From d7479c8a52b5ae8ce721333305ba1b9c27face27 Mon Sep 17 00:00:00 2001 From: Chanho Park Date: Tue, 6 Jan 2015 11:17:11 +0900 Subject: [PATCH] Imported Upstream version 1.3.0 --- AUTHORS | 65 +- ChangeLog | 3354 +++++ HACKING | 10 +- Makefile.am | 6 +- Makefile.in | 530 +- NEWS | 528 + README | 65 +- acinclude.m4 | 10 +- aclocal.m4 | 1133 +- augeas.pc.in | 2 +- augeas.spec | 36 +- augeas.spec.in | 34 +- build/ac-aux/compile | 347 + build/{aux => ac-aux}/config.guess | 1231 +- build/{aux => ac-aux}/config.rpath | 4 +- build/{aux => ac-aux}/config.sub | 538 +- build/{aux => ac-aux}/depcomp | 531 +- build/ac-aux/gitlog-to-changelog | 407 + build/{aux => ac-aux}/install-sh | 35 +- build/{aux => ac-aux}/ltmain.sh | 95 +- build/ac-aux/missing | 215 + build/{aux => ac-aux}/move-if-change | 18 +- build/ac-aux/snippet/_Noreturn.h | 10 + build/{aux => ac-aux/snippet}/arg-nonnull.h | 2 +- build/{aux => ac-aux/snippet}/c++defs.h | 2 +- build/{aux => ac-aux/snippet}/unused-parameter.h | 2 +- build/{aux => ac-aux/snippet}/warn-on-use.h | 2 +- build/ac-aux/test-driver | 127 + build/ac-aux/ylwrap | 249 + build/aux/gitlog-to-changelog | 191 - build/aux/missing | 376 - build/aux/ylwrap | 222 - config.h.in | 341 +- configure | 12227 +++++++++++++------ configure.ac | 19 +- doc/Makefile.in | 415 +- doc/lenses.tex | 10 +- doc/naturaldocs/Makefile.in | 226 +- doc/naturaldocs/conf/c_api/Menu.txt | 4 +- doc/naturaldocs/conf/lenses/Menu.txt | 165 +- doc/naturaldocs/conf/lenses/Menu_Backup.txt | 153 + doc/syntax/augeas.vim | 8 +- examples/Makefile.in | 351 +- gnulib/lib/Makefile.am | 1005 +- gnulib/lib/Makefile.in | 1489 ++- gnulib/lib/alloca.c | 33 +- gnulib/lib/alloca.in.h | 15 +- gnulib/lib/argz.c | 5 +- gnulib/lib/argz.in.h | 2 +- gnulib/lib/asnprintf.c | 5 +- gnulib/lib/asprintf.c | 5 +- gnulib/lib/btowc.c | 2 +- gnulib/lib/canonicalize-lgpl.c | 34 +- gnulib/lib/config.charset | 7 +- gnulib/lib/ctype.in.h | 15 +- gnulib/lib/dosname.h | 2 +- gnulib/lib/errno.in.h | 185 +- gnulib/{tests => lib}/fcntl.in.h | 53 +- gnulib/lib/float+.h | 5 +- gnulib/lib/float.c | 33 + gnulib/lib/float.in.h | 137 +- gnulib/lib/fnmatch.c | 15 +- gnulib/lib/fnmatch.in.h | 17 +- gnulib/lib/fnmatch_loop.c | 27 +- gnulib/lib/getdelim.c | 6 +- gnulib/lib/getfilecon.c | 5 +- gnulib/lib/getline.c | 6 +- gnulib/lib/getopt.c | 159 +- gnulib/lib/getopt.in.h | 64 +- gnulib/lib/getopt1.c | 6 +- gnulib/lib/getopt_int.h | 16 +- gnulib/lib/gettext.h | 14 +- gnulib/lib/gettimeofday.c | 154 + gnulib/lib/isblank.c | 2 +- gnulib/lib/itold.c | 28 + gnulib/lib/langinfo.in.h | 15 +- gnulib/lib/localcharset.c | 35 +- gnulib/lib/localcharset.h | 5 +- gnulib/lib/locale.in.h | 119 +- gnulib/lib/localeconv.c | 103 + gnulib/lib/lstat.c | 18 +- gnulib/lib/malloc.c | 10 +- gnulib/lib/malloca.c | 15 +- gnulib/lib/malloca.h | 5 +- gnulib/lib/mbrtowc.c | 26 +- gnulib/lib/mbsinit.c | 2 +- gnulib/lib/mbsrtowcs-impl.h | 2 +- gnulib/lib/mbsrtowcs-state.c | 4 +- gnulib/lib/mbsrtowcs.c | 2 +- gnulib/lib/mbtowc-impl.h | 2 +- gnulib/lib/mbtowc.c | 2 +- gnulib/lib/memchr.c | 2 +- gnulib/lib/mempcpy.c | 5 +- gnulib/lib/mkstemp.c | 50 + gnulib/lib/nl_langinfo.c | 5 +- gnulib/lib/pathmax.h | 55 +- gnulib/lib/printf-args.c | 5 +- gnulib/lib/printf-args.h | 5 +- gnulib/lib/printf-parse.c | 9 +- gnulib/lib/printf-parse.h | 5 +- gnulib/lib/rawmemchr.c | 136 + gnulib/lib/rawmemchr.valgrind | 12 + gnulib/lib/readlink.c | 2 +- gnulib/lib/realloc.c | 16 +- gnulib/lib/ref-add.sin | 5 +- gnulib/lib/ref-del.sin | 5 +- gnulib/lib/regcomp.c | 207 +- gnulib/lib/regex.c | 18 +- gnulib/lib/regex.h | 229 +- gnulib/lib/regex_internal.c | 65 +- gnulib/lib/regex_internal.h | 63 +- gnulib/lib/regexec.c | 156 +- gnulib/lib/safe-alloc.c | 2 +- gnulib/lib/safe-alloc.h | 2 +- gnulib/lib/se-selinux.in.h | 8 +- gnulib/lib/size_max.h | 5 +- gnulib/lib/stat.c | 39 +- gnulib/lib/stdbool.in.h | 5 +- gnulib/lib/stddef.in.h | 19 +- gnulib/lib/stdint.in.h | 196 +- gnulib/lib/stdio.in.h | 373 +- gnulib/lib/stdlib.in.h | 223 +- gnulib/lib/stpcpy.c | 2 +- gnulib/lib/stpncpy.c | 2 +- gnulib/lib/str-two-way.h | 5 +- gnulib/lib/strchrnul.c | 142 + gnulib/lib/strchrnul.valgrind | 12 + gnulib/lib/streq.h | 10 +- gnulib/lib/string.in.h | 87 +- gnulib/lib/strndup.c | 5 +- gnulib/lib/strnlen.c | 5 +- gnulib/lib/strnlen1.c | 2 +- gnulib/lib/strnlen1.h | 5 +- gnulib/lib/strstr.c | 5 +- gnulib/lib/sys_stat.in.h | 128 +- gnulib/lib/sys_time.in.h | 205 + gnulib/lib/sys_types.in.h | 51 + gnulib/lib/sys_wait.in.h | 15 +- gnulib/lib/tempname.c | 309 + gnulib/lib/tempname.h | 50 + gnulib/lib/time.in.h | 9 +- gnulib/lib/unistd.in.h | 398 +- gnulib/lib/vasnprintf.c | 96 +- gnulib/lib/vasnprintf.h | 5 +- gnulib/lib/vasprintf.c | 5 +- gnulib/lib/verify.h | 146 +- gnulib/lib/wchar.in.h | 192 +- gnulib/lib/wcrtomb.c | 2 +- gnulib/lib/wctype.in.h | 50 +- gnulib/lib/xsize.h | 5 +- gnulib/m4/00gnulib.m4 | 2 +- gnulib/m4/alloca.m4 | 82 +- gnulib/m4/argz.m4 | 12 +- gnulib/m4/btowc.m4 | 9 +- gnulib/m4/canonicalize.m4 | 72 +- gnulib/m4/close.m4 | 33 + gnulib/m4/codeset.m4 | 2 +- gnulib/m4/configmake.m4 | 2 +- gnulib/m4/ctype.m4 | 2 +- gnulib/m4/double-slash-root.m4 | 2 +- gnulib/m4/dup2.m4 | 65 +- gnulib/m4/eealloc.m4 | 2 +- gnulib/m4/environ.m4 | 15 +- gnulib/m4/errno_h.m4 | 20 +- gnulib/m4/exponentd.m4 | 116 + gnulib/m4/extensions.m4 | 11 +- gnulib/m4/fcntl-o.m4 | 17 +- gnulib/m4/fcntl_h.m4 | 27 +- gnulib/m4/fdopen.m4 | 47 + gnulib/m4/float_h.m4 | 87 +- gnulib/m4/fnmatch.m4 | 34 +- gnulib/m4/fpieee.m4 | 54 + gnulib/m4/fstat.m4 | 39 + gnulib/m4/getcwd.m4 | 155 + gnulib/m4/getdelim.m4 | 24 +- gnulib/m4/getline.m4 | 27 +- gnulib/m4/getopt.m4 | 357 +- gnulib/m4/getpagesize.m4 | 5 +- gnulib/m4/gettimeofday.m4 | 140 + gnulib/m4/glibc21.m4 | 2 +- gnulib/m4/gnulib-common.m4 | 155 +- gnulib/m4/gnulib-comp.m4 | 801 +- gnulib/m4/include_next.m4 | 54 +- gnulib/m4/intlmacosx.m4 | 14 +- gnulib/m4/intmax_t.m4 | 2 +- gnulib/m4/inttypes-pri.m4 | 42 + gnulib/m4/inttypes.m4 | 157 + gnulib/m4/inttypes_h.m4 | 2 +- gnulib/m4/isblank.m4 | 5 +- gnulib/m4/langinfo_h.m4 | 2 +- gnulib/m4/largefile.m4 | 149 + gnulib/m4/lcmessage.m4 | 2 +- gnulib/m4/lib-ld.m4 | 2 +- gnulib/m4/lib-link.m4 | 2 +- gnulib/m4/lib-prefix.m4 | 2 +- gnulib/m4/libtool.m4 | 277 +- gnulib/m4/localcharset.m4 | 2 +- gnulib/m4/locale-fr.m4 | 28 +- gnulib/m4/locale-ja.m4 | 17 +- gnulib/m4/locale-tr.m4 | 14 +- gnulib/m4/locale-zh.m4 | 20 +- gnulib/m4/locale_h.m4 | 63 +- gnulib/m4/localeconv.m4 | 22 + gnulib/m4/localename.m4 | 2 +- gnulib/m4/lock.m4 | 6 +- gnulib/m4/longlong.m4 | 8 +- gnulib/m4/lstat.m4 | 62 +- gnulib/m4/ltoptions.m4 | 19 +- gnulib/m4/ltversion.m4 | 10 +- gnulib/m4/malloc.m4 | 52 +- gnulib/m4/malloca.m4 | 2 +- gnulib/m4/mbrtowc.m4 | 28 +- gnulib/m4/mbsinit.m4 | 25 +- gnulib/m4/mbsrtowcs.m4 | 26 +- gnulib/m4/mbstate_t.m4 | 2 +- gnulib/m4/mbtowc.m4 | 8 +- gnulib/m4/memchr.m4 | 22 +- gnulib/m4/mempcpy.m4 | 7 +- gnulib/m4/mkstemp.m4 | 82 + gnulib/m4/mmap-anon.m4 | 14 +- gnulib/m4/mode_t.m4 | 2 +- gnulib/m4/msvc-inval.m4 | 19 + gnulib/m4/msvc-nothrow.m4 | 10 + gnulib/m4/multiarch.m4 | 6 +- gnulib/m4/nl_langinfo.m4 | 6 +- gnulib/m4/nocrash.m4 | 130 + gnulib/m4/off_t.m4 | 18 + gnulib/m4/onceonly.m4 | 25 +- gnulib/m4/open.m4 | 35 +- gnulib/m4/pathmax.m4 | 35 +- gnulib/m4/printf.m4 | 175 +- gnulib/m4/putenv.m4 | 23 +- gnulib/m4/rawmemchr.m4 | 20 + gnulib/m4/readlink.m4 | 39 +- gnulib/m4/realloc.m4 | 52 +- gnulib/m4/regex.m4 | 11 +- gnulib/m4/safe-alloc.m4 | 7 +- gnulib/m4/selinux-context-h.m4 | 5 +- gnulib/m4/selinux-selinux-h.m4 | 5 +- gnulib/m4/setenv.m4 | 77 +- gnulib/m4/setlocale.m4 | 16 +- gnulib/m4/size_max.m4 | 2 +- gnulib/m4/ssize_t.m4 | 2 +- gnulib/m4/stat.m4 | 29 +- gnulib/m4/stdbool.m4 | 5 +- gnulib/m4/stddef_h.m4 | 8 +- gnulib/m4/stdint.m4 | 19 +- gnulib/m4/stdint_h.m4 | 2 +- gnulib/m4/stdio_h.m4 | 71 +- gnulib/m4/stdlib_h.m4 | 21 +- gnulib/m4/stpcpy.m4 | 7 +- gnulib/m4/stpncpy.m4 | 31 +- gnulib/m4/strchrnul.m4 | 50 + gnulib/m4/string_h.m4 | 15 +- gnulib/m4/strndup.m4 | 20 +- gnulib/m4/strnlen.m4 | 12 +- gnulib/m4/strstr.m4 | 37 +- gnulib/m4/symlink.m4 | 24 +- gnulib/m4/sys_socket_h.m4 | 177 + gnulib/m4/sys_stat_h.m4 | 23 +- gnulib/m4/sys_time_h.m4 | 110 + gnulib/m4/sys_types_h.m4 | 24 + gnulib/m4/sys_wait_h.m4 | 7 +- gnulib/m4/tempname.m4 | 19 + gnulib/m4/thread.m4 | 2 +- gnulib/m4/threadlib.m4 | 84 +- gnulib/m4/time_h.m4 | 6 +- gnulib/m4/unistd_h.m4 | 125 +- gnulib/m4/vasnprintf.m4 | 13 +- gnulib/m4/vasprintf.m4 | 2 +- gnulib/m4/warn-on-use.m4 | 14 +- gnulib/m4/wchar_h.m4 | 11 +- gnulib/m4/wchar_t.m4 | 2 +- gnulib/m4/wcrtomb.m4 | 25 +- gnulib/m4/wctob.m4 | 20 +- gnulib/m4/wctomb.m4 | 8 +- gnulib/m4/wctype_h.m4 | 55 +- gnulib/m4/wint_t.m4 | 2 +- gnulib/m4/xsize.m4 | 2 +- gnulib/m4/yield.m4 | 2 +- gnulib/tests/Makefile.am | 542 +- gnulib/tests/Makefile.in | 2340 +++- gnulib/tests/binary-io.h | 43 +- gnulib/tests/c-ctype.c | 5 +- gnulib/tests/c-ctype.h | 39 +- gnulib/tests/c-strcase.h | 10 +- gnulib/tests/c-strcasecmp.c | 5 +- gnulib/tests/c-strncasecmp.c | 5 +- gnulib/tests/close.c | 69 + gnulib/tests/dup2.c | 73 +- gnulib/tests/fd-hook.c | 116 + gnulib/tests/fd-hook.h | 119 + gnulib/tests/fdopen.c | 69 + gnulib/tests/fpucw.h | 108 + gnulib/tests/fstat.c | 88 + gnulib/tests/getcwd-lgpl.c | 125 + gnulib/tests/getpagesize.c | 4 +- gnulib/tests/glthread/lock.c | 7 +- gnulib/tests/glthread/lock.h | 20 +- gnulib/tests/glthread/thread.c | 21 +- gnulib/tests/glthread/thread.h | 46 +- gnulib/tests/glthread/threadlib.c | 5 +- gnulib/tests/glthread/yield.h | 10 +- gnulib/tests/ignore-value.h | 17 +- gnulib/tests/init.sh | 147 +- gnulib/tests/intprops.h | 305 +- gnulib/tests/inttypes.in.h | 1130 ++ gnulib/tests/localename.c | 108 +- gnulib/tests/localename.h | 20 +- gnulib/tests/macros.h | 11 +- gnulib/tests/msvc-inval.c | 129 + gnulib/tests/msvc-inval.h | 222 + gnulib/tests/msvc-nothrow.c | 49 + gnulib/tests/msvc-nothrow.h | 43 + gnulib/tests/open.c | 22 +- gnulib/tests/putenv.c | 14 +- gnulib/tests/same-inode.h | 16 +- gnulib/tests/setenv.c | 20 +- gnulib/tests/setlocale.c | 4 +- gnulib/tests/signature.h | 2 +- gnulib/tests/symlink.c | 2 +- gnulib/tests/test-alloca-opt.c | 4 +- gnulib/tests/test-binary-io.c | 37 +- gnulib/tests/test-binary-io.sh | 7 +- gnulib/tests/test-btowc.c | 2 +- gnulib/tests/test-c-ctype.c | 2 +- gnulib/tests/test-c-strcasecmp.c | 2 +- gnulib/tests/test-c-strncasecmp.c | 2 +- gnulib/tests/test-canonicalize-lgpl.c | 2 +- gnulib/tests/test-close.c | 44 + gnulib/tests/test-ctype.c | 2 +- gnulib/tests/test-dup2.c | 13 +- gnulib/tests/test-environ.c | 2 +- gnulib/tests/test-errno.c | 4 +- gnulib/tests/test-fcntl-h.c | 89 +- gnulib/tests/test-fdopen.c | 54 + gnulib/tests/test-fgetc.c | 95 + gnulib/tests/test-float.c | 384 + gnulib/tests/test-fnmatch.c | 8 +- gnulib/tests/test-fputc.c | 89 + gnulib/tests/test-fread.c | 98 + gnulib/tests/test-fstat.c | 48 + gnulib/tests/test-fwrite.c | 92 + gnulib/tests/test-getcwd-lgpl.c | 102 + gnulib/tests/test-getdelim.c | 5 +- gnulib/tests/test-getline.c | 5 +- gnulib/tests/test-getopt.c | 2 +- gnulib/tests/test-getopt.h | 24 +- gnulib/tests/test-getopt_long.h | 21 +- gnulib/tests/test-gettimeofday.c | 47 + gnulib/tests/test-ignore-value.c | 4 +- gnulib/tests/test-init.sh | 73 + gnulib/tests/test-intprops.c | 275 + gnulib/tests/test-inttypes.c | 118 + gnulib/tests/test-isblank.c | 2 +- gnulib/tests/test-langinfo.c | 2 +- gnulib/tests/test-locale.c | 32 +- gnulib/tests/test-localeconv.c | 72 + gnulib/tests/test-localename.c | 4 +- gnulib/tests/test-lock.c | 78 +- gnulib/tests/test-lstat.c | 2 +- gnulib/tests/test-lstat.h | 2 +- gnulib/tests/test-malloc-gnu.c | 2 +- gnulib/tests/test-malloca.c | 4 +- gnulib/tests/test-mbrtowc-w32.c | 2 +- gnulib/tests/test-mbrtowc.c | 2 +- gnulib/tests/test-mbsinit.c | 2 +- gnulib/tests/test-mbsrtowcs.c | 2 +- gnulib/tests/test-memchr.c | 2 +- gnulib/tests/test-nl_langinfo.c | 2 +- gnulib/tests/test-open.c | 2 +- gnulib/tests/test-open.h | 8 +- gnulib/tests/test-pathmax.c | 32 + gnulib/tests/test-rawmemchr.c | 92 + gnulib/tests/test-readlink.c | 2 +- gnulib/tests/test-readlink.h | 2 +- gnulib/tests/test-safe-alloc.c | 5 +- gnulib/tests/test-setenv.c | 2 +- gnulib/tests/test-setlocale1.c | 2 +- gnulib/tests/test-setlocale2.c | 2 +- gnulib/tests/test-setlocale2.sh | 6 +- gnulib/tests/test-stat.c | 3 +- gnulib/tests/test-stat.h | 6 +- gnulib/tests/test-stdbool.c | 2 +- gnulib/tests/test-stddef.c | 2 +- gnulib/tests/test-stdint.c | 4 +- gnulib/tests/test-stdio.c | 2 +- gnulib/tests/test-stdlib.c | 2 +- gnulib/tests/test-strchrnul.c | 86 + gnulib/tests/test-string.c | 2 +- gnulib/tests/test-strnlen.c | 2 +- gnulib/tests/test-strstr.c | 2 +- gnulib/tests/test-symlink.c | 2 +- gnulib/tests/test-symlink.h | 2 +- gnulib/tests/test-sys_stat.c | 47 +- gnulib/tests/test-sys_time.c | 33 + gnulib/tests/test-sys_types.c | 34 + gnulib/tests/test-sys_wait.c | 2 +- gnulib/tests/test-sys_wait.h | 2 +- gnulib/tests/test-thread_create.c | 78 + gnulib/tests/test-thread_self.c | 34 + gnulib/tests/test-time.c | 10 +- gnulib/tests/test-unistd.c | 2 +- gnulib/tests/test-unsetenv.c | 2 +- gnulib/tests/test-vasnprintf.c | 2 +- gnulib/tests/test-vasprintf.c | 2 +- gnulib/tests/test-verify.c | 6 +- gnulib/tests/test-wchar.c | 2 +- gnulib/tests/test-wcrtomb-w32.c | 2 +- gnulib/tests/test-wcrtomb.c | 2 +- gnulib/tests/test-wctype-h.c | 2 +- gnulib/tests/unsetenv.c | 11 +- gnulib/tests/wctob.c | 2 +- gnulib/tests/wctomb-impl.h | 2 +- gnulib/tests/wctomb.c | 2 +- gnulib/tests/zerosize-ptr.h | 2 +- lenses/access.aug | 10 +- lenses/activemq_conf.aug | 61 + lenses/activemq_xml.aug | 41 + lenses/aliases.aug | 6 +- lenses/anacron.aug | 87 + lenses/approx.aug | 2 +- lenses/apt_update_manager.aug | 47 + lenses/aptcacherngsecurity.aug | 25 + lenses/aptconf.aug | 2 +- lenses/aptpreferences.aug | 90 +- lenses/aptsources.aug | 22 +- lenses/authorized_keys.aug | 70 + lenses/automaster.aug | 125 + lenses/automounter.aug | 131 + lenses/avahi.aug | 45 + lenses/backuppchosts.aug | 2 +- lenses/bbhosts.aug | 64 +- lenses/bootconf.aug | 130 + lenses/build.aug | 242 +- lenses/cachefilesd.aug | 89 + lenses/carbon.aug | 54 + lenses/cgconfig.aug | 9 +- lenses/cgrules.aug | 2 +- lenses/channels.aug | 155 + lenses/chrony.aug | 266 + lenses/cobblersettings.aug | 2 +- lenses/collectd.aug | 36 + lenses/cpanel.aug | 39 + lenses/cron.aug | 13 +- lenses/crypttab.aug | 6 +- lenses/cups.aug | 27 + lenses/cyrus_imapd.aug | 49 + lenses/darkice.aug | 1 - lenses/debctrl.aug | 16 +- lenses/desktop.aug | 6 +- lenses/device_map.aug | 4 +- lenses/dhclient.aug | 22 +- lenses/dhcpd.aug | 203 +- lenses/dnsmasq.aug | 1 - lenses/dovecot.aug | 133 + lenses/dput.aug | 3 +- lenses/erlang.aug | 161 + lenses/exports.aug | 2 +- lenses/fai_diskconfig.aug | 9 +- lenses/fonts.aug | 37 + lenses/fstab.aug | 12 +- lenses/fuse.aug | 45 + lenses/gdm.aug | 4 +- lenses/group.aug | 18 +- lenses/grub.aug | 53 +- lenses/gshadow.aug | 80 + lenses/gtkbookmarks.aug | 36 + lenses/host_conf.aug | 2 +- lenses/hostname.aug | 2 +- lenses/hosts_access.aug | 87 +- lenses/htpasswd.aug | 41 + lenses/httpd.aug | 39 +- lenses/inetd.aug | 2 +- lenses/inifile.aug | 286 +- lenses/inputrc.aug | 57 + lenses/interfaces.aug | 39 +- lenses/iproute2.aug | 10 + lenses/iptables.aug | 1 + lenses/jaas.aug | 28 + lenses/jettyrealm.aug | 56 + lenses/jmxaccess.aug | 58 + lenses/jmxpassword.aug | 56 + lenses/json.aug | 6 +- lenses/kdump.aug | 66 +- lenses/keepalived.aug | 175 +- lenses/known_hosts.aug | 50 + lenses/koji.aug | 40 + lenses/krb5.aug | 64 +- lenses/ldif.aug | 227 + lenses/ldso.aug | 44 + lenses/lightdm.aug | 56 + lenses/login_defs.aug | 4 +- lenses/logrotate.aug | 128 +- lenses/logwatch.aug | 46 + lenses/lvm.aug | 75 + lenses/mcollective.aug | 39 + lenses/mdadm_conf.aug | 5 +- lenses/memcached.aug | 47 + lenses/mke2fs.aug | 8 +- lenses/modprobe.aug | 19 +- lenses/modules.aug | 7 +- lenses/modules_conf.aug | 3 +- lenses/mongodbserver.aug | 53 + lenses/monit.aug | 2 +- lenses/multipath.aug | 50 +- lenses/mysql.aug | 12 +- lenses/nagioscfg.aug | 76 +- lenses/nagiosobjects.aug | 18 +- lenses/netmasks.aug | 65 + lenses/networkmanager.aug | 63 + lenses/networks.aug | 6 +- lenses/nginx.aug | 64 + lenses/nrpe.aug | 31 +- lenses/nsswitch.aug | 36 +- lenses/ntp.aug | 16 +- lenses/ntpd.aug | 157 + lenses/openshift_config.aug | 75 + lenses/openshift_http.aug | 36 + lenses/openshift_quickstarts.aug | 46 + lenses/openvpn.aug | 33 +- lenses/pagekite.aug | 76 + lenses/pam.aug | 61 +- lenses/pamconf.aug | 53 + lenses/passwd.aug | 82 +- lenses/pbuilder.aug | 2 +- lenses/pg_hba.aug | 21 +- lenses/php.aug | 7 +- lenses/phpvars.aug | 28 +- lenses/postfix_main.aug | 3 +- lenses/postfix_master.aug | 7 +- lenses/postfix_transport.aug | 60 + lenses/postfix_virtual.aug | 56 + lenses/postgresql.aug | 75 + lenses/properties.aug | 53 +- lenses/protocols.aug | 47 + lenses/puppet.aug | 4 +- lenses/puppet_auth.aug | 71 + lenses/puppetfileserver.aug | 6 +- lenses/pythonpaste.aug | 54 + lenses/qpid.aug | 32 + lenses/quote.aug | 264 + lenses/rabbitmq.aug | 108 + lenses/redis.aug | 124 + lenses/reprepro_uploaders.aug | 2 +- lenses/resolv.aug | 28 +- lenses/rmt.aug | 30 + lenses/rsyslog.aug | 66 + lenses/rx.aug | 67 +- lenses/samba.aug | 5 +- lenses/schroot.aug | 9 +- lenses/sep.aug | 22 +- lenses/services.aug | 12 +- lenses/shadow.aug | 72 + lenses/shells.aug | 6 +- lenses/shellvars.aug | 236 +- lenses/shellvars_list.aug | 27 +- lenses/simplelines.aug | 47 + lenses/simplevars.aug | 51 + lenses/sip_conf.aug | 57 + lenses/slapd.aug | 18 +- lenses/smbusers.aug | 34 + lenses/solaris_system.aug | 3 +- lenses/soma.aug | 4 +- lenses/spacevars.aug | 3 +- lenses/splunk.aug | 41 + lenses/squid.aug | 4 +- lenses/ssh.aug | 85 +- lenses/sshd.aug | 54 +- lenses/sssd.aug | 39 + lenses/stunnel.aug | 1 - lenses/subversion.aug | 96 + lenses/sudoers.aug | 67 +- lenses/sysconfig.aug | 64 +- lenses/sysconfig_route.aug | 78 + lenses/sysctl.aug | 46 +- lenses/syslog.aug | 32 +- lenses/systemd.aug | 176 + lenses/tests/test_access.aug | 15 + lenses/tests/test_activemq_conf.aug | 35 + lenses/tests/test_activemq_xml.aug | 65 + lenses/tests/test_aliases.aug | 14 + lenses/tests/test_anacron.aug | 39 + lenses/tests/test_apt_update_manager.aug | 41 + lenses/tests/test_aptcacherngsecurity.aug | 34 + lenses/tests/test_aptpreferences.aug | 11 +- lenses/tests/test_authorized_keys.aug | 117 + lenses/tests/test_automaster.aug | 64 + lenses/tests/test_automounter.aug | 171 + lenses/tests/test_avahi.aug | 34 + lenses/tests/test_bbhosts.aug | 39 +- lenses/tests/test_bootconf.aug | 47 + lenses/tests/test_build.aug | 319 + lenses/tests/test_cachefilesd.aug | 30 + lenses/tests/test_carbon.aug | 84 + lenses/tests/test_cgconfig.aug | 65 + lenses/tests/test_channels.aug | 138 + lenses/tests/test_chrony.aug | 143 + lenses/tests/test_collectd.aug | 65 + lenses/tests/test_cpanel.aug | 48 + lenses/tests/test_cups.aug | 495 + lenses/tests/test_cyrus_imapd.aug | 37 + lenses/tests/test_debctrl.aug | 227 + lenses/tests/test_desktop.aug | 14 + lenses/tests/test_device_map.aug | 2 +- lenses/tests/test_dhclient.aug | 17 + lenses/tests/test_dhcpd.aug | 233 +- lenses/tests/test_dovecot.aug | 886 ++ lenses/tests/test_erlang.aug | 78 + lenses/tests/test_exports.aug | 4 + lenses/tests/test_fonts.aug | 809 ++ lenses/tests/test_fstab.aug | 39 + lenses/tests/test_fuse.aug | 22 + lenses/tests/test_group.aug | 9 + lenses/tests/test_grub.aug | 32 +- lenses/tests/test_gshadow.aug | 18 + lenses/tests/test_gtkbookmarks.aug | 25 + lenses/tests/test_hosts_access.aug | 123 + lenses/tests/test_htpasswd.aug | 19 + lenses/tests/test_httpd.aug | 65 + lenses/tests/test_inetd.aug | 11 + lenses/tests/test_inifile.aug | 98 + lenses/tests/test_inputrc.aug | 171 + lenses/tests/test_interfaces.aug | 49 +- lenses/tests/test_iproute2.aug | 63 + lenses/tests/test_iptables.aug | 16 + lenses/tests/test_jaas.aug | 112 + lenses/tests/test_jettyrealm.aug | 51 + lenses/tests/test_jmxaccess.aug | 35 + lenses/tests/test_jmxpassword.aug | 35 + lenses/tests/test_json.aug | 8 + lenses/tests/test_kdump.aug | 99 +- lenses/tests/test_keepalived.aug | 144 +- lenses/tests/test_known_hosts.aug | 20 + lenses/tests/test_koji.aug | 65 + lenses/tests/test_krb5.aug | 103 +- lenses/tests/test_ldif.aug | 150 + lenses/tests/test_ldso.aug | 26 + lenses/tests/test_lightdm.aug | 125 + lenses/tests/test_logrotate.aug | 87 +- lenses/tests/test_logwatch.aug | 15 + lenses/tests/test_lvm.aug | 253 + lenses/tests/test_mcollective.aug | 53 + lenses/tests/test_memcached.aug | 43 + lenses/tests/test_mke2fs.aug | 8 + lenses/tests/test_modprobe.aug | 43 +- lenses/tests/test_mongodbserver.aug | 31 + lenses/tests/test_multipath.aug | 6 +- lenses/tests/test_mysql.aug | 58 +- lenses/tests/test_nagioscfg.aug | 17 + lenses/tests/test_nagiosobjects.aug | 16 + lenses/tests/test_netmasks.aug | 26 + lenses/tests/test_networkmanager.aug | 68 + lenses/tests/test_networks.aug | 21 + lenses/tests/test_nginx.aug | 92 + lenses/tests/test_ntp.aug | 5 + lenses/tests/test_ntpd.aug | 80 + lenses/tests/test_odbc.aug | 4 +- lenses/tests/test_openshift_config.aug | 101 + lenses/tests/test_openshift_http.aug | 71 + lenses/tests/test_openshift_quickstarts.aug | 317 + lenses/tests/test_openvpn.aug | 19 + lenses/tests/test_pagekite.aug | 105 + lenses/tests/test_pam.aug | 14 +- lenses/tests/test_pamconf.aug | 35 + lenses/tests/test_passwd.aug | 14 + lenses/tests/test_pg_hba.aug | 72 +- lenses/tests/test_php.aug | 63 +- lenses/tests/test_phpvars.aug | 25 +- lenses/tests/test_postfix_main.aug | 5 +- lenses/tests/test_postfix_master.aug | 17 + lenses/tests/test_postfix_transport.aug | 54 + lenses/tests/test_postfix_virtual.aug | 46 + lenses/tests/test_postgresql.aug | 245 + lenses/tests/test_properties.aug | 129 +- lenses/tests/test_protocols.aug | 53 + lenses/tests/test_puppet_auth.aug | 43 + lenses/tests/test_pythonpaste.aug | 41 + lenses/tests/test_qpid.aug | 48 + lenses/tests/test_quote.aug | 369 + lenses/tests/test_rabbitmq.aug | 92 + lenses/tests/test_redis.aug | 181 + lenses/tests/test_resolv.aug | 13 +- lenses/tests/test_rmt.aug | 38 + lenses/tests/test_rsyslog.aug | 142 + lenses/tests/test_rx.aug | 44 + lenses/tests/test_samba.aug | 24 +- lenses/tests/test_services.aug | 14 + lenses/tests/test_shadow.aug | 45 + lenses/tests/test_shells.aug | 3 + lenses/tests/test_shellvars.aug | 350 +- lenses/tests/test_shellvars_list.aug | 14 + lenses/tests/test_simplelines.aug | 42 + lenses/tests/test_simplevars.aug | 36 + lenses/tests/test_sip_conf.aug | 113 + lenses/tests/test_slapd.aug | 55 +- lenses/tests/test_smbusers.aug | 29 + lenses/tests/test_splunk.aug | 158 + lenses/tests/test_ssh.aug | 7 + lenses/tests/test_sshd.aug | 60 + lenses/tests/test_sssd.aug | 45 + lenses/tests/test_subversion.aug | 118 + lenses/tests/test_sudoers.aug | 105 +- lenses/tests/test_sysconfig.aug | 101 +- lenses/tests/test_sysconfig_route.aug | 15 + lenses/tests/test_sysctl.aug | 15 +- lenses/tests/test_syslog.aug | 46 +- lenses/tests/test_systemd.aug | 346 + lenses/tests/test_thttpd.aug | 45 + lenses/tests/test_tuned.aug | 13 + lenses/tests/test_up2date.aug | 209 + lenses/tests/test_updatedb.aug | 32 + lenses/tests/test_vfstab.aug | 88 + lenses/tests/test_vmware_config.aug | 49 + lenses/tests/test_xinetd.aug | 13 +- lenses/tests/test_xml.aug | 57 +- lenses/tests/test_xorg.aug | 15 +- lenses/tests/test_xymon.aug | 162 + lenses/tests/test_xymon_alerting.aug | 289 + lenses/tests/test_yum.aug | 50 +- lenses/thttpd.aug | 48 + lenses/tuned.aug | 21 + lenses/up2date.aug | 84 + lenses/updatedb.aug | 49 + lenses/util.aug | 58 +- lenses/vfstab.aug | 67 + lenses/vmware_config.aug | 34 + lenses/vsftpd.aug | 2 +- lenses/webmin.aug | 4 +- lenses/xendconfsxp.aug | 2 +- lenses/xinetd.aug | 74 +- lenses/xml.aug | 55 +- lenses/xorg.aug | 28 +- lenses/xymon.aug | 55 + lenses/xymon_alerting.aug | 199 + lenses/yum.aug | 74 +- man/Makefile.in | 264 +- man/augparse.1 | 11 +- man/augparse.pod | 6 +- man/augtool.1 | 226 +- man/augtool.pod | 196 +- src/Makefile.am | 4 +- src/Makefile.in | 459 +- src/augeas.c | 486 +- src/augeas.h | 95 +- src/augeas_sym.version | 14 + src/augparse.c | 7 +- src/augrun.c | 528 +- src/augtool.c | 190 +- src/builtin.c | 29 +- src/errcode.h | 4 + src/fa.c | 82 + src/fa.h | 13 + src/fa_sym.version | 4 + src/get.c | 285 +- src/internal.c | 20 +- src/internal.h | 22 +- src/jmt.c | 10 +- src/lens.c | 197 +- src/lens.h | 14 +- src/parser.c | 558 +- src/parser.h | 19 +- src/pathx.c | 112 +- src/put.c | 74 +- src/regexp.c | 63 +- src/syntax.c | 65 +- src/syntax.h | 6 +- src/transform.c | 432 +- src/transform.h | 12 + src/try | 8 +- tests/Makefile.am | 104 +- tests/Makefile.in | 2496 +++- tests/cutest.c | 10 + tests/cutest.h | 4 + tests/fatest.c | 43 + tests/leak.c | 46 + tests/lens-activemq_conf.sh | 16 + tests/lens-activemq_xml.sh | 16 + tests/lens-anacron.sh | 16 + tests/lens-apt_update_manager.sh | 16 + tests/lens-aptcacherngsecurity.sh | 16 + tests/lens-authorized_keys.sh | 16 + tests/lens-automaster.sh | 16 + tests/lens-automounter.sh | 16 + tests/lens-avahi.sh | 16 + tests/lens-bootconf.sh | 16 + tests/lens-build.sh | 16 + tests/lens-cachefilesd.sh | 16 + tests/lens-carbon.sh | 16 + tests/lens-channels.sh | 16 + tests/lens-chrony.sh | 16 + tests/lens-collectd.sh | 16 + tests/lens-cpanel.sh | 16 + tests/lens-cups.sh | 16 + tests/lens-cyrus_imapd.sh | 16 + tests/lens-dovecot.sh | 16 + tests/lens-erlang.sh | 16 + tests/lens-fonts.sh | 16 + tests/lens-fuse.sh | 16 + tests/lens-gshadow.sh | 16 + tests/lens-gtkbookmarks.sh | 16 + tests/lens-htpasswd.sh | 16 + tests/lens-inputrc.sh | 16 + tests/lens-iproute2.sh | 16 + tests/lens-jaas.sh | 16 + tests/lens-jettyrealm.sh | 16 + tests/lens-jmxaccess.sh | 16 + tests/lens-jmxpassword.sh | 16 + tests/lens-known_hosts.sh | 16 + tests/lens-koji.sh | 16 + tests/lens-ldif.sh | 16 + tests/lens-ldso.sh | 16 + tests/lens-lightdm.sh | 16 + tests/lens-logwatch.sh | 16 + tests/lens-lvm.sh | 16 + tests/lens-mcollective.sh | 16 + tests/lens-memcached.sh | 16 + tests/lens-mongodbserver.sh | 16 + tests/lens-netmasks.sh | 16 + tests/lens-networkmanager.sh | 16 + tests/lens-nginx.sh | 16 + tests/lens-ntpd.sh | 16 + tests/lens-openshift_config.sh | 16 + tests/lens-openshift_http.sh | 16 + tests/lens-openshift_quickstarts.sh | 16 + tests/lens-pagekite.sh | 16 + tests/lens-pamconf.sh | 16 + tests/lens-postfix_transport.sh | 16 + tests/lens-postfix_virtual.sh | 16 + tests/lens-postgresql.sh | 16 + tests/lens-protocols.sh | 16 + tests/lens-puppet_auth.sh | 16 + tests/lens-pythonpaste.sh | 16 + tests/lens-qpid.sh | 16 + tests/lens-quote.sh | 16 + tests/lens-rabbitmq.sh | 16 + tests/lens-redis.sh | 16 + tests/lens-rmt.sh | 16 + tests/lens-rsyslog.sh | 16 + tests/lens-shadow.sh | 16 + tests/lens-simplelines.sh | 16 + tests/lens-simplevars.sh | 16 + tests/lens-sip_conf.sh | 16 + tests/lens-smbusers.sh | 16 + tests/lens-splunk.sh | 16 + tests/lens-sssd.sh | 16 + tests/lens-subversion.sh | 16 + tests/lens-sysconfig_route.sh | 16 + tests/lens-systemd.sh | 16 + tests/lens-thttpd.sh | 16 + tests/lens-tuned.sh | 16 + tests/lens-up2date.sh | 16 + tests/lens-updatedb.sh | 16 + tests/lens-vfstab.sh | 16 + tests/lens-vmware_config.sh | 16 + tests/lens-xymon.sh | 16 + tests/lens-xymon_alerting.sh | 16 + tests/modules/fail_shadow_union.aug | 2 +- tests/modules/fail_square_consistency.aug | 6 + tests/modules/fail_square_consistency_del.aug | 6 + tests/modules/fail_square_dup_key.aug | 6 + tests/modules/fail_square_lens_type.aug | 6 + tests/modules/pass_compose_func.aug | 12 +- tests/modules/pass_nocase.aug | 6 + tests/modules/pass_square.aug | 148 +- tests/modules/pass_square_rec.aug | 139 + tests/root/etc/crontab | 2 - tests/root/etc/gshadow | 26 + tests/root/etc/shadow | 19 + tests/root/etc/squirrelmail/config.php | 2 - .../ifcfg-Auto-ALICE-WLAN38_(automatisch) | 0 .../ifcfg-Auto_FRITZ!Box_Fon_WLAN_7112 | 14 + .../etc/sysconfig/network-scripts/ifcfg-lo.rpmsave | 9 + .../network-scripts/ifcfg-weird [!] (used to fail) | 4 + tests/root/lvm.conf~ | 59 + tests/run.tests | 527 +- tests/test-api.c | 191 + tests/test-augtool-modify-root.sh | 2 +- tests/test-augtool.sh | 10 +- tests/test-events-saved.sh | 44 +- tests/test-load.c | 141 +- tests/test-preserve.sh | 18 +- tests/test-put-mount-augnew.sh | 69 + tests/test-put-mount-augsave.sh | 62 + tests/test-put-mount.sh | 55 + tests/test-put-symlink-augnew.sh | 52 + tests/test-put-symlink-augsave.sh | 52 + tests/test-put-symlink-augtemp.sh | 52 + tests/test-put-symlink.sh | 5 + tests/test-run.c | 52 +- tests/test-save-empty.sh | 5 +- tests/test-save.c | 118 + tests/test-xpath.c | 26 +- tests/xpath.tests | 8 + 894 files changed, 63586 insertions(+), 14571 deletions(-) create mode 100755 build/ac-aux/compile rename build/{aux => ac-aux}/config.guess (62%) rename build/{aux => ac-aux}/config.rpath (99%) rename build/{aux => ac-aux}/config.sub (73%) rename build/{aux => ac-aux}/depcomp (50%) create mode 100755 build/ac-aux/gitlog-to-changelog rename build/{aux => ac-aux}/install-sh (94%) rename build/{aux => ac-aux}/ltmain.sh (99%) mode change 100755 => 100644 create mode 100755 build/ac-aux/missing rename build/{aux => ac-aux}/move-if-change (80%) create mode 100644 build/ac-aux/snippet/_Noreturn.h rename build/{aux => ac-aux/snippet}/arg-nonnull.h (95%) rename build/{aux => ac-aux/snippet}/c++defs.h (99%) rename build/{aux => ac-aux/snippet}/unused-parameter.h (96%) rename build/{aux => ac-aux/snippet}/warn-on-use.h (98%) create mode 100755 build/ac-aux/test-driver create mode 100755 build/ac-aux/ylwrap delete mode 100755 build/aux/gitlog-to-changelog delete mode 100755 build/aux/missing delete mode 100755 build/aux/ylwrap create mode 100644 doc/naturaldocs/conf/lenses/Menu_Backup.txt rename gnulib/{tests => lib}/fcntl.in.h (83%) create mode 100644 gnulib/lib/float.c create mode 100644 gnulib/lib/gettimeofday.c create mode 100644 gnulib/lib/itold.c create mode 100644 gnulib/lib/localeconv.c create mode 100644 gnulib/lib/mkstemp.c create mode 100644 gnulib/lib/rawmemchr.c create mode 100644 gnulib/lib/rawmemchr.valgrind create mode 100644 gnulib/lib/strchrnul.c create mode 100644 gnulib/lib/strchrnul.valgrind create mode 100644 gnulib/lib/sys_time.in.h create mode 100644 gnulib/lib/sys_types.in.h create mode 100644 gnulib/lib/tempname.c create mode 100644 gnulib/lib/tempname.h create mode 100644 gnulib/m4/close.m4 create mode 100644 gnulib/m4/exponentd.m4 create mode 100644 gnulib/m4/fdopen.m4 create mode 100644 gnulib/m4/fpieee.m4 create mode 100644 gnulib/m4/fstat.m4 create mode 100644 gnulib/m4/getcwd.m4 create mode 100644 gnulib/m4/gettimeofday.m4 create mode 100644 gnulib/m4/inttypes-pri.m4 create mode 100644 gnulib/m4/inttypes.m4 create mode 100644 gnulib/m4/largefile.m4 create mode 100644 gnulib/m4/localeconv.m4 create mode 100644 gnulib/m4/mkstemp.m4 create mode 100644 gnulib/m4/msvc-inval.m4 create mode 100644 gnulib/m4/msvc-nothrow.m4 create mode 100644 gnulib/m4/nocrash.m4 create mode 100644 gnulib/m4/off_t.m4 create mode 100644 gnulib/m4/rawmemchr.m4 create mode 100644 gnulib/m4/strchrnul.m4 create mode 100644 gnulib/m4/sys_socket_h.m4 create mode 100644 gnulib/m4/sys_time_h.m4 create mode 100644 gnulib/m4/sys_types_h.m4 create mode 100644 gnulib/m4/tempname.m4 create mode 100644 gnulib/tests/close.c create mode 100644 gnulib/tests/fd-hook.c create mode 100644 gnulib/tests/fd-hook.h create mode 100644 gnulib/tests/fdopen.c create mode 100644 gnulib/tests/fpucw.h create mode 100644 gnulib/tests/fstat.c create mode 100644 gnulib/tests/getcwd-lgpl.c create mode 100644 gnulib/tests/inttypes.in.h create mode 100644 gnulib/tests/msvc-inval.c create mode 100644 gnulib/tests/msvc-inval.h create mode 100644 gnulib/tests/msvc-nothrow.c create mode 100644 gnulib/tests/msvc-nothrow.h create mode 100644 gnulib/tests/test-close.c create mode 100644 gnulib/tests/test-fdopen.c create mode 100644 gnulib/tests/test-fgetc.c create mode 100644 gnulib/tests/test-float.c create mode 100644 gnulib/tests/test-fputc.c create mode 100644 gnulib/tests/test-fread.c create mode 100644 gnulib/tests/test-fstat.c create mode 100644 gnulib/tests/test-fwrite.c create mode 100644 gnulib/tests/test-getcwd-lgpl.c create mode 100644 gnulib/tests/test-gettimeofday.c create mode 100755 gnulib/tests/test-init.sh create mode 100644 gnulib/tests/test-intprops.c create mode 100644 gnulib/tests/test-inttypes.c create mode 100644 gnulib/tests/test-localeconv.c create mode 100644 gnulib/tests/test-pathmax.c create mode 100644 gnulib/tests/test-rawmemchr.c create mode 100644 gnulib/tests/test-strchrnul.c create mode 100644 gnulib/tests/test-sys_time.c create mode 100644 gnulib/tests/test-sys_types.c create mode 100644 gnulib/tests/test-thread_create.c create mode 100644 gnulib/tests/test-thread_self.c create mode 100644 lenses/activemq_conf.aug create mode 100644 lenses/activemq_xml.aug create mode 100644 lenses/anacron.aug create mode 100644 lenses/apt_update_manager.aug create mode 100644 lenses/aptcacherngsecurity.aug create mode 100644 lenses/authorized_keys.aug create mode 100644 lenses/automaster.aug create mode 100644 lenses/automounter.aug create mode 100644 lenses/avahi.aug create mode 100644 lenses/bootconf.aug create mode 100644 lenses/cachefilesd.aug create mode 100644 lenses/carbon.aug create mode 100644 lenses/channels.aug create mode 100644 lenses/chrony.aug create mode 100644 lenses/collectd.aug create mode 100644 lenses/cpanel.aug create mode 100644 lenses/cups.aug create mode 100644 lenses/cyrus_imapd.aug create mode 100644 lenses/dovecot.aug create mode 100644 lenses/erlang.aug create mode 100644 lenses/fonts.aug create mode 100644 lenses/fuse.aug create mode 100644 lenses/gshadow.aug create mode 100644 lenses/gtkbookmarks.aug create mode 100644 lenses/htpasswd.aug create mode 100644 lenses/inputrc.aug create mode 100644 lenses/iproute2.aug create mode 100644 lenses/jaas.aug create mode 100644 lenses/jettyrealm.aug create mode 100644 lenses/jmxaccess.aug create mode 100644 lenses/jmxpassword.aug create mode 100644 lenses/known_hosts.aug create mode 100644 lenses/koji.aug create mode 100644 lenses/ldif.aug create mode 100644 lenses/ldso.aug create mode 100644 lenses/lightdm.aug create mode 100644 lenses/logwatch.aug create mode 100644 lenses/lvm.aug create mode 100644 lenses/mcollective.aug create mode 100644 lenses/memcached.aug create mode 100644 lenses/mongodbserver.aug create mode 100644 lenses/netmasks.aug create mode 100644 lenses/networkmanager.aug create mode 100644 lenses/nginx.aug create mode 100644 lenses/ntpd.aug create mode 100644 lenses/openshift_config.aug create mode 100644 lenses/openshift_http.aug create mode 100644 lenses/openshift_quickstarts.aug create mode 100644 lenses/pagekite.aug create mode 100644 lenses/pamconf.aug create mode 100644 lenses/postfix_transport.aug create mode 100644 lenses/postfix_virtual.aug create mode 100644 lenses/postgresql.aug create mode 100644 lenses/protocols.aug create mode 100644 lenses/puppet_auth.aug create mode 100644 lenses/pythonpaste.aug create mode 100644 lenses/qpid.aug create mode 100644 lenses/quote.aug create mode 100644 lenses/rabbitmq.aug create mode 100644 lenses/redis.aug create mode 100644 lenses/rmt.aug create mode 100644 lenses/rsyslog.aug create mode 100644 lenses/shadow.aug create mode 100644 lenses/simplelines.aug create mode 100644 lenses/simplevars.aug create mode 100644 lenses/sip_conf.aug create mode 100644 lenses/smbusers.aug create mode 100644 lenses/splunk.aug create mode 100644 lenses/sssd.aug create mode 100644 lenses/subversion.aug create mode 100644 lenses/sysconfig_route.aug create mode 100644 lenses/systemd.aug create mode 100644 lenses/tests/test_activemq_conf.aug create mode 100644 lenses/tests/test_activemq_xml.aug create mode 100644 lenses/tests/test_anacron.aug create mode 100644 lenses/tests/test_apt_update_manager.aug create mode 100644 lenses/tests/test_aptcacherngsecurity.aug create mode 100644 lenses/tests/test_authorized_keys.aug create mode 100644 lenses/tests/test_automaster.aug create mode 100644 lenses/tests/test_automounter.aug create mode 100644 lenses/tests/test_avahi.aug create mode 100644 lenses/tests/test_bootconf.aug create mode 100644 lenses/tests/test_build.aug create mode 100644 lenses/tests/test_cachefilesd.aug create mode 100644 lenses/tests/test_carbon.aug create mode 100644 lenses/tests/test_channels.aug create mode 100644 lenses/tests/test_chrony.aug create mode 100644 lenses/tests/test_collectd.aug create mode 100644 lenses/tests/test_cpanel.aug create mode 100644 lenses/tests/test_cups.aug create mode 100644 lenses/tests/test_cyrus_imapd.aug create mode 100644 lenses/tests/test_dovecot.aug create mode 100644 lenses/tests/test_erlang.aug create mode 100644 lenses/tests/test_fonts.aug create mode 100644 lenses/tests/test_fuse.aug create mode 100644 lenses/tests/test_gshadow.aug create mode 100644 lenses/tests/test_gtkbookmarks.aug create mode 100644 lenses/tests/test_htpasswd.aug create mode 100644 lenses/tests/test_inputrc.aug create mode 100644 lenses/tests/test_iproute2.aug create mode 100644 lenses/tests/test_jaas.aug create mode 100644 lenses/tests/test_jettyrealm.aug create mode 100644 lenses/tests/test_jmxaccess.aug create mode 100644 lenses/tests/test_jmxpassword.aug create mode 100644 lenses/tests/test_known_hosts.aug create mode 100644 lenses/tests/test_koji.aug create mode 100644 lenses/tests/test_ldif.aug create mode 100644 lenses/tests/test_ldso.aug create mode 100644 lenses/tests/test_lightdm.aug create mode 100644 lenses/tests/test_logwatch.aug create mode 100644 lenses/tests/test_lvm.aug create mode 100644 lenses/tests/test_mcollective.aug create mode 100644 lenses/tests/test_memcached.aug create mode 100644 lenses/tests/test_mongodbserver.aug create mode 100644 lenses/tests/test_netmasks.aug create mode 100644 lenses/tests/test_networkmanager.aug create mode 100644 lenses/tests/test_nginx.aug create mode 100644 lenses/tests/test_ntpd.aug create mode 100644 lenses/tests/test_openshift_config.aug create mode 100644 lenses/tests/test_openshift_http.aug create mode 100644 lenses/tests/test_openshift_quickstarts.aug create mode 100644 lenses/tests/test_pagekite.aug create mode 100644 lenses/tests/test_pamconf.aug create mode 100644 lenses/tests/test_postfix_transport.aug create mode 100644 lenses/tests/test_postfix_virtual.aug create mode 100644 lenses/tests/test_postgresql.aug create mode 100644 lenses/tests/test_protocols.aug create mode 100644 lenses/tests/test_puppet_auth.aug create mode 100644 lenses/tests/test_pythonpaste.aug create mode 100644 lenses/tests/test_qpid.aug create mode 100644 lenses/tests/test_quote.aug create mode 100644 lenses/tests/test_rabbitmq.aug create mode 100644 lenses/tests/test_redis.aug create mode 100644 lenses/tests/test_rmt.aug create mode 100644 lenses/tests/test_rsyslog.aug create mode 100644 lenses/tests/test_shadow.aug create mode 100644 lenses/tests/test_simplelines.aug create mode 100644 lenses/tests/test_simplevars.aug create mode 100644 lenses/tests/test_sip_conf.aug create mode 100644 lenses/tests/test_smbusers.aug create mode 100644 lenses/tests/test_splunk.aug create mode 100644 lenses/tests/test_sssd.aug create mode 100644 lenses/tests/test_subversion.aug create mode 100644 lenses/tests/test_sysconfig_route.aug create mode 100644 lenses/tests/test_systemd.aug create mode 100644 lenses/tests/test_thttpd.aug create mode 100644 lenses/tests/test_tuned.aug create mode 100644 lenses/tests/test_up2date.aug create mode 100644 lenses/tests/test_updatedb.aug create mode 100644 lenses/tests/test_vfstab.aug create mode 100644 lenses/tests/test_vmware_config.aug create mode 100644 lenses/tests/test_xymon.aug create mode 100644 lenses/tests/test_xymon_alerting.aug create mode 100644 lenses/thttpd.aug create mode 100644 lenses/tuned.aug create mode 100644 lenses/up2date.aug create mode 100644 lenses/updatedb.aug create mode 100644 lenses/vfstab.aug create mode 100644 lenses/vmware_config.aug create mode 100644 lenses/xymon.aug create mode 100644 lenses/xymon_alerting.aug create mode 100644 tests/leak.c create mode 100755 tests/lens-activemq_conf.sh create mode 100755 tests/lens-activemq_xml.sh create mode 100755 tests/lens-anacron.sh create mode 100755 tests/lens-apt_update_manager.sh create mode 100755 tests/lens-aptcacherngsecurity.sh create mode 100755 tests/lens-authorized_keys.sh create mode 100755 tests/lens-automaster.sh create mode 100755 tests/lens-automounter.sh create mode 100755 tests/lens-avahi.sh create mode 100755 tests/lens-bootconf.sh create mode 100755 tests/lens-build.sh create mode 100755 tests/lens-cachefilesd.sh create mode 100755 tests/lens-carbon.sh create mode 100755 tests/lens-channels.sh create mode 100755 tests/lens-chrony.sh create mode 100755 tests/lens-collectd.sh create mode 100755 tests/lens-cpanel.sh create mode 100755 tests/lens-cups.sh create mode 100755 tests/lens-cyrus_imapd.sh create mode 100755 tests/lens-dovecot.sh create mode 100755 tests/lens-erlang.sh create mode 100755 tests/lens-fonts.sh create mode 100755 tests/lens-fuse.sh create mode 100755 tests/lens-gshadow.sh create mode 100755 tests/lens-gtkbookmarks.sh create mode 100755 tests/lens-htpasswd.sh create mode 100755 tests/lens-inputrc.sh create mode 100755 tests/lens-iproute2.sh create mode 100755 tests/lens-jaas.sh create mode 100755 tests/lens-jettyrealm.sh create mode 100755 tests/lens-jmxaccess.sh create mode 100755 tests/lens-jmxpassword.sh create mode 100755 tests/lens-known_hosts.sh create mode 100755 tests/lens-koji.sh create mode 100755 tests/lens-ldif.sh create mode 100755 tests/lens-ldso.sh create mode 100755 tests/lens-lightdm.sh create mode 100755 tests/lens-logwatch.sh create mode 100755 tests/lens-lvm.sh create mode 100755 tests/lens-mcollective.sh create mode 100755 tests/lens-memcached.sh create mode 100755 tests/lens-mongodbserver.sh create mode 100755 tests/lens-netmasks.sh create mode 100755 tests/lens-networkmanager.sh create mode 100755 tests/lens-nginx.sh create mode 100755 tests/lens-ntpd.sh create mode 100755 tests/lens-openshift_config.sh create mode 100755 tests/lens-openshift_http.sh create mode 100755 tests/lens-openshift_quickstarts.sh create mode 100755 tests/lens-pagekite.sh create mode 100755 tests/lens-pamconf.sh create mode 100755 tests/lens-postfix_transport.sh create mode 100755 tests/lens-postfix_virtual.sh create mode 100755 tests/lens-postgresql.sh create mode 100755 tests/lens-protocols.sh create mode 100755 tests/lens-puppet_auth.sh create mode 100755 tests/lens-pythonpaste.sh create mode 100755 tests/lens-qpid.sh create mode 100755 tests/lens-quote.sh create mode 100755 tests/lens-rabbitmq.sh create mode 100755 tests/lens-redis.sh create mode 100755 tests/lens-rmt.sh create mode 100755 tests/lens-rsyslog.sh create mode 100755 tests/lens-shadow.sh create mode 100755 tests/lens-simplelines.sh create mode 100755 tests/lens-simplevars.sh create mode 100755 tests/lens-sip_conf.sh create mode 100755 tests/lens-smbusers.sh create mode 100755 tests/lens-splunk.sh create mode 100755 tests/lens-sssd.sh create mode 100755 tests/lens-subversion.sh create mode 100755 tests/lens-sysconfig_route.sh create mode 100755 tests/lens-systemd.sh create mode 100755 tests/lens-thttpd.sh create mode 100755 tests/lens-tuned.sh create mode 100755 tests/lens-up2date.sh create mode 100755 tests/lens-updatedb.sh create mode 100755 tests/lens-vfstab.sh create mode 100755 tests/lens-vmware_config.sh create mode 100755 tests/lens-xymon.sh create mode 100755 tests/lens-xymon_alerting.sh create mode 100644 tests/modules/fail_square_consistency.aug create mode 100644 tests/modules/fail_square_consistency_del.aug create mode 100644 tests/modules/fail_square_dup_key.aug create mode 100644 tests/modules/fail_square_lens_type.aug create mode 100644 tests/modules/pass_square_rec.aug delete mode 100644 tests/root/etc/crontab create mode 100644 tests/root/etc/gshadow create mode 100644 tests/root/etc/shadow delete mode 100644 tests/root/etc/squirrelmail/config.php create mode 100644 tests/root/etc/sysconfig/network-scripts/ifcfg-Auto-ALICE-WLAN38_(automatisch) create mode 100644 tests/root/etc/sysconfig/network-scripts/ifcfg-Auto_FRITZ!Box_Fon_WLAN_7112 create mode 100644 tests/root/etc/sysconfig/network-scripts/ifcfg-lo.rpmsave create mode 100644 tests/root/etc/sysconfig/network-scripts/ifcfg-weird [!] (used to fail) create mode 100644 tests/root/lvm.conf~ create mode 100755 tests/test-put-mount-augnew.sh create mode 100755 tests/test-put-mount-augsave.sh create mode 100755 tests/test-put-mount.sh create mode 100755 tests/test-put-symlink-augnew.sh create mode 100755 tests/test-put-symlink-augsave.sh create mode 100755 tests/test-put-symlink-augtemp.sh diff --git a/AUTHORS b/AUTHORS index df63f95..28c68e3 100644 --- a/AUTHORS +++ b/AUTHORS @@ -10,47 +10,110 @@ Committers: Michael Chapman Dominic Cleal Francis Giraldeau - Raphael Pinson + Raphaël Pinson Contributions by: + Jasper Lievisse Adriaanse Partha Aji + Erik B. Andersen Sebastien Aperghis-Tramoni Mathieu Arnold Sergio Ballestrero Sylvain Baubeau Oliver Beattie + Tim Bishop Anders F Björklund Aurelien Bompard Lorenzo Dalrio Francois Deppierraz + Luc Didry Dominique Dumont Craig Dunn Free Ekanayaka + Michal Filka + Freakin Marc Fournier + Davide Guerri + Andy Grimm + Travis Groth Adam Helms Harald Hoyer Shannon Hughes Richard W.M. Jones Simon Josi Bryan Kearney + Jason Kincl + Francois Lebel Frédéric Lespez + Jasper Lievisse Adriaanse Tom Limoncelli Erinn Looney-Triggs + Duncan Mac-Vicar P. + Jeroen van Meeuwen Jim Meyering Sean Millichamp + Tim Mooney Joel Nimety + Matthaus Owens Matt Palmer Bill Pemberton + Dan Prince Alan Pevec + Brett Porter Robin Lee Powell + Michael Pimmer + Branan Purvine-Riley + Andrew Replogle + Pat Riehecky + Lubomir Rintel Roman Rakus + David Salmen + Carlos Sanchez Satoru SATOH Nicolas Valcárcel Scerpella + Gonzalo Servat Nahum Shalman Tim Stoop Laine Stump Jiri Suchomel Ivana Hutarova Varekova + Simon Vocella Frederik Wagner Dean Wilson + Igor Pashev + Micah Anderson + Domen Kožar + Filip Andres + Josh Kayse + Jacob M. McCann + Danny Yates + Terence Haddock + Athir Nuaimi + Ian Berry + Gabriel de Perthuis + Brian Harrington + Mathieu Alorent + Rob Tucker + Stephen P. Schaefer + Pascal Lalonde + Tom Hendrikx + Yanis Guenane + Esteve Fernandez + Dietmar Kling + Michael Haslgrübler + Andrew N Golovkov + Matteo Cerutti + Tomas Hoger + Tomas Klouda + Kaarle Ritvanen + François Maillard + Mykola Nikishov + Robert Drake + Simon Séhier + Vincent Brillault + Mike Latimer + Lorenzo M. Catucci + Joel Loudermilk + Frank Grötzner + Pino Toscano diff --git a/ChangeLog b/ChangeLog index a7764d4..f0685aa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,2917 @@ +2014-10-31 Chris Hollowell + + Cgconfig: permit quoted spaces in parameter values + Allow quoted spaces in controller parameter value assignments, making valid + statements such as the following permissible: + + blkio.throttle.read_iops_device="8:0 50"; + +2014-10-30 Kenaniah Cerny + + Added config.d files to the filter + Used by systems running Red Hat or a variant + +2014-10-28 Raphaël Pinson + + Build: remove unused indent definition + +2014-10-22 Raphaël Pinson + + Update NEWS + + Httpd: Allow comparison operators in tags (GH #154) + +2014-10-17 Tomáš Chvátal + + Add more possible SUSE extensions to read from multipath config. + +2014-10-17 Alastair Lynn + + Inifile: allow single-character keys + +2014-10-17 Yanis Guenane + + xml.aug: Allow nmotoken rather than plain word after !DOCTYPE + Currently, the lens only accepts a word after the !DOCTYPE word. + + A - valid - Doctype can have the following form : + making the xml + file invalid with the current lens. This commits aims for the lens + to accept nmtoken rather than strict word after the DOCTYPE string. + +2014-10-17 fonfon + + Pagekite: new lens and tests + +2014-09-23 Dominic Cleal + + Iptables: parse /etc/sysconfig/iptables.save + Fixes RHBZ#1144651 + +2014-09-23 Pino Toscano + + LVM: handle also /etc/lvm/lvm.conf + The syntax should be the same, so use the lvm lens also for the main + lvm2 configuration file. + + LVM: support negative numbers + Use Rx.relinteger instead of Rx.integer so negative numbers as values + can be read. + +2014-09-18 Dominic Cleal + + Systemd: parse environment variables where only value is quoted + Fixes regression introduced in 5226ae7, which added support to parse fully + quoted "NAME=value" environment vars. To support both, this commit stores + the quotes in the value if it's only the value quoted. + + Fixes RHBZ#1138508 + +2014-09-12 Dominic Cleal + + Dhclient: parse hash statements with dhcp-eval strings + + Systemd: parse semicolons inside entry values, not as EOL comments + Fixes RHBZ#1139498 + +2014-09-09 Dominic Cleal + + Kdump: parse new options, permit EOL comments, refactor + Fixes RHBZ#1139298 + + Test_Kdump: fix test of complete config file + +2014-09-05 Dominic Cleal + + Xml: enable CDATA parsing + Fixes GitHub #80 + +2014-09-04 Dominic Cleal + + * src/augeas.c (unlink_removed_files): ensure aug_save returns non-zero result when unable to delete files + Fixes RHBZ#1091143 + +2014-09-03 Dominic Cleal + + Syslog: permit IPv6 loghost addresses + Fixes RHBZ#1129388 + + Aliases: permit missing whitespace between colon and recipients + +2014-07-24 Raphaël Pinson + + NEWS + + Xml: Allow backslash in #attribute values + +2014-07-21 Dominic Cleal + + Services: permit colons in service name + Fixes RHBZ#1121263 + +2014-07-09 Dominic Cleal + + Rmt: new lens to parse /etc/default/rmt + Fixes RHBZ#1100549 + + Systemd: parse /etc/sysconfig/*.systemd as used in 389-ds + Fixes RHBZ#1083022 + + Shellvars: support $(( .. )) arithmetic expansion in variable assignment + Fixes RHBZ#1100550 + + Systemd: allow quoted Environment key=value pairs + Fixes RHBZ#1100547 + +2014-06-30 Raphaël Pinson + + Simplevars: Support empty values + +2014-06-26 Raphaël Pinson + + Sshd: support doseol and standardize code + + Sshd: Use Build.opt_list + + Sshd: Also make Host entries case-insensitive + + Ssh: support case-insensitive entries everywhere + +2014-06-24 Andy Grimm + + Add other valid controllers to cgconfig lens + +2014-06-19 Raphaël Pinson + + Xymon_Alerting: refactor lens (GH issue #89) + +2014-06-11 Nick + + Sudoers: Allow quoted string in default str/bool parameters + Made string or bool parameters able to be quoted strings like non-bool strings. + Also added "mailfrom" parameter to the list of string/bool parameters + and removed duplicates from that list. + +2014-06-06 Frank Grötzner + + add support for mtu relevant parameters fragment and mssfix + +2014-06-05 Raphaël Pinson + + Update NEWS and AUTHORS + +2014-06-05 fonk + + OpenVPN/ Add support for setting script-security + Setting script security is especially needed when using learn-address, + which we can already set via augeas but is useless without script-security. + +2014-06-04 Dominic Cleal + + * man/augtool.pod: fix description of 'move' alias + +2014-06-03 Dominic Cleal + + * src/augrun.c: remove unused "filename" argument from dump-xml command + Fixes RHBZ#1100106 + + * man/augtool.pod: update man page with --span option + +2014-06-02 Raphaël Pinson + + Update AUTHORS and NEWS + +2014-06-02 Joel Loudermilk + + Multipath: add support for rr_min_io_rq + +2014-06-02 Dominic Cleal + + * man/augtool.pod: update man page with new commands + Fixes RHBZ#1100077 + + * src/augtool.c: add command aliases to autocomplete + Fixes RHBZ#1100184 + + Ldso: handle "hwcap" lines + Fixes #100 + + Rsyslog: parse property filters and file actions with complex templates + Fixes RHBZ#1083016 + +2014-06-02 Raphaël Pinson + + Update NEWS + +2014-06-02 Pat Riehecky + + Added tuned lense + +2014-06-02 Raphaël Pinson + + Update NEWS and AUTHORS + +2014-06-02 Lorenzo M. Catucci + + Add a little bit of ducumentation + for both the shadow and the gshadow lenses + +2014-06-02 Lorenzo M. Catucci + + Add a lens for /etc/gshadow file format + and wire-up its test to the runner's list in Makefile.am + + Also add a mock /etc/gshadow in tests/root + +2014-06-02 Lorenzo M. Catucci + + Add a lens for /etc/shadow file format + and wire-up its test to the runner's list in Makefile.am + + Also add a mock /etc/shadow in tests/root + +2014-06-02 Lorenzo M. Catucci + + Refactor and document + - import already defined lenses from the respective modules + instead of defining them internally + + - add a missing \r to the excluded chars in sto_to_col + + - add some documentation + +2014-05-14 Michael Tiernan + + * HACKING: fix git repository URL + +2014-05-11 Mike Latimer + + Device_map: Parse all device.map files under /boot + +2014-05-08 Raphaël Pinson + + CPanel: Allow colons in keys + + CPanel: New lens to parse cpanel.config files + +2014-05-05 Raphaël Pinson + + Simplevars: Support flags + +2014-04-24 Raphaël Pinson + + Shellvars: Allow any kind of quoted values in block conditions (GH issue #118) + +2014-04-17 Raphaël Pinson + + Sssd: Allow ; for comments + +2014-04-15 Raphaël Pinson + + Allow empty quoted values (GH issue #115) + + Allow continued lines inside quoted value (GH issue #104) + +2014-04-12 Raphaël Pinson + + Update NEWS and AUTHORS + +2014-04-12 Robert Drake + + syslog, support for "# !" style comments + This makes it so if a comment begins with "# " then +, -, or ! it's + treated as a comment and won't have a special meaning. + + fixes #65 + +2014-04-12 Robert Drake + + dhclient, add support for option modifiers + This adds basic support for append|prepend|supercede|default + + I believe it has the same limitations as the existing "option" support. + Any arguments supplied to the option can't have a space. + + fixes #95 + +2014-04-12 Vincent Brillault + + pam: partial support of arguments enclosed in [ .. ] + Pam.conf(5) manual page states 'module-arguments are a space separated list + of tokens that can be used to modify the specific behavior of the given PAM. + Such arguments will be documented for each individual module. Note, if you + wish to include spaces in an argument, you should surround that argument with + square brackets.', but such arguments are not supported by the pam lenses, as + expressed in the comments 'This isn't entirely right: arguments enclosed in + [ .. ] are allowed and should be parsed as one'. + + This commit add basic support of such arguments via the regex: + '/(\[[^]#\n]+\]|[^[#\n \t][^#\n \t]*)/' + + It is only a partial support as some corner cases are not covered: + - Multi line arguments (lines ending with '\') + - Arguments containing a '[' (escaped via '\') + +2014-04-12 Robert Drake + + added seq to vim syntax highlight + +2014-04-03 Simon Séhier + + add missing } in file path for nagios/icinga objects + +2014-03-13 Raphaël Pinson + + UpdateDB: Update tests to ensure spaces around = are OK + + Update NEWS + + UpdateDB: New lens to parse /etc/updatedb.conf + +2014-03-13 Dominic Cleal + + * augeas.spec.in: improve augeas-libs description + +2014-03-12 Raphaël Pinson + + Httpd: Add unit test for comment on next line + + Httpd: Define an eol_comment in section to allow for \n before comment + +2014-03-11 Raphaël Pinson + + Httpd: Allow eol comments after section tags + +2014-03-06 Raphaël Pinson + + Rx: Add iso_8601 simple regex + + Update NEWS + + Update AUTHORS and NEWS + +2014-03-06 Robert Drake + + dhcpd, style and test changes suggested by raphink + I also updated the NEWS entry to note the incompatible change + + dhcpd, fix for put on dhcp option records + Type cannot be blank. I fixed this by making it use record instead of + nesting through "type" + + dhcpd, fix for key block puts + I discovered this after thinking I was done. It actually was a problem + before I started messing with the code but I didn't notice it because + there was never any test for keys. + + dhcpd, removed unused variable and reformatted + stmt_subclass was a little too cluttered so I changed it to multiple + lines for readability. I had also introduced an unused lens sep_to_ncl + which I removed. + +2014-03-06 Robert Drake + + dhcpd, changing quotes on stmt_block_arg + This patch can break users parsers. + + Fixes failover-peer, shared-network, class, host, zone, group, and "on" to + handle quoted values properly. + + It also allows optional semicolon at the end of key {} block. + +2014-03-06 Robert Drake + + dhcpd, adding support for "on" statement + For things like: + + on commit { + set ClientIP = binary-to-ascii(10, 8, ".", leased-address); + set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)); + } + +2014-03-06 Robert Drake + + dhcpd, added fddi to stmt_hardware + getting pretty obscure.. + +2014-03-06 Robert Drake + + dhcpd, adding support for set command + This allows you to define variables in your dhcp configuration. They + can be arbitrarily complicated. + + Things like this: + + set ClientIP = binary-to-ascii(10, 8, ".", leased-address); + set ClientMac = binary-to-ascii(16, 8, ":" , substring(hardware, 1, 6)); + + I also added most of the rest of the functions from dhcp-eval and listed + the limitations of the current parser. I don't think I'm going to be + able to fix most of it but I think I'm getting into obscure features + that most people don't bother using. + + At this point if they need to do very strange class maps they could put + them in an include file and not have augeas parse it. + +2014-03-06 Robert Drake + + dhcpd, added support for match if suffix|option + I also relaxed the rules on matching quoted and unquoted values. + + Things like: + match if suffix (option vendor-class-identifier,6)="123456"; + or + match if option vendor-class-identifier="Brave, Warrior Pidgins"; + + work now. + +2014-03-06 Robert Drake + + dhcpd fix to allow subclasses values to be quoted + DHCP subclass values can have spaces in them. + + Here is an example: + subclass "consoles" "Xbox 360"; + subclass "consoles" "Nintendo 3DS"; + subclass "consoles" Wii; + subclass "consoles" NintendoDS; + +2014-03-06 Robert Drake + + dhcpd known-clients allows spaces in it's value + This is a fix for lines like these: + + deny unknown clients; + deny known clients; + allow known clients; + allow unknown clients; + +2014-03-06 Robert Drake + + dhcpd, fix for quoted characters in members of + Some of my "allow members of" statements have more complicated names + that include things like parenthesis. This change makes it so semicolon + and space are the only things not allowed in barewords, and quotes and + newlines are the only thing not allowed in quoted things. + +2014-03-06 Robert Drake + + dhcpd, fix whitespace problems with blocks + Most blocks should support braces at the end of a line or + on the next line. + + Like this: + + class "test class" + { + + } + + or + + class testclass {} + +2014-03-06 Robert Drake + + dhcpd, expanding support for user-defined-options + This incorporates changes suggested by raphink. + + It should be able to parse all of the following DHCP options now: + + option name-service-search code 117 = array of unsigned integer 16; + option domain-search code 119 = string; + option sip-servers code 120 = string; + option classless-static-route code 121 = string; + option space cable-labs; + option cable-labs.tsp-primary-dhcp-server code 1 = ip-address; + option cable-labs.tsp-secondary-dhcp-server code 2 = ip-address; + option cable-labs.tsp-provisioning-server code 3 = string; + option cable-labs.tsp-as-backoff-retry code 4 = { unsigned integer 32, unsigned integer 32, unsigned integer 32 }; + option cable-labs.tsp-ap-backoff-retry code 5 = { unsigned integer 32, unsigned integer 32, unsigned integer 32 }; + option cable-labs.tsp-kerberos-realm-name code 6 = string; + option cable-labs.tsp-ticket-granting-server-utilization code 7 = boolean; + option cable-labs.tsp-provisioning-timer code 8 = unsigned integer 8; + option cable-labs-encapsulation code 122 = encapsulate cable-labs; + option tftp-server-address code 150 = array of ip-address; + option ip-telephone code 176 = string; + option wpad-url code 252 = text; + +2014-03-06 Robert Drake + + dhcpd, add support for omapi-key statement + You can use this along with omapi-port to specify a secure way to talk + to your DHCP server. + + key myspecialkey { + algorithm hmac-md5; + secret "base64string=="; + } + + omapi-key myspecialkey; + omapi-port 7911; + +2014-03-06 Robert Drake + + dhcpd, add support for named groups + Things like group Special_users { + + } + +2014-03-04 Raphaël Pinson + + Update NEWS + + Desktop: Allow @ in keys (GH issue #92) + +2014-03-03 KaMichael + + Group: Dropped nisentry (not valid here) + + group: Testcase for NIS default + +2014-03-03 KaMichael + + Update group.aug + + Update group.aug to parse NIS entries + +2014-02-28 Raphaël Pinson + + Update NEWS + +2014-02-28 Pat Riehecky + + Added chrony lense + +2014-02-25 Dominic Cleal + + Krb5: permit braces in values when not in sub-section + Fixes RHBZ#1066419 + +2014-02-21 Dominic Cleal + + Keepalived: add more virtual/real server settings and checks + Fixes RHBZ#1064388 + +2014-02-21 Raphaël Pinson + + NetworkManager: Use the Quote module, support # in values (no eol comments) + +2014-02-20 Raphaël Pinson + + AptPreferences: Support spaces in origin fields + + Remove mercurial legacy files + + Sshd: Allow all types of issues in Match groups (GH issue #75) + + Update NEWS + + Add cp to manpage (issue #78) + + Update AUTHORS and NEWS + +2014-02-20 Mykola Nikishov + + Support configuration file for Squid 3 + +2014-02-12 Dominic Cleal + + IPRoute2: handle "/" in protocol names, swap ID and name fields + This is an incompatible change. + + Fixes RHBZ#1063968 + +2014-02-12 Dominic Cleal + + IPRoute2: handle hex IDs and hyphens in names, as present in rt_dsfield + Fixes RHBZ#1063961 + +2014-02-10 Dominic Cleal + + Shellvars: handle case statements with same-line ;; tokens + Fixes RHBZ#1033799 + +2014-02-08 Raphaël Pinson + + Update NEWS + + Fix release date for 1.2.0 in NEWS + + Add Known_Hosts lens + +2014-01-30 Miguel Armas + + Grub: handle "foreground" option + Fixes RHBZ#1059383 + +2014-01-27 David Lutterkort + + Version 1.2.0 + +2014-01-27 Raphaël Pinson + + Update NEWS with span info in XML dump + +2014-01-27 Dominic Cleal + + Add %check to RPM spec, fix download URL + * augeas.spec.in: add %check to run `make check` during build, skipping + SELinux tests which don't work in a mock environment + + Original %check patch from Richard Jones + +2014-01-27 Raphaël Pinson + + Add span info to XML dump + For a node, add span information for the label, value, and node overall if + it is present in the tree. The resulting XML looks like + + + + + + ... + + +2014-01-27 David Lutterkort + + Rename build/aux to build/ac-aux + The directory name 'aux' is special on Windows, and using it keeps the + build from working. + + You will need to rerun autogen.sh after this change + +2014-01-23 Raphaël Pinson + + Update NEWS + + Sshd: let all special keys be case-insensitive + + Update NEWS + + Sshd: Support Ciphers and KexAlgorithms groups, GH issue #69 + + Update NEWS + + Grub: Add 'verbose' option, GH issue #73 + + Update NEWS + + Shellvars_list: Allow end-of-line values, bug #342 + + Fix xymonalerting into xymon_alerting in tests/Makefile.am + + Add Xymon_Alerting lens to NEWS, update AUTHORS + + Rename XymonAlerting lens as Xymon_Alerting + + Fix NaturalDocs comments in XymonAlerting lens + +2014-01-23 Francois Maillard + + Add NaturalDocs documentation to the xymonalerting lens and its tests + + add basic doc + + Add the test lens to the Makefile + + New lens for xymon alerting rules + +2014-01-23 Raphaël Pinson + + Update NEWS with Authorized_Keys change + +2014-01-23 Jasper Lievisse Adriaanse + + Allow 'ssh-ed25519' as a valid authorized_key type + +2014-01-23 Raphaël Pinson + + Update NEWS and AUTHORS + +2014-01-13 Kaarle Ritvanen + + Interfaces: map bond-slaves and bridge-ports options to arrays + This is a backwards incompatible change, as these would previously show up + as strings in the tree + +2014-01-13 Tomas Klouda + + Fix MongoDB Server lens - MongoDB doesn't accept quoted values + This lens worked for already defined values, but once you wanted to + add new value, it was created with quotes and MongoDB failed to start + +2014-01-13 Dominic Cleal + + Fix umask handling when creating new files + * src/transform.c (transform_save): faulty umask arithmetic would cause + overly-open file modes when the umask contains "7", as the umask was + incorrectly subtracted from the target file mode + + Fixes CVE-2013-6412, RHBZ#1034261 + +2014-01-13 Freakin + + OpenVPN: additional config options + Support + 1) daemon + 2) client-config-dir + 3) route + 4) management + +2014-01-13 David Lutterkort + + * NEWS: describe Slapd changes in last few commits + +2014-01-13 Raphaël Pinson + + Slapd: move by/who to the value of by + + Slapd: Allow any allowed combination of who/access/control in by field + + Slapd: support smart quotes in database entry + + Slapd: remove duplicate entry in database_re + + Slapd: rename by parameters + * Rename by/what as by/access (as per official doc) + * Allow access to be absent (as per official doc) + +2014-01-07 Raphaël Pinson + + Slapd: Add unit test for by/control + +2013-12-18 Dominic Cleal + + Shellvars, Sysconfig: map "bare" export and unset lines using seq to handle multiple variables + Fixes RHBZ#1033795 + +2013-12-18 Raphaël Pinson + + Shellvars.lns: Actually test continued lines and fix support + + Shellvars.lns: add unit test for continued lines in double quoted values + +2013-12-16 Dominic Cleal + + Sysconfig: permit empty comments after comment lines + Fixes RHBZ#1043636 + +2013-12-05 Dominic Cleal + + Shellvars: fix syntax error in filter + +2013-12-04 David Lutterkort + + Shellvars: exclude /etc/sysconfig/ip*tables.save files + +2013-12-03 Raphaël Pinson + + Sudoers.lns: Allow uppercase characters in user names (ticket #376) + + Build: Add combine_three_ord and combine_three + + Build: Add combine_two_ord and combine_two + + Yum.lns: split excludes as lists (ticket #275) + + Build: Add combinatorics group + + Yum.lns: simplify code for combinatory logic of list_entry elements + +2013-12-02 Tomas Hoger + + Corrections for CVE-2012-0786 tests + - test-put-symlink-augsave.sh - variable $HOSTS_AUGNEW was used to check if + file was still symlink, while it wasn't set before. Fix to use + $HOSTS_AUGSAVE. + - test-put-symlink-augnew.sh, test-put-symlink-augsave.sh - 'test -f' + dereferences symlink and hence can not be used to check if file is regular + file or symlink to a regular file. Use 'test -h' instead. + +2013-12-02 Tomas Hoger + + Correct locations table for transform_save() + Commit 16387744 introduced a table with locations of temporary, destination and + backup file in various modes as part of the comment for transform_save(). This + corrects two incorrectly listed temporary file locations. + + Note that PATH_canon is somewhat misleading, as canonicalized path is always + used when not using NEWFILE save flag, while it is meant to indicate whether + file is created in a directory that contains symlink, or a directory that + contains symlink's target. + +2013-12-02 Raphaël Pinson + + Desktop.lns: Support square brackets in keys + +2013-11-19 Dominic Cleal + + * src/transform.c (filter_matches): wrap fnmatch to ensure that an incl pattern containing "//" matches file paths + Fixes RHBZ#1031084 + +2013-11-09 Sean Millichamp + + Enhance Nagiosobjects lens + This adds support and tests for three additional Nagios + supported behaviors: + - An optional space between the object name and the { + Example: "define host{" + - An optional indent prior to the closing } + Example: " }" + - Whole-line comments that start with ; + Example: "; This is a comment" + + It does not add support for end-of-line comments with ; + +2013-11-09 Yanis Guenane + + Dhcpd: support a wider variety of DHCP allow/deny/ignore statement + The Dhcpd.aug was missing a part of the allow/deny/ignore possible + statement. This commit updates the lense so it supports the list + of options available here + + http://www.ipamworldwide.com/declarations-topological/declarations-allowdenyignore.html + + Also this bug was preventing a Foreman user to parse the dhcpd.conf + generated by theforeman/dhcp puppet module + +2013-11-09 Dominic Cleal + + Yum: permit spaces after equals sign in list options + Fixes GitHub issue #45 + +2013-11-08 Matteo Cerutti + + Sudoers: permit underscores in group names + Fixes ticket #370 + +2013-11-01 Andrew N Golovkov + + include only *.repo files from yum.repos.d; + +2013-10-24 Michael Haslgrübler + + Use Quote module in dovecot + * use Quote.dquote_spaces for quoting + + dovecot enchancement and bug fixes + * add mailbox to block_names + * fix for block_args in quotes + * fix for block's brackets upon write + * fixes broken tests for mailbox + * fixes indention + * test case for block_args with " + * fixes broken indention + +2013-10-17 Dominic Cleal + + Shellvars_list: handle backtick variable assignments + Fixes ticket #368 + +2013-10-08 Yanis Guenane + + Update NEWS + +2013-10-07 Dietmar Kling + + Cyrus_Imapd: create new entries without space before separator + Fixes RHBZ#1014974 + +2013-10-05 Dominic Cleal + + Exports: permit colons for IPv6 client addresses + Fixes ticket #366 + +2013-09-20 Esteve Fernandez + + Added dhclient.conf path for Debian/Ubuntu + +2013-09-09 Yanis Guenane + + Fix Trac#364. Syslog lense accept UDP(@) and TCP(@@) protocol + Currently the syslog lense only accept sending log to another host + via UDP - a single @ -, and was discarding TCP - a double @ -. This + PR fixes that. + + Fix test_rsyslog.aug + + Remove unused variable at + +2013-09-07 Yanis Guenane + + Fix NagiosCfg lense so /etc/nagios/nrpe.cfg is parsed by Nrpe and not NagiosCfg + Currently NagiosCfg lense is in charge of parsing all files under /etc/nagios/*.cfg + but /etc/nagios/commands.cfg. /etc/nagios/nrpe.cfg should be also added as an exception + since it needs to be parsed by the Nrpe lense. This issue currently causes the following + error : "Lenses @NagiosCfg and @Nrpe could be used to load this file" + +2013-09-02 Dominic Cleal + + * tests/test-load.c (testPermsErrorReported): skip permissions test when root + +2013-08-27 Tom Hendrikx + + Postfix_virtual: allow '+' and '=' in email addresses + + ('plus') and = ('equals') are valid characters in email addresses. + Example is from postfix docs, see: + http://www.postfix.org/MULTI_INSTANCE_README.html#quick + +2013-08-27 Raphaël Pinson + + Add aug_cp and the cp and copy commands + +2013-08-27 Dominic Cleal + + Grub: handle makeactive menu command + Fixes ticket #340 + + Postfix_Main: handle stray whitespace at end of multiline lines + Fixes ticket #348 + +2013-08-27 Pat Riehecky + + Koji: new lens to parse Koji configs + +2013-08-27 Dominic Cleal + + Access: support DOMAIN\user syntax for users and groups + Fixes ticket #353 + + Samba: permit asterisk in key name + Fixes ticket #354 + + Shellvars: support all types of quoted strings in arrays + Patch from webmeister. Fixes ticket #357. + +2013-08-27 Pat Riehecky + + Yum: add yum-cron*.conf files + +2013-08-27 Pascal Lalonde + + Interfaces: allow numeric characters in stanza options + +2013-08-27 David Lutterkort + + Shellvars: read /etc/firewalld/firewalld.conf + Fixes https://fedorahosted.org/augeas/ticket/363 + +2013-08-27 Matthew Booth + + Grub: support the 'lock' directive + + Grub: NFC fix whitespace errors introduced by 4e09d15 + Kill tabs! + + Grub: support the 'setkey' directive + +2013-08-27 Michael Wisheu + + Interfaces: add /etc/network/interfaces.d/* as another commonly used location + +2013-08-06 Raphaël Pinson + + Update NEWS + + Fix NaturalDocs comments in lenses + +2013-08-06 Stephen P. Schaefer + + Allow augeas to deal with one variant of /etc/sysconfig/network-scripts/route-* + +2013-08-01 Raphaël Pinson + + Update NEWS + + Properties: Support multiline starting with an empty string, GH issue #19 + + Dhcpd: support conditionals, GH issue #34 + + Update NEWS + + PHP: Allow php-fpm syntax (GH issue #35) + +2013-08-01 Patrick Adair + + Interfaces: add in support for the source stanza in /etc/network/interfaces files + +2013-07-30 Dominic Cleal + + Simplevars: adopt /etc/selinux/semanage.conf due to spaces around delimiters + +2013-07-30 Michael Scherer + + Shellvars: add /etc/selinux/semanage.conf + +2013-07-30 Raphaël Pinson + + Start new NEWS section + + Fix documentation links in c_api naturaldocs menu + +2013-07-24 Raphaël Pinson + + Sshd: also indent comments by 2 spaces by default in Match groups + + Sshd: Indent Match entries by 2 spaces by default + +2013-06-27 Jan Vansteenkiste + + Fixes #27: Automounter lens does not handle hostnames with dashes in them + +2013-06-24 Jasper Lievisse Adriaanse + + Fix my name + +2013-06-14 David Lutterkort + + Version 1.1.0 + + Make tree_unlink safer to use + tree_unlink used to only remove nodes from the tree, leaving the + possibilities of dangling references from variables stored in the + symtab. The new incarnation is safer in that it cleans up the symtab first. + +2013-06-14 David Lutterkort + + Do not interpret file names as path exprs during load + We used to interpret file names as path expressions at various points in + the process of loading the tree. That lead to nasty failures if the file + names contained characters that have a special meaning in path expressions, + like '!', '[' etc. + + When the loading code now creates nodes or looks them up based on filenames + (e.g. to create the file's top level node in /files or the info node in + /augeas/files), we now use tree_fpath/tree_fpath_cr to do that. + + The workaround introduced into shellvars.aug to fix tiecket #246 is also no + longer needed. + + Fixes https://fedorahosted.org/augeas/ticket/343 + Fixes https://fedorahosted.org/augeas/ticket/333 + Improves on the fix for https://fedorahosted.org/augeas/ticket/246 + +2013-06-14 David Lutterkort + + * src/transform.c (xfm_error): do not segfault when msg is NULL + + * src/try: make 'try gdb' work with emacs-24 and gdb-7.5.1 + +2013-06-11 David Lutterkort + + LVM: fix handling of quoted strings that contain quotes + Fixes https://github.com/hercules-team/augeas-do-not-use/issues/28 reported + by brianredbeard + +2013-06-11 Erik B. Andersen + + AptCacherNGSecurity: new lens for /etc/apt-cacher-ng/security.conf + +2013-06-11 brian redbeard + + Added node config for OpenShift + When the intial lens was developed there was a missing transform + on /etc/openshift/node.conf + + This is a fix for bug hercules-team/augeas#22 + +2013-06-04 David Lutterkort + + Xorg: allow 'Screen' in Device section + Patch from merkela + + Fixes bug https://fedorahosted.org/augeas/ticket/344 + +2013-06-03 David Lutterkort + + Xorg: support extmod section + Patch by merkela + + Partial fix for https://fedorahosted.org/augeas/ticket/344 + +2013-05-30 Raphaël Pinson + + Yum: optimize regexp substractions + + Nrpe: optimize regexp substractions + + Mdadm_Conf: optimize regexp substractions + + Fai_Diskconfig: Optimize regexp substractions + + Shellvars: Optimize regexp substraction + +2013-05-28 Dominic Cleal + + Automaster: accept spaces between options + +2013-05-24 Raphaël Pinson + + Update NEWS + + Add Rob Tucker to AUTHORS + + Add README as a symlink to README.md to make autogen relax + +2013-05-24 Rob Tucker + + Added augeas lens and test for the asterisk sip.conf file + +2013-05-22 Raphaël Pinson + + postfix_master: Allow [] in words (ticket #345) + +2013-05-17 David Lutterkort + + Update README.md + Reformat as GH-flavored markdown; add a License section + + Rename README to README.md + +2013-05-17 David Lutterkort + + * tests/test-run.c (load_module): do not downcase the lensdir + We should not touch the lensdir, since it is user provided; we only want to + downcase the module name. + + Patch by aponomarenko + + Fixes bug #332 + +2013-05-17 Raphaël Pinson + + Add --echo alias to augtool manpage + + Add -t option to augtool manpage + +2013-05-17 Enrico Stahn + + PHPFPM Support + +2013-05-16 Francis Giraldeau + + Add Splunk lens + Lens to parse Splunk configuration. Based on IniFile lens, with few differences: + + * Accepts empty value in entry + * Entries without parent section are children of .anon node + + Thanks to Tim Brigham for this contribution. + +2013-05-16 Francis Giraldeau + + Add CR as a white space char in RX.space_in + CR is used in the IniFile lens as of EOL. To avoid concat ambig between + IniFile.store_to_eol and IniFile.eol, CR has to be added to Rx.space_in. This + change do not break any existing lens in the repository. + +2013-05-16 Davide Guerri + + adds support for iptoute2 configuration files (/etc/iproute2/*) + +2013-05-16 Simon Vocella + + JaaS: lens for the Java Authentication and Authorization Service + +2013-05-15 David Lutterkort + + Function composition: fix the typing of the generated lambda + When f and g are functions, 'f ; g' gets translated into + lambda x: g (f x) + + The resulting function wasn't typed right, which led to an internal error. + + This fixes bug #328 + +2013-05-08 Raphaël Pinson + + Update AUTHORS + +2013-05-08 Brian Harrington + + Added support for OpenShift + Added a series of lenses to support the corresponding configuration + formats including conf, JSON, & HTTP. + +2013-05-08 Brian Harrington + + Add support for MongoDB Server + A basic lens and test to support the configuration of MongoDB + + Added infrastructure components for MongoDB + + Included references to MongoDBServer to handle the auto testing of + lenses on build & mention of lens in for autodoc generation. + + fixes hercules-team/augeas/#25 + + Improved documentation on MongoDBServer filter + + Added improved reference and usage information for the lens + + Mistyped port path in MongoDBServer lens usage + + The port component was missing from the set command + + fixes herclues/team-augeas/#25 + +2013-05-08 Brian Harrington + + Added support for ActiveMQ / Red Hat JBoss A-MQ + Added a series of lenses to support the file formats utilized with + the project ActiveMQ / Red Hat JBoss A-MQ. + + ActiveMQ is a standards-based, open source messaging platform + shipped by Red Hat (Formerly Fuse Source). + + http://activemq.apache.org/ + http://www.redhat.com/products/jbossenterprisemiddleware/amq/ + +2013-04-30 Mathieu Alorent + + Add more flags + add other flags, and use regexp to check + +2013-04-30 Mathieu Alorent + + implement Downtime feature + As seen in this thread, there is a downtime feature that is not + parsed by Augeas. + + http://lists.xymon.com/archive/2011-March/030998.html + +2013-04-20 Dominic Cleal + + Rsyslog: support :omusrmsg: list of users in actions + +2013-04-15 Raphaël Pinson + + Passwd: allow period in user names in spec (fixes #337) + + Passwd: allow overrides in nisentry + +2013-03-31 Gonzalo Servat + + Nrpe: accept any config option, remove predefined list + +2013-03-30 Branan Purvine-Riley + + Add support for port ranges to /etc/services lens + The `/etc/services` file on AIX can contain entries with ranges of ports. This change allows Augeas to parse such files. + + Example from an AIX /etc/services file: +     x11                      6000-6063/tcp  # X Window System +     x11                      6000-6063/udp  # X Window System + +2013-03-21 Dominic Cleal + + Shellvars: reinstate /etc/sysconfig/network + Fixes #330, RHBZ#904222, RHBZ#920609 + +2013-03-14 Gabriel + + Add some autodoc comments. + + Add a lens for LVM metadata. + +2013-03-11 Raphaël Pinson + + Update NEWS + +2013-03-11 Serge Smetana + + Added lens for Dovecot config files + +2013-03-01 Dominic Cleal + + * src/augtool.c (usage): fix spelling error + +2013-02-07 Raphaël Pinson + + Krb5: Improve performances + +2013-02-07 Raphaël Pinson + + IniFile: Support dos eol + Subversion: Support dos eol + Desktop: Support dos eol + MySQL: Support dos eol + Samba: Support dos eol + Yum: Support dos eol + Krb5: Support dos eol + + IniFile: Add empty_generic_nocomment + Rx: make no_spaces compatible with doseol + Schroot: Use empty_generic_nocomment + +2013-02-07 Raphaël Pinson + + IniFile: Allow quotes inside bare values + + IniFile: Multiline values can begin with a single newline + + IniFile: Add empty_generic and empty_noindent + Subversion: Use IniFile.empty_noindent + + IniFile: Add entry_generic and entry_multiline_generic + Subversion: Use IniFile.entry_multiline_generic + + IniFile: Allow spaces in entry_multiline* values + +2013-02-07 Raphaël Pinson + + IniFile: Use Util.comment_generic and Util.empty + Add put test for ace + + Lightdm: empty comments are mapped as empty + PHP: empty comments are mapped as empty + Odbc: empty comments are mapped as empty + Samba: empty comments are mapped as empty + Krb5: Fix tests for new IniFile.empty + MySQL: Support smart quotes and empty comments + Yum: Use Util.empty instead of IniFile.empty + Subversion: Adapt to new IniFile.empty definition + Systemd: Fix tests for new IniFile.empty + +2013-02-07 Raphaël Pinson + + IniFile: Support smart quotes + Add support for smart quotes in IniFile lenses. + Fix PHP lens to support smart quotes. + Subversion: Adapt to smart quotes but allow ; in values + Schroot: Support smart quotes + + IniFile: Add ready-to-use lns_loose and lns_loose_multiline lenses + +2013-02-06 Andrew Anderson + + Krb5: fix parse error with IPA generated krb5.conf + +2013-02-06 Igor Pashev + + * configure.ac: better detection of how to pass version script to linker + This now also works on Illumos when using GNU ld + + Fixes https://fedorahosted.org/augeas/ticket/289 + +2013-02-06 Jan Pokorný + + lenses.tex: fix typos, single-quote cleanup + +2013-01-23 Dominic Cleal + + Shellvars: ignore network configs with brackets in their name + SSIDs containing brackets would cause aug_init failures, as the characters are + parsed in path expressions. + + Fixes ticket #246 + +2013-01-23 David Lutterkort + + augparse: add --trace option + Using --trace will print the filenames of all modules that are loaded. + + Shellvars: ignore network configs with ! in their name + NetworkManager would write such files, but that leads to problems during + aug_init, as the attempt to create the node + /augeas/files/etc/sysconfig/network-scripts/FILE!NAME will fail as that is + not a valid path expression + + * .gitignore: ignore test result files (*.trs) + + * acinclude.m4: only turn on FORTIFY_SOURCE if it won't anger gcc + Following libvirt commits cf9bced0 and 1c2edf0f + +2013-01-10 Raphaël Pinson + + Quote: Allow multiple spaces in quote_spaces + +2013-01-10 Jasper Lievisse Adriaanse + + Add two files found on OpenBSD to the simplevars lens. + +2013-01-08 Jasper Lievisse Adriaanse + + The nagios filters work for Icinga too + + Modify the Nagios lens to handle resources.cfg too. + Fixes ticket #312 + +2013-01-04 Raphaël Pinson + + AptPreferences: adjust a little bit to simplified lens + + AptPreferences: Simplify/Standardize the module + +2013-01-04 Jasper Lievisse Adriaanse + + Make sure the usage shows up properly formated. + + sync another comment with ND definition + + Sync View comment with actual definition. + + Properly document this lens. + + Basic documentation for final apt lenses and sync Menu.txt + + regen Menu.txt after recent changes. + + Move the 'coding' comment to the end of the file to fix the menu entry. + + Fix some more broken module names + + Small fixes to improve documentation: + - Declare a module name in test_yum, so that gets taken instead of Yum.lns + - Filter is a view, not a variable in ntpd.aug + - Properly declare the module name nginx.aug + + Correctly set the module name, and let it actually test the Lightdm lens. + +2013-01-04 David Lutterkort + + Xml test (input1): modify to mildly check handling DOS line endings + +2013-01-04 Jasper Lievisse Adriaanse + + Add support for handling the "client-output-buffer-limit" to the Redis lens. + +2013-01-03 Jasper Lievisse Adriaanse + + Some small Rx tweaks: include regexes for octal and hex and simplify ipv4 matching. + Fixes ticket #327 + + Add a lens for OpenNTPD's config file (ntpd.conf). + Extend rx.aug with some helpful regexes while here. + Fixes ticket #324 + + Adjust the fonts lens' exclusion rule to ignore all README files + Fixes ticket #323 + +2013-01-03 Raphaël Pinson + + Quote: improve lens usage + + Quote: lens usage + + Quote: Improve documentation for functions + + Xorg: Fix filter + +2013-01-03 Jasper Lievisse Adriaanse + + Also handle /etc/monitrc + Fixes ticket #326 + +2013-01-03 Jasper Lievisse Adriaanse + + Remove bogus use of Util.stdexcl. + It should only be used for wildcard includes. + Add an exclude to Util.stdexcl for "#*#" while here. + + Fixes ticket #325 + +2013-01-03 Raphaël Pinson + + Erlang and Quote are generic lenses + +2013-01-02 Jasper Lievisse Adriaanse + + Add a new lens for OpenBSD's /etc/boot.conf. + Fixes ticket #322 + +2013-01-02 Raphaël Pinson + + Networks: networks can have weird submasks, too + + Sysctl: exclude /etc/sysctl.d/README.sysctl + + Sudoers: Allow user aliases in specs + + Systemd: Allow backslashes inside values + + Systemd: Simplify expression + + Systemd: Don't use multiple negates in regexps + +2012-12-30 Jasper Lievisse Adriaanse + + * tests/cutest.c: include sys/wait.h for WIFEXITED and WEXITSTATUS. + Fixes ticket #321 + +2012-12-30 Dominic Cleal + + Inetd: support IPv6 addresses + Fixes ticket #320 + +2012-12-30 Jasper Lievisse Adriaanse + + Shellvars: parse /etc/rc.conf.local which is found on OpenBSD. + Fixes ticket #320 + + Dhclient: on OpenBSD dhclient.conf lives in /etc/dhclient.conf + Fixes ticket #320 + + Resolv: Add two new views (family and lookup) + Fixes ticket #320 + +2012-12-29 Dominic Cleal + + * src/augrun.c: fix spelling in defnode help + +2012-12-28 Raphaël Pinson + + AptPreferences: Add "n" to pin keys + +2012-12-23 Dominic Cleal + + Xinetd: handle missing values in lists + Fixes ticket #307 + +2012-12-22 Dominic Cleal + + Update NEWS and AUTHORS + +2012-12-21 David Lutterkort + + Version 1.0.0 + +2012-12-21 Dominic Cleal + + Krb5: support semicolon comments, allow empty lines within subsections + Fixes ticket #288 + +2012-12-21 Pat Riehecky + + Krb5: support host { } subsections inside v4_name_convert, handle multiple arguments to *_enctypes settings, support ticket_lifetime + Contains a minor incompatible lens change for permitted_enctypes, + default_tgs_enctypes and default_tkt_enctypes settings, where labels are now + lower-cased. + + Fixes ticket #274 + +2012-12-21 Raphaël Pinson + + Update NEWS and AUTHORS + + Merge branch 'master' of ssh://git.fedorahosted.org/git/augeas into dev/nginx + + Add Nginx lens to parse /etc/nginx/nginx.conf, bug #319 + +2012-12-21 David Lutterkort + + * src/Makefile.am: add $(top_builddir)/gnulib/lib to GNULIB_CFLAGS + Needed for building under IllumOS + + Fixes https://fedorahosted.org/augeas/ticket/270 + +2012-12-19 Matthaus Owens + + Add /etc/puppetlabs/puppet path to puppet lenses + In Puppet Enterprise, puppet is rooted in /etc/puppetlabs/puppet instead of + /etc/puppet, so that is also a valid location for puppet.conf, fileserver.conf, + and auth.conf. This commit also adds /usr/local/etc/puppet/auth.conf as a + filter for the puppet auth lens. + +2012-12-17 Marc Fournier + + Redis: new lens and tests + +2012-12-17 Raphaël Pinson + + Quote: Add tests for *_nil entries + +2012-12-17 Marc Fournier + + Add Quote.*quote_opt_nil variables and functions + ... which are exactly the same as Quote.*quote_opt, except they don't + set quotes by default. + + This patch also completes a couple of existing comments. + +2012-12-17 Marc Fournier + + augeas.vim: added a couple of keywords recently introduced. + +2012-12-17 Raphaël Pinson + + Dhcpd: force double quotes for filename attribute, bug #311 + +2012-12-16 Marc Fournier + + Postgresql: properly support quotes + Fixes trac#317 + +2012-12-14 Raphaël Pinson + + Postfix_Transport: allow host:port and [host]:port syntaxes, bug #303 + + Really test Avahi.lns in test_avahi.aug + + Update NEWS + +2012-12-14 Athir Nuaimi + + Add new Avahi lens to manage /etc/avahi/avahi-daemon.conf + +2012-12-14 Raphaël Pinson + + Merge branch 'trac#281' of git://github.com/mfournier/augeas into review/pr4 + +2012-12-14 Marc Fournier + + Add a path to pg_hba.aug, fixes Trac ticket #281. + + Htpasswd: new lens and tests + +2012-12-13 Raphaël Pinson + + Update NEWS + + src/augtool.c: honor --echo in run_args + + src/augtool.c: print_aug_error when run_args fails + + src/augtool.c: run_args is successful if code >= 0, bug #316 + +2012-12-12 Raphaël Pinson + + Update AUTHORS + + Prepare NEWS for 1.0 release + + Add Quote.dquote_spaces and Quote.squote_spaces + + Use Quote.quote_spaces in pg_hba.aug + + Add Quote.quote_spaces + + Automagically manage quotes in pg_hba.aug + +2012-12-11 Raphaël Pinson + + pg_hba.aug: Support multiple options (ticket #313) + + Add test for ticket 313 + + pg_hba.aug: fix method to avoid clashing with hostname + +2012-12-11 Andreas Ntaflos + + Support hostnames/FQDNs and FQDN suffixes in pg_hba.conf + In pg_hba.conf the "address" column may also be a hostname, FQDN or part + of an FQDN starting with a dot, in addition to IP addresses. This adds + support for such hostnames and hostname suffixes. + +2012-12-09 Raphaël Pinson + + Merge branch 'master' of ssh://git.fedorahosted.org/git/augeas into dev/shellvars_newlines + +2012-12-09 Dominic Cleal + + Shellvars: add locale.conf, vconsole.conf systemd configs + Fixes BZ#881841 + +2012-12-09 Raphaël Pinson + + Fix support for empty comments after comments + + shellvars.aug: Fix newlines after comments being mapped as Util.empty + +2012-12-06 Dominic Cleal + + Shellvars: add locale.conf, vconsole.conf systemd configs + Fixes BZ#881841 + +2012-12-03 Raphaël Pinson + + Add rsyslog.aug + +2012-11-29 Raphaël Pinson + + No need for comment in rabbitmq.aug (managed in erlang.aug) + + Support comments in erlang.aug and rabbitmq.aug + +2012-11-28 Raphaël Pinson + + Add rabbitmq.aug + + Add erlang.aug + +2012-11-22 Raphaël Pinson + + Add /etc/audit/auditd.conf to simplevars.aug + +2012-11-20 Domen Kožar + + correctly parse escaped string literals in vim syntax file + +2012-11-20 Francois Lebel + + Add a lens for logwatch. + +2012-11-20 Raphaël Pinson + + Add tests for regexp builtin with flag + + Add support for an 'i' flag in regexp builtin function + +2012-11-20 David Lutterkort + + * src/pathx.c: pass the number of actual arguments to the func implementation + + * src/pathx.c: match functions by name and arity + This makes it possible to have different numbers of arguments for the same + function, e.g. count() and count(nodeset) + + * src/pathx.c: disallow ',' in names in path expressions + Note that this breaks backwards compatibility, since, when searching for a + node 'a,b' you now must write "match a\,b" rather than "match a,b" + +2012-11-14 Raphaël Pinson + + Add Puppet_Auth lens + +2012-11-09 Raphaël Pinson + + Add aug_label to retrieve the label from a path. + +2012-11-09 David Lutterkort + + Sysconfig: handle end of line comments and semicolons; strip quotes + Fixes RHBZ #761246 + + square lens: correctly process skeletons during put + The current code would identify a L_SQUARE skeleton to match even when it + did not, meaning we would not trigger a create in all instances where it + was needed. + + Shellvars: add tests for semicolon handling + + * lenses/tests/test_sysconfig.aug: use a variable 'lns' for Sysconfig.lns + + * lenses/tests/test_sysconfig.aug: use a variable 'lns' for Shellvars.lns + + * tests/Makefile.am (lens_tests): add quote test + +2012-10-29 Raphaël Pinson + + Use the Quote module in dhcpd.aug + + Use the Quote module in openvpn.aug + + Add quote.aug to easily manage quotes + +2012-10-27 Raphaël Pinson + + vmware_config: use square lens to manage quotes + +2012-10-26 David Lutterkort + + square: properly handle first lens matching empty string + The rewriting of the ctype of (square l1 l2 l3) introduced in commit + 1484afc3 was not correct when the ctype of l1 matched the empty string: the + rewritten ctype did not match the empty string any more. + + This patch fixes that by making sure that fa_enumerate includes the empty + word if the language contains it. + +2012-10-26 Marc Fournier + + improved documentation for carbon/mcollective/memcached/thttpd lenses. + +2012-10-26 Raphaël Pinson + + VMware_Config accepts values without quotes + +2012-10-23 Francis Giraldeau + + Xml: support single _and_ double quoted attribute values + Fixes RHBZ #799885 + Fixes ticket #258 + +2012-10-23 David Lutterkort + + Use precise ctype of a square lens if it is indeed regular + + libfa (fa_enumerate): new function + Function to enumerate FA's with a finite language, given a preset limit of + words. + + * src/syntax.c (compile_test): print which test failed when missing exception + Tests which should produce an exception, but produce a regular value didn't + print their line info when they failed. + + * tests/modules/fail_shadow_union.aug: fix unintended test failure + +2012-10-19 David Lutterkort + + Gdm: also read /etc/gdm/custom.conf by default + +2012-10-19 Filip Andres + + cgconfig.aug adds space between group and id + +2012-10-19 David Lutterkort + + Lightdm: new lens and tests + Fixes ticket #302 + Contributed by David Salmen + +2012-10-19 jmccann + + Ntp: add tos directive + Fixes ticket #297 + +2012-10-19 David Lutterkort + + Phpvars: support classes and public/var values + Fixes ticket #299 + + Patch by aheahe + +2012-10-19 Marc Fournier + + Memcached: new lens and tests + + Thttpd: new lens and tests + + Carbon: new lens and tests for Carbon cache. + + MCollective: new lens and tests + +2012-09-24 Dominic Cleal + + Revert f04d7dfb3fe7c54b0be650e68aa7778eaf02ea66 + This was a subtle feature which uses counters named after the setting key to + index the values beneath it, over all instances of the setting key. This allows + for path expressions such as /files/etc/ssh/sshd/AllowEnv/10 to map to the + tenth value, irrespective of how many setting lines they are split over. + + Modprobe: revert inner lens name change, fixes Modules_conf + Modules: define own entry regexp as referenced Modprobe inner lens doesn't + match file format + +2012-09-21 Dominic Cleal + + Modprobe: support multiline split commands + Fixes Ubuntu bug #1054306 + +2012-09-17 Dominic Cleal + + Sshd: reset seq counter for each array setting + +2012-09-13 Raphaël Pinson + + Fix test_syslog.aug + + Capital letters are allowed in tokens in syslog.aug + + Add collectd.aug and associated test + +2012-09-10 Raphaël Pinson + + Add postfix_virtual.aug and associated test + + Remove /etc/postfix/virtual from postfix_transport.aug + +2012-09-04 Dominic Cleal + + Sshd: permit hyphens in subsystem names + +2012-09-03 Raphaël Pinson + + Add apt_update_manager.aug and test + + Add vmware_config.aug and test + + Allow empty lines in gtkbookmarks.aug + + Use label instead of seq in gtkbookmarks.aug + + Add gtkbookmarks.aug and test + +2012-08-27 Pat Riehecky + + Cachefilesd: new lens for /etc/cachefilesd.conf + +2012-08-23 jmccann + + fixes #278 multipath: allow devices to override defaults + +2012-08-22 Michal Filka + + Fixed logrotate.aug. + Logrotate accepts integers prefixed by a sign. Added real world + ntp config file example from SLES into test_logrotate.aug. + +2012-08-21 Jeroen van Meeuwen (Kolab Systems) + + Add a lens for Cyrus IMAP configuration file /etc/imapd.conf (includes /etc/imap/*.conf) + Fixes ticket #296 + +2012-08-14 Francis Giraldeau + + Generic square lens v4 + Lens square now takes lenses instead of regular expressions as arguments, as follow: + + square left body right + + The left and right lenses must accept the same language. The left lens can be + either key or del, while the right lens must be del. + + This patch changes the semantic of the square lens and is thus not backward + compatible. Modules must be updated accordingly. The definition of the square + lens should now be definitive, and later addition may add support for + additionnal lenses for left and right sides. + + * builtin.c: change definition of the square lens. + * get.c: use the AST to recover the left and right strings matched by the + square lens.Regular lenses are handled with regexp registers. + * put.c: the variable state->override is used to indicate to a del part of a + square lens that it should use the provided value instead of the saved + string in the skel or the default value. + * lens.c: change the lns_make_square to match the new structure. + + Update square lens test to use lens arguments instead of regexp. The change + consists to replace "square re lens" into "square right lens left", where right + and left are lenses. Hence, legacy lens is converted this way: + + Legacy: + let x = square re body + + New definition: + let x = + let right = key re in + let left = del re "" in + square right body left + + This patch splits pass_square.aug into regular and recursive tests. Other tests + are added to verify constraints on the square lens arguments and typechecking. + + Finally, this patch updates httpd and xml lens according to square args + + Changes in v2: + * protect arg with parenthesis in child_first and child_last macros + * drop flag in_square, avoid lens copy, drop square_left/right strings + replaced by ast for rec lens and regs for regular lens. This + processing is more general than the previous approach, and thus + will help to extends the square lens more in the future. + Changed in v3: + * Split the patch into smaller units + Changed in v4: + * Rejoin patches to avoid breaking make check + +2012-08-14 Francis Giraldeau + + Build AST while visiting the parse v2 + The AST records the structure of the parse according to the lens tree. The + indices of the text matched is recorded for later use. + + Changed in v2: + * Additional checks for correctness + * Create the root node in rec_process() + * Merge ast_add_child() and ast_append() + +2012-08-14 Francis Giraldeau + + Fix memory leak in dbg_visit + dbg_visit() calls format_lens() to display the lens information. The caller of + format_lens() must free the memory allocated, just do it. + + Ignore Eclipse settings directory + +2012-08-12 Dominic Cleal + + Simplevars: use to parse /etc/default/grub_installdevice + Ticket #290 + + Hosts_Access: add hosts_options(5) support + Fixes ticket #256 + +2012-08-12 Dominic Cleal + + Hosts_Access: permit more client list formats + * whitespace separated lists + * @netgroups + * IPv6 hosts, inc. zone indices + * paths to lists of clients + * wildcards + + Mostly fixes ticket #256 + +2012-08-11 Dominic Cleal + + Fix regression in permissions of created files + Commit 16387744 changed temporary file creation to use mkstemp, resulting in + new files being created with 0600 permissions. For brand new files created + through Augeas, their permissions stayed at 0600 rather than being set by the + umask as before. + + * src/transform.c (transform_save): chmod after creating new files to + permissions implied by the umask + +2012-08-11 Dominic Cleal + + Fix issues reported by clang static analyser + * src/transform.c (text_retrieve): initialise variable before use + * src/transform.c (filter_generate): remove duplicate variable assignment + * src/jmt.c (parse_add_item): ensure return is defined on goto error + + Fix augtool --transform documentation + * src/augtool.c (usage): -t syntax is now same as 'transform' command + * src/augrun.c (cmd_transform_def): improve description + + Arrange commands into groups for better help + * src/augrun.c: create group definitions, move commands into arrays per + group, update help output to iterate over and announce each group + + Ldif: new lens to read LDIF files per RFC2849 + + * src/augtool.c (add_transforms): move free() to prevent free(NULL) and run on each iteration + +2012-08-10 Raphaël Pinson + + Add a way to specify explict transforms + Allow specifying transforms in three different ways: + - an aug_transform API call + - a transform command for aug_srun + - a -t|--transform option to augtool + +2012-08-10 David Lutterkort + + * src/augeas.c: use constants for "lens", "incl" and "excl" + +2012-08-10 Francis Giraldeau + + Fix typo in previous commit + Adjust comment and remove duplicated test case for primary statement in + dhcpd.conf lens. + + Fix bug #293 primary statement in dhcpd.conf + The "primary" statement does not support any arguments, while it should when + it's used in the "zone" block statement. The solution is to add the primary + statement in the statements that requires a string argument. The primary + statement can thus take a value or not, and thus do not cause any ambiguity in + the put direction. + +2012-08-08 Raphaël Pinson + + Add entry_list and entry_list_nocomment to inifile.aug Use entry_list_nocomment in subversion.aug + +2012-08-07 Raphaël Pinson + + Add aug_rename to rename node labels without moving them in the tree. + +2012-08-07 Francis Giraldeau + + Escape double quotes when dumping regexp + Graphviz DOT is using double quotes to quotes the string of a label. Escape + double quotes to avoid parsing errors with graphviz when the regexp of the lens + includes double quotes. + +2012-08-02 Raphaël Pinson + + Update doc/naturaldocs/conf/lenses/Menu.txt + +2012-08-01 Raphaël Pinson + + Update email address for Raphaël Pinson in AUTHORS + +2012-07-31 Raphaël Pinson + + Make get_square case insensitive on the ending key. + +2012-07-29 Dominic Cleal + + * src/augrun.c (cmd_retrieve_help): tidy line wrapping + + NetworkManager: support semicolons in values, spaces and brackets in entry names + + * src/transform.c (xread_file): catch failed fopen, e.g. EACCES + + Fix Valgrind memcheck errors + * src/augtool.c (main_loop): free memory allocated by readline + * src/augrun.c (aug_srun): free command opts after use + +2012-07-27 Raphaël Pinson + + Notify #augeas channel + + Add valgrind test in .travis.yml + + Add Travis CI file + + Shellvars.aug fix empty comments + + Shellvars.aug: Allow double quotes around variables in case statements + + Shellvars.aug: Add shift and exit builtins, with optional args + + Shellvars.aug: Fix empty lines after comments + + Shellvars.aug: Support matching keys in var_action (ticket #290) + + Shellvars.aug: Add dbquot for double bquoted values + + Shellvars.aug: eol_comments must begin with a space char can contain # + + Shellvars.aug: Add bquot and dollar-assigned tests + + shellvars.aug: Allow semi-colons in bquot and dollar_assign Fix wrong test using bquot and eol_comment + + Allow newlines in quoted values + + Add lns_norec to shellvars.aug and fix ambiguities in the lens. + + Fix ambiguity in shellvars.aug by making semi-colons illegal in bquot and arrays. + +2012-07-26 Raphaël Pinson + + Allow end of line comments in fstab.aug + +2012-07-23 Michal Filka + + Cron: records can be prefixed by '-'. + +2012-07-19 Danny Yates + + vsftpd.aug: Add require_ssl_reuse option + +2012-07-19 David Lutterkort + + * augeas.spec.in: add bundled(gnulib) provides + Fixes BZ 821745 + +2012-07-19 Dominic Cleal + + Prevent cross-mountpoint attacks via .augsave during saving + Previously Augeas would open PATH.augsave for writing if a rename from PATH to + PATH.augsave failed, then write the file contents in. Now if the rename fails, + it tries to unlink PATH.augsave and open it with O_EXCL first. + + Mountpoints remain permitted at either PATH or PATH.augnew provided + /augeas/save/copy_if_rename_fails exists. + + * src/transform.c (clone_file): + add argument to perform unlink and O_EXCL on destination filename after a + rename failure to prevent PATH.augsave being a mountpoint + * src/transform.c (transform_save, remove_file): + always try to unlink PATH.augsave if rename fails, only allowing PATH to be + a mountpoint; allow PATH or PATH.augnew to be mountpoints + * tests/ + test-put-mount: check PATH being a mountpoint is supported + test-put-mount-augnew.sh: check PATH.augnew being a mountpoint is supported + test-put-mount-augsave.sh: check unlink error when PATH.augsave is a mount + + Fixes BZ 772261 + +2012-07-19 Dominic Cleal + + Prevent symlink attacks via .augnew during saving + Instead of saving into a predictable PATH.augnew file, save into a securely + created PATH.augnew.XXXXXX + + * src/transform.c (transform_save): + write changes to a temporary file in the same directory as the destination + (either the file's canonical path or the path of .augnew), before renaming + + * src/transform.c (transfer_file_attrs): + use fchown, fchmod etc. on the same file handles to ensure consistent + permission changes + + * bootstrap: add mkstemp gnulib module + * tests/ + test-put-symlink-augnew.sh: test symlink attack when writing .augnew + test-put-symlink-augsave.sh: test symlink attack when writing .augsave + test-put-symlink-augtemp.sh: test symlink attack via temp .augnew + test-put-symlink.sh: also test file modification + + Fixes BZ 772257 + +2012-07-18 Dan Prince + + Pythonpaste: new lens for Python Paste configs. + Added a new lense file for Python Paste configs. This is useful + for editing a variety of Openstack config files including, + Nova api-paste.ini, Glance *.ini files, keystone.conf, and the + swift config files. + +2012-07-18 David Lutterkort + + Xinetd: slight formatting improvements + + Case-insensitive regexps: fix a problem with number of groups + When we expand a regexp to a case-sensitive regexp in regexp_expand_nocase, + it is possible that the number of groups in that regexp changes, + e.g. /(a)|(b)/i becomes /[AaBb]/. That confuses the parser when that regexp + is used in a union or concatenation, since it expects the match following + the match for this regexp to be in group 3, not group 1. + + * src/regexp.c (regexp_union_n, regexp_concat_n): fix bad memory access + Avoid calling strlen on a possibly unintialized string (since we overwrite + the trailing '\0' with a '(' just before calling REALLOC + +2012-07-18 Michal Filka + + made xinetd.aug case insensitive on attribute names + +2012-07-18 David Lutterkort + + Update gnulib to commit cabce6b8 + +2012-07-18 David Lutterkort + + * src/builtin.c (pr_tree): new primitive print_tree + Useful in 'put' tests, as in + + test lns put ".." after + set .. ; + print_tree; + set .. + = ? + +2012-07-17 David Lutterkort + + aug_text_store, aug_text_retrieve: fix segfault when passed in node was NULL + When the node existed, but had a NULL value, we segfaulted instead of + reporting an error. We now report ENOMATCH. + + Fixes https://fedorahosted.org/augeas/ticket/283 + +2012-07-15 Dominic Cleal + + Fstab: options field is optional + +2012-07-13 Dominic Cleal + + Authorized_Keys: add more tests + +2012-07-13 Raphaël Pinson + + Add authorized_keys.aug and associated test. + +2012-07-04 Raphaël Pinson + + simplevars.aug: Add /etc/zabbix/*.conf to includes + + simplevars.aug: Allow quotes in variables that do not begin with a quote + +2012-06-28 Dominic Cleal + + Shellvars: exclude directories from /etc/sysconfig/* wildcard + This prevents a bug where Augeas maps a directory such as + /etc/sysconfig/network-scripts to a lens via a matching transform and fails + to save if the user edits /etc/sysconfig/network-scripts/ifcfg-eth0. + +2012-06-19 Micah Anderson + + escape all possible regular expressions before they are sent to sed + +2012-06-12 David Lutterkort + + Modprobe: allow spaces around '=' in option + Fixes https://bugzilla.redhat.com/show_bug.cgi?id=826752 + +2012-06-05 David Lutterkort + + * man/augtool.pod: update mentions of default load path + +2012-06-01 Luc Didry + + Add su logrotate.conf option in logrotate.aug + +2012-05-31 David Lutterkort + + Tests for aug_text_store and aug_text_retrieve + + aug_text_store, aug_text_retrieve: expose in augtool and aug_srun + + aug_text_store, aug_text_retrieve: new API functions + + * src/transform.c (text_retrieve): new function to turn tree into text + + * src/transform.c (text_store): new function to write string to tree + + * tests/test-run.c: allow loading of a module with 'use' + +2012-05-31 David Lutterkort + + Allow running individual tests with test-run + Invoking 'test-run t1 t2 t3' will only run tests t1, t2 and t3 + + * tests/test-xpath.c: move checking if a test is mentioned in argv to + cutest + * tests/cutest.c, tests/cutest.h: add should_run + * Makefile.am: test-xpath now uses cutest.[ch] + * tests/test-run.c (run_tests): check if tests is mentioned on cmd line + +2012-05-31 Raphaël Pinson + + Add postgresql lens + + Allow eol comments in simplevars.aug + + Add lens for cups + + Add lens for samba's smbusers + +2012-05-21 David Lutterkort + + * src/augrun.c (cmd_span): better synopsis + + * tests/run.tests: fix lines with trailing whitespace + + * tests/test-run.c (errtokens): bring in sync with actual error codes + +2012-05-17 David Lutterkort + + * src/transform.c (load_file): remove unused variable file + +2012-05-16 David Lutterkort + + Fix behavior of set with empty strings + * src/augrun.c (cmd_set, cmd_setm): distinguish between empty string and + NULL value + * tests/run.tests (set-args): adapt to new behavior + +2012-05-12 Dominic Cleal + + * src/try: don't overwrite gdbcmds.txt if it exists + +2012-05-11 Dominic Cleal + + Fstab: handle options with empty values ("password=") + +2012-05-06 Tim Bishop + + Puppet, PuppetFileserver: add /usr/local/etc/puppet paths + +2012-04-26 Raphaël Pinson + + Shellvars: various edge cases in case entries + + AptPreferences: #comments are accepted within entries + + NagiosCfg: /etc/nagios3/commands.cfg and /etc/nagios3/resource.cfg have their own syntax, allow spaces in values. + + /etc/default/whoopsie is an IniFile + + Merge branch 'master' of ssh://git.fedorahosted.org/git/augeas + + Mke2fs: Add support for default_mntopts, enable_periodic_fsck, and auto_64-bit_support. + +2012-04-26 Dominic Cleal + + Make creating NULL value nodes more intuitive + * src/augrun.c: add "touch" command to create node if it doesn't exist, make + argument to "set" and "setm" optional + + Fixes ticket #276 + +2012-04-23 David Lutterkort + + * src/augeas.h: include 'extern "C"' wrapper for C++ + Fixes https://fedorahosted.org/augeas/ticket/272 + + Patch from Igor Pashev + +2012-04-22 Raphaël Pinson + + Use Sys.getenv("HOME") in dput.aug + +2012-04-19 Raphaël Pinson + + PHPVars: map arrays with @arraykey subnodes to make working paths + +2012-04-12 Michal Filka + + Shellvars: handle bash's implicit concatenation of quoted strings + +2012-04-12 Josh + + Grub: add /boot/grub/grub.conf to transform + +2012-04-12 Luc Didry + + Use Sys.getenv('HOME') in filter instead of ~ since it's not expanded + +2012-04-12 Brett Porter + + Properties: improve handling of whitespace, empty props, and underscores in keys + This brings the lens closer to the Java specification + + With help from Carlos Sanchez and Dominic Cleal + + +2012-04-11 Raphaël Pinson + + Use a more standard way of writing LGPL v2+ in lens headers + +2012-04-10 Raphaël Pinson + + postfix_transport.aug also applies to virtual (5) + + Add postfix_transport.aug and associated test. + + Add subversion lens and associated test. + + Add networkmanager lens to tests and doc + + Add networkmanager.aug and associated test file. + +2012-04-09 Dominic Cleal + + Sudoers: allow quoted strings in Defaults parameters + Fixes bug #263 + +2012-04-08 Dominic Cleal + + Debctrl: allow control extensions for Python packages + Fixes bug #267 + + Debctrl: fixed package paragraph keywords, allow variables for version numbers in dependency lists, allow DM-Upload-Allowed keyword + Fixes Debian bug #650887 + +2012-04-06 Dominic Cleal + + AUTHORS: updated from recent commits + +2012-04-06 Jason Kincl + + Xymon: new lens for Xymon config files + Fixes ticket #266 + +2012-04-06 Jim Meyering + + compile_exp: don't return an uninitialized pointer upon failure + As a result of its improved flow analysis gcc-4.7.0 20111202 reported: + + syntax.c: In function 'compile_exp': + syntax.c:1694:5: warning: 'v' may be used uninitialized in this \ + function [-Wmaybe-uninitialized] + + However, compile_exp calls many functions that return values that are + then assigned to "v". Only two of those had a problem: in each there + is an error path by which the returned pointer is not initialized. + * src/syntax.c (compile_concat): Initialize "v". + (compile_minus): Likewise. + +2012-04-04 Duncan Mac-Vicar P + + bootloader is also present in shellvars_list, exclude from shellvars. + +2012-04-01 Dominic Cleal + + Sudoers: allow "!" as a type of Defaults entry + Fixes Debian bug #650079 + + Modprobe: support softdep command + Fixes Debian bug #641813 + +2012-03-29 Dominic Cleal + + * src/augrun.c (nexttoken): support \t and \n in aug_srun tokens + Fixes bug #265 + +2012-03-23 Raphaël Pinson + + Add netmask to hosts_access.aug + +2012-03-18 Dominic Cleal + + Shellvars: add systemd's /etc/os-release file + + Systemd: new lens to parse systemd unit files + + * src/augeas.c (aug_save): remove loop that added a second iteration around children of /files, causing multiple saves in newfile and noop modes when editing under /files/boot + Fixes ticket #264 + +2012-03-17 Dominic Cleal + + Qpid: new lens to read Apache Qpid daemon/client configs + Contributed by Andrew Replogle. + +2012-03-12 David Lutterkort + + Make sure reloading discards changes after save with mode 'newfile' + +2012-03-10 Dominic Cleal + + Util: add *.bak and *.old to stdexcl, to match files in /etc/sysconfig + + Fix excl filters that only specify a filename or wildcard + * src/transform.c (transform_validate): only normalise excl paths with + directory separators into absolute paths + * src/transform.c (filter_generate): don't apply root prefix to excl filter + values when only comparing the base filename + + Shellvars: exclude non-shell files in tests/root/etc/sysconfig + + Shellvars: add /etc/selinux/config + +2012-03-06 Dominic Cleal + + Shellvars: include /etc/{default,sysconfig}/* and list exceptions instead + +2012-03-03 Tim Mooney + + src/augtool.c: rename echo to echo_commands to fix differing types reported with Solaris linker + Fixes ticket #262 + +2012-02-24 Dominic Cleal + + Up2date: change tree to distinguish between empty values and empty lists + + Up2date: change tree to fix ambiguity during put, remove list of known config options and separation of possible values + +2012-02-22 Dominic Cleal + + Protocols: change tree to support protocols named "a/n" and "tp++" + + Shellvars: remove non-shell files, up2date now has a lens, move updatedb.conf to Simplevars + Fonts: exclude README + + Sep: add semicolon + + Ntp: allow deprecated 'authenticate' setting + +2012-02-21 Raphaël Pinson + + Add up2date.aug and associated test file + +2012-02-17 Raphaël Pinson + + Support \r in httpd.aug + + Support \r in comments in util.aug + + Support \r\n in xml.aug + + Do not allow \r in comment_or_eol + + Add Util.doseol + +2012-02-13 David Lutterkort + + * src/transform.c (clone_file): do not leak from_fp + +2012-02-13 Raphaël Pinson + + Allow commands without full path if they begin with a lowcase letter in sudoers.aug + + Allow = in commands in sudoers.aug (but force ! or / as first character if not an alias) + + Use Build.opt_list in sudoers.aug + +2012-02-13 Dominic Cleal + + Shellvars: add BSD's /etc/rc.conf + Fixes ticket #255 + +2012-02-12 Dominic Cleal + + Improve aug_srun quoting to permit concatenation and better detect bad quoting + * src/augrun.c (nexttoken): permit shell-like concatenation of quoted and + unquoted strings, detect unmatched quotes and raise AUG_ECMDRUN. + * tests/run.tests: add lots of tests to cover quoting mismatches, single and + double quote combinations, courtesy of David Schmitt + + Passwd: allow asterisk in password field + Fixes ticket #255 + + Pam: exclude /etc/pam.d/README + Fixes ticket #255 + +2012-02-10 Raphaël Pinson + + Simplify Sudoers.sto_to_com_user to improve performance. Use more standard constructs. + + Add continued lines to rx.aug and sep.aug + +2012-02-09 Raphaël Pinson + + Improve grub.aug's performances slightly + + Improve keepalived.aug: cut typechecking time and resident size by 2. + + Use Cron.shellvar in anacron.aug + + Simplify Cron.key_re to improve typechecking of cron.aug + + Allow # and ; in quoted values in inifile.aug (Fix ticket #243) + +2012-02-08 Terence Haddock + + * lenses/tests/test_iptables.aug: test that we accept blank lines + +2012-02-08 Francis Giraldeau + + Allocate exception instead of static const value + The static const value returned by exn_error() may cause SIGSEGV in case + the value is further changed. To avoid this situation, the structure is + allocated early in aug_init instead and released in aug_close, and is + accessible via aug->error->exn. The resulting exception value can be + modified without adverse effect. + +2012-02-08 Duncan Mac-Vicar P + + Shellvars: autoload some SuSe and RHN specific files + +2012-02-07 David Lutterkort + + Add very simplistic leak test + + Fix some memory leaks + * src/augeas.c (tree_from_transform): do not do unneeded strdups which + lead to leaks + * src/lens.h: any lens can carry a jmt when it is recursive; this was a + pretty serious issue which could have lead to memory corruptions, since + struct lens was not right for that + * src/lens.c (free_lens, lens_release): call jmt_free for all lenses + +2012-02-07 Raphaël Pinson + + Fix test-save by allowing (empty | comment)* in yum.aug. + +2012-02-07 Dominic Cleal + + CronAllow: remove accompanying test, moved into Simplelines test earlier + +2012-02-06 David Lutterkort + + * src/transform.c (transform_save): different errors for parse and put failure + +2012-02-06 David Lutterkort + + Graphviz: remove since it can not be typechecked + Typechecking for the Graphviz lens requires too much memory right now, + which makes it impossible to run 'mke check' on a reasonably sized machine + (6GB memory) + + Backing out the lens until we can figure out a way to fix it so that 'make + check' works with it in practice. + +2012-02-06 Raphaël Pinson + + Disable recursive mode in graphviz.aug since it fails in the put direction. + + Pass Util.empty with entry in Build.block_generic. Fix ambiguity with Util.empty in graphviz.aug. + +2012-02-03 Raphaël Pinson + + graphviz.aug: space is optional before options + + graphviz.aug: names can be empty + + Support crazy example in graphviz.aug + + Add a simple graphviz.aug and associated test + + Use Build.block_newlines in keepalived.aug + + Build.block_newlines takes a comment parameter, newline is optional + + Add variables for default delimiters and regexps in build.aug + +2012-02-02 David Lutterkort + + * src/transform.c (filter_generate): take root into account for excludes + When matching an exclude pattern against a path, only try to match against + the part of path after the root. The paths found by globbing include + patterns contain the root. + + Fixes bug #252 + +2012-02-02 Raphaël Pinson + + Improve logrotate, use Build, Rx, Sep + + Add lbracket and rbracket to sep.aug + + Add tests for build.aug + + Add Build.block_newlines and use it in xinetd.aug + + Rewrite xinetd.aug with Build, Sep, Rx + + Allow to set lbracket_re and rbracket_re in Build.block_generic + + Add Util.delim and use it in Sep.space_equal + + Add Build.block_setdefault + + Add default_lbracket and default_rbracket to Build.block_generic + + Add blocks to build.aug, add comment_noindent to util.aug Add test_build.aug + +2012-02-01 Raphaël Pinson + + Support dollar assignment ($(bar)) in shellvars.aug + + Parse functions in shellvars.aug + + Shellvars.aug allows multiple elif statements + + Add test_fonts.aug + +2012-01-31 Dominic Cleal + + CronAllow: remove lens, add files to the Simplelines lens + +2012-01-31 Raphaël Pinson + + Add fonts.aug + + Add ldso.aug and test + + Fix author + + Add /etc/sysctl.d to sysctl.aug, improve lens and add it to docs. + + Add protocols.aug and associated test + + Add /etc/wgetrc to simplevars.aug + + Add simplelines.aug and test + + Add simplevars.aug and associated test + + Add inputrc.aug and associated test + + Add anacron.aug and associated test + + cowpoke.conf + +2012-01-30 Raphaël Pinson + + Ignore allow.pamlist from pam.aug + + Add a few files to shellvars.aug + + Add fuse.aug and associated test + +2012-01-27 Dominic Cleal + + Vfstab: new lens for /etc/vfstab config on Solaris + +2012-01-22 Dominic Cleal + + Automounter: exclude /etc/auto_master for Solaris, small tidyup + + Automounter: exclude /etc/auto.master + + Automaster: change to lowercase for consistency with Automounter + + Automounter: new lens to parse automounter maps (/etc/auto.*) + +2012-01-21 Dominic Cleal + + AutoMaster: new lens to parse autofs auto.master files + + CronAllow: new lens to parse both cron/at allow/deny files + Cron: exclude cron allow/deny files + + Nsswitch: remove long list of databases, match by regexp + + PamConf: new lens to parse /etc/pam.conf with the additional service field + + Pam: allow uppercase chars in 'types', remove /etc/pam.conf from filter + PamConf: new lens to parse /etc/pam.conf with the additional service field + + Networks: handle multiple missing network octets, fix sequencing of aliases + + Nsswitch: add extra databases used on Solaris + + Shells: permit same-line comments + +2012-01-20 Dominic Cleal + + Netmasks: new lens for parsing /etc/inet/netmasks on Solaris + +2012-01-19 Travis Groth + + Nsswitch: add passwd_compat, group_compat and shadow_compat GNU extensions + +2012-01-18 Raphaël Pinson + + Add channels.aug and associated test. + +2012-01-14 Dominic Cleal + + Grub: parse "password --encrypted" properly, add tests for file subnode + Fixes ticket #250 + +2012-01-11 Francis Giraldeau + + Fix fatest linking with libfa + fatest requires libfa symbols which are not exported by libaugeas library. + +2012-01-09 Lubomir Rintel + + Correctly parse empty object and arrays in JSON + Add a test case. + Fix from David Lutterkort . + + https://fedorahosted.org/augeas/ticket/248 + +2012-01-09 Lubomir Rintel + + Allow JSON number literals to be followed by whitespace + Add a test case. + + Fixes https://fedorahosted.org/augeas/ticket/247 + +2012-01-09 David Lutterkort + + * build/aux/move-if-change: refresh with latest from gnulib + Taken from gnulib commit 1602f0af + +2012-01-02 Dominic Cleal + + * src/augtool.c (main_loop): re-open rl_outstream/stdout only when stdout isn't a tty (fixes -e -i); use /dev/tty instead of /dev/stdout when re-opening to prevent permission errors + Fixes ticket #241 + +2011-12-31 Dominic Cleal + + * tests/test-augtool.sh: fix broken gsed check + +2011-12-30 Dominic Cleal + + Remove Linux-isms so tests can run on Solaris + * tests/test-augtool-modify-root.sh: /bin/sh -> /bin/bash + * tests/test-augtool.sh: /bin/sh -> /bin/bash, use 'gsed' if available (GNU sed + is required) + * tests/test-load.c: don't use GNU sed in-place extension + * tests/test-preserve.sh: handle Solaris `ls -il` output + + * bootstrap: add strchrnul gnulib module (for Solaris) + +2011-12-24 Jim Meyering + + Don't use variables uninitialized upon error + * src/transform.c (filter_generate): Move declarations and + initializations of pathv and pathc to precede possible + "goto error;" via which those variables are used. + +2011-12-23 Francis Giraldeau + + fix fatest linking + +2011-12-19 Raphaël Pinson + + Rebase yum.aug on inifile.aug, support comments (except in lists) Fix ticket #217 + + Add @return to shellvars.aug + +2011-12-19 Erinn Looney-Triggs + + Create lens and tests for sssd.conf heavily based on mysql and php lenses. + +2011-12-18 Raphaël Pinson + + aliases.aug: commands can be fully enclosed in quotes (Fix ticket #229) + +2011-12-18 Erinn Looney-Triggs + + Add in single-request-reopen into lens and tests. + +2011-12-16 Michael Chapman + + Add missing argument to escape() + Fixes ticket #242. + +2011-12-10 Dominic Cleal + + * src/augeas.c (tree_root_ctx): create context path if it doesn't exist + +2011-12-09 Raphaël Pinson + + Add libxml2-devel to requirements in HACKING + +2011-12-08 Raphaël Pinson + + Debian-based distributions use /etc/mdadm/mdadm.conf + +2011-12-05 Raphaël Pinson + + Support include() in phpvars.aug + + Add unit test for bug #239 + + In aug_to_xml: do not replace pathin with '/*' unless the length is 0 or pathin is '/' (Fix ticket #239) + +2011-12-03 Richard W.M. Jones + + pkg-config: Augeas requires libxml2. + +2011-12-02 David Lutterkort + + Version 0.10.0 + 2011-12-02 Dominic Cleal Implement escape sequences for whitespace, quotes and square brackets in command arguments to match Puppet provider. @@ -41,6 +2955,8 @@ * src/augeas.c (aug_to_xml): rename 'path' attr on root to 'match' The attribute contains a path expression, not just a path. +2011-12-01 David Lutterkort + Make it possible for aug_init to report initialization errors Sometimes initialization fails for mundane reasons, like syntax errors in lens files. So far, it was not possible for callers to report details for @@ -56,6 +2972,8 @@ * src/augtool.c: call aug_init with AUG_NO_ERR_CLOSE and print errors on initialization failure +2011-12-01 David Lutterkort + Update documentation for augtool/augrun and man page Adjust more copyright notices @@ -167,6 +3085,8 @@ Fixes bug #238 +2011-11-29 David Lutterkort + * tests/cutest.c: run one test when CUTEST env var is set 2011-11-29 Raphaël Pinson @@ -365,6 +3285,8 @@ ^ Configuration file errors encountered -- exiting +2011-11-15 Michael Chapman + Access: parse user@host and (group) in users field pam_access matches the hostname in user@host against the system's own hostname, which allows a single access.conf to be shared amongst @@ -373,6 +3295,8 @@ pam_access also allows group names to be optionally enclosed in parentheses to disambiguate them from user names. +2011-11-15 Michael Chapman + Access: field separator need not be surrounded by spaces For compatibility with the old behaviour and to match the examples in the PAM documentation, new entries are still emitted with spaces. @@ -385,6 +3309,8 @@ Mdadm: use case-insensitive regexps +2011-11-15 David Lutterkort + * src/fa.c (totalize): handle case-insensitive FA's properly The convention for case-insensitive FA's is that they do not contain any transitions on [A-Z], effectively removing upper case letters from the @@ -481,9 +3407,13 @@ exception of \/ and \\ sequences. These needs to be handled by unescape() directly. +2011-10-10 Michael Chapman + FAI_DiskConfig: Fix invalid escape sequence \s It should be expanded to [ \n\t]. +2011-10-10 Michael Chapman + Cron: Fix parsing of numeric fields In: @@ -493,6 +3423,8 @@ erroneously allowed a whole bunch of characters (including all uppercase letters) in numeric fields. +2011-10-10 Michael Chapman + Cgconfig: Fix parsing of group names In: @@ -611,6 +3543,8 @@ xpath test. fai_diskconfig does this. As a temporary fix, we disable transform from fai_diskconfig. +2011-08-31 Francis Giraldeau + Adding ssh client lens This lens parses the client side configuration directives of ssh. @@ -644,6 +3578,8 @@ By reformating eol of pupperfileserver test, it's possible to make both git and unit test working. +2011-08-11 Francis Giraldeau + Remove trailing white spaces from puppet test Trailing white lines are valid in a puppet file, but the test is rejected when pushing to master git repository. @@ -687,6 +3623,8 @@ Of course, this is a heinous hack. +2011-07-22 David Lutterkort + Migrate tests from test-mv.sh into run.tests aug_srun: new API call @@ -756,6 +3694,8 @@ Sudoers: allow same-line comments Fixes ticket #206 +2011-06-29 Dominic Cleal + Util: allow comment_or_eol to match empty comments containing only whitespace Services: add test for line with a whitespace-only comment @@ -832,6 +3772,8 @@ test root: add a few more files +2011-04-29 David Lutterkort + path expressions: allow whitespace inside names This makes the path expression '/files/etc/foo bar/baz' legal, i.e. it is no longer necessary to escape whitespace in path expressions. @@ -875,6 +3817,8 @@ Enable the test for continuation lines in test_httpd.aug +2011-03-25 Bill Pemberton + Add /etc/httpd/conf/httpd.conf to the filter list for httpd.aug Allow blank and comment lines throughout config file in iptables @@ -920,6 +3864,8 @@ Thanks to thefoxbox for the enhancement +2011-03-17 Francis Giraldeau + Fix unmatch bracket causes segfault in augtool.c When command is parsed in augtool, function nexttoken verify that path has valid and matching brackets and return NULL if not. The function cleanpath that @@ -1011,6 +3957,8 @@ Version 0.8.0 +2011-02-23 David Lutterkort + Fix compile errors found by gcc 4.6.0 There were several places that caused the new 'variable assigned but not used' warning. @@ -1018,6 +3966,8 @@ The struct lens also contained the member jmt twice; it is now only available for L_REC lenses. +2011-02-23 David Lutterkort + * src/info.h: include stdlib so we can use uint * tests/Makefile.am: distribute the test data in test-augtool/ @@ -1145,6 +4095,8 @@ * Fix copy/paste error about config files * Added filters for Fedora and RHEL +2011-01-25 Francis Giraldeau + Add Httpd lens The Httpd lens parses Apache Web server configuration according to the manual. @@ -1205,6 +4157,8 @@ for that file up for loading. This reduces the runtime of the tests from ~ 30s on my machine to under 2s. +2011-01-11 David Lutterkort + Test that getting and setting the root node works This tests the same thing that test-get.sh tests, but in a much more reliable fashion @@ -1228,6 +4182,8 @@ Refactor augtool.c to use only readline +2011-01-10 Raphaël Pinson + augtool: add --autosave option Additional changes to augtool: * Define AUGTOOL_PROMPT as a constant @@ -1353,6 +4309,8 @@ Enable square lens in dump_lens +2010-12-10 Francis Giraldeau + Add square lens to language The new primitive square lens allows to handle XML like open and close tags. It takes 2 arguments, a regexp for the tag and a lens for the content. The @@ -1413,6 +4371,8 @@ comment entries. Adapt tests for shellvars and services to take this new behaviour in consideration. +2010-11-19 Raphaël Pinson + Add "indomU" Debian setting to grub.aug (Fix ticket #162) Allow "\" style newlines in syslog.aug and add corresponding test (Fix ticket #161). @@ -1452,6 +4412,8 @@ * tests/Makefile.am (lens_tests): add tests for new lenses +2010-11-18 David Lutterkort + Krb5 (realm_re, app_re): allow digits in realm names Still makes the incorrect assumption that realm names start with an upper case letter, and app names with a lower case one, but it's an improvement @@ -1659,6 +4621,8 @@ * src/try: add an optioj to strace augtool +2010-09-09 David Lutterkort + Properly record the new mtime of a saved file in the tree transform_save used to pass an incorrect file name to add_file_info (the name was missing the root prefix), leading to an mitme of 0 for all saved @@ -1702,6 +4666,8 @@ Version 0.7.3 +2010-08-06 David Lutterkort + Fix behavior of aug_defnode (1) Make sure that the definition of the variable is recorded under /augeas/variables @@ -1725,6 +4691,8 @@ * augeas.c (pathx_aug_parse): renamed, add optional arg for a different root +2010-08-05 David Lutterkort + Fix BZ 613967 - memory corruption on reloading externally modified file The problem was that when we replaced the old tree for a file with the new one we just read from the file, the replace operation did not update @@ -1739,6 +4707,8 @@ * tests/test-load.c (testReloadExternalMod): test that we do not segfault when a file was modified externally +2010-08-05 David Lutterkort + Test root: mimick the setup of grub config files on Fedora more closely * root/etc/grub.conf: symlink to root/boot/grub/grub.conf * root/boot/grub/grub.conf: new file with contents of /etc/grub.conf @@ -1781,6 +4751,8 @@ The lens doesn't autoload any files yet, though we should consider moving most of the files that Shellvars loads over to this lens. +2010-07-23 David Lutterkort + * src/lens.c (lns_check_rec): allow 'let rec' with regular RHS If the user writes 'let rec l = rhs' and the RHS does not mention l, just mark the lens as regular and carry on. @@ -1789,6 +4761,8 @@ * src/syntax.c (load_module_file): make sure we report an error +2010-07-21 David Lutterkort + Fix segfault in glue routines; add test for the fix The tree_*_glue functions did not set the error struct when parsing a path; this caused a segfault when trying to insert before/after a non-existant @@ -1797,6 +4771,8 @@ Fixes bug #129 +2010-07-21 David Lutterkort + * src/syntax.c (compile_test): reset errors at the end of the test Otherwise, we can't have tests succeed after tests failed intentionally (by making their result '= *') @@ -1838,6 +4814,8 @@ obliterating the tree and filling it with the latest from disk. This includes throwing away unsaved changes or trees that have been deleted. +2010-06-29 David Lutterkort + Add utility tree_store_value to avoid unnecessary strdup's * src/internal.h (tree_store_value): add prototype * src/augeas.c (tree_store_value): new function; (tree_set_value): use @@ -1847,12 +4825,16 @@ * src/augeas.c (tree_clean): remove 'static' * src/internal.h (tree_clean): add prototype +2010-06-29 David Lutterkort + Add xstrtoint64 to internal.[ch] The implementation is directly from libvirt * src/internal.h (xstrtoint64): add prototype * src/internal.c (xstrtoint64): add impl +2010-06-29 David Lutterkort + * src/test-load.c (testLoadSave): work off a writable /etc/hosts This addresses a FIXME that could lead to use not detecting incorrect behavior @@ -1861,6 +4843,8 @@ * tests/cutest.c (run): add impl * tests/test-save.c (run): remove +2010-06-29 David Lutterkort + Redefine all variables upon load This is a slight change in behavior: before, we used to just discard the contents of all variables upon load. Now, we redefine variables by @@ -1869,6 +4853,8 @@ The change in behavior is backwards compatible, since at worst, users will redefine variables themselves after an aug_load +2010-06-29 David Lutterkort + * src/augeas.c (aug_init): create /augeas/variables on startup * src/augeas.c (aug_defvar): use constants to create /augeas/variables @@ -1979,6 +4965,8 @@ File was reported in bug #122 +2010-04-21 David Lutterkort + tests: make most tests work on Solaris The test scripts are full of bashisms; removed some of them, though for most, just changed the shell from /bin/sh to /bin/bash; removing bashisms @@ -1986,6 +4974,8 @@ Tests now mostly pass (82/85) on the OpenCSW Solaris 5.10 build machine +2010-04-21 David Lutterkort + * tests/test-save.c: use proper includes for WIFEXITED Without them, the build fails on FreeBSD @@ -2000,6 +4990,8 @@ Debctrl: whitespace cleanup, no functional change +2010-04-20 David Lutterkort + * src/fa.c (re_iter_as_string): escape literal '|' When turning a FA back to a string, a literal '|' needs to be output as '\|' @@ -2017,6 +5009,8 @@ * src/augtool.c: report an error when 'get' fails +2010-04-19 David Lutterkort + aug_get: return -1 when multiple nodes match This fixes breakage in the API contract for aug_get, introduced in commit e80494a6. Also adds a test to ensure we do not break API for aug_get again. @@ -2036,11 +5030,15 @@ distinguish between internal errors, syntax errors and successful parses properly. +2010-04-16 David Lutterkort + * src/get.c (visit_exit): handle L_MAYBE Added test to tests/modules/pass_simple_recursion.aug, lens 'maybe' Fixes bug #119 +2010-04-16 David Lutterkort + * src/jmt.c (build_tree): print debug output for build_nullable 2010-03-12 David Lutterkort @@ -2197,6 +5195,8 @@ * src/fa.c (parse_int): flag not parsing anything as an error +2010-02-08 David Lutterkort + * src/jmt.c: add caller filtering Caller filtering is needed to weed out seemingly ambiguous parse trees (see Section 5.3 of Jim/Mandelbaum's paper) @@ -2204,6 +5204,8 @@ Also adds two pathological lenses and tests to pass_simple_recursion.aug. Those tests fail without caller filtering. +2010-02-08 David Lutterkort + * AUTHORS: reformatted * tests/Makefile.am: add test for cobblermodules.aug @@ -2231,6 +5233,8 @@ Bug reported by Matt Palmer +2010-01-27 David Lutterkort + * src/get.c (no_match_error): initialize lname Otherwise, gcc complains about a possibly uninitialized value with -O2 @@ -2238,6 +5242,8 @@ Test for using a recursive lens inside other lenses +2010-01-25 David Lutterkort + * src/get.c: handle recursive lenses that are not L_REC Since any lens that uses an L_REC is itself recursive, the distinction whether to use get_rec or get_lens can be made in lns_get @@ -2246,6 +5252,8 @@ Fixes ticket #100 +2010-01-25 David Lutterkort + Properly handle lenses that use L_REC lenses In constructs involving a recursive lens, we need to take the body of the recursive lens into consideration. We avoid infinite recursion by stopping @@ -2260,8 +5268,12 @@ * src/jmt.c: when building the jmt, consider L_REC as long as it's not internal +2010-01-25 David Lutterkort + * src/jmt.c (print_grammar): recurse into L_REC if they are not rec_internal +2010-01-25 David Lutterkort + * src/jmt.c (jmt_visit): allow for toplevel lenses that are not L_REC To reconstruct the parse of a lens that is not L_REC, but uses L_REC, e.g. l* where l is L_REC, we can not assume any longer that the root of the @@ -2275,6 +5287,8 @@ of the root of the parse tree; the Earley graph does not contain an item for that, which makes this operation slightly special. +2010-01-25 David Lutterkort + * src/lens.c: propagate rec_internal in the body of an L_REC * src/lens.c: don't short-circuit typechecking for recursive lenses explicitly @@ -2318,6 +5332,8 @@ allowed if the first expression is of type unit, i.e. '() ; something' is legal. +2010-01-15 David Lutterkort + Language: allow '_' as an identifier that is never bound The expression let _ = something @@ -2326,6 +5342,8 @@ * src/lexer.l (LID): allow leading underscore * src/syntax.c (bind, bind_type): do not bind '_' +2010-01-15 David Lutterkort + New primitive lens 'value' In analogy to 'label', this lens allows setting the value of a tree node to a fixed string @@ -2338,6 +5356,8 @@ Tests for recursive (context free) lenses +2010-01-14 David Lutterkort + Syntax for recursive lenses Add a 'let rec' construct; the syntax should be considered experimental and might be changed to some other form of expressing recursion. @@ -2355,6 +5375,8 @@ of let_check_rec within the interpreter * src/syntax.c (free_term): now extern, not static +2010-01-14 David Lutterkort + * src/get.c (get_rec, parse_rec): get/parse for recursive lenses * src/put.c: put/create for recursive lenses @@ -2375,6 +5397,8 @@ * src/lens.h: add a recursive lens combinator +2010-01-14 David Lutterkort + A simple debug facility Debugging is disabled by default. When configured with --enable-debug=yes, Augeas will look at runtime at the environment variable AUGEAS_DEBUG, which @@ -2387,6 +5411,8 @@ * src/internal.h (debugging, debug_file): new functions * src/internal.c (debugging, debug_file): new functions +2010-01-14 David Lutterkort + struct error: add pointer back to struct augeas * src/errcode.h: more usable BUG_ON and BUG_FMT @@ -2425,6 +5451,8 @@ * src/lens.c (str_to_fa): remove FIXME's and use proper error reporting +2010-01-13 David Lutterkort + Support for case-insensitive regexps Add nocase argument to make_regexp, and adjust all uses of make_regexp to pass that in. For concatenation and union of regexps we have to expand @@ -2432,6 +5460,8 @@ Adjust all uses of make_regexp. +2010-01-13 David Lutterkort + Add fa_expand_nocase to libfa Support for case-insensitive operations in libfa @@ -2459,6 +5489,8 @@ be enclosed in quotes if they have spaces with predicates, e.g. you can now type 'get /foo[ last() ]' +2010-01-07 David Lutterkort + Record an error if more than one lens tries to load a file * src/transform.c (file_info): new function; (transform_load): detect if more than one lens tries to load a file and record error in @@ -2468,6 +5500,8 @@ * src/transform.c (file_name_path): new function; (load_file): use file_name_path +2010-01-07 David Lutterkort + Change the metadata for individual files Record the name of the lens used to load the file in the lens node underneath /augeas/files/$PATH; the location info of the lens is kept in @@ -2477,6 +5511,8 @@ lens node * tests/xpath.tests (lircd-ancestor): adapt to metadata change +2010-01-07 David Lutterkort + * src/transform.c (add_file_info): manipulate tree directly Going through public functions like aug_set is silly, and causes all kinds of string munging. @@ -2495,12 +5531,16 @@ * src/transfrom.h (xfm_lens_name): add prototype * src/transform.c (xfm_lens_name): new function +2010-01-07 David Lutterkort + Tree functions to find/create a node with a path expression Internal counterparts to aug_get and aug_set * src/internal.h (tree_find, tree_find_cr): new prototypes * src/augeas.c (tree_find, tree_find_cr): new functions +2010-01-07 David Lutterkort + * src/internal.h: make various tree management functions available 2010-01-06 David Lutterkort @@ -2517,12 +5557,16 @@ Fixes bug #98 +2010-01-05 David Lutterkort + New error code AUG_ENOLENS Indicates failure to look a lens up by name from /augeas/load/*/lens * src/augeas.h (aug_errcode_t): new value AUG_ENOLENS * src/augeas.c (errcodes): new entry for AUG_ENOLENS +2010-01-05 David Lutterkort + * src/lens.c (lens_release): tolerate a NULL lens 2010-01-04 Bryan Kearney @@ -2547,6 +5591,8 @@ * src/builtin.c (lens_get, lens_put): propagate errors as exceptions +2009-12-18 David Lutterkort + More convenience macros for errors Add BUG_ON and ERR_RET macros for reporting internal errors @@ -2609,10 +5655,14 @@ Fixes ticket #93 +2009-11-25 David Lutterkort + * src/lexer.l: include errcode.h; fix bad use of report_error * src/errcode.c: include stdarg.h +2009-11-25 David Lutterkort + Cron: variable names can contain '_' etc. Use Shellvars.key_re for consistency. @@ -2679,6 +5729,8 @@ * test/Makefile.am (TEST_ENVIRONMENT): set LANG to a non-C locale +2009-11-10 David Lutterkort + Remove character ranges from regexps if we are not in the C locale Since re_compile_pattern uses the current locale when expanding character ranges like [a-z], we need to be careful that such ranges are expanded in @@ -2696,10 +5748,14 @@ Fixes ticket #35 for systems that do not have uselocale (for systems with uselocale, the fix is commit 07b6a880) +2009-11-10 David Lutterkort + libfa: new function fa_expand_char_ranges Calls to __aug_load_module need to go through api_entry/api_exit +2009-11-10 David Lutterkort + Switch to C locale on API entry on systems that have uselocale Since we need to do all our operations (especially regexp matching) in the C locale, we switch to that on API entry, and switch back to the user's @@ -2752,6 +5808,8 @@ Fixes ticket #89 +2009-10-21 David Lutterkort + * src/pathx.c (clone_nodeset): properly set size of the clone The size of the clone is the number of nodes in the original nodeset, not the size of the original nodeset. @@ -2766,6 +5824,8 @@ Wine: new lens and test Lens for parsing textual Windows registry files +2009-10-20 David Lutterkort + Pam: allow '-' before type The type field in a pam.d file can start with a '-' to indicate that missing the module should not cause an error. The '-' is now mapped into @@ -2773,6 +5833,8 @@ Bug reported by Shannon Hughes +2009-10-20 David Lutterkort + * test/Makefile.am (lens_tests): add lens-ethers.sh * src/internal.c (escape): convert char to unsigned when printing as octal @@ -2811,6 +5873,8 @@ * lenses/rx.aug (device_name): new regexp * lenses/tests/test_lokkit.aug: new test for more permissive device names +2009-10-09 David Lutterkort + Lokkit.forward_port: add missing eol Also adjust test_lokkit.aug since we're not getting a spurious empty entry anymore @@ -2898,6 +5962,8 @@ * src/regexp.c (regexp_compile): do not print anything on error +2009-09-21 David Lutterkort + Split regexps, info and strings out of syntax.[ch] * Move struct string and struct info and related functions into info.[ch] * Move headers for regexp.c into new file regexp.h @@ -2905,6 +5971,8 @@ This makes it easier to reuse these outside of syntax.[ch] - including syntax.h in get.c and put.c was way too much anyway. +2009-09-21 David Lutterkort + aug_match, aug_mv: return -1 when pathx evaluation fails Report errors when exactly one match is expected @@ -2991,6 +6059,8 @@ e.g. when the original file is bindmounted - in that situation, we have to copy. +2009-09-03 David Lutterkort + * src/syntax.c (print_value): use print_tree instead of dump_tree 2009-09-02 David Lutterkort @@ -3020,6 +6090,8 @@ The tests strips optional quotes and puts them back (or creates them) as needed, only depending on the value of the tree node. +2009-08-31 David Lutterkort + Match trees on label and value, not just label We still only use one level in the tree for matching in the put direction, but take the values of nodes into account. @@ -3027,6 +6099,8 @@ We had fail_ tests in place to document the deficiency of the tree matcher, but with that deficiency gone, these now become passing tests. +2009-08-31 David Lutterkort + Restrict the alphabet of a regexp Use offsets for various lens types @@ -3051,12 +6125,16 @@ * src/builtin.c (tree_clear_glue): primitive clear function for use in tests +2009-08-31 David Lutterkort + Utility function xasprintf Like asprintf, but don't leave first arg in limbo on error * src/internal.h (xasprintf): new prototype * src/internal.c (xasprintf): new function +2009-08-31 David Lutterkort + regexp_release: allow NULL regexp * src/augeas.c: do not read past the end of the load path @@ -3091,6 +6169,8 @@ Fixes bug #79 +2009-08-10 David Lutterkort + Pass symtab explicitly into pathx_symtab_remove_descendants 2009-08-06 David Lutterkort @@ -3103,6 +6183,8 @@ Fixes bug #78 +2009-08-06 David Lutterkort + * src/transform.c (add_file_info): change what we store about a file For a file FILE, we now only record the path and the info for the lens; instead of @@ -3119,10 +6201,14 @@ The id wasn't useful to anybody, and the lens info is useful for debugging at best +2009-08-06 David Lutterkort + * src/transform.c (add_file_info): minor cleanup - Rename add_load_info to add_file_info - Eliminate filename argument, since it's redundant +2009-08-06 David Lutterkort + defnode: when creating new node, put it in the nodeset When a new node is created, e.g. with 'defnode x "/foo[0 = 1]"' we used to assign an empty nodeset to x. Now x will hold a reference to the newly @@ -3168,6 +6254,8 @@ as it does not know what types to expect, it stores a bare string. This will include quote marks. +2009-08-04 Matthew Booth + Add more specific entry handlers to xorg.conf Additionally handle: * Driver @@ -3181,6 +6269,8 @@ values are valid. For example, with this patch Driver will not accept an unquoted value, which would cause the X server not to start. +2009-08-04 Matthew Booth + Parse more directives in xorg.conf The default xorg.conf generated by pyxf86config on Red Hat/Fedora systems is not parsed by the current xorg.conf. Specifically it does not @@ -3241,6 +6331,8 @@ Fixes bug #72 reported by Micah +2009-07-08 David Lutterkort + Shellvars: allow backticks as quote characters * lenses/shellvars.aug (simple_value): allow backticks as quotes * lenses/tests/test_shellvars.aug: add tests @@ -3261,15 +6353,21 @@ Fixes part of bug #67 reported by Micah +2009-07-08 David Lutterkort + Logrotate: make owner/group in create statement optional * lenses/logrotate.aug (create): make mode/owner/group optional * lenses/test/test_logrotate.aug: add tests Fixes part of bug #67 reported by Micah +2009-07-08 David Lutterkort + * configure.ac: use AC_SYS_LARGEFILE Suggested by Jeff Johnson +2009-07-08 David Lutterkort + * src/augeas.c (init_root): when root0 == "", use "/" as root When an empty string is passed as root0, make sure we do not make an invalid memory access when we look for the trailing slash. @@ -3346,12 +6444,16 @@ Fixes part of ticket #66 +2009-06-11 Anders F Björklund + configuration: check whether rl_completion_matches is available That function is missing on OS/X; we substitute it with a dummy if readline does not provide it. Fixes part of ticket #66 +2009-06-11 Anders F Björklund + * src/augtool.c: add missing include for ctype.h Part of fix for ticket #66 @@ -3393,6 +6495,8 @@ Whitespace cleanup (no functional change) Remove trailing whitespace +2009-05-29 David Lutterkort + Ntp: support more commands * process 'broadcastdelay' * process enable/disable flags @@ -3402,6 +6506,8 @@ Fixes bug #62, reported by Frank Sweetser +2009-05-29 David Lutterkort + Fix grammar docs (production for PrimaryExpr was wrong) * tests/root/etc/: add group and passwd files @@ -3466,6 +6572,8 @@ Cron: new lens and test Parses /etc/crontab and /etc/cron.d +2009-04-08 Raphael Pinson + Sudoers: allow backslashes inside sto_to_com and sto_to_com_user This patch fixes ticket #60 which reports the possible usage of backslashes in sudoers aliases (for use with e.g. Windows resources). @@ -3476,6 +6584,8 @@ Additionally, add a line with backslashes in test_sudoers to prevent regressions. +2009-04-08 Raphael Pinson + Xinetd: map comments using Util.comment Squid: allow indentation of entries @@ -3527,6 +6637,8 @@ Also exposes comments in /etc/aliases as #comment nodes +2009-04-03 Raphael Pinson + New utility modules Build, Rx, and Sep 2009-04-03 Marc Fournier @@ -3584,6 +6696,8 @@ Thanks to Nate Foster for the inspiration of this +2009-03-25 David Lutterkort + Sudoers: produce at most one negate node Even if there are multiple '!' signs, only produce one negate node. @@ -3618,6 +6732,8 @@ into $(datadir)/augeas/lenses, they are automatically preferred over the ones we ship. +2009-03-24 David Lutterkort + New API call aug_defnode and augtool command defnode It's common that we want to define a variable to reference /foo/bar, and create that node if it does not exist yet. aug_defnode bundles that @@ -3756,6 +6872,8 @@ * src/fa.h: use 'struct fa *' instead of fa_t +2009-03-13 David Lutterkort + * src/augeas.c: fix handling of dirty flag Under some circumstances, we did not properly propagate the dirty flag up the tree, leading to files that were not saved even though they should have @@ -3764,6 +6882,8 @@ This also removes two full sweeps over the tree for dirty handling, and now only touches nodes that are/need to be marked dirty. +2009-03-13 David Lutterkort + * Makefile.maint: different setup at home 2009-03-12 David Lutterkort @@ -3799,6 +6919,8 @@ Test the Debian Lenny sample squid.conf +2009-03-09 Francois Deppierraz + Add a bunch of keywords available on squid-2.7-STABLE6 or squid-3.HEAD-20090308. The keywords list was generated by the following command: @@ -3855,6 +6977,8 @@ * src/pathx.c: make sure ['foo' != 'foo'] is false +2009-03-02 David Lutterkort + * src/pathx.c: handle names with '.' properly Make sure that a component ina path expression like '.bar' is parsed as a single step (name), and not as the self axis '.' followed by some @@ -3862,6 +6986,8 @@ Bug reported by Jan Kupec +2009-03-02 David Lutterkort + * src/pathx.c: it is an error if we don't consume the whole expression 2009-02-27 David Lutterkort @@ -3929,12 +7055,16 @@ * src/pathx.c: allow '=' and '!=' of numbers +2009-02-18 David Lutterkort + * src/pathx.c: fix matching multiple predicates We used to evaluate /path[pred1][last()] wrong - last() must match the last node in the nodeset /path[pred1], not the last node in the nodeset /path. This requires that we compute nodesets explicitly. +2009-02-18 David Lutterkort + Logrotate: small fixes * recognize 'yearly' schedule * allow whitespaces around { and } @@ -4024,11 +7154,15 @@ The typecheck is redundant (we already do that when running lens tests) and really slow +2009-02-06 David Lutterkort + Grub: process 'savedefault' in boot stanza Also, allow keywords to be preceded by whitespace Fixes ticket #36 +2009-02-06 David Lutterkort + Minor whitespace cleanup 2009-02-02 Free Ekanayaka @@ -4088,6 +7222,8 @@ * pathx_next does not need an explicit argument for the current tree node any more +2009-01-30 David Lutterkort + Expand the grammar for path expressions * add predicates based on labels and values * allow path expressions in predicates, e.g. '/foo/bar[../baz = "7"]' @@ -4099,6 +7235,8 @@ Also add tests to check path expression evaluation +2009-01-30 David Lutterkort + Use absolute paths in lens tests when manipulating the tree Paths that start with a number (like '1/ipaddr') are ambiguous in the new path expression grammar and will confuse the parser; to make it clear that @@ -4257,6 +7395,8 @@ Segments do not need to track the tree node where they matched anymore, since we can get the same information by following parent pointers. +2008-12-23 David Lutterkort + Make finding the parent and siblings of a node uniform All nodes (including the root) now have a parent node, so that the start of the list of siblings can be found as @@ -4266,6 +7406,8 @@ children are the real root nodes. Another way to look at this is that the tree is now edge-labeled. +2008-12-23 David Lutterkort + Rename seg_siblings to tree_siblings Add an explicit parent pointer to the tree @@ -4470,6 +7612,8 @@ Logrotate: add dateext flag Patch by Sean E. Millichamp +2008-09-22 David Lutterkort + Various changes to the NaturalDocs support This patch changes a few things around in the NaturalDocs support: @@ -4598,6 +7742,8 @@ There's no need to construct an FA to check if a regular expression matches the empty string. +2008-09-03 David Lutterkort + Properly typecheck the '?' operator The '?' operator was completely missing a typecheck for the atype. The check must make sure that neither the ctype nor the atype match the empty @@ -4645,6 +7791,8 @@ Script to run lens tests through Valgrind We don't run this as part of 'make check' since it's _very_ slow. +2008-08-27 David Lutterkort + Dhclient: change some defaults for del This is really a bug in how string literals are unescaped by the lexer, but we can sidestep the problem here. @@ -4712,12 +7860,16 @@ Shellvars: one more cornercase with double quoted strings +2008-08-15 David Lutterkort + Shellvars: much improved handling - handle single and double quoted strings correctly - parse arrays into a subtree Inspired by a chat and preliminary work by nahamu +2008-08-15 David Lutterkort + skel_instance_of: remove pointless check There is no point in trying to match against skel->text for a store lens since that is always NULL. @@ -4736,6 +7888,8 @@ Added test in test-mv.sh to test that moving at the root level works. +2008-08-14 David Lutterkort + Module names are treated case-insensitively Before, if you had a module 'Mod' in file 'mod.aug' and requested variable 'MoD.var' from another module, the interpreter would throw itself into a @@ -4829,6 +7983,8 @@ Test for continuation lines +2008-08-11 David Lutterkort + Posix ERE compliant escaping Posix extended regular expressions treat a backslash outside of a character class always as an escape character, with the character sequence '\\x' @@ -4854,6 +8010,8 @@ by a sequence) or when all entries fall under one key, adding an entry to a dict is O(log n). +2008-08-09 David Lutterkort + Don't use registers in split_iter The data in the registers was never used, calculating it causes some overhead in the matcher. @@ -4867,6 +8025,8 @@ inside a leaf node. In that case, we know that there is no possible split, and therefore can save the trouble of calling regexp_match. +2008-08-08 David Lutterkort + Avoid O(n^2) runtime by appending to lists in constant time The data structure used to keep track of successive matches of an iterated lens, a split list, was being appended to by traversing the list for each @@ -4879,6 +8039,8 @@ Dicts still have that problem - they need to be changed to hash tables to address this issue. +2008-08-08 David Lutterkort + Add list_reverse and list_tail_cons list_reverse reverses a list in place. list_tail_cons appends to a list in constant time, since it is given a pointer to the tail of the list. @@ -4896,6 +8058,8 @@ libaugeas, we also bump the minor version, since we just added aug_mv to the interface. +2008-08-07 David Lutterkort + Check that 'put' fails when invalid tree entries are present put_quant_star and create_quant_star did not compare the part of the tree they should transform against the part of the tree they actually @@ -4910,6 +8074,8 @@ Fixes bug https://fedorahosted.org/augeas/ticket/1 +2008-08-07 David Lutterkort + Return an exit status from augtool augtool will return a non-zero exit status if any command issued failed. This is useful when piping multiple commands into augtool to check @@ -5044,6 +8210,8 @@ Added tag release-0.2.1 for changeset 13fdcd9bb18a +2008-07-17 David Lutterkort + aliases.aug: Do not require whitespace after commas It's perfectly fine to have an alias like 'alias: target1,target2' @@ -5056,6 +8224,8 @@ Bug reported by Raphael Pinson. +2008-07-16 David Lutterkort + Add support for 'insert' in unit tests Two new primitives 'insa' (insert after) and 'insb' (insert before) are added so that unit tests can modify the tree through insert, as in @@ -5084,6 +8254,8 @@ Most of this fix suggested by Jim Meyering, I only touched it up a little (and no doubt introduced all the bugs). +2008-07-07 David Lutterkort + Check for NULL values in the put direction of store This is now flagged as an error instead of causing a segfault. @@ -5123,6 +8295,8 @@ Reported by Jason Dobies +2008-06-13 David Lutterkort + Produce more helpful errors The previous check whether we could proces the entire input was too crude and produced the unhelpful error message "Get could not process entire @@ -5139,6 +8313,8 @@ Process /etc/sysconfig/selinux Patch by Alan Pevec +2008-06-12 David Lutterkort + Fix segfault when aug_init/close are called multiple times The way we cached the regexp '[0-9]+/' was totally botched. We now allocate the pattern statically in memory and pin it to protect it from being freed, @@ -5150,6 +8326,8 @@ Initialize out parameters +2008-06-06 David Lutterkort + Change struct fields of type (const char *) to (char *) There were many places where struct fields were declared (const char *) but then used as (char *) - mostly to free them. Remove the 'const' from those @@ -5178,6 +8356,8 @@ been declared yet and it goes and does that. gcc then complains about the duplicate declaration. +2008-06-03 David Lutterkort + Infrastructure and import of gnulib modules We do not keep the gnulib sources in our own repo. Instead, autogen.sh now calls out to bootstrap to pull in needed files from gnulib. @@ -5340,6 +8520,8 @@ Add dependency on ref.h +2008-05-16 David Lutterkort + Get rid of compiled regexps earlier After we're done with a transform, release the memory used by compiled regexps; storage for compiled regexps accounts for the lion's share of @@ -5422,6 +8604,8 @@ broke collect into separate subfunctions so we can see better when one of them becomes a bottleneck. +2008-05-13 David Lutterkort + Stricter skeleton instance check for del and store Besides having the right tag, del and store match a skeleton only if the text for that skeleton also matches their regexp. @@ -5443,6 +8627,8 @@ Use the new '-' operator for key_re +2008-05-09 David Lutterkort + Add subtraction of regular expressions to the language It is now possible to say something like @@ -5450,6 +8636,8 @@ The '-' operator is only defined between regexps. +2008-05-09 David Lutterkort + Add REGEXP_MINUS; move REGEXP_TO_FA to regexp.c Refactor typechecking for union/concat @@ -5460,6 +8648,8 @@ Also clean up the definition of the bitset type and make the bitset_* functions const correct +2008-05-09 David Lutterkort + Add fa_as_regexp that converts an automaton back to a regexp During conversion from FA to regexp, our FA mutates into a 'generalized transition graph' where transitions aren't labelled with character @@ -5483,12 +8673,16 @@ Safer memory allocation from libvirt +2008-05-08 David Lutterkort + Fix a rather embarrassing #ifdef problem When __GNUC__ was not defined, a big chunk of internal.h was suppressed that is not compiler dependent. Also, add ATTRIBUTE_PURE macro. +2008-05-08 David Lutterkort + Switch to using unsigned char internally Since we use chars as indices into arrays in some cases, it is simpler to treat characters as unsigned. This also addresses passing possibly signed @@ -5498,6 +8692,8 @@ There were also cases where we iterated over chars using a char, which was prone to silent overflow. +2008-05-08 David Lutterkort + Fix mistaken assignments in asserts Reported by Jeff Johnson @@ -5509,6 +8705,8 @@ Patch by Jim Meyering +2008-05-06 David Lutterkort + Small fixes to the specfile Suggested by Michael Schwendt @@ -5525,6 +8723,8 @@ Be more consistent in how NULL labels are printed +2008-05-05 David Lutterkort + Suppress assert of hash_verify Doing the assert(hash_verify(hash)) at various places in hash.c is very expensive and slows things down considerably when assertions are turned @@ -5533,6 +8733,8 @@ Rather than turning assertions off globally, only do the hash_verify asserts when they are explicitly requested by defining HASH_DEBUG_VERIFY +2008-05-05 David Lutterkort + Do not minimize freshly created regexps The minimization imposes a serious performance penalty, and is generally not needed. @@ -5540,6 +8742,8 @@ This also exposes a bug in fa_overlap; for acceptToAccept to work properly, it needs to be passed a deterministic automaton. +2008-05-05 David Lutterkort + Fix containment check Checking for FA2\FA1 being empty was plain silly; this check is a little better, but still not the correct disjointness check. @@ -5568,6 +8772,8 @@ variables are actually going to be looked at (together with some restrictions on possible values) +2008-04-30 David Lutterkort + Test files for various /etc/sysconfig files The next commit will add a lens for handling shell var style files in /etc/sysconfig. These are simply test/sample files. No functionality. @@ -5601,6 +8807,8 @@ the edge going from a parent to its child, but root has no parent, and therefore "/" does not really make sense. +2008-04-25 David Lutterkort + Split multiple baseurl's in a yum file into multiple baseurl nodes With this, the schema for yum config files may now contain nodes like { "section" @@ -5625,6 +8833,8 @@ This change fixes that and adds a test to demonstrate the problem. +2008-04-24 David Lutterkort + Fix ref counting error in lns_make_plus We burnt the passed-in ownership of L when constructing STAR; also, since we unref STAR at the end, we need to take ownership of STAR->LENS when @@ -5638,12 +8848,16 @@ Processing of Apt's sources files Contributed by Dean Wilson +2008-04-24 David Lutterkort + Make sure install preserves timestamps Avoids getting into trouble with the .aug files in augeas-libs on multilib when installing more than one arch. See http://fedoraproject.org/wiki/PackagingDrafts/MultilibTricks +2008-04-24 David Lutterkort + Remove trailing whitespace from the end of lines No functional change, only formatting. @@ -5657,14 +8871,20 @@ Add todo file for low-level tasks that don't make sense on the website +2008-04-23 David Lutterkort + Split libraries into a -libs package This also includes the files in /usr/share/augeas, since they are read by the library and control how configuration files are processed. Patch provided by Harald Hoyer +2008-04-23 David Lutterkort + Include the augtool manpage as doc in the RPM +2008-04-23 David Lutterkort + Don't die on NULL entries in args There is no guarantee that parseline will fill all of args with strings, empty or otherwise; chk_args needs to be prepared that any entry in args @@ -5673,6 +8893,8 @@ Also, parseline initializes all args as NULL now to guard against garbage pointers accumulating from previous uses. +2008-04-23 David Lutterkort + Don't complain about missing optional args For example, both 'print' and 'print PATH' are legal. Make sure we accept either. @@ -5696,12 +8918,16 @@ Clean up the error path in load_file; free the loaded text in transform_load +2008-04-22 David Lutterkort + Use fread_file_lim to read entire files The function is taken verbatim from libvirt's util.c, and due to show up in gnulib soon. Also, make read_file return a char * instead of the silly const char *. +2008-04-22 David Lutterkort + Check the return value from hash_create More const-correctness fixes @@ -5729,12 +8955,16 @@ Propagate failure of transform_save up +2008-04-21 David Lutterkort + Sync compiler warnings with latest from libvirt This should avoid build failures seen on Debian, caused by -fstack-protector Also fix build failure caused by addition of -Wformat-security +2008-04-21 David Lutterkort + Mention people who sent patches Parse network configs in /etc/sysconfig/ifcfg-* @@ -5751,6 +8981,8 @@ Check for failures during printing and return an indication whether printing succeeded or not. +2008-04-21 David Lutterkort + Don't hide pointer in typedef; const correctness The type for the Augeas handle is now called 'augeas' insteda of 'augeas_t', and is a struct, not a pointer to a struct. @@ -5759,11 +8991,15 @@ Patch provided by Jim Meyering +2008-04-21 David Lutterkort + Change names of macros used to guard against double-inclusion Change the names from __NAME_H to NAME_H_ since __* macros are reserved. Suggested by Jim Meyering. +2008-04-21 David Lutterkort + Add "2008" to the copyright in the headers 2008-04-19 David Lutterkort @@ -5821,6 +9057,8 @@ Process grub.conf +2008-04-14 David Lutterkort + Don't delete too many siblings When a path specified a node that had siblings with the same name, tree_rm was deleting that node and all the siblings after it (because the name @@ -5829,6 +9067,8 @@ Now, first generate a list of nodes to delete before removing anything. +2008-04-14 David Lutterkort + Fix put test - it was checking for hte wrong result Running a failing test fails loading the whole module @@ -5842,6 +9082,8 @@ Syntax and semantics follow XPath. +2008-04-11 David Lutterkort + Run all tests - don't abort after the first failure 2008-04-10 David Lutterkort @@ -5859,6 +9101,8 @@ valid. Ideally, this check would be in the typechecker, but requires dependant types, too much of a complication right now. +2008-04-09 David Lutterkort + Clean up some confusion around the semantics of store Store does not create a tree; instead it puts a value in place where the enclosing subtree will find it. @@ -5868,6 +9112,8 @@ happen in the typechecker, but it would require that we parametrize the lens type, considerably complicating matters. +2008-04-09 David Lutterkort + When get encounters an error during a test, include hte tree in the exn lns_get now returns a tree even if the full input was not consumed. To check whether get succeeded, the ERR parameter needs to be checked. @@ -5886,6 +9132,8 @@ Do not do the expensive lens type checks if AUG_TYPE_CHECK is not set. Run augtool with -c in tests to ensure tests do type checks. +2008-04-09 David Lutterkort + Update augtool round-trip tests and add them to 'make check' Update the tests to the new layout of the tree. @@ -5893,6 +9141,8 @@ test) and sets the exit status properly so that 'make check' will fail if one of the augtool tests fails +2008-04-09 David Lutterkort + Fix underallocation Only attempt to save if there are dirty files @@ -6050,6 +9300,8 @@ /etc/aliases processing in the new syntax with tests +2008-04-04 David Lutterkort + Allow rm from toplevel of tree The only issue with this is that the dirty flag can not be set properly when deleting from the toplevel of the tree since the flag has to be set on @@ -6063,6 +9315,8 @@ nodes are fixed, like /files and /augeas, and we don't really have an issue there. +2008-04-04 David Lutterkort + Small tweaks Produce exn when tree_rm/tree_set fail @@ -6102,12 +9356,16 @@ The basename of the file must be the name of the module, lowercased and with ".aug" appended +2008-04-03 David Lutterkort + Add explicit loadpath augtool and augparse now take an explicit loadpath with the -I option, which can be repeated multiple times. aug_init takes a loadpath as a new argument +2008-04-03 David Lutterkort + Load needed modules When the module for a qualified identifier Mod.name is not loaded yet, automatically load it by looking for a file mod.aug on the module load @@ -6153,6 +9411,8 @@ Pass lns_error to parse; free dicts and skels +2008-04-02 David Lutterkort + Report errors from get as exceptions Adds a value kind 'EXN'. When the interpreter gets such a value, it bails out immediately. @@ -6160,6 +9420,8 @@ lns_get now reports parse errors in an lns_error struct, which is turned into an exception in the interpreter. +2008-04-02 David Lutterkort + Added tag ml-syntax-start for changeset fcd6c04a1eed A subtree without a key matches "/" @@ -6292,6 +9554,8 @@ Store the map of (s1, s2) -> s for intersection in nested state sets instead of a linked list. +2008-03-12 David Lutterkort + Faster data structures for sets of states and a list of sets of states Store the list of sets of states for determinize in a hash table. Since I don't feel like implementing my own, pull in glib and use GHashTable. @@ -6309,6 +9573,8 @@ reachable states, use one bit each in the state to mark them for that purpose. +2008-03-11 David Lutterkort + Add typechecking of lenses Concatenation and iteration of lenses is now checked for ambiguity. Union is checked for disjointness, but that is only flagged as a warning, since @@ -6331,6 +9597,8 @@ to split that string into u.pv and up.v. Algorithm from Anders Moeller from the dk.brics.grammar package. +2008-03-06 David Lutterkort + Fix example generation, it was completely broken The previous algorithm was way too simplistic, and failed on more complicated languages. @@ -6339,6 +9607,8 @@ preferences, so that for example, alnum characters are preferred over printable ones, and those over nonprintable ones. +2008-03-06 David Lutterkort + Fix some cornercases in fa_example 2008-03-05 David Lutterkort @@ -6353,6 +9623,8 @@ Released version 0.0.6 +2008-03-05 David Lutterkort + Allow influencing the behavior of save By passing one of the flags AUG_SAVE_BACKUP or AUG_SAVE_NEWFILE to aug_init, it is possible to influence the behavior of aug_save to either @@ -6362,6 +9634,8 @@ Also added switches to augtool to set this from the command line, and to set the filesystem root. +2008-03-05 David Lutterkort + Added tag release-0.0.5 for changeset 0efe2a620e39 Mark print_re as unused @@ -6380,6 +9654,8 @@ Add a test that performs Anders Moeller's ambiguity algorithm manually +2008-03-04 David Lutterkort + Two bug fixes (1) fa_make_char_set would never create transitions with min == max (2) fa_intersect got things wrong when t2 had an interval that overlapped @@ -6387,6 +9663,8 @@ Also added tests to check these two problems. +2008-03-04 David Lutterkort + Fix handling of negated charsets Negated charsets where handled entirely wrong. A character set is now represented as a map from char -> {0, 1}. That map is rather big (one byte @@ -6399,11 +9677,15 @@ Compute the complement, set difference and overlap of two languages +2008-03-04 David Lutterkort + Fix a bug in how '.' is being handled The '.' was treated the same as [\n] instead of [^\n] by mistake. Also fixes a small bug in fa_contains. +2008-03-04 David Lutterkort + Add deciding unambiguously iterable based on ua concatenable 2008-03-03 David Lutterkort @@ -6444,6 +9726,8 @@ Add tests for language subsets and equality +2008-02-29 David Lutterkort + The beginnings of a finite automata library The code is heavily based on the Java package dk.brics.automaton by Anders Moeller (http://www.brics.dk/automaton/) @@ -6451,6 +9735,8 @@ Eventually, this should becomea standalone library, seeing how there does not seem to be any open-source, maintained finite automata library. +2008-02-29 David Lutterkort + Some unit testing help This is an adapted version of CuTest (http://sourceforge.net/projects/cutest/) written by Asim Jalis @@ -6541,6 +9827,8 @@ Print test results a tad prettier +2008-02-20 David Lutterkort + Use GNU regex instead of PCRE Use the GNU regex functions from glibc instead of PCRE, as glibc uses a DFA implementation that does not suffer the limitations of PCRE's backtracking @@ -6550,11 +9838,15 @@ essentially extended POSIX regular expressions, except that '.' does not match newlines. +2008-02-20 David Lutterkort + Clean up regexps for POSIX Various small fixes to regexps to make them work properly as POSIX regexps. Added tag remove-any-first-follow for changeset 0d22160e9494 +2008-02-20 David Lutterkort + Remove any matches ... and ..? from the language. Remove first/follow sets They currently require lookahead assertions from the underlying regexp engine. @@ -6562,6 +9854,8 @@ Since any matches were the only reason to compute first/follow sets, remove those, too. +2008-02-20 David Lutterkort + Remove the use of the any operators '...' and '..?' These operators inherently require lookahead assertions, but we need to switch to a regexp engine that does not support them. @@ -6592,6 +9886,8 @@ Unfortunately, we have to keep first/follow computations to construct the fairly tricky regexps that are used for ANY patterns. +2008-02-18 David Lutterkort + Remove unused token T_FIELD Rename match.xaction to match.action @@ -6602,6 +9898,8 @@ Remove leading whitespace inside Match directives +2008-02-18 David Lutterkort + Fix nested splits For a lens like a . (b . c)*, tree_split used to return a split that looked like [a; b; c; b; c] That is wrong: when we split on the outer '.', we need @@ -6612,12 +9910,16 @@ subsplits are mostly computed for their sideeffect, particularly for the fact that they change state->tree. +2008-02-18 David Lutterkort + Properly print split nodes Lenses for sshd_config This is interesting because of the treatment of AcceptEnv and similar constructs +2008-02-18 David Lutterkort + For split nodes, append entries at the last occurence It is possible that one logical node is split across several physical nodes to accomodate settings that are spread across several lines like @@ -6692,6 +9994,8 @@ Fixed, nicely working tests +2008-02-14 David Lutterkort + Readline completion Complete command names and tree paths. @@ -6699,6 +10003,8 @@ trailing spaces or '/'. Cleaning should probably be done by the public API. +2008-02-14 David Lutterkort + Major rework Code still unbelievably buggy and segfaults in lots of places, but it is fairly clean and works for choice examples. @@ -6766,6 +10072,8 @@ user cleanly indicate what a comment goes with (e.g., an entire section, the next key/value pair etc.) +2008-01-29 David Lutterkort + Initialize fields used as path components When a field is used in a path component, initialize its value from the path. Since it is not possible to change an existing path, this operation @@ -6775,10 +10083,14 @@ where the leaf's value is used. That is not necessarily true; at least, it's not being checked from the grammar. +2008-01-29 David Lutterkort + Test that reordering of subtrees works Set the root of the tree from include +2008-01-29 David Lutterkort + Respect ordering of nodes in the config tree. Previously, reordering of branches in the config tree did not lead to a corresponding reordering of elements in the file. Branches in the AST are @@ -6789,8 +10101,12 @@ change the path for the current (iterator) node, only for the child nodes. That is terribly ugly. +2008-01-29 David Lutterkort + Fix bug in creating sequence subtrees +2008-01-29 David Lutterkort + Distribute enters so we have one per match Simultaneous traversal of the AST and the config tree is much simpler if any match will only go at most one level deeper. That guarantees that @@ -6808,6 +10124,8 @@ ensures that the children of an AST node differ in exactly one path component. +2008-01-29 David Lutterkort + Push stores to the matches they store in the tree In an assignment, the value being stored can only be a field reference. Push the corresponding action for the store to that field. This @@ -6823,8 +10141,12 @@ if they get in the way of a store, but should probably be checked for the whole grammar +2008-01-29 David Lutterkort + Produce dot files for the grammar +2008-01-29 David Lutterkort + Various changes to the tests to make them (almost) work (1) Adjust to the fact that the root dir is now a variable (2) Mark tests as failing if augtool exits with an error exit status @@ -6833,6 +10155,8 @@ Some of the tests are still failing. +2008-01-29 David Lutterkort + aug_ls: Fix bad parent comparison Before /foo/1000 was listed as a child of /foo/1 @@ -6855,6 +10179,8 @@ names and simplifies the 'put' direction of the transformation considerably. +2008-01-21 David Lutterkort + Some config settings - most of them need to be exposed through configure.ac 2008-01-18 David Lutterkort @@ -6870,6 +10196,8 @@ Don't segfault in ast_dot on NULL ast +2008-01-18 David Lutterkort + Only save files with actual changes Split emitting into two parts: updating the AST from the config tree and actually writing the AST to file. do_insertion and do_deletion now report @@ -6879,6 +10207,8 @@ As a byproduct, parts of the AST that are no longer needed are actually freed. +2008-01-18 David Lutterkort + Handle null values/tokens when storing Detect association of values with impossible paths @@ -6896,6 +10226,8 @@ version have been lost. Therefore, builds between 57:9e439a136787 and this revision will fail. +2008-01-17 David Lutterkort + Emit a the current tree into a file Based on the AST, generate the file that lead to that AST. Changes to the config tree are mirrored by corresponding changes in the AST before it is @@ -6904,6 +10236,8 @@ This is a first version that works for some restricted set of grammars, but needs a lot more testing. +2008-01-17 David Lutterkort + Compute tree handles for each match The handle of a match is a set of regular expressions that indicate which subtrees are generated by that match. Handles are computed based on the @@ -6912,6 +10246,8 @@ The handle of an action is a regular expression matching the path generated by that action. +2008-01-17 David Lutterkort + Build an explicit AST Instead of representing the parsed file by a simple list of tokens, build a fullblown AST for that file. The AST is actually not very abstract, and is @@ -6927,6 +10263,8 @@ Remove aug_token and any mention of it - that has been replaced by struct ast. +2008-01-17 David Lutterkort + Represent quantifiers in their own match nodes Instead of using a field in struct match for quantifiers '*', '+', '?', represent quantified expressions by their own struct match, with a matches @@ -6935,6 +10273,8 @@ This leads to a cleaner parser and makes constructing an explicit AST simpler. +2008-01-17 David Lutterkort + Prefer comments over kv Print first sets for every match @@ -6960,6 +10300,8 @@ Still missing is saving of the tree back to file, and in particular adding new entries in the tree to such files. +2008-01-03 David Lutterkort + Move hosts and inittab under /etc Always set the passed-in grammars and maps to NULL @@ -7031,6 +10373,8 @@ Produce tokens during parsing. Also, nicer printing of the tokens read. +2007-12-20 David Lutterkort + Stricter checking for ambiguous rules Check that all items in alternatives have non-overlapping first sets. Two sets are overlapping if they both contain an entry pointing to the same @@ -7041,6 +10385,8 @@ expresions (e.g. /[ab]/ in one and /[ba]/ in the other) but that seems very hard to determine. +2007-12-20 David Lutterkort + Print first/follow sets prettier, print control characters escaped with ~ Literals from first/follow sets are now reduced back to the abbrev they belong to if that exists. @@ -7099,6 +10445,8 @@ aug_rec_save: Check input parameters +2007-11-30 David Lutterkort + Major overhaul of record parsing Use PCRE to split records with regexps, and abstract a major chunk of functionality out so it is independent of parsing pam config files @@ -7107,6 +10455,8 @@ of nodes are translated into changing fields and insert/delete of fields and records/lines) +2007-11-30 David Lutterkort + Root filesys that tests pass against Basic tests for record parsing @@ -7121,6 +10471,8 @@ Autotools support for building +2007-11-26 David Lutterkort + Very simplistic key store with a public API in augeas.h The implementation is braindead and slow, but good enough to experiment with the actual difficulty for augeas: parsing and editing different config @@ -7128,4 +10480,6 @@ augtool gives a basic mean to inspect the keystore from the command line +2007-11-26 David Lutterkort + Ignore some files diff --git a/HACKING b/HACKING index 419d681..7231a06 100644 --- a/HACKING +++ b/HACKING @@ -5,7 +5,7 @@ Check out the sources The sources are in a git repo (which you presumably found already) - git clone git://git.fedorahosted.org/git/augeas.git + git clone git://github.com/hercules-team/augeas Building from git ----------------- @@ -16,6 +16,7 @@ Building from git * Bison * Flex * readline-devel + * libxml2-devel * libselinux-devel (optional) Augeas uses gnulib, and you need a checkout of gnulib. The build scripts @@ -47,8 +48,9 @@ of the ones that might be installed on your system) The script can be used for the following; OPTS are options that are passed to augtool verbatim - ./src/try OPTS - run the commands from /tmp/augcmds.txt + ./src/try OPTS - run the commands from build/augcmds.txt ./src/try cli OPTS - start an interactive session with augtool - ./src/try gdb - start gdb and set it up for debugging augtool - ./src/try valgrind - run the commands from /tmp/augcmds.txt through augtool + ./src/try gdb - start gdb and set it up from build/gdbcmds.txt for + debugging augtool with commands in build/augcmds.txt + ./src/try valgrind - run the commands from build/augcmds.txt through augtool under valgrind to check for memory leaks diff --git a/Makefile.am b/Makefile.am index 14aa121..d88e6dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,17 +8,17 @@ lenstestdir=$(datadir)/augeas/lenses/dist/tests dist_lens_DATA=$(wildcard lenses/*.aug) dist_lenstest_DATA=$(wildcard lenses/tests/*.aug) -EXTRA_DIST=augeas.spec build/aux/move-if-change Makefile.am HACKING +EXTRA_DIST=augeas.spec build/ac-aux/move-if-change Makefile.am HACKING pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = augeas.pc distclean-local: - -find $(top_builddir)/build/* -maxdepth 0 -not -name aux | xargs rm -rf + -find $(top_builddir)/build/* -maxdepth 0 -not -name ac-aux | xargs rm -rf ChangeLog: if test -d $(top_srcdir)/.git; then \ - $(top_srcdir)/build/aux/gitlog-to-changelog > $@; \ + $(top_srcdir)/build/ac-aux/gitlog-to-changelog > $@; \ fi dist: ChangeLog diff --git a/Makefile.in b/Makefile.in index d08d7e2..4d3212e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,20 +78,29 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(dist_lens_DATA) \ - $(dist_lenstest_DATA) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/augeas.pc.in \ - $(srcdir)/augeas.spec.in $(srcdir)/config.h.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - build/aux/config.guess build/aux/config.rpath \ - build/aux/config.sub build/aux/depcomp build/aux/install-sh \ - build/aux/ltmain.sh build/aux/missing build/aux/ylwrap +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/augeas.pc.in \ + $(srcdir)/augeas.spec.in $(dist_lens_DATA) \ + $(dist_lenstest_DATA) COPYING build/ac-aux/compile \ + build/ac-aux/config.guess build/ac-aux/config.rpath \ + build/ac-aux/config.sub build/ac-aux/depcomp \ + build/ac-aux/install-sh build/ac-aux/missing \ + build/ac-aux/ylwrap build/ac-aux/ltmain.sh \ + $(top_srcdir)/build/ac-aux/config.guess \ + $(top_srcdir)/build/ac-aux/config.rpath \ + $(top_srcdir)/build/ac-aux/config.sub \ + $(top_srcdir)/build/ac-aux/install-sh \ + $(top_srcdir)/build/ac-aux/ltmain.sh \ + $(top_srcdir)/build/ac-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -56,24 +109,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -85,6 +147,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -102,15 +165,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -130,13 +199,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -162,21 +236,33 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = augeas.pc augeas.spec CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = 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_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-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 \ + tags-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/||"`;; \ @@ -198,24 +284,55 @@ 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; }; \ + } am__installdirs = "$(DESTDIR)$(lensdir)" "$(DESTDIR)$(lenstestdir)" \ "$(DESTDIR)$(pkgconfigdir)" DATA = $(dist_lens_DATA) $(dist_lenstest_DATA) $(pkgconfig_DATA) 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 dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) 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__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -243,7 +360,10 @@ am__relativize = \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best +DIST_TARGETS = dist-gzip 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@ @@ -253,6 +373,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -296,9 +417,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -310,16 +433,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -327,6 +459,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@ @@ -339,8 +473,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -348,6 +488,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -388,25 +529,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -416,12 +563,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -439,9 +589,11 @@ 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@ @@ -451,7 +603,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -463,8 +615,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@ @@ -513,6 +667,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -523,18 +678,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -550,7 +710,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -564,7 +727,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -598,15 +763,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -616,6 +787,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -632,6 +804,7 @@ 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@ @@ -639,6 +812,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -680,6 +854,7 @@ 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@ @@ -696,6 +871,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -741,6 +918,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -750,6 +928,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -760,6 +940,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -769,6 +950,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -795,6 +978,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -811,6 +996,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -822,6 +1008,7 @@ 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@ @@ -830,11 +1017,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -863,8 +1054,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -878,9 +1072,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -890,10 +1086,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -926,6 +1126,8 @@ 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@ +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@ @@ -933,6 +1135,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -1001,14 +1205,14 @@ lensdir = $(datadir)/augeas/lenses/dist lenstestdir = $(datadir)/augeas/lenses/dist/tests dist_lens_DATA = $(wildcard lenses/*.aug) dist_lenstest_DATA = $(wildcard lenses/tests/*.aug) -EXTRA_DIST = augeas.spec build/aux/move-if-change Makefile.am HACKING +EXTRA_DIST = augeas.spec build/ac-aux/move-if-change Makefile.am HACKING pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = augeas.pc 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 \ @@ -1044,10 +1248,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 @@ -1074,8 +1276,11 @@ distclean-libtool: -rm -f libtool config.lt install-dist_lensDATA: $(dist_lens_DATA) @$(NORMAL_INSTALL) - test -z "$(lensdir)" || $(MKDIR_P) "$(DESTDIR)$(lensdir)" @list='$(dist_lens_DATA)'; test -n "$(lensdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(lensdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(lensdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1089,13 +1294,14 @@ uninstall-dist_lensDATA: @$(NORMAL_UNINSTALL) @list='$(dist_lens_DATA)'; test -n "$(lensdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(lensdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(lensdir)" && rm -f $$files + dir='$(DESTDIR)$(lensdir)'; $(am__uninstall_files_from_dir) install-dist_lenstestDATA: $(dist_lenstest_DATA) @$(NORMAL_INSTALL) - test -z "$(lenstestdir)" || $(MKDIR_P) "$(DESTDIR)$(lenstestdir)" @list='$(dist_lenstest_DATA)'; test -n "$(lenstestdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(lenstestdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(lenstestdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1109,13 +1315,14 @@ uninstall-dist_lenstestDATA: @$(NORMAL_UNINSTALL) @list='$(dist_lenstest_DATA)'; test -n "$(lenstestdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(lenstestdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(lenstestdir)" && rm -f $$files + dir='$(DESTDIR)$(lenstestdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -1129,27 +1336,28 @@ uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(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. -# 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; \ +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1164,57 +1372,12 @@ $(RECURSIVE_TARGETS): $(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: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1230,12 +1393,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1247,15 +1405,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1264,9 +1418,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -1302,13 +1478,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; \ @@ -1337,36 +1510,36 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz - $(am__remove_distdir) + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another @@ -1377,8 +1550,8 @@ distcheck: dist GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ 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*) \ @@ -1388,9 +1561,9 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ @@ -1398,6 +1571,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 \ @@ -1421,13 +1595,21 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ 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)"; \ @@ -1461,10 +1643,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: @@ -1548,15 +1735,14 @@ ps-am: uninstall-am: uninstall-dist_lensDATA uninstall-dist_lenstestDATA \ uninstall-pkgconfigDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) all install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-local distclean-tags \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dist_lensDATA \ @@ -1567,17 +1753,17 @@ uninstall-am: uninstall-dist_lensDATA uninstall-dist_lenstestDATA \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am tags tags-recursive uninstall uninstall-am \ + ps ps-am tags tags-am uninstall uninstall-am \ uninstall-dist_lensDATA uninstall-dist_lenstestDATA \ uninstall-pkgconfigDATA distclean-local: - -find $(top_builddir)/build/* -maxdepth 0 -not -name aux | xargs rm -rf + -find $(top_builddir)/build/* -maxdepth 0 -not -name ac-aux | xargs rm -rf ChangeLog: if test -d $(top_srcdir)/.git; then \ - $(top_srcdir)/build/aux/gitlog-to-changelog > $@; \ + $(top_srcdir)/build/ac-aux/gitlog-to-changelog > $@; \ fi dist: ChangeLog diff --git a/NEWS b/NEWS index 0365547..13dc9a1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,531 @@ +1.3.0 - 2014-11-07 + - General changes/additions + * Add missing cp entry in manpage (GH issue #78) + * Add seq to vim syntax highlight (Robert Drake) + * Update augtool.1 man page with new commands and --span, RHBZ#1100077 + * augtool autocomplete includes command aliases, RHBZ#1100184 + * Remove unused "filename" argument from dump-xml command, RHBZ#1100106 + * aug_save returns non-zero result when unable to delete files, + RHBZ#1091143 + - Lens changes/additions + * Aliases: permit missing whitespace between colon and recipients + * AptPreferences: Support spaces in origin fields + * Cgconfig: handle additional valid controllers (Andy Grimm) + * Chrony: New lens to parse /etc/chrony.conf (Pat Riehecky) + * CPanel: New lens to parse cpanel.config files + * Desktop: Allow @ in keys (GH issue #92) + * Device_map: Parse all device.map files under /boot (Mike Latimer) + * Dhclient: Add support for option modifiers (Robert Drake, + GH issue #95) + Parse hash statements with dhcp-eval strings + * Dhcpd: stmt_string quoted blocks no longer store quote marks + (incompatible change), + many changes to support more record types (Robert Drake) + * Group: NIS support (KaMichael) + * Grub: handle "foreground" option, RHBZ#1059383 (Miguel Armas) + * Gshadow: New lens (Lorenzo Catucci) + * Httpd: Allow eol comments after section tags + Allow continued lines inside quoted value (GH issue #104) + Allow comparison operators in tags (GH issue #154) + * IPRoute2: handle "/" in protocol name, swap ID and name fields + (incompatible change), RHBZ#1063968, + handle hex IDs and hyphens, as present in + rt_dsfield, RHBZ#1063961 + * Iptables: parse /etc/sysconfig/iptables.save, RHBZ#1144651 + * Kdump: parse new options, permit EOL comments, refactor, RHBZ#1139298 + * Keepalived: Add more virtual/real server settings and checks, RHBZ#1064388 + * Known_Hosts: New lens for SSH known hosts files + * Krb5: permit braces in values when not in sub-section, RHBZ#1066419 + * Ldso: handle "hwcap" lines (GH issue #100) + * Lvm: support negative numbers, parse /etc/lvm/lvm.conf (Pino Toscano) + * Multipath: add support for rr_min_io_rq (Joel Loudermilk) + * NagiosConfig and NagiosObjects: Fix documentation (Simon Sehier) + * NetworkManager: Use the Quote module, support # in values (no eol comments) + * OpenVPN: Add support for fragment, mssfix, and script-security + (Frank Grötzner) + * Pagekite: New lens (Michael Pimmer) + * Pam: Add partial support for arguments enclosed in [] (Vincent Brillault) + * Passwd: Refactor lens (Lorenzo Catucci) + * Redis: Allow empty quoted values (GH issue #115) + * Rmt: New lens to parse /etc/default/rmt, RHBZ#1100549 + * Rsyslog: support complex $template lines, property filters and file + actions with templates, RHBZ#1083016 + * Services: permit colons in service name, RHBZ#1121263 + * Shadow: New lens (Lorenzo Catucci) + * Shellvars: Handle case statements with same-line ';;', RHBZ#1033799 + Allow any kind of quoted values in block + conditions (GH issue #118) + Support $(( .. )) arithmetic expansion in variable + assignment, RHBZ#1100550 + * Simplevars: Support flags and empty values + * Sshd: Allow all types of entries in Match groups (GH issue #75) + * Sssd: Allow ; for comments + * Squid: Support configuration files for squid 3 (Mykola Nikishov) + * Sudoers: Allow wuoted string in default str/bool params (Nick Piacentine) + * Syslog: Support "# !" style comments (Robert Drake, GH issue #65) + Permit IPv6 loghost addresses, RHBZ#1129388 + * Systemd: Allow quoted Environment key=value pairs, RHBZ#1100547 + Parse /etc/sysconfig/*.systemd, RHBZ#1083022 + Parse semicolons inside entry values, RHBZ#1139498 + * Tuned: New lens for /etc/tuned/tuned-main.conf (Pat Riehecky) + * UpdateDB: New lens to parse /etc/updatedb.conf + (incompatible change as this file used to be processed with + Simplevars) + * Xml: Allow backslash in #attribute values (GH issue #145) + Parse CDATA elements (GH issue #80) + * Xymon_Alerting: refactor lens (GH issue #89) + +1.2.0 - 2014-01-27 + - API changes + * Add aug_cp and the cp and copy commands + * aug_to_xml now includes span information in the XML dump + - General changes/additions + * Fix documentation link in c_api NaturalDocs menu + * Fix NaturalDocs documentation for various lenses + * src/transform.c (filter_matches): wrap fnmatch to ensure that an incl + pattern containing "//" matches file paths, RHBZ#1031084 + * Correct locations table for transform_save() (Tomas Hoger) + * Corrections for CVE-2012-0786 tests (Tomas Hoger) + * Fix umask handling when creating new files, RHBZ#1034261 + - Lens changes/additions + * Access: support DOMAIN\user syntax for users and groups, bug #353 + * Authorized_Keys: Allow 'ssh-ed25519' as a valid authorized_key + type (Jasper Lievisse Adriaanse) + * Automounter: Handle hostnames with dashes in them, GH issue #27 + * Build: Add combinatorics group + * Cyrus_Imapd: Create new entries without space before separator, + RHBZ#1014974 (Dietmar Kling) + * Desktop: Support square brackets in keys + * Dhclient: Add dhclient.conf path for Debian/Ubuntu (Esteve Fernandez) + * Dhcpd: Support conditionals, GH issue #34 + Support a wider variety of allow/deny statement, including + booting and bootp (Yanis Guenane) + Support a wider variety of DHCP allow/deny/ignore statements + (Yanis Guenane) + * Dovecot: Various enhancements and bug fixes (Michael Haslgrübler): + add mailbox to block_names, fix for block_args in quotes, + fix for block's brackets upon write, + fixes broken tests for mailbox, + fixes indention, + test case for block_args with ", + fixes broken indention + Use Quote module + * Exports: Permit colons for IPv6 client addresses, bug #366 + * Grub: Support the 'setkey' and 'lock' directives + NFC fix whitespace errors + Handle makeactive menu command, bug #340 + Add 'verbose' option, GH issue #73 + * Interfaces: Add in support for the source stanza in + /etc/network/interfaces files + Map bond-slaves and bridge-ports to arrays (incompatible + change) (Kaarle Ritvanen) + Add /etc/network/interfaces.d/* support + Allow numeric characters in stanza options (Pascal Lalonde) + * Koji: New lens to parse Koji configs (Pat Riehecky) + * MongoDBServer: Accept quoted values (Tomas Klouda) + * NagiosCfg: Do not try to parse /etc/nagios/nrpe.cfg anymore, GH issue #43 + /etc/nagios/nrpe.cfg is parsed by Nrpe (Yanis Guenane) + * Nagiosobjects: Add support for optional spaces and indents + and whole-line comments (Sean Millichamp) + * OpenVPN: Support daemon, client-config-dir, route, and management + directives (Freakin https://github.com/Freakin) + * PHP: allow php-fpm syntax in keys, GH issue #35 + * Postfix_Main: Handle stray whitespace at end of multiline lines, bug #348 + * Postfix_virtual: allow '+' and '=' in email addresses (Tom Hendrikx) + * Properties: support multiline starting with an empty string, GH issue #19 + * Samba: Permit asterisk in key name, bug #354 + * Shellvars: Read /etc/firewalld/firewalld.conf, bug #363 + Support all types of quoted strings in arrays, bug #357 + Exclude /etc/sysconfig/ip*tables.save files + * Shellvars, Sysconfig: map "bare" export and unset lines to seq numbered + nodes to handle multiple variables (incompatible change), RHBZ#1033795 + * Shellvars_list: Handle backtick variable assignments, bug #368 + Allow end-of-line comments, bug #342 + * Simplevars: Add /etc/selinux/semanage.conf + * Slapd: use smart quotes for database entries; rename by/what to by/access; + allow access to be absent as per official docs (incompatible change) + * Sshd: Indent Match entries by 2 spaces by default + Support Ciphers and KexAlgorithms groups, GH issue #69 + Let all special keys be case-insensitive + * Sudoers: Permit underscores in group names, bug #370 (Matteo Cerutti) + Allow uppercase characters in user names, bug #376 + * Sysconfig: Permit empty comments after comment lines, RHBZ#1043636 + * Sysconfig_Route: New lens for RedHat's route configs + * Syslog: Accept UDP(@) and TCP(@@) protocol, bug #364 (Yanis Guenane) + * Xymon_Alerting: New lens for Xymon alerting files (François Maillard) + * Yum: Add yum-cron*.conf files (Pat Riehecky) + Include only *.repo files from yum.repos.d (Andrew N Golovkov) + Permit spaces after equals sign in list options, GH issue #45 + Split excludes as lists, bug #275 + +1.1.0 - 2013-06-14 + - General changes/additions + * Handle files with special characters in their name, bug #343 + * Fix type error in composition ('f; g') of functions, bug #328 + * Improve detection of version script; make build work on Illumos with + GBU ld (Igor Pashev) + * augparse: add --trace option to print filenames of all modules being + loaded + * Various lens documentation improvements (Jasper Lievisse Adriaanse) + - Lens changes/additions + * ActiveMQ_*: new lens for ActiveMQ/JBoss A-MQ (Brian Harrington) + * AptCacherNGSecurity: new lens for /etc/apt-cacher-ng/security.conf + (Erik Anderson) + * Automaster: accept spaces between options + * BBHosts: support more flags and downtime feature (Mathieu Alorent) + * Bootconf: new lens for OpenBSD's /etc/boot.conf (Jasper Lievisse Adriaanse) + * Desktop: Support dos eol + * Dhclient: read /etc/dhclient.conf used in OpenBSD (Jasper Lievisse Adriaanse) + * Dovecot: New lens for dovecot configurations (Serge Smetana) + * Fai_Diskconfig: Optimize some regexps + * Fonts: exclude all README files (Jasper Lievisse Adriaanse) + * Inetd: support IPv6 addresses, bug #320 + * IniFile: Add lns_loose and lns_loose_multiline definitions + Support smart quotes + Warning: Smart quotes support means users should not add + escaped double quotes themselves. Tests need to be fixed + also. + Use standard Util.comment_generic and Util.empty_generic + Warning: Existing lens tests must be adapted to use standard + comments and empty lines + Allow spaces in entry_multiline* values + Add entry_generic and entry_multiline_generic + Add empty_generic and empty_noindent + Let multiline values begin with a single newline + Support dos eol + Warning: Support for dos eol means existing lenses usually + need to be adapted to exclude \r as well as \n. + * IPRoute2: Support for iproute2 files (Davide Guerri) + * JaaS: lens for the Java Authentication and Authorization Service + (Simon Vocella) + * JettyRealm: new lens for jetty-realm.properties (Brian Harrington) + * JMXAccess, JMXPassword: new lenses for ActiveMQ's JMX files + (Brian Harrington) + * Krb5: Use standard comments and empty lines + Support dos eol + Improve performance + Accept pkinit_anchors (Andrew Anderson) + * Lightdm: Use standard comments and empty lines + * LVM: New lens for LVM metadata (Gabriel) + * Mdadm_conf: optimize some regexps + * MongoDBServer: new lens (Brian Harrington) + * Monit: also load /etc/monitrc (Jasper Lievisse Adriaanse) + * MySQL: Use standard comments and empty lines + Support dos eol + * NagiosCfg: handle Icinga and resources.cfg (Jasper Lievisse Adriaanse) + * Nrpe: accept any config option rather than predefined list (Gonzalo + Servat); optimize some regexps + * Ntpd: new lense for OpenNTPD config (Jasper Lievisse Adriaanse) + * Odbc: Use standard comments and empty lines + * Openshift_*: new lenses for Openshift support (Brian Harrington) + * Quote: allow multiple spaces in quote_spaces; improve docs + * Passwd: allow period in user names in spec, bug #337; allow overrides + in nisentry + * PHP: Support smart quotes + Use standard comments and empty lines + Load /etc/php*/fpm/pool.d/*.conf (Enrico Stahn) + * Postfix_master: allow [] in words, bug #345 + * Resolv: support 'lookup' and 'family' key words, bug #320 + (Jasper Lievisse Adriaanse)) + * Rsyslog: support :omusrmsg: list of users in actions + * RX: add CR to RX.space_in + * Samba: Use standard comments and empty lines + Support dos eol + * Schroot: Support smart quotes + * Services: support port ranges (Branan Purvine-Riley) + * Shellvars: optimize some regexps; reinstate /etc/sysconfig/network, + fixes bug #330, RHBZ#904222, RHBZ#920609; parse /etc/rc.conf.local + from OpenBSD + * Sip_Conf: New lens for sip.conf configurations (Rob Tucker) + * Splunk: new lens (Tim Brigham) + * Subversion: Support smart quotes + Use standard comments and empty lines + Use IniFile.entry_multiline_generic + Use IniFile.empty_noindent + Support dos eol + * Sudoers: allow user aliases in specs + * Sysctl: exclude README file + * Systemd: Support smart quotes; allow backslashes in values + * Xinetd: handle missing values in list, bug #307 + * Xorg: allow 'Screen' in Device section, bug #344 + * Yum: Support dos eol, optimize some regexps + +1.0.0 - 2012-12-21 + - General changes/additions + * fix missing requirement on libxml2 in pkg-config + * do not replace pathin with '/*' unless the length is 0 + or pathin is '/', bug #239 + * create context path if it doesn't exist + * add missing argument to escape() to fix build on solaris, bug #242 + * fix fatest linking with libfa + * don't use variables uninitialized upon error (Jim Meyering) + * bootstrap: add strchrnul gnulib module (for Solaris) + * remove Linux-isms so tests can run on Solaris + * re-open rl_outstream/stdout only when stdout isn't a tty + (fixes -e -i); use /dev/tty instead of /dev/stdout when re-opening + to prevent permission errors, bug #241 + * take root into account for excludes, bug #252 + * fix different errors for parse and put failure + * fix various memory leaks + * add leak test + * allocate exception instead of static const value + * improve aug_srun quoting to permit concatenation and better detect + bad quoting + * rename echo to echo_commands to fix differing types reported + with Solaris linker (Tim Mooney), bug #262 + * fix excl filters that only specify a filename or wildcard + * make sure reloading discards changes after save with mode 'newfile' + * remove loop that added a second iteration around children of /files, + causing multiple saves in newfile and noop modes when editing under + /files/boot, bug #264 + * support \t and \n in aug_srun tokens, bug #265 + * compile_exp: don't return an uninitialized pointer upon failure + (Jim Meyering) + * include 'extern "C"' wrapper for C++, bug #272 (Igor Pashev) + * src/try: don't overwrite gdbcmds.txt if it exists + * fix behavior of set with empty strings + * allow running individual tests with test-run + * test-augtool.sh: escape all possible regular expressions before + they are sent to sed (Micah Anderson) + * add new print_tree primitive + * fix bad memory access in regexp.c + * case-insensitive regexps: fix a problem with number of groups + * prevent symlink attacks via .augnew during saving, + RedHat bug #772257, CVE-2012-0786 + * prevent cross-mountpoint attacks via .augsave during saving, + RedHat bug #772261, CVE-2012-0787 + * add bundled (gnulib) provides in augeas.spec.in, RedHat bug #821745 + * make Travis CI builds + * src/transform.c (xread_file): catch failed fopen, e.g. EACCES + * src/augrun.c (cmd_retrieve_help): tidy line wrapping + * make get_square case insensitive on the ending key + * escape double quotes when dumping regexp + * use constants for "lens", "incl" and "excl" + * src/transform.c (filter_generate): remove duplicate variable assignment + * src/jmt.c (parse_add_item): ensure return is defined on goto error + * src/transform.c (transform_save): chmod after creating new files to + permissions implied by the umask + * ignore eclipse settings directory + * fix memory leak in dbg_visit + * build AST while visiting the parse v2 + * rewrite square lens to be more generic, allowing e.g. square quoting + * tests/modules/fail_shadow_union.aug: fix unintended test failure + * src/syntax.c (compile_test): print which test failed when missing + exception + * libfa (fa_enumerate): new function + * use precise ctype of a square lens if it is indeed regula + * square: properly handle first lens matching empty string + * square lens: correctly process skeletons during put + * src/pathx.c: disallow ',' in names in path expressions + * src/pathx.c: match functions by name and arity + * src/pathx.c: pass the number of actual arguments to the func + implementation + * correctly parse escaped string literals in vim syntax file (Domen Ko¿ar) + - API changes/additions + * add aug_text_store to write string to tree + * add aug_text_retrieve to turn tree into text + * add aug_rename to rename node labels without moving them in the tree + * add aug_transform to allow specifying transforms + * add aug_label to retrieve the label from a path + - Augtool/aug_srun changes/additions + * add "touch" command to create node if it doesn't exist, bug #276 + * make argument to "set" and "setm" optional, bug #276 + * add "text_store" and "text_retrieve" commands + * add "rename" command + * add "transform" command and "-t|--transform" option + * add "label" command + * arrange commands in groups for better help + * man/augtool.pod: update mentions of default load path + * fix exit code when using autosave + * output errors when sending a command as argument + * honor --echo when sending a command as argument + - XPath changes/additions + * add support for an 'i' flag in regexp builtin function + - Lens changes/additions + * Aliases: commands can be fully enclosed in quotes, bug #229 + * Anacron: new lens for /etc/anacrontab + * Apt_Update_Manager: new lens for /etc/update-manager + * AptPreferences: #comments are accepted within entries + * AuthorizedKeys: new lens for SSH's authorized_keys + * AutoMaster: new lens for auto.master files + * AutoMounter: new lens for automounter maps (/etc/auto.*) + * Avahi: new lens for /etc/avahi/avahi-daemon.conf (Athir Nuaimi) + * Build: add blocks + * Cachefilesd: new lens for /etc/cachefilesd.conf (Pat Riehecky) + * Carbon: new lens for /etc/carbon files (Marc Fournier) + * Cgconfig: add space between group and id (Filip Andres) + * Channels: new lens for channels.conf + * Collectd: new lens for /etc/collectd.conf + * Cron: exclude cron allow/deny files; + optimize typechecking; + records can be prefixed by '-' (Michal Filka) + * CronAllow: new lens for cron/at allow/deny files + * Cups: new lens for Cups files + * Cyrus_Imapd: new lens for /etc/imapd.conf, bug #296 (Jeroen van Meeuwen) + * Debctrl: fixed package paragraph keywords, allow variables + for version numbers in dependency lists, + allow DM-Upload-Allowed keyword, Debian bug #650887; + allow control extensions for Python packages, bug #267 + * Dhcpd: fix primary statement arguments, bug #293; + use the Quote module to manage quoted values; + force double quotes for filename attribute, bug #311 + * Dput: use Sys.getenv("HOME") + * Erlang: new generic lens to build Erlang config lenses + * Fonts: new lens for /etc/fonts files + * Fstab: handle options with empty values ("password="); + make options field optional; + allow end-of-line comment + * Fuse: new lens for fuse.conf + * Gdm: include /etc/gdm/custom.conf + * Grub: parse "password --encrypted" properly, bug #250; + optimize typechecking; + add /boot/grub/grub.conf to transform (Josh Kayse) + * GtkBookmarks: new lens for $HOME/.gtk-bookmarks + * Hosts_Access: add netmask; + permit more client list formats + (whitespace separated lists, @netgroups, + IPv6 hosts, inc. zone indices, + paths to lists of clients, wildcards, + hosts_options), bug #256 + * Htpasswd: new lens for htpasswd/rsyncd.secret files (Marc Fournier) + * Httpd: support DOS eol + * IniFile: allow # and ; in quoted values, bug #243; + add entry_list and entry_list_nocomment + * Inputrc: new lens for /etc/inputrc + * Iptables: test that blank lines are accepted (Terence Haddock) + * Json: allow JSON number literals to be followed by whitespace; + correctly parse empty object and arrays (Lubomir Rintel) + * Keepalived: various improvements, optimize typechecking + * Krb5: handle host{} sections in v4_name_convert; + support ticket_lifetime; + handle multiple arguments to *_enctypes (Pat Riehecky); + better whitespace and semicolon comment support + * Ldif: new lens to read LDIF files per RFC2849 + * Ldso: new lens for ld.so.conf files + * Lightdm: new lens for /etc/lightdm/*.conf, bug #302 (David Salmen) + * Logrotate: rewrite with Build, Rx, and Sep; + add su logrotate.conf option (Luc Didry); + accept integers prefixed by a sign (Michal Filka) + * Logwatch: new lens for /etc/logwatch/conf/logwatch.conf (Francois Lebel) + * Mcollective: new lens for Mcollective files (Marc Fournier) + * Memcached: new lens for /etc/memcached.conf (Marc Fournier) + * Mdadm_conf: include /etc/mdadm/mdadm.conf + * Mke2fs: add support for default_mntopts, enable_periodic_fsck, + and auto_64-bit_support + * Modprobe: support softdep command, Debian bug #641813; + allow spaces around '=' in option, RedHat bug #826752; + support multiline split commands, Ubuntu bug #1054306; + revert inner lens name change, fixes Modules_conf + * Modules: define own entry regexp as referenced Modprobe inner lens + doesn't match file format + * Multipath: allow devices to override defaults, bug #278 (Jacob M. McCann) + * NagiosCfg: support syntax for commands.cfg and resource.cfg + * Netmask: new lens for /etc/inet/netmasks on Solaris + * NetworkManager: new lens for NetworkManager files + * Networks: handle multiple missing network octets, + fix sequencing of aliases + * Nginx: new lens for /etc/nginx/nginx.conf (Ian Berry) + * Nsswitch: add passwd_compat, group_compat and shadow_compat + GNU extensions (Travis Groth); + remove long list of databases, match by regexp + * Ntp: allow deprecated 'authenticate' setting; + add tos directive, bug #297 (Jacob M. McCann) + * OpenVPN: use the Quote module to manage quoted values + * Pam: allow uppercase chars in 'types', remove /etc/pam.conf from filter; + ignore allow.pamlist; + exclude /etc/pam.d/README, bug #255 + * PamConf: new lens for /etc/pam.conf + * Passwd: allow asterisk in password field, bug #255 + * Pg_Hba: support multiple options, bug #313; + add a path to pg_hba.aug, bug #281 (Marc Fournier) + * Php: support include() statements + * Phpvars: map arrays with @arraykey subnodes to make working paths; + support classes and public/var values, bug #299 (aheahe) + * Postfix_Transport: new lens for Postfix transport files; + allow host:port and [host]:port syntaxes, bug #303 + * Postfix_Virtual: new lens for Postfix virtual files + * Postgresql: new lens for postgresql.conf; + properly support quotes, bug #317 + * Properties: improve handling of whitespace, empty props, and underscores + in keys (Brett Porter, Carlos Sanchez) + * Protocols: new lens for /etc/protocols + * Puppet: add /usr/local/etc/puppet paths (Tim Bishop) + * Puppet_Auth: new lens for /etc/puppet/auth.conf + * PuppetFileserver: add /usr/local/etc/puppet paths (Tim Bishop) + * PythonPaste: new lens for Python Paste configs (Dan Prince) + * Qpid: new lens to read Apache Qpid daemon/client configs (Andrew Replogle) + * Quote: new generic lens to manage quoted values using square lenses + * Rabbitmq: new lens for /etc/rabbitmq/rabbitmq.config + * Redis: new lens for /etc/redis/redis.conf (Marc Fournier) + * Resolv: add in single-request-reopen (Erinn Looney-Triggs) + * Rsyslog: new lens for rsyslog files + * Rx: add continous lines (cl, cl_or_space, cl_or_opt_space) + * Sep: add space_equal; + add continous lines (cl_or_space, cl_or_opt_space) + * Shellvars: support @return; + allow multiple elif statements; + parse functions; + add more includes; + autoload some SuSe and RHN specific files (Duncan Mac-Vicar P); + add BSD's /etc/rc.conf, bug #255; + remove non-shell files, up2date now has a lens, + move updatedb.conf to Simplevars; + include /etc/{default,sysconfig}/* and /etc/selinux/config; + add systemd's /etc/os-release file; + exclude bootloader from shellvars (Duncan Mac-Vicar P); + handle bash's implicit concatenation of quoted strings + (Michal Filka); + exclude /etc/default/whoopsie; + fix ambiguity by making semi-colons illegal in bquot + and arrays; + add lns_norec to check for ambiguities; + allow newlines in quoted values; + allow semi-colons in bquot and dollar_assign; + make end-of-line comments begin with a space; + allow double backquoted values; + support matching keys in var_action, bug #290; + fix empty lines after comments; + add shift and exit builtins, with optional args; + allow double quotes around variables in case statements; + fix empty comments; + add locale.conf, vconsole.conf systemd configs, + RedHat bug #881841 + * Shells: permit same-line comments + * Simplelines: new lens for simple lines files + * Simplevars: new lens for simple key/value, non shellvars files + * Smbusers: new lens for Samba's smbusers + * Sssd: new lens for sssd.conf (Erinn Looney-Triggs) + * Ssh: use Sys.getenv('HOME') in filter instead of ~ since it's not + expanded (Luc Didry) + * Sshd: permit hyphens in subsystem names + * Subversion: new lens for /etc/subversion files + * Sudoers: optimize typechecking; + allow = in commands (but force ! or / as first character + if not an alias); + allow commands without full path if they begin with a lowcase + letter; + allow "!" as a type of Defaults entry, Debian bug #650079; + allow quoted strings in Defaults parameters, bug #263 + * Sysconfig: handle end of line comments and semicolons; strip quotes, + RedHat bug #761246 + * Sysctl: include /etc/sysctl.d files + * Syslog: allow capital letters in tokens + * Systemd: new lens to parse systemd unit files + * Thttpd: new lens for /etc/thttpd/thttpd.conf (Marc Fournier) + * Up2date: new lens for /etc/sysconfig/rhn/up2date + * Util: add comment_noindent; add delim; add doseol; + support DOS eols in various places; + add *.bak and *.old to stdexcl, to match files in /etc/sysconfig + * Vfstab: new lens for /etc/vfstab config on Solaris + * Vmware_Config: new lens for /etc/vmware/config + * Vsftpd: add require_ssl_reuse option (Danny Yates) + * Xinetd: rewrite with Build, Sep, and Rx; + make attribute names case-insensitive (Michal Filka) + * Xml: support single _and_ double quoted attribute values, + RedHat bug #799885, bug #258 + * Xymon: new lens for Xymon config files, bug #266 (Jason Kincl) + * Yum: rebase on IniFile, support for comments, bug #217 + 0.10.0 - 2011-12-02 - support relative paths by taking them relative to the value of /augeas/context in all API functions where paths are used diff --git a/README b/README index 92d9e87..8ea1c36 100644 --- a/README +++ b/README @@ -34,41 +34,42 @@ Introduction Non-goals --------- - Augeas is as much defined by the things it does _not_ try to accomplish - as by its goals: - - * No abstraction from native config format, i.e. the organization of - the tree mirrors closely how the native config files are organized - * No cross-platform abstraction - what is logically the same value may - live in different places in the tree on different - distributions. Dealing with that should be left to a higher-level - tool - * No remote management support. Augeas is a local API, other ways of - access to Augeas should be built on top of it - * No (or very little) modelling. Augeas is focused on syntax - transformation, not on any higher-level understanding of - configuration. - - The above non-goals are of course important concerns in - practice. Historically though, too many config mgmt projects have failed - because they set their sights too high and tried to address syntax - transformation, modelling, remote support, and scalable management all in - one. That leads to a lack of focus, and to addressing each of those goals - unsatisfactorily. +Augeas is as much defined by the things it does _not_ try to accomplish +as by its goals: + +* No abstraction from native config format, i.e. the organization of + the tree mirrors closely how the native config files are organized +* No cross-platform abstraction - what is logically the same value may + live in different places in the tree on different + distributions. Dealing with that should be left to a higher-level + tool +* No remote management support. Augeas is a local API, other ways of + access to Augeas should be built on top of it +* No (or very little) modelling. Augeas is focused on syntax + transformation, not on any higher-level understanding of + configuration. + +The above non-goals are of course important concerns in +practice. Historically though, too many config mgmt projects have failed +because they set their sights too high and tried to address syntax +transformation, modelling, remote support, and scalable management all in +one. That leads to a lack of focus, and to addressing each of those goals +unsatisfactorily. Building -------- - These instructions apply to building a released tarball. If you want to - build from a git checkout, see the file HACKING. +These instructions apply to building a released tarball. If you want to +build from a git checkout, see the file HACKING. + +See the generic instructions in INSTALL. Generally, - See the generic instructions in INSTALL. Generally, - ./configure - make && make install - should be all that is needed. + ./configure + make && make install +should be all that is needed. - You need to have readline-devel installed. On systems that support - SELinux, you should also install libselinux-devel. +You need to have readline-devel installed. On systems that support +SELinux, you should also install libselinux-devel. Documentation ------------- @@ -76,3 +77,9 @@ Documentation Documentation can be found on Augeas' website http://augeas.net/ The site also contains information on how to get in touch, what you can do to help etc. + +License +------- + +Augeas is released under the [Lesser General Public License, Version 2.1](http://www.gnu.org/licenses/lgpl-2.1.html) +See the file COPYING for details. diff --git a/acinclude.m4 b/acinclude.m4 index 7168cf3..f632182 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -19,7 +19,7 @@ AC_DEFUN([AUGEAS_COMPILE_WARNINGS],[ warnCFLAGS= - common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables" + common_flags="-fexceptions -fasynchronous-unwind-tables" case "$enable_compile_warnings" in no) @@ -45,6 +45,14 @@ AC_DEFUN([AUGEAS_COMPILE_WARNINGS],[ ;; esac + AH_VERBATIM([FORTIFY_SOURCE], + [/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting newer glibc. */ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + ]) + compiler_flags= for option in $try_compiler_flags; do SAVE_CFLAGS="$CFLAGS" diff --git a/aclocal.m4 b/aclocal.m4 index b3a5ed7..162cf2b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 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. @@ -11,13 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +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'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) @@ -47,7 +48,8 @@ To do so, use the procedure documented by the package, typically `autoreconf'.]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) +m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) +m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) @@ -93,7 +95,8 @@ m4_define([_PKG_CONFIG], pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], + [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried @@ -141,9 +144,9 @@ if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then - $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else - $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` + $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD @@ -156,7 +159,7 @@ $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -_PKG_TEXT]) +_PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) @@ -167,7 +170,7 @@ path to pkg-config. _PKG_TEXT -To get pkg-config, see .]) +To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS @@ -177,457 +180,62 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# po.m4 serial 17 (gettext-0.18) -dnl Copyright (C) 1995-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 -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" <@]) +AC_ARG_WITH([pkgconfigdir], + [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, + [with_pkgconfigdir=]pkg_default) +AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_INSTALLDIR + + +# PKG_NOARCH_INSTALLDIR(DIRECTORY) +# ------------------------- +# Substitutes the variable noarch_pkgconfigdir as the location where a +# module should install arch-independent pkg-config .pc files. By +# default the directory is $datadir/pkgconfig, but the default can be +# changed by passing DIRECTORY. The user can override through the +# --with-noarch-pkgconfigdir parameter. +AC_DEFUN([PKG_NOARCH_INSTALLDIR], +[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) +m4_pushdef([pkg_description], + [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) +AC_ARG_WITH([noarch-pkgconfigdir], + [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, + [with_noarch_pkgconfigdir=]pkg_default) +AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) +m4_popdef([pkg_default]) +m4_popdef([pkg_description]) +]) dnl PKG_NOARCH_INSTALLDIR + + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl -dnl Initializes the accumulator used by AM_XGETTEXT_OPTION. -AC_DEFUN([AM_XGETTEXT_OPTION_INIT], -[ - XGETTEXT_EXTRA_OPTIONS= -]) +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) -dnl Registers an option to be passed to xgettext in the po subdirectory. -AC_DEFUN([AM_XGETTEXT_OPTION], -[ - AC_REQUIRE([AM_XGETTEXT_OPTION_INIT]) - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1" -]) +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -639,10 +247,10 @@ AC_DEFUN([AM_XGETTEXT_OPTION], # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.13' 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.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -658,22 +266,22 @@ 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.13.4])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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # 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/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -692,7 +300,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -718,22 +326,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -752,16 +357,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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# 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, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -771,7 +374,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -784,12 +387,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -797,8 +401,9 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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. @@ -837,16 +442,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -855,16 +460,16 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + 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. am__obj=conftest.${OBJEXT-o} @@ -912,7 +517,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -922,34 +527,39 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) 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 -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -962,7 +572,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -974,21 +584,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -1006,7 +614,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -1014,29 +622,14 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# 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 8 - -# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. -AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) - # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. @@ -1052,7 +645,7 @@ AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -1081,31 +674,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -1116,28 +718,32 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], @@ -1165,7 +771,7 @@ 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1184,16 +790,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -1209,14 +813,12 @@ AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -1234,7 +836,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -1261,15 +863,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -1277,11 +876,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -1294,63 +892,64 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# -*- Autoconf -*- +# Obsolete and "removed" macros, that must however still report explicit +# error messages when used, to smooth transition. +# +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) +AC_DEFUN([AM_CONFIG_HEADER], +[AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should use the 'AC][_CONFIG_HEADERS' macro instead.])dnl +AC_CONFIG_HEADERS($@)]) + +AC_DEFUN([AM_PROG_CC_STDC], +[AC_PROG_CC +am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc +AC_DIAGNOSE([obsolete], +['$0': this macro is obsolete. +You should simply use the 'AC][_PROG_CC' macro instead. +Also, your code should no longer depend upon 'am_cv_prog_cc_stdc', +but upon 'ac_cv_prog_cc_stdc'.])]) + +AC_DEFUN([AM_C_PROTOTYPES], + [AC_FATAL([automatic de-ANSI-fication support has been removed])]) +AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 - # _AM_MANGLE_OPTION(NAME) # ----------------------- 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)]) +[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)])]) @@ -1363,22 +962,16 @@ AC_DEFUN([_AM_IF_OPTION], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1389,32 +982,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1424,36 +1025,85 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using '$V' instead of '$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1461,34 +1111,32 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1496,24 +1144,22 @@ 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-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1523,75 +1169,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # 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]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. +[# 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}']) + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR @@ -1601,6 +1286,7 @@ m4_include([gnulib/m4/alloca.m4]) m4_include([gnulib/m4/argz.m4]) m4_include([gnulib/m4/btowc.m4]) m4_include([gnulib/m4/canonicalize.m4]) +m4_include([gnulib/m4/close.m4]) m4_include([gnulib/m4/codeset.m4]) m4_include([gnulib/m4/configmake.m4]) m4_include([gnulib/m4/ctype.m4]) @@ -1609,24 +1295,33 @@ 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/exponentd.m4]) m4_include([gnulib/m4/extensions.m4]) m4_include([gnulib/m4/fcntl-o.m4]) m4_include([gnulib/m4/fcntl_h.m4]) +m4_include([gnulib/m4/fdopen.m4]) m4_include([gnulib/m4/float_h.m4]) m4_include([gnulib/m4/fnmatch.m4]) +m4_include([gnulib/m4/fpieee.m4]) +m4_include([gnulib/m4/fstat.m4]) +m4_include([gnulib/m4/getcwd.m4]) m4_include([gnulib/m4/getdelim.m4]) m4_include([gnulib/m4/getline.m4]) m4_include([gnulib/m4/getopt.m4]) m4_include([gnulib/m4/getpagesize.m4]) +m4_include([gnulib/m4/gettimeofday.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/include_next.m4]) m4_include([gnulib/m4/intlmacosx.m4]) m4_include([gnulib/m4/intmax_t.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/langinfo_h.m4]) +m4_include([gnulib/m4/largefile.m4]) m4_include([gnulib/m4/lcmessage.m4]) m4_include([gnulib/m4/lib-ld.m4]) m4_include([gnulib/m4/lib-link.m4]) @@ -1638,6 +1333,7 @@ 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/localeconv.m4]) m4_include([gnulib/m4/localename.m4]) m4_include([gnulib/m4/lock.m4]) m4_include([gnulib/m4/longlong.m4]) @@ -1655,15 +1351,21 @@ 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/mkstemp.m4]) m4_include([gnulib/m4/mmap-anon.m4]) m4_include([gnulib/m4/mode_t.m4]) +m4_include([gnulib/m4/msvc-inval.m4]) +m4_include([gnulib/m4/msvc-nothrow.m4]) m4_include([gnulib/m4/multiarch.m4]) m4_include([gnulib/m4/nl_langinfo.m4]) +m4_include([gnulib/m4/nocrash.m4]) +m4_include([gnulib/m4/off_t.m4]) m4_include([gnulib/m4/onceonly.m4]) m4_include([gnulib/m4/open.m4]) m4_include([gnulib/m4/pathmax.m4]) m4_include([gnulib/m4/printf.m4]) m4_include([gnulib/m4/putenv.m4]) +m4_include([gnulib/m4/rawmemchr.m4]) m4_include([gnulib/m4/readlink.m4]) m4_include([gnulib/m4/realloc.m4]) m4_include([gnulib/m4/regex.m4]) @@ -1683,13 +1385,18 @@ m4_include([gnulib/m4/stdio_h.m4]) m4_include([gnulib/m4/stdlib_h.m4]) m4_include([gnulib/m4/stpcpy.m4]) m4_include([gnulib/m4/stpncpy.m4]) +m4_include([gnulib/m4/strchrnul.m4]) m4_include([gnulib/m4/string_h.m4]) m4_include([gnulib/m4/strndup.m4]) m4_include([gnulib/m4/strnlen.m4]) m4_include([gnulib/m4/strstr.m4]) m4_include([gnulib/m4/symlink.m4]) +m4_include([gnulib/m4/sys_socket_h.m4]) m4_include([gnulib/m4/sys_stat_h.m4]) +m4_include([gnulib/m4/sys_time_h.m4]) +m4_include([gnulib/m4/sys_types_h.m4]) m4_include([gnulib/m4/sys_wait_h.m4]) +m4_include([gnulib/m4/tempname.m4]) m4_include([gnulib/m4/thread.m4]) m4_include([gnulib/m4/threadlib.m4]) m4_include([gnulib/m4/time_h.m4]) diff --git a/augeas.pc.in b/augeas.pc.in index c97847d..9e166db 100644 --- a/augeas.pc.in +++ b/augeas.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: augeas Version: @VERSION@ Description: Augeas configuration editing library -Requires: +Requires.private: libxml-2.0 Libs: -L${libdir} -laugeas @LIBS@ Cflags: -I${includedir} diff --git a/augeas.spec b/augeas.spec index a9b75d8..f23f4c0 100644 --- a/augeas.spec +++ b/augeas.spec @@ -1,16 +1,18 @@ Name: augeas -Version: 0.10.0 +Version: 1.3.0 Release: 1%{?dist} Summary: A library for changing configuration files Group: System Environment/Libraries License: LGPLv2+ URL: http://augeas.net/ -Source0: http://augeas.net/download/%{name}-%{version}.tar.gz +Source0: http://download.augeas.net/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline-devel libselinux-devel libxml2-devel Requires: %{name}-libs = %{version}-%{release} +# Bundling exception for gnulib: https://fedorahosted.org/fpc/ticket/174 +Provides: bundled(gnulib) %description A library for programmatically editing configuration files. Augeas parses @@ -40,6 +42,10 @@ Group: System Environment/Libraries %description libs The libraries for %{name}. +Augeas is a library for programmatically editing configuration files. It parses +configuration files into a tree structure, which it exposes through its +public API. Changes made through the API are written back to the initially +read files. %prep %setup -q @@ -48,11 +54,26 @@ The libraries for %{name}. %configure --disable-static make %{?_smp_mflags} +%check +# Disable test-preserve.sh SELinux testing. This fails when run under mock due +# to differing SELinux labelling. +export SKIP_TEST_PRESERVE_SELINUX=1 + +make %{?_smp_mflags} check || { + echo '===== tests/test-suite.log =====' + cat tests/test-suite.log + exit 1 +} + %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +# The tests/ subdirectory contains lenses used only for testing, and +# so it shouldn't be packaged. +rm -r $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/dist/tests + %clean rm -rf $RPM_BUILD_ROOT @@ -85,6 +106,17 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/augeas.pc %changelog +* Tue Oct 15 2013 Dominic Cleal - 1.1.0-2 +- Add %check stage to run make check (rjones@redhat.com) +- Don't package lenses in tests/ subdirectory (rjones@redhat.com) +- Fix source URL to download.augeas.net (RHBZ#996033) + +* Fri Jun 14 2013 David Lutterkort - 1.1.0-1 +- New version + +* Fri Dec 21 2012 David Lutterkort - 1.0.0-1 +- New version + * Fri Dec 2 2011 David Lutterkort - 0.10.0-1 - New version diff --git a/augeas.spec.in b/augeas.spec.in index 21debb2..5a829e2 100644 --- a/augeas.spec.in +++ b/augeas.spec.in @@ -6,11 +6,13 @@ Summary: A library for changing configuration files Group: System Environment/Libraries License: LGPLv2+ URL: http://augeas.net/ -Source0: http://augeas.net/download/%{name}-%{version}.tar.gz +Source0: http://download.augeas.net/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: readline-devel libselinux-devel libxml2-devel Requires: %{name}-libs = %{version}-%{release} +# Bundling exception for gnulib: https://fedorahosted.org/fpc/ticket/174 +Provides: bundled(gnulib) %description A library for programmatically editing configuration files. Augeas parses @@ -40,6 +42,10 @@ Group: System Environment/Libraries %description libs The libraries for %{name}. +Augeas is a library for programmatically editing configuration files. It parses +configuration files into a tree structure, which it exposes through its +public API. Changes made through the API are written back to the initially +read files. %prep %setup -q @@ -48,11 +54,26 @@ The libraries for %{name}. %configure --disable-static make %{?_smp_mflags} +%check +# Disable test-preserve.sh SELinux testing. This fails when run under mock due +# to differing SELinux labelling. +export SKIP_TEST_PRESERVE_SELINUX=1 + +make %{?_smp_mflags} check || { + echo '===== tests/test-suite.log =====' + cat tests/test-suite.log + exit 1 +} + %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +# The tests/ subdirectory contains lenses used only for testing, and +# so it shouldn't be packaged. +rm -r $RPM_BUILD_ROOT%{_datadir}/augeas/lenses/dist/tests + %clean rm -rf $RPM_BUILD_ROOT @@ -85,6 +106,17 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/pkgconfig/augeas.pc %changelog +* Tue Oct 15 2013 Dominic Cleal - 1.1.0-2 +- Add %check stage to run make check (rjones@redhat.com) +- Don't package lenses in tests/ subdirectory (rjones@redhat.com) +- Fix source URL to download.augeas.net (RHBZ#996033) + +* Fri Jun 14 2013 David Lutterkort - 1.1.0-1 +- New version + +* Fri Dec 21 2012 David Lutterkort - 1.0.0-1 +- New version + * Fri Dec 2 2011 David Lutterkort - 0.10.0-1 - New version diff --git a/build/ac-aux/compile b/build/ac-aux/compile new file mode 100755 index 0000000..531136b --- /dev/null +++ b/build/ac-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General 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 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + esac +} + +# func_cl_dashL linkdir +# Make cl look for libraries in LINKDIR +func_cl_dashL () +{ + func_file_conv "$1" + if test -z "$lib_path"; then + lib_path=$file + else + lib_path="$lib_path;$file" + fi + linker_opts="$linker_opts -LIBPATH:$file" +} + +# func_cl_dashl library +# Do a library search-path lookup for cl +func_cl_dashl () +{ + lib=$1 + found=no + save_IFS=$IFS + IFS=';' + for dir in $lib_path $LIB + do + IFS=$save_IFS + if $shared && test -f "$dir/$lib.dll.lib"; then + found=yes + lib=$dir/$lib.dll.lib + break + fi + if test -f "$dir/$lib.lib"; then + found=yes + lib=$dir/$lib.lib + break + fi + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + break + fi + done + IFS=$save_IFS + + if test "$found" != yes; then + lib=$lib.lib + fi +} + +# func_cl_wrapper cl arg... +# Adjust compile command to suit cl +func_cl_wrapper () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + esac + ;; + -I) + eat=1 + func_file_conv "$2" mingw + set x "$@" -I"$file" + shift + ;; + -I*) + func_file_conv "${1#-I}" mingw + set x "$@" -I"$file" + shift + ;; + -l) + eat=1 + func_cl_dashl "$2" + set x "$@" "$lib" + shift + ;; + -l*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +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 +# 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 +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build/aux/config.guess b/build/ac-aux/config.guess similarity index 62% rename from build/aux/config.guess rename to build/ac-aux/config.guess index 0e30d56..1f5c50c 100755 --- a/build/aux/config.guess +++ b/build/ac-aux/config.guess @@ -1,13 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2003-07-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 -# the Free Software Foundation; either version 2 of the License, or +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -16,24 +15,22 @@ timestamp='2003-07-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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 to . Submit a context -# diff and a properly formatted 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"). +# +# Originally written by Per Bothner. # -# 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. +# 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 # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -53,8 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -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." @@ -66,11 +62,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -104,7 +100,7 @@ set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; @@ -123,7 +119,7 @@ case $CC_FOR_BUILD,$HOST_CC,$CC in ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ;' +esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) @@ -136,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 @@ -158,6 +175,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched @@ -166,7 +184,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -176,7 +194,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -196,50 +214,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" - exit 0 ;; - amiga:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - arc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - hp300:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mac68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - macppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme68k:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvme88k:OpenBSD:*:*) - echo m88k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - mvmeppc:OpenBSD:*:*) - echo powerpc-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - pmax:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sgi:OpenBSD:*:*) - echo mipseb-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - sun3:OpenBSD:*:*) - echo m68k-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; - wgrisc:OpenBSD:*:*) - echo mipsel-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) - echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} - exit 0 ;; + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; alpha:OSF1:*:*) - if test $UNAME_RELEASE = "V4.0"; then + case $UNAME_RELEASE in + *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - fi + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU @@ -277,42 +281,52 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac + # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit 0 ;; - Alpha*:OpenVMS:*:*) - echo alpha-hp-vms - exit 0 ;; + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix - exit 0 ;; + exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 - exit 0 ;; + exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 - exit 0;; + exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos - exit 0 ;; + exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos - exit 0 ;; + exit ;; *:OS/390:*:*) echo i370-ibm-openedition - exit 0 ;; + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} - exit 0;; + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp - exit 0;; + exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then @@ -320,32 +334,51 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in else echo pyramid-pyramid-bsd fi - exit 0 ;; + exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 - exit 0 ;; + exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 - exit 0 ;; - DRS?6000:UNIX_SV:4.2*:7*) + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7 && exit 0 ;; + sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) @@ -354,10 +387,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit 0 ;; + exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 @@ -369,10 +402,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in echo sparc-sun-sunos${UNAME_RELEASE} ;; esac - exit 0 ;; + exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} - exit 0 ;; + exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor @@ -382,38 +415,41 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit 0 ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} - exit 0 ;; + exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 - exit 0 ;; + exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} - exit 0 ;; + exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} - exit 0 ;; + exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -437,35 +473,36 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in exit (-1); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c \ - && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ - && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} - exit 0 ;; + exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax - exit 0 ;; + exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax - exit 0 ;; + exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix - exit 0 ;; + exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 - exit 0 ;; + exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 - exit 0 ;; + exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -478,29 +515,29 @@ EOF else echo i586-dg-dgux${UNAME_RELEASE} fi - exit 0 ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 - exit 0 ;; + exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 - exit 0 ;; + exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 - exit 0 ;; + exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd - exit 0 ;; + exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit 0 ;; + exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix - exit 0 ;; + exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` @@ -508,7 +545,7 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build @@ -523,15 +560,19 @@ EOF exit(0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 - echo rs6000-ibm-aix3.2.5 + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi - exit 0 ;; - *:AIX:*:[45]) + exit ;; + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -544,28 +585,28 @@ EOF IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit 0 ;; + exit ;; *:AIX:*:*) echo rs6000-ibm-aix - exit 0 ;; + exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 - exit 0 ;; + exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit 0 ;; # report: romp-ibm BSD 4.3 + exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx - exit 0 ;; + exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 - exit 0 ;; + exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd - exit 0 ;; + exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 - exit 0 ;; + exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in @@ -574,52 +615,52 @@ EOF 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include + #define _HPUX_SOURCE + #include + #include - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -627,9 +668,19 @@ EOF esac if [ ${HP_ARCH} = "hppa2.0w" ] then - # avoid double evaluation of $set_cc_for_build - test -n "$CC_FOR_BUILD" || eval $set_cc_for_build - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -637,11 +688,11 @@ EOF fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} - exit 0 ;; + exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c @@ -669,321 +720,345 @@ EOF exit (0); } EOF - $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 - exit 0 ;; + exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd - exit 0 ;; + exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd - exit 0 ;; + exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix - exit 0 ;; + exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf - exit 0 ;; + exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf - exit 0 ;; + exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi - exit 0 ;; + exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites - exit 0 ;; + exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit 0 ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit 0 ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit 0 ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit 0 ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit 0 ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + exit ;; *:UNICOS/mp:*:*) - echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit 0 ;; + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit 0 ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; + exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit 0 ;; - *:FreeBSD:*:*|*:GNU/FreeBSD:*:*) - # Determine whether the default compiler uses glibc. - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #if __GLIBC__ >= 2 - LIBC=gnu - #else - LIBC= - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - # GNU/FreeBSD systems have a "k" prefix to indicate we are using - # FreeBSD's kernel, but not the complete OS. - case ${LIBC} in gnu) kernel_only='k' ;; esac - echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} - exit 0 ;; + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-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 0 ;; - i*:MINGW*:*) + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 - exit 0 ;; + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 - exit 0 ;; - x86:Interix*:[34]*) - echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' - exit 0 ;; + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks - exit 0 ;; + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix - exit 0 ;; + exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin - exit 0 ;; + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin - exit 0 ;; + exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit 0 ;; + exit ;; *:GNU:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit 0 ;; + # the GNU system + 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/[-(].*//'`-${LIBC} + exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix - exit 0 ;; + 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 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + 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:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + 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-${LIBC} + else + 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-${LIBC} + exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; - mips:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips - #undef mipsel - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips - #else - CPU= - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 - ;; - mips64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips64 - #undef mips64el + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` - test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit 0 ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit 0 ;; + 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-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + 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 0 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit 0 ;; + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + 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 - exit 0 ;; + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit 0 ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit 0 ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit 0 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit 0 ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit 0 ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #ifdef __INTEL_COMPILER - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 - test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 - ;; + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 - exit 0 ;; + exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx - exit 0 ;; + exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop - exit 0 ;; + exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos - exit 0 ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit 0 ;; + exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then @@ -991,15 +1066,16 @@ EOF else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi - exit 0 ;; - i*86:*:5:[78]*) + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit 0 ;; + exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi - exit 0 ;; + exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv - exit 0 ;; + exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv - exit 0 ;; + exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix - exit 0 ;; - M68*:*:R3V[567]*:*) - test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; - 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && echo i486-ncr-sysv4 && exit 0 ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 - exit 0 ;; + exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit 0 ;; + exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} - exit 0 ;; + exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 - exit 0 ;; + exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1091,68 +1180,109 @@ EOF else echo ns32k-sni-sysv fi - exit 0 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit 0 ;; + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 - exit 0 ;; + exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 - exit 0 ;; + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos - exit 0 ;; + exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} - exit 0 ;; + exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 - exit 0 ;; + exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit 0 ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos - exit 0 ;; + exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos - exit 0 ;; + exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos - exit 0 ;; + exit ;; + 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 0 ;; + exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} - exit 0 ;; + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Darwin:*:*) - case `uname -p` in - *86) UNAME_PROCESSOR=i686 ;; - powerpc) UNAME_PROCESSOR=powerpc ;; - esac + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + 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 0 ;; + exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then @@ -1160,22 +1290,28 @@ EOF UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit 0 ;; + exit ;; *:QNX:*:4*) echo i386-pc-qnx - exit 0 ;; - NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*) + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} - exit 0 ;; + exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux - exit 0 ;; + exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv - exit 0 ;; + exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit 0 ;; + exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 @@ -1186,180 +1322,55 @@ EOF UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 - exit 0 ;; + exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 - exit 0 ;; + exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex - exit 0 ;; + exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 - exit 0 ;; + exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 - exit 0 ;; + exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 - exit 0 ;; + exit ;; *:ITS:*:*) echo pdp10-unknown-its - exit 0 ;; + exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit 0 ;; + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + 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"); 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 && $dummy && exit 0 - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } - -# 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 0 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit 0 ;; - c34*) - echo c34-convex-bsd - exit 0 ;; - c38*) - echo c38-convex-bsd - exit 0 ;; - c4*) - echo c4-convex-bsd - exit 0 ;; - esac -fi - cat >&2 <, 1996 # @@ -25,7 +25,7 @@ # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. -# All known linkers require a `.a' archive for static linking (except MSVC, +# All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a shrext=.so diff --git a/build/aux/config.sub b/build/ac-aux/config.sub similarity index 73% rename from build/aux/config.sub rename to build/ac-aux/config.sub index 9d7f733..66c5074 100755 --- a/build/aux/config.sub +++ b/build/ac-aux/config.sub @@ -1,42 +1,40 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 1992-2014 Free Software Foundation, Inc. -timestamp='2003-07-04' +timestamp='2014-07-28' -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# 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 2 of the License, or +# 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 program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# 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., 59 Temple Place - Suite 330, -# Boston, MA 02111-1307, 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. +# 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 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. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -70,8 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 -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." @@ -83,11 +80,11 @@ Try \`$me --help' for more information." while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) - echo "$timestamp" ; exit 0 ;; + echo "$timestamp" ; exit ;; --version | -v ) - echo "$version" ; exit 0 ;; + echo "$version" ; exit ;; --help | --h* | -h ) - echo "$usage"; exit 0 ;; + echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. @@ -99,7 +96,7 @@ while test $# -gt 0 ; do *local*) # First pass through any local machine types. echo $1 - exit 0;; + exit ;; * ) break ;; @@ -118,10 +115,18 @@ esac # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + 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 ] @@ -144,10 +149,13 @@ 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) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -162,13 +170,17 @@ case $os in os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -185,6 +197,10 @@ case $os in # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` @@ -202,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 ;; @@ -226,55 +248,108 @@ 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] \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ - | c4x | clipper \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ - | fr30 | frv \ + | epiphany \ + | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ - | ip2k \ - | m32r | m68000 | m68k | m88k | mcore \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ - | mips64vr | mips64vrel \ + | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ + | 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 | nios2eb | nios2el \ | ns16k | ns32k \ - | openrisc | or32 \ + | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | 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 \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ - | x86 | xscale | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and @@ -290,58 +365,86 @@ 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]-* | amd64-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* \ - | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | cydra-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ - | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | 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-* \ - | m32r-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | mcore-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ + | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ + | 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-* \ - | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | 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-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ | tron-* \ - | v850-* | v850e-* | vax-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ - | xtensa-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. @@ -359,6 +462,9 @@ case $basic_machine in basic_machine=a29k-amd os=-udi ;; + abacus) + basic_machine=abacus-unknown + ;; adobe68k) basic_machine=m68010-adobe os=-scout @@ -376,6 +482,9 @@ case $basic_machine in amd64) basic_machine=x86_64-pc ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; amdahl) basic_machine=580-amdahl os=-sysv @@ -399,6 +508,10 @@ case $basic_machine in basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -407,10 +520,35 @@ case $basic_machine in basic_machine=ns32k-sequent os=-dynix ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; convex-c1) basic_machine=c1-convex os=-bsd @@ -435,12 +573,27 @@ case $basic_machine in basic_machine=j90-cray os=-unicos ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; crds | unos) basic_machine=m68k-crds ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; da30 | da30-*) basic_machine=m68k-da30 ;; @@ -463,6 +616,14 @@ case $basic_machine in basic_machine=m88k-motorola os=-sysv3 ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx @@ -574,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 @@ -613,6 +773,14 @@ case $basic_machine in basic_machine=m68k-isi os=-sysv ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; m88k-omron*) basic_machine=m88k-omron ;; @@ -624,10 +792,21 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; + 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) + basic_machine=arm-unknown + os=-mingw32ce + ;; miniframe) basic_machine=m68000-convergent ;; @@ -641,10 +820,6 @@ case $basic_machine in mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; - mmix*) - basic_machine=mmix-knuth - os=-mmixware - ;; monitor) basic_machine=m68k-rom68k os=-coff @@ -653,14 +828,29 @@ case $basic_machine in basic_machine=powerpc-unknown os=-morphos ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; msdos) basic_machine=i386-pc os=-msdos ;; + 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 @@ -725,9 +915,11 @@ case $basic_machine in np1) basic_machine=np1-gould ;; - nv1) - basic_machine=nv1-cray - os=-unicosmp + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem @@ -736,9 +928,12 @@ case $basic_machine in basic_machine=hppa1.1-oki os=-proelf ;; - or32 | or32-*) + openrisc | openrisc-*) basic_machine=or32-unknown - os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson @@ -756,6 +951,14 @@ case $basic_machine in basic_machine=i860-intel os=-osf ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; pbd) basic_machine=sparc-tti ;; @@ -765,6 +968,12 @@ case $basic_machine in pc532 | pc532-*) basic_machine=ns32k-pc532 ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; @@ -794,9 +1003,10 @@ case $basic_machine in ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -806,7 +1016,7 @@ case $basic_machine in ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown @@ -821,6 +1031,14 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; rom68k) basic_machine=m68k-rom68k os=-coff @@ -847,6 +1065,10 @@ case $basic_machine in sb1el) basic_machine=mipsisa64sb1el-unknown ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; sei) basic_machine=mips-sei os=-seiux @@ -858,6 +1080,9 @@ case $basic_machine in basic_machine=sh-hitachi os=-hms ;; + sh5el) + basic_machine=sh5le-unknown + ;; sh64) basic_machine=sh64-unknown ;; @@ -879,6 +1104,9 @@ case $basic_machine in basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -935,17 +1163,9 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown @@ -960,6 +1180,10 @@ case $basic_machine in tower | tower-32) basic_machine=m68k-ncr ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; udi29k) basic_machine=a29k-amd os=-udi @@ -1003,9 +1227,16 @@ case $basic_machine in basic_machine=hppa1.1-winbond os=-proelf ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1014,6 +1245,10 @@ case $basic_machine in basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1033,6 +1268,9 @@ case $basic_machine in romp) basic_machine=romp-ibm ;; + mmix) + basic_machine=mmix-knuth + ;; rs6000) basic_machine=rs6000-ibm ;; @@ -1049,13 +1287,10 @@ case $basic_machine in we32k) basic_machine=we32k-att ;; - sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) @@ -1099,9 +1334,12 @@ esac if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1122,25 +1360,31 @@ case $os in # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ - | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -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* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei*) + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1158,12 +1402,15 @@ case $os in os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; @@ -1176,6 +1423,9 @@ case $os in -opened*) os=-openedition ;; + -os400*) + os=-os400 + ;; -wince*) os=-wince ;; @@ -1197,6 +1447,9 @@ case $os in -atheos*) os=-atheos ;; + -syllable*) + os=-syllable + ;; -386bsd) os=-bsd ;; @@ -1219,6 +1472,9 @@ case $os in -sinix*) os=-sysv4 ;; + -tpf*) + os=-tpf + ;; -triton*) os=-sysv3 ;; @@ -1252,8 +1508,13 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) ;; -none) ;; @@ -1277,6 +1538,12 @@ else # system, and we'll never get to this point. case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; *-acorn) os=-riscix1.2 ;; @@ -1286,9 +1553,24 @@ case $basic_machine in arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff - ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 @@ -1307,13 +1589,13 @@ 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 ;; + mep-*) + os=-elf + ;; mips*-cisco) os=-elf ;; @@ -1332,9 +1614,15 @@ case $basic_machine in *-be) os=-beos ;; + *-haiku) + os=-haiku + ;; *-ibm) os=-aix ;; + *-knuth) + os=-mmixware + ;; *-wec) os=-proelf ;; @@ -1437,7 +1725,7 @@ case $basic_machine in -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) @@ -1467,9 +1755,15 @@ case $basic_machine in -mvs* | -opened*) vendor=ibm ;; + -os400*) + vendor=ibm + ;; -ptx*) vendor=sequent ;; + -tpf*) + vendor=ibm + ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; @@ -1494,7 +1788,7 @@ case $basic_machine in esac echo $basic_machine$os -exit 0 +exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build/aux/depcomp b/build/ac-aux/depcomp similarity index 50% rename from build/aux/depcomp rename to build/ac-aux/depcomp index df8eea7..4ebd5b3 100755 --- a/build/aux/depcomp +++ b/build/ac-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 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=2009-04-28.21; # 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,18 +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 +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 @@ -114,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 @@ -123,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 @@ -137,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" ;; @@ -179,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -188,43 +266,41 @@ sgi) 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 + # 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" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$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" + tr ' ' "$nl" < "$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" + make_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 @@ -237,9 +313,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 @@ -248,44 +322,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 @@ -297,8 +427,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" ;; @@ -309,9 +439,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 @@ -322,8 +451,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 @@ -333,77 +461,107 @@ 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 + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/'"$tab"'\1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/'"$tab"'/ + G + p +}' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # 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 + ;; #nosideeffect) # This comment above is used by automake to tell side-effect @@ -422,7 +580,7 @@ dashmstdout) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -442,18 +600,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" ;; @@ -503,12 +661,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 ;; @@ -525,7 +686,7 @@ cpp) shift fi - # Remove `-o $object'. + # Remove '-o $object'. IFS=" " for arg do @@ -544,10 +705,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" @@ -579,23 +740,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/ac-aux/gitlog-to-changelog b/build/ac-aux/gitlog-to-changelog new file mode 100755 index 0000000..d79e7aa --- /dev/null +++ b/build/ac-aux/gitlog-to-changelog @@ -0,0 +1,407 @@ +eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' + & eval 'exec perl -wS "$0" $argv:q' + if 0; +# Convert git log output to ChangeLog format. + +my $VERSION = '2012-07-16 18:34'; # 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-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 . + +# Written by Jim Meyering + +use strict; +use warnings; +use Getopt::Long; +use POSIX qw(strftime); + +(my $ME = $0) =~ s|.*/||; + +# use File::Coda; # http://meyering.net/code/Coda/ +END { + defined fileno STDOUT or return; + close STDOUT and return; + warn "$ME: failed to close standard output: $!\n"; + $? ||= 1; +} + +sub usage ($) +{ + my ($exit_code) = @_; + my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); + if ($exit_code != 0) + { + print $STREAM "Try '$ME --help' for more information.\n"; + } + else + { + print $STREAM < ChangeLog + $ME -- -n 5 foo > last-5-commits-to-branch-foo + +SPECIAL SYNTAX: + +The following types of strings are interpreted specially when they appear +at the beginning of a log message line. They are not copied to the output. + + Copyright-paperwork-exempt: Yes + Append the "(tiny change)" notation to the usual "date name email" + ChangeLog header to mark a change that does not require a copyright + assignment. + Co-authored-by: Joe User + List the specified name and email address on a second + ChangeLog header, denoting a co-author. + Signed-off-by: Joe User + These lines are simply elided. + +In a FILE specified via --amend, comment lines (starting with "#") are ignored. +FILE must consist of pairs where SHA is a 40-byte SHA1 (alone on +a line) referring to a commit in the current project, and CODE refers to one +or more consecutive lines of Perl code. Pairs must be separated by one or +more blank line. + +Here is sample input for use with --amend=FILE, from coreutils: + +3a169f4c5d9159283548178668d2fae6fced3030 +# fix typo in title: +s/all tile types/all file types/ + +1379ed974f1fa39b12e2ffab18b3f7a607082202 +# Due to a bug in vc-dwim, I mis-attributed a patch by Paul to myself. +# Change the author to be Paul. Note the escaped "@": +s,Jim .*>,Paul Eggert , + +EOF + } + exit $exit_code; +} + +# If the string $S is a well-behaved file name, simply return it. +# If it contains white space, quotes, etc., quote it, and return the new string. +sub shell_quote($) +{ + my ($s) = @_; + if ($s =~ m![^\w+/.,-]!) + { + # Convert each single quote to '\'' + $s =~ s/\'/\'\\\'\'/g; + # Then single quote the string. + $s = "'$s'"; + } + return $s; +} + +sub quoted_cmd(@) +{ + return join (' ', map {shell_quote $_} @_); +} + +# Parse file F. +# Comment lines (starting with "#") are ignored. +# F must consist of pairs where SHA is a 40-byte SHA1 +# (alone on a line) referring to a commit in the current project, and +# CODE refers to one or more consecutive lines of Perl code. +# Pairs must be separated by one or more blank line. +sub parse_amend_file($) +{ + my ($f) = @_; + + open F, '<', $f + or die "$ME: $f: failed to open for reading: $!\n"; + + my $fail; + my $h = {}; + my $in_code = 0; + my $sha; + while (defined (my $line = )) + { + $line =~ /^\#/ + and next; + chomp $line; + $line eq '' + and $in_code = 0, next; + + if (!$in_code) + { + $line =~ /^([0-9a-fA-F]{40})$/ + or (warn "$ME: $f:$.: invalid line; expected an SHA1\n"), + $fail = 1, next; + $sha = lc $1; + $in_code = 1; + exists $h->{$sha} + and (warn "$ME: $f:$.: duplicate SHA1\n"), + $fail = 1, next; + } + else + { + $h->{$sha} ||= ''; + $h->{$sha} .= "$line\n"; + } + } + close F; + + $fail + and exit 1; + + return $h; +} + +{ + my $since_date; + my $format_string = '%s%n%b%n'; + my $amend_file; + my $append_dot = 0; + my $cluster = 1; + my $strip_tab = 0; + my $strip_cherry_pick = 0; + my $srcdir; + GetOptions + ( + help => sub { usage 0 }, + version => sub { print "$ME version $VERSION\n"; exit }, + 'since=s' => \$since_date, + 'format=s' => \$format_string, + 'amend=s' => \$amend_file, + 'append-dot' => \$append_dot, + 'cluster!' => \$cluster, + 'strip-tab' => \$strip_tab, + 'strip-cherry-pick' => \$strip_cherry_pick, + 'srcdir=s' => \$srcdir, + ) or usage 1; + + defined $since_date + and unshift @ARGV, "--since=$since_date"; + + # This is a hash that maps an SHA1 to perl code (i.e., s/old/new/) + # that makes a correction in the log or attribution of that commit. + my $amend_code = defined $amend_file ? parse_amend_file $amend_file : {}; + + my @cmd = ('git', + defined $srcdir ? ("--git-dir=$srcdir/.git") : (), + qw(log --log-size), + '--pretty=format:%H:%ct %an <%ae>%n%n'.$format_string, @ARGV); + open PIPE, '-|', @cmd + or die ("$ME: failed to run '". quoted_cmd (@cmd) ."': $!\n" + . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); + + my $prev_multi_paragraph; + my $prev_date_line = ''; + my @prev_coauthors = (); + while (1) + { + defined (my $in = ) + or last; + $in =~ /^log size (\d+)$/ + or die "$ME:$.: Invalid line (expected log size):\n$in"; + my $log_nbytes = $1; + + my $log; + my $n_read = read PIPE, $log, $log_nbytes; + $n_read == $log_nbytes + or die "$ME:$.: unexpected EOF\n"; + + # Extract leading hash. + my ($sha, $rest) = split ':', $log, 2; + defined $sha + or die "$ME:$.: malformed log entry\n"; + $sha =~ /^[0-9a-fA-F]{40}$/ + or die "$ME:$.: invalid SHA1: $sha\n"; + + # If this commit's log requires any transformation, do it now. + my $code = $amend_code->{$sha}; + if (defined $code) + { + eval 'use Safe'; + my $s = new Safe; + # Put the unpreprocessed entry into "$_". + $_ = $rest; + + # Let $code operate on it, safely. + my $r = $s->reval("$code") + or die "$ME:$.:$sha: failed to eval \"$code\":\n$@\n"; + + # Note that we've used this entry. + delete $amend_code->{$sha}; + + # Update $rest upon success. + $rest = $_; + } + + # Remove lines inserted by "git cherry-pick". + if ($strip_cherry_pick) + { + $rest =~ s/^\s*Conflicts:\n.*//sm; + $rest =~ s/^\s*\(cherry picked from commit [\da-f]+\)\n//m; + } + + my @line = split "\n", $rest; + my $author_line = shift @line; + defined $author_line + or die "$ME:$.: unexpected EOF\n"; + $author_line =~ /^(\d+) (.*>)$/ + or die "$ME:$.: Invalid line " + . "(expected date/author/email):\n$author_line\n"; + + # Format 'Copyright-paperwork-exempt: Yes' as a standard ChangeLog + # `(tiny change)' annotation. + my $tiny = (grep (/^Copyright-paperwork-exempt:\s+[Yy]es$/, @line) + ? ' (tiny change)' : ''); + + my $date_line = sprintf "%s %s$tiny\n", + strftime ("%F", localtime ($1)), $2; + + my @coauthors = grep /^Co-authored-by:.*$/, @line; + # Omit meta-data lines we've already interpreted. + @line = grep !/^(?:Signed-off-by:[ ].*>$ + |Co-authored-by:[ ] + |Copyright-paperwork-exempt:[ ] + )/x, @line; + + # Remove leading and trailing blank lines. + if (@line) + { + while ($line[0] =~ /^\s*$/) { shift @line; } + while ($line[$#line] =~ /^\s*$/) { pop @line; } + } + + # Record whether there are two or more paragraphs. + my $multi_paragraph = grep /^\s*$/, @line; + + # Format 'Co-authored-by: A U Thor ' lines in + # standard multi-author ChangeLog format. + for (@coauthors) + { + s/^Co-authored-by:\s*/\t /; + s/\s*/ + or warn "$ME: warning: missing email address for " + . substr ($_, 5) . "\n"; + } + + # If clustering of commit messages has been disabled, if this header + # would be different from the previous date/name/email/coauthors header, + # or if this or the previous entry consists of two or more paragraphs, + # then print the header. + if ( ! $cluster + || $date_line ne $prev_date_line + || "@coauthors" ne "@prev_coauthors" + || $multi_paragraph + || $prev_multi_paragraph) + { + $prev_date_line eq '' + or print "\n"; + print $date_line; + @coauthors + and print join ("\n", @coauthors), "\n"; + } + $prev_date_line = $date_line; + @prev_coauthors = @coauthors; + $prev_multi_paragraph = $multi_paragraph; + + # If there were any lines + if (@line == 0) + { + warn "$ME: warning: empty commit message:\n $date_line\n"; + } + else + { + if ($append_dot) + { + # If the first line of the message has enough room, then + if (length $line[0] < 72) + { + # append a dot if there is no other punctuation or blank + # at the end. + $line[0] =~ /[[:punct:]\s]$/ + or $line[0] .= '.'; + } + } + + # Remove one additional leading TAB from each line. + $strip_tab + and map { s/^\t// } @line; + + # Prefix each non-empty line with a TAB. + @line = map { length $_ ? "\t$_" : '' } @line; + + print "\n", join ("\n", @line), "\n"; + } + + defined ($in = ) + or last; + $in ne "\n" + and die "$ME:$.: unexpected line:\n$in"; + } + + close PIPE + or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; + # FIXME-someday: include $PROCESS_STATUS in the diagnostic + + # Complain about any unused entry in the --amend=F specified file. + my $fail = 0; + foreach my $sha (keys %$amend_code) + { + warn "$ME:$amend_file: unused entry: $sha\n"; + $fail = 1; + } + + exit $fail; +} + +# Local Variables: +# mode: perl +# indent-tabs-mode: nil +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "my $VERSION = '" +# time-stamp-format: "%:y-%02m-%02d %02H:%02M" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "'; # UTC" +# End: diff --git a/build/aux/install-sh b/build/ac-aux/install-sh similarity index 94% rename from build/aux/install-sh rename to build/ac-aux/install-sh index 6781b98..377bb86 100755 --- a/build/aux/install-sh +++ b/build/ac-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2009-04-28.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 @@ -156,6 +156,10 @@ while test $# -ne 0; do -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) no_target_directory=true;; @@ -186,6 +190,10 @@ 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. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -194,13 +202,17 @@ 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 - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for 'test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -347,7 +354,7 @@ do 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. + # 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 @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/build/aux/ltmain.sh b/build/ac-aux/ltmain.sh old mode 100755 new mode 100644 similarity index 99% rename from build/aux/ltmain.sh rename to build/ac-aux/ltmain.sh index aa5624c..63ae69d --- a/build/aux/ltmain.sh +++ b/build/ac-aux/ltmain.sh @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 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. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 +# $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4 +VERSION=2.4.2 TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ case $progpath in ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ func_help () s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_finish=false opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1120,6 +1117,10 @@ esac opt_silent=false func_append preserve_args " $opt" ;; + --no-warning|--no-warn) + opt_warning=false +func_append preserve_args " $opt" + ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" @@ -2059,7 +2060,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ func_mode_install () # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ func_exec_program_core () # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6147,7 +6160,8 @@ func_mode_link () lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6831,7 +6845,7 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7316,6 +7330,7 @@ func_mode_link () # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7432,7 +7447,7 @@ func_mode_link () versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8020,6 +8035,11 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8050,7 +8070,7 @@ EOF elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8058,11 +8078,7 @@ EOF if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9152,6 +9168,8 @@ EOF esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9261,7 +9279,8 @@ EOF *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff --git a/build/ac-aux/missing b/build/ac-aux/missing new file mode 100755 index 0000000..cdea514 --- /dev/null +++ b/build/ac-aux/missing @@ -0,0 +1,215 @@ +#! /bin/sh +# Common wrapper for a few potentially missing GNU programs. + +scriptversion=2012-06-26.16; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General 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 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. + +if test $# -eq 0; then + echo 1>&2 "Try '$0 --help' for more information" + exit 1 +fi + +case $1 in + + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; + + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; + + -h|--h|--he|--hel|--help) + echo "\ +$0 [OPTION]... PROGRAM [ARGUMENT]... + +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. + +Options: + -h, --help display this help and exit + -v, --version output version information and exit + +Supported PROGRAM values: + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man + +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. + +Send bug reports to ." + exit $? + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing $scriptversion (GNU Automake)" + exit $? + ;; + + -*) + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" + exit 1 + ;; + +esac + +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi + +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'automa4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" + ;; + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build/aux/move-if-change b/build/ac-aux/move-if-change similarity index 80% rename from build/aux/move-if-change rename to build/ac-aux/move-if-change index a542417..fb6a451 100755 --- a/build/aux/move-if-change +++ b/build/ac-aux/move-if-change @@ -2,13 +2,13 @@ # Like mv $1 $2, but if the files are the same, just delete $1. # Status is zero if successful, nonzero otherwise. -VERSION='2007-09-28 23:10'; # UTC +VERSION='2011-01-28 20:09'; # 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) 2002-2007 Free Software Foundation, Inc. +# Copyright (C) 2002-2007, 2009-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 @@ -32,15 +32,18 @@ If SOURCE is different than DEST, then move it to DEST; else remove SOURCE. --help display this help and exit --version output version information and exit +The variable CMPPROG can be used to specify an alternative to \`cmp'. + Report bugs to ." version=`expr "$VERSION" : '\([^ ]*\)'` version="move-if-change (gnulib) $version -Copyright (C) 2007 Free Software Foundation, Inc. +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." +cmpprog=${CMPPROG-cmp} for arg do @@ -60,12 +63,15 @@ do esac done -test $# = 2 || { echo "$0: $usage" >&2; exit 1; } +test $# -eq 2 || { echo "$0: $usage" >&2; exit 1; } -if test -r "$2" && cmp -s -- "$1" "$2"; then +if test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null; then rm -f -- "$1" else - mv -f -- "$1" "$2" + if mv -f -- "$1" "$2"; then :; else + # Ignore failure due to a concurrent move-if-change. + test -r "$2" && $cmpprog -- "$1" "$2" >/dev/null && rm -f -- "$1" + fi fi ## Local Variables: diff --git a/build/ac-aux/snippet/_Noreturn.h b/build/ac-aux/snippet/_Noreturn.h new file mode 100644 index 0000000..c44ad89 --- /dev/null +++ b/build/ac-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/arg-nonnull.h b/build/ac-aux/snippet/arg-nonnull.h similarity index 95% rename from build/aux/arg-nonnull.h rename to build/ac-aux/snippet/arg-nonnull.h index 6c2f1e8..3a9dd26 100644 --- a/build/aux/arg-nonnull.h +++ b/build/ac-aux/snippet/arg-nonnull.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific arguments must not be NULL. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/build/aux/c++defs.h b/build/ac-aux/snippet/c++defs.h similarity index 99% rename from build/aux/c++defs.h rename to build/ac-aux/snippet/c++defs.h index b6821a6..96da94b 100644 --- a/build/aux/c++defs.h +++ b/build/ac-aux/snippet/c++defs.h @@ -1,5 +1,5 @@ /* C++ compatible function declaration macros. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-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 diff --git a/build/aux/unused-parameter.h b/build/ac-aux/snippet/unused-parameter.h similarity index 96% rename from build/aux/unused-parameter.h rename to build/ac-aux/snippet/unused-parameter.h index c8d2071..1c8d61f 100644 --- a/build/aux/unused-parameter.h +++ b/build/ac-aux/snippet/unused-parameter.h @@ -1,5 +1,5 @@ /* A C macro for declaring that specific function parameters are not used. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-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 diff --git a/build/aux/warn-on-use.h b/build/ac-aux/snippet/warn-on-use.h similarity index 98% rename from build/aux/warn-on-use.h rename to build/ac-aux/snippet/warn-on-use.h index 2cdeec3..d4cb94f 100644 --- a/build/aux/warn-on-use.h +++ b/build/ac-aux/snippet/warn-on-use.h @@ -1,5 +1,5 @@ /* A C macro for emitting warnings if a function is used. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-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 diff --git a/build/ac-aux/test-driver b/build/ac-aux/test-driver new file mode 100755 index 0000000..32bf39e --- /dev/null +++ b/build/ac-aux/test-driver @@ -0,0 +1,127 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2012-06-27.10; # UTC + +# Copyright (C) 2011-2013 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General 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 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build/ac-aux/ylwrap b/build/ac-aux/ylwrap new file mode 100755 index 0000000..1c4d776 --- /dev/null +++ b/build/ac-aux/ylwrap @@ -0,0 +1,249 @@ +#! /bin/sh +# ylwrap - wrapper for lex/yacc invocations. + +scriptversion=2012-12-21.17; # UTC + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# +# Written by Tom Tromey . +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General 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 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. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +get_dirname () +{ + case $1 in + */*|*\\*) printf '%s\n' "$1" | sed -e 's|\([\\/]\)[^\\/]*$|\1|';; + # Otherwise, we want the empty string (not "."). + esac +} + +# guard FILE +# ---------- +# The CPP macro used to guard inclusion of FILE. +guard() +{ + printf '%s\n' "$1" \ + | sed \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' \ + -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g' \ + -e 's/__*/_/g' +} + +# quote_for_sed [STRING] +# ---------------------- +# Return STRING (or stdin) quoted to be used as a sed pattern. +quote_for_sed () +{ + case $# in + 0) cat;; + 1) printf '%s\n' "$1";; + esac \ + | sed -e 's|[][\\.*]|\\&|g' +} + +case "$1" in + '') + echo "$0: No files given. Try '$0 --help' for more information." 1>&2 + exit 1 + ;; + --basedir) + basedir=$2 + shift 2 + ;; + -h|--h*) + cat <<\EOF +Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... + +Wrapper for lex/yacc invocations, renaming files as desired. + + INPUT is the input file + OUTPUT is one file PROG generates + DESIRED is the file we actually want instead of OUTPUT + PROGRAM is program to run + ARGS are passed to PROG + +Any number of OUTPUT,DESIRED pairs may be used. + +Report bugs to . +EOF + exit $? + ;; + -v|--v*) + echo "ylwrap $scriptversion" + exit $? + ;; +esac + + +# The input. +input="$1" +shift +# We'll later need for a correct munging of "#line" directives. +input_sub_rx=`get_dirname "$input" | quote_for_sed` +case "$input" in + [\\/]* | ?:[\\/]*) + # Absolute path; do nothing. + ;; + *) + # Relative path. Make it absolute. + input="`pwd`/$input" + ;; +esac +input_rx=`get_dirname "$input" | quote_for_sed` + +# Since DOS filename conventions don't allow two dots, +# the DOS version of Bison writes out y_tab.c instead of y.tab.c +# and y_tab.h instead of y.tab.h. Test to see if this is the case. +y_tab_nodot=false +if test -f y_tab.c || test -f y_tab.h; then + y_tab_nodot=true +fi + +# The parser itself, the first file, is the destination of the .y.c +# rule in the Makefile. +parser=$1 + +# A sed program to s/FROM/TO/g for all the FROM/TO so that, for +# instance, we rename #include "y.tab.h" into #include "parse.h" +# during the conversion from y.tab.c to parse.c. +sed_fix_filenames= + +# Also rename header guards, as Bison 2.7 for instance uses its header +# guard in its implementation file. +sed_fix_header_guards= + +while test "$#" -ne 0; do + if test "$1" = "--"; then + shift + break + fi + from=$1 + # Handle y_tab.c and y_tab.h output by DOS + if $y_tab_nodot; then + case $from in + "y.tab.c") from=y_tab.c;; + "y.tab.h") from=y_tab.h;; + esac + fi + shift + to=$1 + shift + sed_fix_filenames="${sed_fix_filenames}s|"`quote_for_sed "$from"`"|$to|g;" + sed_fix_header_guards="${sed_fix_header_guards}s|"`guard "$from"`"|"`guard "$to"`"|g;" +done + +# The program to run. +prog="$1" +shift +# Make any relative path in $prog absolute. +case "$prog" in + [\\/]* | ?:[\\/]*) ;; + *[\\/]*) prog="`pwd`/$prog" ;; +esac + +# FIXME: add hostname here for parallel makes that run commands on +# other machines. But that might take us over the 14-char limit. +dirname=ylwrap$$ +do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' +trap "ret=129; $do_exit" 1 +trap "ret=130; $do_exit" 2 +trap "ret=141; $do_exit" 13 +trap "ret=143; $do_exit" 15 +mkdir $dirname || exit 1 + +cd $dirname + +case $# in + 0) "$prog" "$input" ;; + *) "$prog" "$@" "$input" ;; +esac +ret=$? + +if test $ret -eq 0; then + for from in * + do + to=`printf '%s\n' "$from" | sed "$sed_fix_filenames"` + if test -f "$from"; then + # If $2 is an absolute path name, then just use that, + # otherwise prepend '../'. + case $to in + [\\/]* | ?:[\\/]*) target=$to;; + *) target="../$to";; + esac + + # Do not overwrite unchanged header files to avoid useless + # recompilations. Always update the parser itself: it is the + # destination of the .y.c rule in the Makefile. Divert the + # output of all other files to a temporary file so we can + # compare them to existing versions. + if test $from != $parser; then + realtarget="$target" + target=tmp-`printf '%s\n' "$target" | sed 's|.*[\\/]||g'` + fi + + # Munge "#line" or "#" directives. Don't let the resulting + # debug information point at an absolute srcdir. Use the real + # output file name, not yy.lex.c for instance. Adjust the + # include guards too. + sed -e "/^#/!b" \ + -e "s|$input_rx|$input_sub_rx|" \ + -e "$sed_fix_filenames" \ + -e "$sed_fix_header_guards" \ + "$from" >"$target" || ret=$? + + # Check whether files must be updated. + if test "$from" != "$parser"; then + if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then + echo "$to is unchanged" + rm -f "$target" + else + echo "updating $to" + mv -f "$target" "$realtarget" + fi + fi + else + # A missing file is only an error for the parser. This is a + # blatant hack to let us support using "yacc -d". If -d is not + # specified, don't fail when the header file is "missing". + if test "$from" = "$parser"; then + ret=1 + fi + fi + done +fi + +# Remove the directory. +cd .. +rm -rf $dirname + +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build/aux/gitlog-to-changelog b/build/aux/gitlog-to-changelog deleted file mode 100755 index 4559704..0000000 --- a/build/aux/gitlog-to-changelog +++ /dev/null @@ -1,191 +0,0 @@ -eval '(exit $?0)' && eval 'exec perl -wS "$0" ${1+"$@"}' - & eval 'exec perl -wS "$0" $argv:q' - if 0; -# Convert git log output to ChangeLog format. - -my $VERSION = '2009-10-30 13:46'; # 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. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License 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 - -use strict; -use warnings; -use Getopt::Long; -use POSIX qw(strftime); - -(my $ME = $0) =~ s|.*/||; - -# use File::Coda; # http://meyering.net/code/Coda/ -END { - defined fileno STDOUT or return; - close STDOUT and return; - warn "$ME: failed to close standard output: $!\n"; - $? ||= 1; -} - -sub usage ($) -{ - my ($exit_code) = @_; - my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR); - if ($exit_code != 0) - { - print $STREAM "Try `$ME --help' for more information.\n"; - } - else - { - print $STREAM < ChangeLog - $ME -- -n 5 foo > last-5-commits-to-branch-foo - -EOF - } - exit $exit_code; -} - -# If the string $S is a well-behaved file name, simply return it. -# If it contains white space, quotes, etc., quote it, and return the new string. -sub shell_quote($) -{ - my ($s) = @_; - if ($s =~ m![^\w+/.,-]!) - { - # Convert each single quote to '\'' - $s =~ s/\'/\'\\\'\'/g; - # Then single quote the string. - $s = "'$s'"; - } - return $s; -} - -sub quoted_cmd(@) -{ - return join (' ', map {shell_quote $_} @_); -} - -{ - my $since_date = '1970-01-01 UTC'; - my $format_string = '%s%n%b%n'; - GetOptions - ( - help => sub { usage 0 }, - version => sub { print "$ME version $VERSION\n"; exit }, - 'since=s' => \$since_date, - 'format=s' => \$format_string, - ) or usage 1; - - my @cmd = (qw (git log --log-size), "--since=$since_date", - '--pretty=format:%ct %an <%ae>%n%n'.$format_string, @ARGV); - open PIPE, '-|', @cmd - or die ("$ME: failed to run `". quoted_cmd (@cmd) ."': $!\n" - . "(Is your Git too old? Version 1.5.1 or later is required.)\n"); - - my $prev_date_line = ''; - while (1) - { - defined (my $in = ) - or last; - $in =~ /^log size (\d+)$/ - or die "$ME:$.: Invalid line (expected log size):\n$in"; - my $log_nbytes = $1; - - my $log; - my $n_read = read PIPE, $log, $log_nbytes; - $n_read == $log_nbytes - or die "$ME:$.: unexpected EOF\n"; - - my @line = split "\n", $log; - my $author_line = shift @line; - defined $author_line - or die "$ME:$.: unexpected EOF\n"; - $author_line =~ /^(\d+) (.*>)$/ - or die "$ME:$.: Invalid line " - . "(expected date/author/email):\n$author_line\n"; - - my $date_line = sprintf "%s $2\n", strftime ("%F", localtime ($1)); - # If this line would be the same as the previous date/name/email - # line, then arrange not to print it. - if ($date_line ne $prev_date_line) - { - $prev_date_line eq '' - or print "\n"; - print $date_line; - } - $prev_date_line = $date_line; - - # Omit "Signed-off-by..." lines. - @line = grep !/^Signed-off-by: .*>$/, @line; - - # If there were any lines - if (@line == 0) - { - warn "$ME: warning: empty commit message:\n $date_line\n"; - } - else - { - # Remove leading and trailing blank lines. - while ($line[0] =~ /^\s*$/) { shift @line; } - while ($line[$#line] =~ /^\s*$/) { pop @line; } - - # Prefix each non-empty line with a TAB. - @line = map { length $_ ? "\t$_" : '' } @line; - - print "\n", join ("\n", @line), "\n"; - } - - defined ($in = ) - or last; - $in ne "\n" - and die "$ME:$.: unexpected line:\n$in"; - } - - close PIPE - or die "$ME: error closing pipe from " . quoted_cmd (@cmd) . "\n"; - # FIXME-someday: include $PROCESS_STATUS in the diagnostic -} - -# Local Variables: -# mode: perl -# indent-tabs-mode: nil -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "my $VERSION = '" -# time-stamp-format: "%:y-%02m-%02d %02H:%02M" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "'; # UTC" -# End: diff --git a/build/aux/missing b/build/aux/missing deleted file mode 100755 index 28055d2..0000000 --- a/build/aux/missing +++ /dev/null @@ -1,376 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General 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 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG="\${$#}" - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/build/aux/ylwrap b/build/aux/ylwrap deleted file mode 100755 index 84d5634..0000000 --- a/build/aux/ylwrap +++ /dev/null @@ -1,222 +0,0 @@ -#! /bin/sh -# ylwrap - wrapper for lex/yacc invocations. - -scriptversion=2009-04-28.21; # UTC - -# Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, -# 2007, 2009 Free Software Foundation, Inc. -# -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General 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 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. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -case "$1" in - '') - echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 - exit 1 - ;; - --basedir) - basedir=$2 - shift 2 - ;; - -h|--h*) - cat <<\EOF -Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... - -Wrapper for lex/yacc invocations, renaming files as desired. - - INPUT is the input file - OUTPUT is one file PROG generates - DESIRED is the file we actually want instead of OUTPUT - PROGRAM is program to run - ARGS are passed to PROG - -Any number of OUTPUT,DESIRED pairs may be used. - -Report bugs to . -EOF - exit $? - ;; - -v|--v*) - echo "ylwrap $scriptversion" - exit $? - ;; -esac - - -# The input. -input="$1" -shift -case "$input" in - [\\/]* | ?:[\\/]*) - # Absolute path; do nothing. - ;; - *) - # Relative path. Make it absolute. - input="`pwd`/$input" - ;; -esac - -pairlist= -while test "$#" -ne 0; do - if test "$1" = "--"; then - shift - break - fi - pairlist="$pairlist $1" - shift -done - -# The program to run. -prog="$1" -shift -# Make any relative path in $prog absolute. -case "$prog" in - [\\/]* | ?:[\\/]*) ;; - *[\\/]*) prog="`pwd`/$prog" ;; -esac - -# FIXME: add hostname here for parallel makes that run commands on -# other machines. But that might take us over the 14-char limit. -dirname=ylwrap$$ -trap "cd '`pwd`'; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 -mkdir $dirname || exit 1 - -cd $dirname - -case $# in - 0) "$prog" "$input" ;; - *) "$prog" "$@" "$input" ;; -esac -ret=$? - -if test $ret -eq 0; then - set X $pairlist - shift - first=yes - # Since DOS filename conventions don't allow two dots, - # the DOS version of Bison writes out y_tab.c instead of y.tab.c - # and y_tab.h instead of y.tab.h. Test to see if this is the case. - y_tab_nodot="no" - if test -f y_tab.c || test -f y_tab.h; then - y_tab_nodot="yes" - fi - - # The directory holding the input. - input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` - # Quote $INPUT_DIR so we can use it in a regexp. - # FIXME: really we should care about more than `.' and `\'. - input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` - - while test "$#" -ne 0; do - from="$1" - # Handle y_tab.c and y_tab.h output by DOS - if test $y_tab_nodot = "yes"; then - if test $from = "y.tab.c"; then - from="y_tab.c" - else - if test $from = "y.tab.h"; then - from="y_tab.h" - fi - fi - fi - if test -f "$from"; then - # If $2 is an absolute path name, then just use that, - # otherwise prepend `../'. - case "$2" in - [\\/]* | ?:[\\/]*) target="$2";; - *) target="../$2";; - esac - - # We do not want to overwrite a header file if it hasn't - # changed. This avoid useless recompilations. However the - # parser itself (the first file) should always be updated, - # because it is the destination of the .y.c rule in the - # Makefile. Divert the output of all other files to a temporary - # file so we can compare them to existing versions. - if test $first = no; then - realtarget="$target" - target="tmp-`echo $target | sed s/.*[\\/]//g`" - fi - # Edit out `#line' or `#' directives. - # - # We don't want the resulting debug information to point at - # an absolute srcdir; it is better for it to just mention the - # .y file with no path. - # - # We want to use the real output file name, not yy.lex.c for - # instance. - # - # We want the include guards to be adjusted too. - FROM=`echo "$from" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - TARGET=`echo "$2" | sed \ - -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ - -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` - - sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ - -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? - - # Check whether header files must be updated. - if test $first = no; then - if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then - echo "$2" is unchanged - rm -f "$target" - else - echo updating "$2" - mv -f "$target" "$realtarget" - fi - fi - else - # A missing file is only an error for the first file. This - # is a blatant hack to let us support using "yacc -d". If -d - # is not specified, we don't want an error when the header - # file is "missing". - if test $first = yes; then - ret=1 - fi - fi - shift - shift - first=no - done -else - ret=$? -fi - -# Remove the directory. -cd .. -rm -rf $dirname - -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff --git a/config.h.in b/config.h.in index adddf6f..6e64abf 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 to the number of bits in type 'ptrdiff_t'. */ #undef BITSIZEOF_PTRDIFF_T @@ -23,12 +26,26 @@ /* 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 to 1 if // is a file system root distinct from /. */ #undef DOUBLE_SLASH_IS_DISTINCT_ROOT /* whether debugging is enabled */ #undef ENABLE_DEBUG +/* Enable compile-time and run-time bounds-checking, and some warnings, + without upsetting newer glibc. */ + #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__ + # define _FORTIFY_SOURCE 2 + #endif + + /* Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string. */ #undef FUNC_NL_LANGINFO_YESEXPR_WORKS @@ -36,14 +53,29 @@ and handles trailing slash correctly. */ #undef FUNC_REALPATH_WORKS +/* Define if gettimeofday clobbers the localtime buffer. */ +#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME + +/* Define this to 'void' or 'struct timezone' to match the system's + declaration of the second argument to gettimeofday. */ +#undef GETTIMEOFDAY_TIMEZONE + /* Define to a C preprocessor expression that evaluates to 1 or 0, depending whether the gnulib module canonicalize-lgpl shall be considered present. */ #undef GNULIB_CANONICALIZE_LGPL /* 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 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 scanf shall be considered present. */ +#undef GNULIB_SCANF + /* Define to 1 when the gnulib module btowc should be tested. */ #undef GNULIB_TEST_BTOWC @@ -51,12 +83,24 @@ */ #undef GNULIB_TEST_CANONICALIZE_FILE_NAME +/* Define to 1 when the gnulib module close should be tested. */ +#undef GNULIB_TEST_CLOSE + /* Define to 1 when the gnulib module dup2 should be tested. */ #undef GNULIB_TEST_DUP2 /* Define to 1 when the gnulib module environ should be tested. */ #undef GNULIB_TEST_ENVIRON +/* Define to 1 when the gnulib module fdopen should be tested. */ +#undef GNULIB_TEST_FDOPEN + +/* Define to 1 when the gnulib module fstat should be tested. */ +#undef GNULIB_TEST_FSTAT + +/* Define to 1 when the gnulib module getcwd should be tested. */ +#undef GNULIB_TEST_GETCWD + /* Define to 1 when the gnulib module getdelim should be tested. */ #undef GNULIB_TEST_GETDELIM @@ -69,6 +113,12 @@ /* Define to 1 when the gnulib module getpagesize should be tested. */ #undef GNULIB_TEST_GETPAGESIZE +/* Define to 1 when the gnulib module gettimeofday should be tested. */ +#undef GNULIB_TEST_GETTIMEOFDAY + +/* Define to 1 when the gnulib module localeconv should be tested. */ +#undef GNULIB_TEST_LOCALECONV + /* Define to 1 when the gnulib module lstat should be tested. */ #undef GNULIB_TEST_LSTAT @@ -93,6 +143,9 @@ /* Define to 1 when the gnulib module mempcpy should be tested. */ #undef GNULIB_TEST_MEMPCPY +/* Define to 1 when the gnulib module mkstemp should be tested. */ +#undef GNULIB_TEST_MKSTEMP + /* Define to 1 when the gnulib module nl_langinfo should be tested. */ #undef GNULIB_TEST_NL_LANGINFO @@ -102,6 +155,9 @@ /* Define to 1 when the gnulib module putenv should be tested. */ #undef GNULIB_TEST_PUTENV +/* Define to 1 when the gnulib module rawmemchr should be tested. */ +#undef GNULIB_TEST_RAWMEMCHR + /* Define to 1 when the gnulib module readlink should be tested. */ #undef GNULIB_TEST_READLINK @@ -126,6 +182,9 @@ /* Define to 1 when the gnulib module stpncpy should be tested. */ #undef GNULIB_TEST_STPNCPY +/* Define to 1 when the gnulib module strchrnul should be tested. */ +#undef GNULIB_TEST_STRCHRNUL + /* Define to 1 when the gnulib module strndup should be tested. */ #undef GNULIB_TEST_STRNDUP @@ -167,17 +226,17 @@ /* 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 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 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 @@ -205,6 +264,18 @@ don't. */ #undef HAVE_DECL_ISBLANK +/* 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 `setenv', and to 0 if you don't. */ #undef HAVE_DECL_SETENV @@ -221,10 +292,18 @@ don't. */ #undef HAVE_DECL_STRNLEN +/* 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 `unsetenv', and to 0 if you 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 @@ -236,7 +315,7 @@ /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H -/* Define to 1 if you have the `dup2' function. */ +/* Define to 1 if you have the 'dup2' function. */ #undef HAVE_DUP2 /* Define if you have the declaration of environ. */ @@ -245,9 +324,6 @@ /* Define to 1 if the system has the type `error_t'. */ #undef HAVE_ERROR_T -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H @@ -260,10 +336,10 @@ /* Define to 1 if you have the `funlockfile' function. */ #undef HAVE_FUNLOCKFILE -/* Define to 1 if you have the `getcwd' function. */ +/* 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 header file. */ @@ -275,6 +351,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE +/* Define to 1 if you have the 'gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + /* Define if you have the 'intmax_t' type in or . */ #undef HAVE_INTMAX_T @@ -285,13 +364,13 @@ 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 'isblank' function. */ #undef HAVE_ISBLANK -/* 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). */ @@ -306,10 +385,10 @@ /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H -/* 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 @@ -326,31 +405,35 @@ /* 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 `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 header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY -/* Define to 1 if you have the `mprotect' function. */ +/* Define to 1 if you have the 'mkstemp' function. */ +#undef HAVE_MKSTEMP + +/* Define to 1 if you have the 'mprotect' function. */ #undef HAVE_MPROTECT -/* Define to 1 if you have the `newlocale' 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 'newlocale' function. */ #undef HAVE_NEWLOCALE -/* 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 `open_memstream' function. */ @@ -359,9 +442,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_OS_H -/* Define to 1 if you have the `pathconf' function. */ -#undef HAVE_PATHCONF - /* Define to 1 if you have the `pthread_atfork' function. */ #undef HAVE_PTHREAD_ATFORK @@ -371,6 +451,9 @@ /* Define if the POSIX multithreading library has read/write locks. */ #undef HAVE_PTHREAD_RWLOCK +/* Define to 1 if you have the `rawmemchr' function. */ +#undef HAVE_RAWMEMCHR + /* Define to 1 if atoll is declared even after undefining macros. */ #undef HAVE_RAW_DECL_ATOLL @@ -381,12 +464,18 @@ macros. */ #undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME +/* 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 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 @@ -420,12 +509,24 @@ /* 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 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 fpurge is declared even after undefining macros. */ #undef HAVE_RAW_DECL_FPURGE /* 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 @@ -474,17 +575,38 @@ /* Define to 1 if getpagesize is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETPAGESIZE +/* Define to 1 if gets is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETS + /* Define to 1 if getsubopt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETSUBOPT +/* Define to 1 if gettimeofday is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GETTIMEOFDAY + /* Define to 1 if getusershell is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GETUSERSHELL /* Define to 1 if grantpt is declared even after undefining macros. */ #undef HAVE_RAW_DECL_GRANTPT -/* Define to 1 if initstat_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_INITSTAT_R +/* Define to 1 if group_member is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_GROUP_MEMBER + +/* 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 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 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 @@ -570,6 +692,9 @@ /* Define to 1 if openat is declared even after undefining macros. */ #undef HAVE_RAW_DECL_OPENAT +/* 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 @@ -579,15 +704,24 @@ /* 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 pread is declared even after undefining macros. */ #undef HAVE_RAW_DECL_PREAD /* 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 @@ -615,9 +749,15 @@ /* 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 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 @@ -630,6 +770,9 @@ /* Define to 1 if snprintf is declared even after undefining macros. */ #undef HAVE_RAW_DECL_SNPRINTF +/* 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 @@ -675,6 +818,9 @@ /* Define to 1 if strtod is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOD +/* Define to 1 if strtoimax is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOIMAX + /* Define to 1 if strtok_r is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOK_R @@ -684,6 +830,9 @@ /* Define to 1 if strtoull is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRTOULL +/* Define to 1 if strtoumax is declared even after undefining macros. */ +#undef HAVE_RAW_DECL_STRTOUMAX + /* Define to 1 if strverscmp is declared even after undefining macros. */ #undef HAVE_RAW_DECL_STRVERSCMP @@ -840,13 +989,13 @@ /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H -/* Define to 1 if you have the `readlink' function. */ +/* Define to 1 if you have the 'readlink' function. */ #undef HAVE_READLINK /* 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 `rl_completion_matches' function. */ @@ -861,7 +1010,7 @@ /* 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 'setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `setlocale' function. */ @@ -876,7 +1025,7 @@ /* Define to 1 if 'wint_t' is a signed integer type. */ #undef HAVE_SIGNED_WINT_T -/* Define to 1 if you have the `snprintf' function. */ +/* Define to 1 if you have the 'snprintf' function. */ #undef HAVE_SNPRINTF /* Define if the return value of the snprintf function is the number of of @@ -900,6 +1049,9 @@ /* Define if you have the stpncpy() function and it works. */ #undef HAVE_STPNCPY +/* Define to 1 if you have the `strchrnul' function. */ +#undef HAVE_STRCHRNUL + /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R @@ -909,13 +1061,16 @@ /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H -/* 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. */ #undef HAVE_STRNLEN -/* Define to 1 if you have the `symlink' function. */ +/* Define to 1 if `decimal_point' is a member of `struct lconv'. */ +#undef HAVE_STRUCT_LCONV_DECIMAL_POINT + +/* Define to 1 if you have the 'symlink' function. */ #undef HAVE_SYMLINK /* Define to 1 if you have the header file. */ @@ -930,9 +1085,15 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_SOCKET_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIMEB_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H @@ -942,6 +1103,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_WAIT_H +/* Define to 1 if you have the `towlower' function. */ +#undef HAVE_TOWLOWER + /* Define to 1 if you have the `tsearch' function. */ #undef HAVE_TSEARCH @@ -951,13 +1115,13 @@ /* 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 `vasnprintf' function. */ +/* Define to 1 if you have the 'vasnprintf' function. */ #undef HAVE_VASNPRINTF /* Define to 1 if you have the `vasprintf' function. */ @@ -969,10 +1133,10 @@ /* 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. */ +/* Define to 1 if you have the 'wcscoll' function. */ #undef HAVE_WCSCOLL /* Define to 1 if you have the `wcslen' function. */ @@ -981,22 +1145,25 @@ /* 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 header file. */ +#undef HAVE_WINSOCK2_H + /* 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 /* This value is set to 1 to indicate that the system argz facility works */ @@ -1014,7 +1181,13 @@ /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL -/* Define to 1 if `lstat' dereferences a symlink specified with a trailing +/* Define to 1 if you have the `_ftime' function. */ +#undef HAVE__FTIME + +/* Define to 1 if you have the '_set_invalid_parameter_handler' function. */ +#undef HAVE__SET_INVALID_PARAMETER_HANDLER + +/* Define to 1 if 'lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK @@ -1064,6 +1237,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define if exists and defines unusable PRI* macros. */ +#undef PRI_MACROS_BROKEN + /* Define to the type that is the result of default argument promotions of type mode_t. */ #undef PROMOTED_MODE_T @@ -1141,8 +1317,8 @@ made weak. */ #undef USE_SOLARIS_THREADS_WEAK -/* Define if the Win32 multithreading API can be used. */ -#undef USE_WIN32_THREADS +/* Define if the native Windows multithreading API can be used. */ +#undef USE_WINDOWS_THREADS /* Version number of package */ #undef VERSION @@ -1158,26 +1334,68 @@ 'wint_t'. */ #undef WINT_T_SUFFIX +/* 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 + /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* 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 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 +/* 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 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 @@ -1188,6 +1406,10 @@ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on Mac 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 @@ -1213,7 +1435,7 @@ /* Define so that glibc/gnulib argp.h does not typedef error_t. */ #undef __error_t_defined -/* Define to a type to use for `error_t' if it is not otherwise available. */ +/* Define to a type to use for 'error_t' if it is not otherwise available. */ #undef error_t /* Always use our fgetfilecon wrapper. */ @@ -1225,6 +1447,9 @@ /* Always use our getfilecon wrapper. */ #undef getfilecon +/* 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 @@ -1237,7 +1462,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__ @@ -1247,6 +1472,9 @@ /* 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 @@ -1256,6 +1484,9 @@ /* Define to the type of st_nlink in struct stat, or a supertype. */ #undef nlink_t +/* Define to `int' if does not define. */ +#undef pid_t + /* Define as the type of the result of subtracting two pointers, if the system doesn't define it. */ #undef ptrdiff_t @@ -1337,3 +1568,17 @@ 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 + diff --git a/configure b/configure index f67c89d..cbe86fd 100755 --- a/configure +++ b/configure @@ -1,11 +1,9 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for augeas 0.10.0. +# Generated by GNU Autoconf 2.69 for augeas 1.3.0. # # -# 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 @@ -134,6 +132,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 @@ -167,7 +190,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'\" && @@ -220,21 +244,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. - # 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 - export CONFIG_SHELL - 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+"$@"} + 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 : @@ -336,6 +364,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 @@ -457,6 +493,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). @@ -491,16 +531,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 @@ -512,28 +552,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'" @@ -567,8 +587,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='augeas' PACKAGE_TARNAME='augeas' -PACKAGE_VERSION='0.10.0' -PACKAGE_STRING='augeas 0.10.0' +PACKAGE_VERSION='1.3.0' +PACKAGE_STRING='augeas 1.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -638,18 +658,27 @@ LIBPTH_PREFIX LTLIBPTH LIBPTH INTL_MACOSX_LIBS -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H -NEXT_FCNTL_H -REPLACE_OPENAT -REPLACE_OPEN -REPLACE_FCNTL -HAVE_OPENAT -HAVE_FCNTL -GNULIB_OPENAT -GNULIB_OPEN -GNULIB_FCNTL +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 +REPLACE_STRTOIMAX +HAVE_DECL_STRTOUMAX +HAVE_DECL_STRTOIMAX +HAVE_DECL_IMAXDIV +HAVE_DECL_IMAXABS +GNULIB_STRTOUMAX +GNULIB_STRTOIMAX +GNULIB_IMAXDIV +GNULIB_IMAXABS +HAVE_MSVC_INVALID_PARAMETER_HANDLER LOCALE_TR_UTF8 gltests_WITNESS +REPLACE_TOWLOWER REPLACE_ISWCNTRL HAVE_WCTYPE_H NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H @@ -692,6 +721,10 @@ GNULIB_MKTIME NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H NEXT_SYS_WAIT_H GNULIB_WAITPID +WINDOWS_64_BIT_OFF_T +NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H +NEXT_SYS_TYPES_H +WINDOWS_64_BIT_ST_SIZE NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H NEXT_SYS_STAT_H NEXT_AS_FIRST_DIRECTIVE_STRING_H @@ -700,6 +733,8 @@ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H NEXT_STDLIB_H NEXT_AS_FIRST_DIRECTIVE_STDIO_H NEXT_STDIO_H +GL_GENERATE_STDINT_H_FALSE +GL_GENERATE_STDINT_H_TRUE STDINT_H WINT_T_SUFFIX WCHAR_T_SUFFIX @@ -725,7 +760,11 @@ HAVE_WCHAR_H HAVE_UNSIGNED_LONG_LONG_INT HAVE_LONG_LONG_INT HAVE__BOOL +GL_GENERATE_STDBOOL_H_FALSE +GL_GENERATE_STDBOOL_H_TRUE STDBOOL_H +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 @@ -739,6 +778,7 @@ REPLACE_STRNDUP REPLACE_STRNCAT REPLACE_STRERROR_R REPLACE_STRERROR +REPLACE_STRCHRNUL REPLACE_STRCASESTR REPLACE_STRSTR REPLACE_STRDUP @@ -763,6 +803,8 @@ HAVE_DECL_MEMRCHR HAVE_MEMPCPY HAVE_DECL_MEMMEM HAVE_MEMCHR +HAVE_FFSLL +HAVE_FFSL HAVE_MBSLEN GNULIB_STRVERSCMP GNULIB_STRSIGNAL @@ -799,6 +841,8 @@ GNULIB_MEMRCHR GNULIB_MEMPCPY GNULIB_MEMMEM GNULIB_MEMCHR +GNULIB_FFSLL +GNULIB_FFSL LOCALE_FR_UTF8 LOCALE_ZH_CN LOCALE_JA @@ -833,20 +877,26 @@ GNULIB_LSTAT GNULIB_LCHMOD GNULIB_FUTIMENS GNULIB_FSTATAT +GNULIB_FSTAT GNULIB_FCHMODAT 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 @@ -859,8 +909,18 @@ NEXT_LANGINFO_H REPLACE_NL_LANGINFO HAVE_NL_LANGINFO GNULIB_NL_LANGINFO +HAVE_WINSOCK2_H +NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H +NEXT_SYS_TIME_H +REPLACE_STRUCT_TIMEVAL +REPLACE_GETTIMEOFDAY +HAVE_SYS_TIME_H +HAVE_STRUCT_TIMEVAL +HAVE_GETTIMEOFDAY +GNULIB_GETTIMEOFDAY LTLIBINTL LIBINTL +GNULIB_GL_UNISTD_H_GETOPT GETOPT_H HAVE_GETOPT_H NEXT_AS_FIRST_DIRECTIVE_GETOPT_H @@ -876,17 +936,20 @@ 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_GETDOMAINNAME REPLACE_GETCWD +REPLACE_FTRUNCATE REPLACE_FCHOWNAT REPLACE_DUP2 REPLACE_DUP @@ -895,10 +958,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 @@ -906,6 +971,7 @@ HAVE_UNLINKAT HAVE_SYMLINKAT HAVE_SYMLINK HAVE_SLEEP +HAVE_SETHOSTNAME HAVE_READLINKAT HAVE_READLINK HAVE_PWRITE @@ -915,6 +981,7 @@ HAVE_PIPE HAVE_LINKAT HAVE_LINK HAVE_LCHOWN +HAVE_GROUP_MEMBER HAVE_GETPAGESIZE HAVE_GETLOGIN HAVE_GETHOSTNAME @@ -922,6 +989,7 @@ HAVE_GETGROUPS HAVE_GETDTABLESIZE HAVE_FTRUNCATE HAVE_FSYNC +HAVE_FDATASYNC HAVE_FCHOWNAT HAVE_FCHDIR HAVE_FACCESSAT @@ -934,14 +1002,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 @@ -950,6 +1020,8 @@ GNULIB_LSEEK GNULIB_LINKAT GNULIB_LINK GNULIB_LCHOWN +GNULIB_ISATTY +GNULIB_GROUP_MEMBER GNULIB_GETUSERSHELL GNULIB_GETPAGESIZE GNULIB_GETLOGIN_R @@ -961,6 +1033,7 @@ GNULIB_GETDOMAINNAME GNULIB_GETCWD GNULIB_FTRUNCATE GNULIB_FSYNC +GNULIB_FDATASYNC GNULIB_FCHOWNAT GNULIB_FCHDIR GNULIB_FACCESSAT @@ -968,8 +1041,10 @@ GNULIB_EUIDACCESS GNULIB_ENVIRON GNULIB_DUP3 GNULIB_DUP2 +GNULIB_DUP GNULIB_CLOSE GNULIB_CHOWN +GNULIB_CHDIR REPLACE_VSPRINTF REPLACE_VSNPRINTF REPLACE_VPRINTF @@ -978,6 +1053,7 @@ REPLACE_VDPRINTF REPLACE_VASPRINTF REPLACE_TMPFILE REPLACE_STDIO_WRITE_FUNCS +REPLACE_STDIO_READ_FUNCS REPLACE_SPRINTF REPLACE_SNPRINTF REPLACE_RENAMEAT @@ -998,11 +1074,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 @@ -1021,11 +1100,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 @@ -1036,35 +1119,61 @@ 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 +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_OPENAT +REPLACE_OPEN +REPLACE_FCNTL +HAVE_OPENAT +HAVE_FCNTL +GNULIB_OPENAT +GNULIB_OPEN +GNULIB_NONBLOCKING +GNULIB_FCNTL EOVERFLOW_VALUE EOVERFLOW_HIDDEN 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 @@ -1084,7 +1193,9 @@ REPLACE_STRTOD REPLACE_SETENV REPLACE_REALPATH REPLACE_REALLOC +REPLACE_RANDOM_R REPLACE_PUTENV +REPLACE_PTSNAME_R REPLACE_MKSTEMP REPLACE_MBTOWC REPLACE_MALLOC @@ -1103,7 +1214,10 @@ 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 @@ -1127,8 +1241,11 @@ 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 @@ -1235,7 +1352,11 @@ GNULIB_MBRTOWC GNULIB_MBSINIT GNULIB_WCTOB GNULIB_BTOWC +GL_GENERATE_ARGZ_H_FALSE +GL_GENERATE_ARGZ_H_TRUE ARGZ_H +GL_GENERATE_ALLOCA_H_FALSE +GL_GENERATE_ALLOCA_H_TRUE ALLOCA_H ALLOCA LTALLOCA @@ -1259,7 +1380,6 @@ NMEDIT DSYMUTIL MANIFEST_TOOL ac_ct_AR -AR DLLTOOL OBJDUMP LN_S @@ -1271,12 +1391,15 @@ FGREP SED LIBTOOL RANLIB +ARFLAGS +AR EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -1313,6 +1436,8 @@ ND_ENABLED_TRUE ND_PROG AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -1383,8 +1508,8 @@ with_pdfdocs with_failmalloc enable_debug enable_dependency_tracking -enable_threads enable_largefile +enable_threads enable_shared enable_static with_pic @@ -1870,8 +1995,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 @@ -1957,7 +2080,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 augeas 0.10.0 to adapt to many kinds of systems. +\`configure' configures augeas 1.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2027,7 +2150,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of augeas 0.10.0:";; + short | recursive ) echo "Configuration of augeas 1.3.0:";; esac cat <<\_ACEOF @@ -2035,15 +2158,17 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") --enable-debug=no/yes enable debugging output - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --enable-threads={posix|solaris|pth|win32} + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --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 --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] @@ -2064,7 +2189,7 @@ Optional Packages: --with-failmalloc=FAILMALLOC enable failmalloc test targets and use the failmalloc library FAILMALLOC - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -2168,10 +2293,10 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -augeas configure 0.10.0 -generated by GNU Autoconf 2.68 +augeas configure 1.3.0 +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 @@ -2444,7 +2569,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 @@ -2601,7 +2726,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; @@ -2617,7 +2743,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; @@ -2643,7 +2770,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; @@ -2659,7 +2787,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; @@ -2693,7 +2822,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; @@ -2807,12 +2937,69 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl + +# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES +# ---------------------------------------------------- +# Tries to find if the field MEMBER exists in type AGGR, after including +# INCLUDES, setting cache variable VAR accordingly. +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 \${$4+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$5 +int +main () +{ +static $2 ac_aggr; +if (sizeof ac_aggr.$3) +return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$4=yes" +else + eval "$4=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 +eval ac_res=\$$4 + { $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_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 augeas $as_me 0.10.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by augeas $as_me 1.3.0, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3097,6 +3284,8 @@ gl_func_list="$gl_func_list getcwd" gl_func_list="$gl_func_list readlink" gl_func_list="$gl_func_list realpath" gl_header_list="$gl_header_list sys/param.h" +gl_header_list="$gl_header_list unistd.h" +gl_func_list="$gl_func_list symlink" gl_func_list="$gl_func_list isblank" gl_func_list="$gl_func_list iswctype" gl_func_list="$gl_func_list mbsrtowcs" @@ -3108,6 +3297,9 @@ gl_header_list="$gl_header_list wctype.h" gl_func_list="$gl_func_list getdelim" gl_getopt_required=GNU gl_header_list="$gl_header_list getopt.h" +gl_header_list="$gl_header_list sys/time.h" +gl_header_list="$gl_header_list sys/socket.h" +gl_func_list="$gl_func_list gettimeofday" gl_header_list="$gl_header_list langinfo.h" gl_header_list="$gl_header_list xlocale.h" gl_func_list="$gl_func_list lstat" @@ -3115,9 +3307,8 @@ gl_func_list="$gl_func_list mbsinit" gl_func_list="$gl_func_list mbrtowc" gl_header_list="$gl_header_list sys/mman.h" gl_func_list="$gl_func_list mprotect" -gl_func_list="$gl_func_list memchr" +gl_func_list="$gl_func_list mkstemp" gl_func_list="$gl_func_list nl_langinfo" -gl_func_list="$gl_func_list pathconf" gl_func_list="$gl_func_list wcscoll" gl_header_list="$gl_header_list selinux/selinux.h" gl_header_list="$gl_header_list wchar.h" @@ -3126,17 +3317,15 @@ gl_func_list="$gl_func_list stpncpy" gl_func_list="$gl_func_list strndup" gl_header_list="$gl_header_list sys/stat.h" gl_header_list="$gl_header_list sys/wait.h" -gl_header_list="$gl_header_list sys/time.h" -gl_header_list="$gl_header_list unistd.h" gl_func_list="$gl_func_list vasnprintf" gl_header_list="$gl_header_list features.h" +gl_func_list="$gl_func_list snprintf" gl_func_list="$gl_func_list wcrtomb" gl_func_list="$gl_func_list iswcntrl" -gl_func_list="$gl_func_list dup2" -gl_func_list="$gl_func_list fcntl" +gl_func_list="$gl_func_list _set_invalid_parameter_handler" +gl_header_list="$gl_header_list inttypes.h" gl_func_list="$gl_func_list newlocale" gl_func_list="$gl_func_list setenv" -gl_func_list="$gl_func_list symlink" gl_func_list="$gl_func_list wctob" # Check that the precious variables saved in the cache have kept the same # value. @@ -3208,7 +3397,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= -for ac_dir in build/aux "$srcdir"/build/aux; do +for ac_dir in build/ac-aux "$srcdir"/build/ac-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -3224,7 +3413,7 @@ for ac_dir in build/aux "$srcdir"/build/aux; do fi done if test -z "$ac_aux_dir"; then - as_fn_error $? "cannot find install-sh, install.sh, or shtool in build/aux \"$srcdir\"/build/aux" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in build/ac-aux \"$srcdir\"/build/ac-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3238,7 +3427,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" -am__api_version='1.11' +am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -3277,7 +3466,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. @@ -3335,9 +3524,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -3348,32 +3534,40 @@ case `pwd` in 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 +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -3385,6 +3579,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -3407,12 +3611,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -3424,10 +3628,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -3446,7 +3650,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 @@ -3486,7 +3690,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 @@ -3537,7 +3741,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) '* | \ @@ -3567,12 +3771,6 @@ fi $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -3591,7 +3789,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 @@ -3655,6 +3853,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -3677,7 +3914,7 @@ fi # Define the identity of the package. PACKAGE='augeas' - VERSION='0.10.0' + VERSION='1.3.0' cat >>confdefs.h <<_ACEOF @@ -3705,13 +3942,24 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # 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"} +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' @@ -3722,11 +3970,38 @@ if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' # make --enable-silent-rules the default. @@ -3751,7 +4026,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_ND_PROG="$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 @@ -3830,7 +4105,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_PDFLATEX="$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 @@ -3904,9 +4179,9 @@ $as_echo "#define ENABLE_DEBUG 1" >>confdefs.h fi -LIBAUGEAS_VERSION_INFO=15:0:15 +LIBAUGEAS_VERSION_INFO=19:0:19 -LIBFA_VERSION_INFO=4:5:3 +LIBFA_VERSION_INFO=5:0:4 # Make sure we can run config.sub. @@ -3999,7 +4274,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -4032,6 +4307,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= @@ -4064,7 +4340,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 @@ -4104,7 +4380,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 @@ -4157,7 +4433,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 @@ -4198,7 +4474,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 @@ -4256,7 +4532,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 @@ -4300,7 +4576,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 @@ -4746,8 +5022,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); @@ -4843,8 +5118,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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. @@ -4878,16 +5154,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -4896,16 +5172,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + 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. am__obj=conftest.${OBJEXT-o} @@ -5114,7 +5390,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 @@ -5180,7 +5456,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 @@ -5421,6 +5697,8 @@ $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 @@ -5452,7 +5730,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 @@ -5492,7 +5770,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 @@ -5545,7 +5823,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 @@ -5586,7 +5864,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 @@ -5644,7 +5922,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 @@ -5688,7 +5966,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 @@ -5884,8 +6162,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); @@ -5981,8 +6258,9 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # 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'. + # 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. @@ -6016,16 +6294,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -6034,16 +6312,16 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; - msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + 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. am__obj=conftest.${OBJEXT-o} @@ -6097,7 +6375,149 @@ else fi -if test -n "$ac_tool_prefix"; then + + + { $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 @@ -6114,7 +6534,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_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6154,7 +6574,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_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6189,6 +6609,8 @@ else RANLIB="$ac_cv_prog_RANLIB" fi + fi + fi @@ -6199,207 +6621,31 @@ fi - # Check whether --enable-threads was given. -if test "${enable_threads+set}" = set; then : - enableval=$enable_threads; gl_use_threads=$enableval -else - if test -n "$gl_use_threads_default"; then - gl_use_threads="$gl_use_threads_default" - else - case "$host_os" in - 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 - fi - -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 - - - - # Code from module alloca: - # Code from module alloca-opt: - # Code from module alloca-opt-tests: - # Code from module arg-nonnull: - # Code from module argz: - # Code from module binary-io: - # Code from module binary-io-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 canonicalize-lgpl: - # Code from module canonicalize-lgpl-tests: - # Code from module configmake: - # Code from module ctype: - # Code from module ctype-tests: - # Code from module dosname: - # 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 extensions: - - # Code from module fcntl-h: - # Code from module fcntl-h-tests: - # Code from module float: - # Code from module fnmatch: - # Code from module fnmatch-tests: - # Code from module getdelim: - # Code from module getdelim-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-h: - # Code from module gitlog-to-changelog: - # Code from module havelib: - # Code from module ignore-value: - # Code from module ignore-value-tests: - # Code from module include_next: - # Code from module intprops: - # Code from module isblank: - # Code from module isblank-tests: - # Code from module langinfo: - # Code from module langinfo-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 lstat: - # Code from module lstat-tests: - # 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 mbrtowc: - # Code from module mbrtowc-tests: - # Code from module mbsinit: - # Code from module mbsinit-tests: - # Code from module mbsrtowcs: - # Code from module mbsrtowcs-tests: - # Code from module mbtowc: - # Code from module memchr: - # Code from module memchr-tests: - # Code from module mempcpy: - # 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 pathmax: - # Code from module putenv: - # Code from module readlink: - # Code from module readlink-tests: - # Code from module realloc-posix: - # Code from module regex: - # Code from module safe-alloc: - # Code from module safe-alloc-tests: - # Code from module same-inode: - # 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 ssize_t: - # Code from module stat: - # Code from module stat-tests: - # 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 stpncpy: - # Code from module streq: - # Code from module string: - # Code from module string-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 symlink: - # Code from module symlink-tests: - # Code from module sys_stat: - # Code from module sys_stat-tests: - # Code from module sys_wait: - # Code from module sys_wait-tests: - # Code from module thread: - # Code from module threadlib: - - - - # Code from module time: - # Code from module time-tests: - # Code from module unistd: - # Code from module unistd-tests: - # Code from module unsetenv: - # Code from module unsetenv-tests: - # Code from module unused-parameter: - # Code from module vasnprintf: - # Code from module vasnprintf-tests: - # Code from module vasprintf: - # Code from module vasprintf-tests: - # Code from module verify: - # Code from module verify-tests: - # Code from module warn-on-use: - # 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 xsize: - # Code from module yield: + # 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 # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then : @@ -6597,6 +6843,460 @@ _ACEOF esac rm -rf conftest* fi + + +fi + + + + + + + # Check whether --enable-threads was given. +if test "${enable_threads+set}" = set; then : + enableval=$enable_threads; gl_use_threads=$enableval +else + if test -n "$gl_use_threads_default"; then + gl_use_threads="$gl_use_threads_default" + else + case "$host_os" in + 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 + fi + +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 + + + + # Code from module alloca: + # Code from module alloca-opt: + # Code from module alloca-opt-tests: + # Code from module argz: + # Code from module binary-io: + # Code from module binary-io-tests: + # Code from module btowc: + # Code from module btowc-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 canonicalize-lgpl: + # Code from module canonicalize-lgpl-tests: + # Code from module close: + # Code from module close-tests: + # Code from module configmake: + # Code from module ctype: + # Code from module ctype-tests: + # Code from module dosname: + # 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 extensions: + + # Code from module fcntl-h: + # Code from module fcntl-h-tests: + # Code from module fd-hook: + # Code from module fdopen: + # Code from module fdopen-tests: + # Code from module fgetc-tests: + # Code from module float: + # Code from module float-tests: + # Code from module fnmatch: + # Code from module fnmatch-tests: + # Code from module fpieee: + + # Code from module fpucw: + # Code from module fputc-tests: + # Code from module fread-tests: + # Code from module fstat: + # Code from module fstat-tests: + # Code from module fwrite-tests: + # Code from module getcwd-lgpl: + # Code from module getcwd-lgpl-tests: + # Code from module getdelim: + # Code from module getdelim-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-h: + # Code from module gettimeofday: + # Code from module gettimeofday-tests: + # Code from module gitlog-to-changelog: + # Code from module havelib: + # Code from module ignore-value: + # Code from module ignore-value-tests: + # Code from module include_next: + # Code from module intprops: + # Code from module intprops-tests: + # Code from module inttypes: + # Code from module inttypes-incomplete: + # Code from module inttypes-tests: + # Code from module isblank: + # Code from module isblank-tests: + # Code from module langinfo: + # Code from module langinfo-tests: + # Code from module largefile: + + # 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 lstat: + # Code from module lstat-tests: + # 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 mbrtowc: + # Code from module mbrtowc-tests: + # Code from module mbsinit: + # Code from module mbsinit-tests: + # Code from module mbsrtowcs: + # Code from module mbsrtowcs-tests: + # Code from module mbtowc: + # Code from module memchr: + # Code from module memchr-tests: + # Code from module mempcpy: + # Code from module mkstemp: + # Code from module msvc-inval: + # Code from module msvc-nothrow: + # Code from module multiarch: + # 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 pathmax: + # Code from module pathmax-tests: + # Code from module putenv: + # Code from module rawmemchr: + # Code from module rawmemchr-tests: + # Code from module readlink: + # Code from module readlink-tests: + # Code from module realloc-posix: + # Code from module regex: + # Code from module safe-alloc: + # Code from module safe-alloc-tests: + # Code from module same-inode: + # 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 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 ssize_t: + # Code from module stat: + # Code from module stat-tests: + # 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 stpncpy: + # Code from module strchrnul: + # Code from module strchrnul-tests: + # Code from module streq: + # Code from module string: + # Code from module string-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 symlink: + # Code from module symlink-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_wait: + # Code from module sys_wait-tests: + # Code from module tempname: + # 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: + + + + # Code from module time: + # Code from module time-tests: + # Code from module unistd: + # Code from module unistd-tests: + # Code from module unsetenv: + # Code from module unsetenv-tests: + # Code from module vasnprintf: + # Code from module vasnprintf-tests: + # Code from module vasprintf: + # Code from module vasprintf-tests: + # Code from module verify: + # Code from module verify-tests: + # 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 xsize: + # Code from module yield: + +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +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 ${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 () +{ + + ; + 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 () +{ + + ; + 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 + + fi @@ -6610,8 +7310,8 @@ esac -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -6718,7 +7418,7 @@ do 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" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + 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 @@ -6797,7 +7497,7 @@ do for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -7053,7 +7753,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_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7097,7 +7797,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_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7255,6 +7955,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -7294,7 +7999,7 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -7516,7 +8221,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_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7556,7 +8261,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_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7723,7 +8428,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -7862,7 +8567,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_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7902,7 +8607,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_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8005,7 +8710,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_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8049,7 +8754,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_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8174,7 +8879,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 @@ -8214,7 +8919,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 @@ -8273,7 +8978,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_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8313,7 +9018,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_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8363,13 +9068,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -8516,6 +9221,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -8804,7 +9510,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -8822,7 +9528,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -8841,7 +9550,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -8904,7 +9616,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -8915,7 +9627,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -8948,7 +9673,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_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8988,7 +9713,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_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9068,7 +9793,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_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9108,7 +9833,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_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9160,7 +9885,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_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9200,7 +9925,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_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9252,7 +9977,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_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9292,7 +10017,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_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9344,7 +10069,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_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9384,7 +10109,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_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9436,7 +10161,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_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9476,7 +10201,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_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9555,7 +10280,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -9566,6 +10297,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -9598,6 +10330,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -9619,7 +10352,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -9757,7 +10492,22 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -9835,6 +10585,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + test -z "$LN_S" && LN_S="ln -s" @@ -10294,7 +11048,9 @@ lt_prog_compiler_static= case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -10385,18 +11141,33 @@ lt_prog_compiler_static= ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -10758,7 +11529,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -11008,8 +11778,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -11388,6 +12157,7 @@ fi # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -11433,6 +12203,7 @@ fi hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -11461,10 +12232,6 @@ fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -11477,7 +12244,7 @@ fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -11516,7 +12283,6 @@ fi fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -12140,11 +12906,6 @@ esac - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } @@ -12234,7 +12995,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -12243,7 +13004,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -12308,7 +13069,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -12447,7 +13208,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -12455,10 +13216,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -12466,7 +13223,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -12484,7 +13241,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -12504,17 +13261,18 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -12575,7 +13333,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -12591,7 +13349,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -12628,9 +13386,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12716,7 +13474,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -12785,7 +13543,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12810,7 +13568,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -12834,7 +13592,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -12865,7 +13623,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -12875,7 +13633,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -13657,6 +14415,8 @@ CC="$lt_save_CC" + + ac_config_commands="$ac_config_commands libtool" @@ -13683,7 +14443,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_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13726,7 +14486,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_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13758,7 +14518,8 @@ a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } -e { yyless (input () != 0); } +e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ + yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% @@ -13879,7 +14640,7 @@ fi warnCFLAGS= - common_flags="-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fasynchronous-unwind-tables" + common_flags="-fexceptions -fasynchronous-unwind-tables" case "$enable_compile_warnings" in no) @@ -13905,6 +14666,8 @@ fi ;; esac + + compiler_flags= for option in $try_compiler_flags; do SAVE_CFLAGS="$CFLAGS" @@ -14186,13 +14949,18 @@ fi done -VERSION_SCRIPT_FLAGS= -$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to pass version script to the linker ($LD)" >&5 +$as_echo_n "checking how to pass version script to the linker ($LD)... " >&6; } +VERSION_SCRIPT_FLAGS=none +if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then VERSION_SCRIPT_FLAGS=-Wl,--version-script= -test "`uname`" == "SunOS" && \ +elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_SCRIPT_FLAGS" >&5 +$as_echo "$VERSION_SCRIPT_FLAGS" >&6; } - if test -n "$VERSION_SCRIPT_FLAGS"; then + if test "$VERSION_SCRIPT_FLAGS" != none; then USE_VERSION_SCRIPT_TRUE= USE_VERSION_SCRIPT_FALSE='#' else @@ -14205,6 +14973,7 @@ fi + LIBC_FATAL_STDERR_=1 export LIBC_FATAL_STDERR_ @@ -14374,23 +15143,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 : @@ -14703,9 +15469,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) @@ -14714,7 +15480,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, @@ -14740,10 +15506,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; } @@ -14761,7 +15529,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 @@ -14771,7 +15539,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. @@ -14813,6 +15581,81 @@ $as_echo "$gt_cv_locale_fr" >&6; } + GNULIB__EXIT=0; + GNULIB_ATOLL=0; + GNULIB_CALLOC_POSIX=0; + GNULIB_CANONICALIZE_FILE_NAME=0; + GNULIB_GETLOADAVG=0; + GNULIB_GETSUBOPT=0; + GNULIB_GRANTPT=0; + GNULIB_MALLOC_POSIX=0; + GNULIB_MBTOWC=0; + GNULIB_MKDTEMP=0; + GNULIB_MKOSTEMP=0; + 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_SETENV=0; + GNULIB_STRTOD=0; + GNULIB_STRTOLL=0; + GNULIB_STRTOULL=0; + GNULIB_SYSTEM_POSIX=0; + GNULIB_UNLOCKPT=0; + GNULIB_UNSETENV=0; + GNULIB_WCTOMB=0; + HAVE__EXIT=1; + HAVE_ATOLL=1; + HAVE_CANONICALIZE_FILE_NAME=1; + HAVE_DECL_GETLOADAVG=1; + HAVE_GETSUBOPT=1; + HAVE_GRANTPT=1; + HAVE_MKDTEMP=1; + HAVE_MKOSTEMP=1; + 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_SETENV=1; + HAVE_DECL_SETENV=1; + HAVE_STRTOD=1; + HAVE_STRTOLL=1; + HAVE_STRTOULL=1; + HAVE_STRUCT_RANDOM_DATA=1; + HAVE_SYS_LOADAVG_H=0; + HAVE_UNLOCKPT=1; + HAVE_DECL_UNSETENV=1; + REPLACE_CALLOC=0; + REPLACE_CANONICALIZE_FILE_NAME=0; + REPLACE_MALLOC=0; + REPLACE_MBTOWC=0; + REPLACE_MKSTEMP=0; + REPLACE_PTSNAME_R=0; + REPLACE_PUTENV=0; + REPLACE_RANDOM_R=0; + REPLACE_REALLOC=0; + REPLACE_REALPATH=0; + REPLACE_SETENV=0; + REPLACE_STRTOD=0; + REPLACE_UNSETENV=0; + REPLACE_WCTOMB=0; + + @@ -14879,21 +15722,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 ${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 () @@ -14915,6 +15879,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; ; @@ -14931,15 +15901,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 @@ -14988,73 +15961,6 @@ done - GNULIB__EXIT=0; - GNULIB_ATOLL=0; - GNULIB_CALLOC_POSIX=0; - GNULIB_CANONICALIZE_FILE_NAME=0; - GNULIB_GETLOADAVG=0; - GNULIB_GETSUBOPT=0; - GNULIB_GRANTPT=0; - GNULIB_MALLOC_POSIX=0; - GNULIB_MBTOWC=0; - GNULIB_MKDTEMP=0; - GNULIB_MKOSTEMP=0; - GNULIB_MKOSTEMPS=0; - GNULIB_MKSTEMP=0; - GNULIB_MKSTEMPS=0; - GNULIB_PTSNAME=0; - GNULIB_PUTENV=0; - GNULIB_RANDOM_R=0; - GNULIB_REALLOC_POSIX=0; - GNULIB_REALPATH=0; - GNULIB_RPMATCH=0; - GNULIB_SETENV=0; - GNULIB_STRTOD=0; - GNULIB_STRTOLL=0; - GNULIB_STRTOULL=0; - GNULIB_SYSTEM_POSIX=0; - GNULIB_UNLOCKPT=0; - GNULIB_UNSETENV=0; - GNULIB_WCTOMB=0; - HAVE__EXIT=1; - HAVE_ATOLL=1; - HAVE_CANONICALIZE_FILE_NAME=1; - HAVE_DECL_GETLOADAVG=1; - HAVE_GETSUBOPT=1; - HAVE_GRANTPT=1; - HAVE_MKDTEMP=1; - HAVE_MKOSTEMP=1; - HAVE_MKOSTEMPS=1; - HAVE_MKSTEMP=1; - HAVE_MKSTEMPS=1; - HAVE_PTSNAME=1; - HAVE_RANDOM_H=1; - HAVE_RANDOM_R=1; - HAVE_REALPATH=1; - HAVE_RPMATCH=1; - HAVE_SETENV=1; - HAVE_DECL_SETENV=1; - HAVE_STRTOD=1; - HAVE_STRTOLL=1; - HAVE_STRTOULL=1; - HAVE_STRUCT_RANDOM_DATA=1; - HAVE_SYS_LOADAVG_H=0; - HAVE_UNLOCKPT=1; - HAVE_DECL_UNSETENV=1; - REPLACE_CALLOC=0; - REPLACE_CANONICALIZE_FILE_NAME=0; - REPLACE_MALLOC=0; - REPLACE_MBTOWC=0; - REPLACE_MKSTEMP=0; - REPLACE_PUTENV=0; - REPLACE_REALLOC=0; - REPLACE_REALPATH=0; - REPLACE_SETENV=0; - REPLACE_STRTOD=0; - REPLACE_UNSETENV=0; - REPLACE_WCTOMB=0; - - GNULIB_ISBLANK=0; HAVE_ISBLANK=1; @@ -15184,6 +16090,9 @@ else /* end confdefs.h. */ #include +#if !defined ETXTBSY +booboo +#endif #if !defined ENOMSG booboo #endif @@ -15208,6 +16117,12 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif #if !defined ESTALE booboo #endif @@ -15217,6 +16132,12 @@ booboo #if !defined ECANCELED booboo #endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | @@ -15260,13 +16181,27 @@ _ACEOF 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_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/errno.h#{ - s#.*"\(.*/errno.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -15290,6 +16225,14 @@ $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 @@ -15505,6 +16448,196 @@ $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } + GNULIB_FCNTL=0; + GNULIB_NONBLOCKING=0; + GNULIB_OPEN=0; + GNULIB_OPENAT=0; + HAVE_FCNTL=1; + HAVE_OPENAT=1; + REPLACE_FCNTL=0; + REPLACE_OPEN=0; + REPLACE_OPENAT=0; + + + + + + + + + + + + + + + + : + + + + + + + : + + + + + + { $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 + 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 + #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 = !constants; + #if HAVE_SYMLINK + { + 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); + } + #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_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 + + +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 + +cat >>confdefs.h <<_ACEOF +#define pid_t int +_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" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define mode_t int +_ACEOF + +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 $as_echo_n "checking for mbstate_t... " >&6; } @@ -15592,23 +16725,31 @@ $as_echo "#define mbstate_t int" >>confdefs.h 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; @@ -15619,11 +16760,15 @@ $as_echo "#define mbstate_t int" >>confdefs.h 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; @@ -15642,11 +16787,14 @@ $as_echo "#define mbstate_t int" >>confdefs.h 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; @@ -15667,6 +16815,7 @@ $as_echo "#define mbstate_t int" >>confdefs.h 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; @@ -15708,8 +16857,10 @@ _ACEOF + GNULIB_CHDIR=0; GNULIB_CHOWN=0; GNULIB_CLOSE=0; + GNULIB_DUP=0; GNULIB_DUP2=0; GNULIB_DUP3=0; GNULIB_ENVIRON=0; @@ -15717,6 +16868,7 @@ _ACEOF GNULIB_FACCESSAT=0; GNULIB_FCHDIR=0; GNULIB_FCHOWNAT=0; + GNULIB_FDATASYNC=0; GNULIB_FSYNC=0; GNULIB_FTRUNCATE=0; GNULIB_GETCWD=0; @@ -15728,6 +16880,8 @@ _ACEOF 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; @@ -15736,14 +16890,16 @@ _ACEOF 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; @@ -15756,6 +16912,7 @@ _ACEOF HAVE_FACCESSAT=1; HAVE_FCHDIR=1; HAVE_FCHOWNAT=1; + HAVE_FDATASYNC=1; HAVE_FSYNC=1; HAVE_FTRUNCATE=1; HAVE_GETDTABLESIZE=1; @@ -15763,6 +16920,7 @@ _ACEOF HAVE_GETHOSTNAME=1; HAVE_GETLOGIN=1; HAVE_GETPAGESIZE=1; + HAVE_GROUP_MEMBER=1; HAVE_LCHOWN=1; HAVE_LINK=1; HAVE_LINKAT=1; @@ -15772,6 +16930,7 @@ _ACEOF HAVE_PWRITE=1; HAVE_READLINK=1; HAVE_READLINKAT=1; + HAVE_SETHOSTNAME=1; HAVE_SLEEP=1; HAVE_SYMLINK=1; HAVE_SYMLINKAT=1; @@ -15779,10 +16938,12 @@ _ACEOF 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; @@ -15791,17 +16952,20 @@ _ACEOF REPLACE_DUP=0; REPLACE_DUP2=0; REPLACE_FCHOWNAT=0; + REPLACE_FTRUNCATE=0; REPLACE_GETCWD=0; REPLACE_GETDOMAINNAME=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; @@ -15860,13 +17024,27 @@ _ACEOF 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_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/getopt.h#{ - s#.*"\(.*/getopt.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_getopt_h='<'getopt.h'>' fi @@ -15932,56 +17110,124 @@ done fi - if test -z "$gl_replace_getopt"; then + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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. */ + #include +#include +#include + int main () { -int *p = &optreset; return optreset; - ; + 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_optind_min=1 +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe +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 +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 + +#include +#include +#include + int main () { -return !getopt_clip; - ; + 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 : - gl_optind_min=1 +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_getopt_posix=maybe else - gl_optind_min=0 + 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 -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 + 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. */ @@ -15993,80 +17239,17 @@ else 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; - } - + 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; } @@ -16080,7 +17263,13 @@ rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi - CPPFLAGS=$gl_save_CPPFLAGS + 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 @@ -16111,11 +17300,7 @@ else POSIXLY_CORRECT=1 export POSIXLY_CORRECT 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 + gl_cv_func_getopt_gnu="guessing no" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -16124,28 +17309,147 @@ else #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 MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; + static char conftest[] = "conftest"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; opterr = 0; - if (getopt (2, myargv, "+a") != '?') + if (getopt (2, argv, "+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, + 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. */ { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; + 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') @@ -16159,20 +17463,36 @@ main () } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { - char *argv[] = { "program", "foo", "-p", NULL }; + 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 |= 32; + result |= 16; } /* This code fails on glibc 2.11. */ { - char *argv[] = { "program", "-b", "-a", NULL }; + 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 |= 64; + 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; @@ -16199,12 +17519,95 @@ fi 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 + 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 @@ -16218,30 +17621,32 @@ _ACEOF + GNULIB_GETTIMEOFDAY=0; + HAVE_GETTIMEOFDAY=1; + HAVE_STRUCT_TIMEVAL=1; + HAVE_SYS_TIME_H=1; + REPLACE_GETTIMEOFDAY=0; + REPLACE_STRUCT_TIMEVAL=0; - 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" @@ -16249,157 +17654,303 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + : - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - : + 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_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + 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 - GNULIB_NL_LANGINFO=0; - HAVE_NL_LANGINFO=1; - REPLACE_NL_LANGINFO=0; + 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 working fcntl.h" >&5 -$as_echo_n "checking for working fcntl.h... " >&6; } -if ${gl_cv_header_working_fcntl_h+:} false; then : + : + + + + + + 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 + + + { $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 - if test "$cross_compiling" = yes; then : - gl_cv_header_working_fcntl_h=cross-compiling + 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 + { $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. */ -#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 - }; +#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 + ]; - 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 +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timeval_tv_sec=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 + 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_header_working_fcntl_h" >&5 -$as_echo "$gl_cv_header_working_fcntl_h" >&6; } +{ $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 - 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 + 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 - 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 + + + + + + + + + + GNULIB_NL_LANGINFO=0; + HAVE_NL_LANGINFO=1; + REPLACE_NL_LANGINFO=0; + + + + + + + + + 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 () +{ + + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_type_off_t_64=yes +else + gl_cv_type_off_t_64=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_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 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" @@ -16452,16 +18003,18 @@ $as_echo "$ac_cv_gnu_library_2_1" >&6; } + 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; - STDDEF_H=''; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 @@ -16499,6 +18052,7 @@ $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h + STDDEF_H= if test $gt_cv_c_wchar_t = no; then HAVE_WCHAR_T=0 STDDEF_H=stddef.h @@ -16534,6 +18088,15 @@ $as_echo "$gl_cv_decl_null_works" >&6; } 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 + if test -n "$STDDEF_H"; then @@ -16561,13 +18124,27 @@ _ACEOF 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_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stddef.h#{ - s#.*"\(.*/stddef.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -16597,6 +18174,7 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } GNULIB_FCHMODAT=0; + GNULIB_FSTAT=0; GNULIB_FSTATAT=0; GNULIB_FUTIMENS=0; GNULIB_LCHMOD=0; @@ -16635,19 +18213,21 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 + { $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 ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : +if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; 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 + 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 @@ -16667,9 +18247,9 @@ struct stat sbuf; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_lstat_dereferences_slashed_symlink=yes + gl_cv_func_lstat_dereferences_slashed_symlink=yes else - ac_cv_func_lstat_dereferences_slashed_symlink=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 @@ -16678,31 +18258,22 @@ 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 + gl_cv_func_lstat_dereferences_slashed_symlink="guessing 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 && +{ $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 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 + ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } @@ -16779,7 +18350,8 @@ fi $as_echo "$gl_cv_func_malloc_posix" >&6; } - for ac_header in stdlib.h + + 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 : @@ -16791,21 +18363,29 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 + { $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 : - 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 + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif + # include + #else + char *malloc (); + #endif int main () @@ -16814,6 +18394,7 @@ return ! malloc (0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes @@ -16824,10 +18405,11 @@ 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 : + if test $ac_cv_func_malloc_0_nonnull = yes; then : gl_cv_func_malloc_0_nonnull=1 else gl_cv_func_malloc_0_nonnull=0 @@ -16992,9 +18574,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) @@ -17003,7 +18585,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, @@ -17052,13 +18634,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. @@ -17131,9 +18714,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) @@ -17142,7 +18725,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, @@ -17191,7 +18774,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 @@ -17199,9 +18782,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. @@ -17258,9 +18847,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) @@ -17269,7 +18858,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, @@ -17295,10 +18884,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; } @@ -17316,7 +18907,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 @@ -17326,7 +18917,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. @@ -17368,6 +18959,8 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } + GNULIB_FFSL=0; + GNULIB_FFSLL=0; GNULIB_MEMCHR=0; GNULIB_MEMMEM=0; GNULIB_MEMPCPY=0; @@ -17404,7 +18997,9 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } GNULIB_STRSIGNAL=0; GNULIB_STRVERSCMP=0; HAVE_MBSLEN=0; - HAVE_MEMCHR=1; + HAVE_FFSL=1; + HAVE_FFSLL=1; + HAVE_MEMCHR=1; HAVE_DECL_MEMMEM=1; HAVE_MEMPCPY=1; HAVE_DECL_MEMRCHR=1; @@ -17428,6 +19023,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } REPLACE_STRDUP=0; REPLACE_STRSTR=0; REPLACE_STRCASESTR=0; + REPLACE_STRCHRNUL=0; REPLACE_STRERROR=0; REPLACE_STRERROR_R=0; REPLACE_STRNCAT=0; @@ -17441,11 +19037,6 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } - - - - - # 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. @@ -17467,12 +19058,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* @@ -17483,12 +19074,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 @@ -17523,13 +19114,7 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - : - - - - - - if test $ac_cv_func_memchr = yes; 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 @@ -17615,36 +19200,13 @@ $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 - - - gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" - - - 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 - -fi - -done - - - fi - gl_cv_c_multiarch=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -17702,11 +19264,6 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - - - - - # Check whether --with-selinux was given. if test "${with_selinux+set}" = set; then : withval=$with_selinux; @@ -17891,18 +19448,48 @@ fi - ac_fn_c_check_decl "$LINENO" "stpncpy" "ac_cv_have_decl_stpncpy" "$ac_includes_default" -if test "x$ac_cv_have_decl_stpncpy" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPNCPY $ac_have_decl -_ACEOF + + if test $ac_cv_type_long_long_int = yes; then + HAVE_LONG_LONG_INT=1 + else + HAVE_LONG_LONG_INT=0 + fi + + + 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 @@ -17911,6 +19498,7 @@ _ACEOF + : @@ -17920,195 +19508,329 @@ _ACEOF if test $gl_cv_have_include_next = yes; then - gl_cv_next_string_h='<'string.h'>' + 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 ${gl_cv_next_string_h+:} false; 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_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 /* end confdefs.h. */ -#include +#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 - }'`'"' + + 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_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + else + gl_cv_next_stdint_h='<'stdint.h'>' + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 -$as_echo "$gl_cv_next_string_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 +$as_echo "$gl_cv_next_stdint_h" >&6; } fi - NEXT_STRING_H=$gl_cv_next_string_h + 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='<'string.h'>' + gl_next_as_first_directive='<'stdint.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_string_h + gl_next_as_first_directive=$gl_cv_next_stdint_h fi - NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + if test $ac_cv_header_stdint_h = yes; then + HAVE_STDINT_H=1 + else + HAVE_STDINT_H=0 + fi - 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 \${$as_gl_Symbol+:} false; then : + 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 ${gl_cv_header_working_stdint_h+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + gl_cv_header_working_stdint_h=no + 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 - - - - 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 +#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; + /* 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; +}; - 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 +int +main () +{ -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNLEN $ac_have_decl + ; + return 0; +} _ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + if test "$cross_compiling" = yes; then : + gl_cv_header_working_stdint_h=yes - - - - - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - - - - - - - - - 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 ${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 + 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* +#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ +#include -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 -#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 + +#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 + }; int main () { -return !!strstr (HAYSTACK, NEEDLE); + + 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; ; 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 + 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 @@ -18116,200 +19838,367 @@ 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 +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; } + 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 +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 - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" + if test $APPLE_UNIVERSAL_BUILD = 0; then - fi - 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 ${ac_cv_header_stat_broken+:} false; 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 \${gl_cv_bitsizeof_${gltype}+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include + 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 -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif +#include "; then : -#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 + result=unknown 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 + eval gl_cv_bitsizeof_${gltype}=\$result 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 +_ACEOF + eval BITSIZEOF_${GLTYPE}=\$result + done + fi + 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 \${gl_cv_bitsizeof_${gltype}+:} 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 : - GNULIB_WAITPID=0; - - - - - - - - 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; - - - - - - +else + result=unknown +fi + eval gl_cv_bitsizeof_${gltype}=\$result - : +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 +_ACEOF + eval BITSIZEOF_${GLTYPE}=\$result + done - { $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 : + 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 \${gl_cv_type_${gltype}_signed+:} false; then : $as_echo_n "(cached) " >&6 else 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 + + int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; 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 + result=yes else - gl_cv_sys_struct_timespec_in_time_h=no + result=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + eval gl_cv_type_${gltype}_signed=\$result + 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; } +eval ac_res=\$gl_cv_type_${gltype}_signed + { $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 +_ACEOF - 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 : + eval HAVE_SIGNED_${GLTYPE}=1 + else + eval HAVE_SIGNED_${GLTYPE}=0 + 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 \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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. */ -#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 () { -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 + 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 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 : +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 + + done + + + fi + + + 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 \${gl_cv_type_${gltype}_suffix+:} false; then : $as_echo_n "(cached) " >&6 else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + 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. */ -#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 () { -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 + 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 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 +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 + + done + + + + 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 + + + + ac_fn_c_check_decl "$LINENO" "stpncpy" "ac_cv_have_decl_stpncpy" "$ac_includes_default" +if test "x$ac_cv_have_decl_stpncpy" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_STPNCPY $ac_have_decl +_ACEOF + + + + @@ -18325,361 +20214,400 @@ $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' + 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_time_h+:} false; 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_string_h+:} false; then : $as_echo_n "(cached) " >&6 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 - 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 - }'`'"' + + 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_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 -$as_echo "$gl_cv_next_time_h" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 +$as_echo "$gl_cv_next_string_h" >&6; } fi - NEXT_TIME_H=$gl_cv_next_time_h + 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='<'time.h'>' + gl_next_as_first_directive='<'string.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_time_h + gl_next_as_first_directive=$gl_cv_next_string_h fi - NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive - - - - - - - - - - - + NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive - { $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 : + 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 -/* 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 +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 HAVE_WINT_T 1" >>confdefs.h + 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 $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 : + + 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 - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "$cross_compiling" = yes; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include -#include +#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 -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 +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_header_inttypes_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + gl_cv_func_strstr_works_always="guessing no" 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 +rm -f conftest* - { $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 + +#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 () { -uintmax_t i = (uintmax_t) -1; return !i; +return !!strstr (HAYSTACK, NEEDLE); + ; return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_stdint_h=yes +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strstr_works_always=yes else - gl_cv_header_stdint_h=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_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}: 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 - - - - { $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 "$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 -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include +#if defined S_ISBLK && defined S_IFDIR +extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include + +#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 -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 + ac_cv_header_stat_broken=no else - gt_cv_c_intmax_t=no + 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: $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 "$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 HAVE_INTMAX_T 1" >>confdefs.h +$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h - else +fi - 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 - { $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 - 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 + + + + + + + GNULIB_WAITPID=0; + + + + + + + + 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; + + + + : + + + + + + { $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 -#include -#include -static char buf[100]; -int main () +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; +static struct timespec x; x.tv_sec = x.tv_nsec; + ; return 0; } _ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_snprintf_retval_c99=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_time_h=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 + 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_func_snprintf_retval_c99" >&5 -$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } - - - - - +{ $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 - 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 +int +main () +{ +static struct timespec x; x.tv_sec = x.tv_nsec; + ; + return 0; +} _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 +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_timespec_in_sys_time_h=yes else - ac_have_decl=0 + 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 -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL__SNPRINTF $ac_have_decl +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 - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - -$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h - ;; - esac - XGETTEXT_EXTRA_OPTIONS= @@ -18687,24 +20615,64 @@ $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.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; + 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_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' +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 @@ -18717,190 +20685,1240 @@ $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h - { $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 ${gt_cv_var_environ_declaration+:} false; 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include - extern struct { int foo; } environ; + +/* 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 () { -environ.foo = 1; + ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_var_environ_declaration=no + gt_cv_c_wint_t=yes else - gt_cv_var_environ_declaration=yes + 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 "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 -$as_echo "$gt_cv_var_environ_declaration" >&6; } - if test $gt_cv_var_environ_declaration = yes; then - -$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h +$as_echo "#define HAVE_WINT_T 1" >>confdefs.h fi - if test $gt_cv_var_environ_declaration != yes; then - HAVE_DECL_ENVIRON=0 - fi - GNULIB_FCNTL=0; - GNULIB_OPEN=0; - GNULIB_OPENAT=0; - HAVE_FCNTL=1; - HAVE_OPENAT=1; - REPLACE_FCNTL=0; - REPLACE_OPEN=0; - REPLACE_OPENAT=0; + : - { $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 : + + + 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 +#include + int main () { -return LC_MESSAGES +uintmax_t i = (uintmax_t) -1; return !i; ; 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 : + gl_cv_header_inttypes_h=yes else - gt_cv_val_LC_MESSAGES=no + gl_cv_header_inttypes_h=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: $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 "#define HAVE_LC_MESSAGES 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_INTTYPES_H_WITH_UINTMAX 1 +_ACEOF 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 "$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 - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include +#include + #include int main () { -CFPreferencesCopyAppValue(NULL, NULL) +uintmax_t i = (uintmax_t) -1; return !i; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFPreferencesCopyAppValue=yes +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_header_stdint_h=yes else - gt_cv_func_CFPreferencesCopyAppValue=no + gl_cv_header_stdint_h=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 "$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 "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h +cat >>confdefs.h <<_ACEOF +#define HAVE_STDINT_H_WITH_UINTMAX 1 +_ACEOF 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 "$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 - gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#include +#include +#if HAVE_STDINT_H_WITH_UINTMAX +#include +#endif +#if HAVE_INTTYPES_H_WITH_UINTMAX +#include +#endif + int main () { -CFLocaleCopyCurrent(); +intmax_t x = -1; return !x; ; return 0; } _ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gt_cv_func_CFLocaleCopyCurrent=yes +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_c_intmax_t=yes else - gt_cv_func_CFLocaleCopyCurrent=no + gt_cv_c_intmax_t=no fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gt_save_LIBS" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 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 "$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_CFLOCALECOPYCURRENT 1" >>confdefs.h +$as_echo "#define HAVE_INTMAX_T 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 + 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 - 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 + { $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 - with_gnu_ld=no + + if test "$cross_compiling" = yes; then : + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#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 : + # 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 + + ; + 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 + + +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 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 + + 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. */ + +#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; +} +_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 +fi + + +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; } + + + + + + + + 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_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; + + + + + + + + + + + + + + : + + + + + + 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 + + + + + + + + : + + + + + + + + { $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 ${gt_cv_var_environ_declaration+:} false; then : + $as_echo_n "(cached) " >&6 +else + + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if HAVE_UNISTD_H + #include + #endif + /* mingw, BeOS, Haiku declare environ in , not in . */ + #include + + extern struct { int foo; } environ; +int +main () +{ +environ.foo = 1; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gt_cv_var_environ_declaration=no +else + gt_cv_var_environ_declaration=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 +$as_echo "$gt_cv_var_environ_declaration" >&6; } + if test $gt_cv_var_environ_declaration = yes; then + +$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h + + fi + + + if test $gt_cv_var_environ_declaration != yes; then + HAVE_DECL_ENVIRON=0 + fi + + + + : + + + + + + { $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 + 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. */ + +# if HAVE_UNISTD_H +# include +# else /* on Windows with MSVC */ +# include +# endif +# ifndef getcwd + char *getcwd (); +# endif + +int +main () +{ + +#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 : + 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 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 +$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } + + + + + + + + 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; + 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'; + + + + + : + + + + + + + + + + + + + + : + + + + + + + + + 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 + + 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_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + 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 + + + + + + + + + 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 + +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 + + + + 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 + +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 + + + + + + + + + { $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 + + + + 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. @@ -19980,18 +22998,20 @@ $as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h 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 + 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 -$as_echo "#define USE_WIN32_THREADS 1" >>confdefs.h +$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h - fi - fi + fi + ;; + esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 @@ -20007,17 +23027,6 @@ $as_echo "$gl_threads_api" >&6; } -ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" -if test "x$ac_cv_type_mode_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define mode_t int -_ACEOF - -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 @@ -20090,73 +23099,6 @@ _ACEOF - 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 : - gl_cv_func_setenv_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - #include - -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 - -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 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext" - - fi - fi @@ -20206,11 +23148,6 @@ _ACEOF - - - - - 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 @@ -20249,10 +23186,8 @@ fi gl_source_base='gnulib/lib' - # Code from module alloca: LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` - # Code from module alloca-opt: if test $ac_cv_func_alloca_works = no; then @@ -20299,10 +23234,16 @@ $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 - # Code from module arg-nonnull: - # Code from module argz: - : + +: @@ -20346,16 +23287,7 @@ ac_fn_c_check_func "$LINENO" "argz_replace" "ac_cv_func_argz_replace" if test "x$ac_cv_func_argz_replace" = xyes; then : else - ARGZ_H=argz.h; - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS argz.$ac_objext" - + ARGZ_H=argz.h fi @@ -20399,22 +23331,31 @@ $as_echo "#define HAVE_WORKING_ARGZ 1" >>confdefs.h else ARGZ_H=argz.h +fi +fi + if test -n "$ARGZ_H"; then + GL_GENERATE_ARGZ_H_TRUE= + GL_GENERATE_ARGZ_H_FALSE='#' +else + GL_GENERATE_ARGZ_H_TRUE='#' + GL_GENERATE_ARGZ_H_FALSE= +fi +if test -n "$ARGZ_H"; then - gl_LIBOBJS="$gl_LIBOBJS argz.$ac_objext" -fi -fi - # Code from module btowc: + gl_LIBOBJS="$gl_LIBOBJS argz.$ac_objext" + +fi @@ -20546,10 +23487,8 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } *) REPLACE_BTOWC=1 ;; esac fi - if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then - - : +if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then @@ -20563,42 +23502,47 @@ $as_echo "$gl_cv_func_btowc_eof" >&6; } : - fi - - - - - GNULIB_BTOWC=1 - +fi -$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - # Code from module c++defs: - # Code from module canonicalize-lgpl: + GNULIB_BTOWC=1 - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 +$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" + 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 - elif test "$gl_cv_func_realpath_works" != yes; then - REPLACE_REALPATH=1 + else + case "$gl_cv_func_realpath_works" in + *yes) ;; + *) REPLACE_REALPATH=1 ;; + esac fi - elif test "$gl_cv_func_realpath_works" != yes; then + else + case "$gl_cv_func_realpath_works" in + *yes) + ;; + *) + REPLACE_CANONICALIZE_FILE_NAME=1 + REPLACE_REALPATH=1 + ;; + esac + fi +if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then @@ -20606,12 +23550,10 @@ $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" - REPLACE_REALPATH=1 - REPLACE_CANONICALIZE_FILE_NAME=1 - fi + gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" +fi cat >>confdefs.h <<_ACEOF @@ -20622,7 +23564,11 @@ _ACEOF - GNULIB_CANONICALIZE_FILE_NAME=1 + + + GNULIB_CANONICALIZE_FILE_NAME=1 + + @@ -20633,7 +23579,11 @@ $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h - GNULIB_REALPATH=1 + + + GNULIB_REALPATH=1 + + @@ -20641,7 +23591,6 @@ $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h - # Code from module configmake: if test "x$datarootdir" = x; then datarootdir='${datadir}' @@ -20679,7 +23628,6 @@ $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h pkglibexecdir='${libexecdir}/${PACKAGE}' - # Code from module ctype: @@ -20709,13 +23657,27 @@ _ACEOF 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_next_ctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/ctype.h#{ - s#.*"\(.*/ctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -20768,7 +23730,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 @@ -20778,18 +23740,236 @@ fi done - # Code from module dosname: - # Code from module errno: - # Code from module extensions: - # Code from module float: + + + + + + + + + + + + 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 + +_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 '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 + }' + gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + + +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 \${$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 + + FLOAT_H= + REPLACE_FLOAT_LDBL=0 case "$host_os" in - beos* | openbsd* | mirbsd*) + 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 + + 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" in + sparc*-*-linux*) + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#if defined __LP64__ || defined __arch64__ + yes + #endif +_ACEOF +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_itold_works="guessing yes" +fi +rm -f conftest* + + ;; + *) gl_cv_func_itold_works="guessing yes" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int i = -1; +volatile long double ld; +int main () +{ + ld += i * 1.0L; + if (ld > 0) + return 1; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_itold_works=yes +else + 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 +{ $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 + + if test -n "$FLOAT_H"; then @@ -20816,13 +23996,27 @@ _ACEOF 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 + }' 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 - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -20843,11 +24037,42 @@ $as_echo "$gl_cv_next_float_h" >&6; } - ;; - esac + 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 + + + +if test $REPLACE_FLOAT_LDBL = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" + +fi +if test $REPLACE_ITOLD = 1; then + - # Code from module fnmatch: + + + + + + gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" + +fi @@ -20855,7 +24080,7 @@ $as_echo "$gl_cv_next_float_h" >&6; } FNMATCH_H= gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | tr '[A-Z]' '[a-z]' + 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 @@ -20903,6 +24128,8 @@ char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; 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)) @@ -20976,6 +24203,18 @@ $as_echo "$ac_res" >&6; } 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 + + +if test -n "$FNMATCH_H"; then @@ -20987,12 +24226,13 @@ $as_echo "$ac_res" >&6; } gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" + cat >>confdefs.h <<_ACEOF #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch _ACEOF - ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include + 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 @@ -21039,10 +24279,8 @@ _ACEOF - fi - - # Code from module getdelim: +fi @@ -21064,6 +24302,7 @@ _ACEOF 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 : @@ -21084,9 +24323,9 @@ else _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 + gl_cv_func_working_getdelim="guessing yes" else - gl_cv_func_working_getdelim=no + gl_cv_func_working_getdelim="guessing no" fi rm -f conftest* @@ -21136,18 +24375,20 @@ fi fi { $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 - gl_cv_func_working_getdelim=no + HAVE_GETDELIM=0 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 +if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then @@ -21183,12 +24424,15 @@ cat >>confdefs.h <<_ACEOF _ACEOF - fi +fi + + + GNULIB_GETDELIM=1 + - GNULIB_GETDELIM=1 @@ -21196,7 +24440,6 @@ $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h - # Code from module getline: @@ -21239,122 +24482,9 @@ else _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* - - -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 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" - - - - - - - - - - : - - - - - - - - : - - - - - - 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 ${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 - -_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 + am_cv_func_working_getline="guessing yes" else - gl_cv_func_working_getdelim=no + am_cv_func_working_getline="guessing no" fi rm -f conftest* @@ -21376,7 +24506,7 @@ else Based on a test program from Karl Heuer. */ char *line = NULL; size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); + int len = getline (&line, &siz, in); if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) return 2; } @@ -21385,7 +24515,7 @@ else This crashes on FreeBSD 8.0. */ char *line = NULL; size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) + if (getline (&line, &siz, in) == -1) return 3; } return 0; @@ -21393,30 +24523,30 @@ else _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_getdelim=yes + am_cv_func_working_getline=yes else - gl_cv_func_working_getdelim=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: $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: $am_cv_func_working_getline" >&5 +$as_echo "$am_cv_func_working_getline" >&6; } fi - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 + if test $ac_cv_have_decl_getline = no; then + HAVE_DECL_GETLINE=0 fi - if test $gl_cv_func_working_getdelim = no; then - if test $ac_cv_func_getdelim = yes; then - REPLACE_GETDELIM=1 - fi + case "$am_cv_func_working_getline" in + *no) + REPLACE_GETLINE=1 + ;; + esac +if test $REPLACE_GETLINE = 1; then @@ -21424,77 +24554,92 @@ $as_echo "$gl_cv_func_working_getdelim" >&6; } - gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" + gl_LIBOBJS="$gl_LIBOBJS getline.$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" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 fi -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl -_ACEOF - fi - fi + GNULIB_GETLINE=1 - GNULIB_GETLINE=1 +$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h -$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h - # Code from module getopt-gnu: +if test $REPLACE_GETOPT = 1; then -$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h - # Code from module getopt-posix: + + + gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - if test -n "$gl_replace_getopt"; then : + + gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" + + + + : + + + + + + + GNULIB_GL_UNISTD_H_GETOPT=1 +fi + + + +$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h + + + + + + + + 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 - GNULIB_UNISTD_H_GETOPT=1 + fi + +if test $REPLACE_GETOPT = 1; then @@ -21524,17 +24669,222 @@ $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h + GNULIB_GL_UNISTD_H_GETOPT=1 +fi + + + + + + + + + : + + + + + + + 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 + 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 + +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 fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 +$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } + case "$gl_cv_func_gettimeofday_clobber" in + *yes) + REPLACE_GETTIMEOFDAY=1 + + +$as_echo "#define gmtime rpl_gmtime" >>confdefs.h + + +$as_echo "#define localtime rpl_localtime" >>confdefs.h + + + +$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 + 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 +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 +fi +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 GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone +_ACEOF + + +if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then + + + + + + + + + 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 + + + + + + GNULIB_GETTIMEOFDAY=1 + + + + + +$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h - # Code from module gettext-h: - # Code from module gitlog-to-changelog: - # Code from module include_next: - # Code from module isblank: @@ -21548,6 +24898,9 @@ fi if test $ac_cv_func_isblank = no; then HAVE_ISBLANK=0 + fi + +if test $HAVE_ISBLANK = 0; then @@ -21558,15 +24911,17 @@ fi gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" - fi +fi - GNULIB_ISBLANK=1 + + GNULIB_ISBLANK=1 + + - # Code from module langinfo: @@ -21608,13 +24963,27 @@ _ACEOF 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_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/langinfo.h#{ - s#.*"\(.*/langinfo.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_langinfo_h='<'langinfo.h'>' fi @@ -21816,7 +25185,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 @@ -21826,7 +25195,7 @@ fi done - # Code from module localcharset: + @@ -21841,9 +25210,8 @@ fi - LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\"" +LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" - # Code from module locale: @@ -21851,6 +25219,15 @@ fi + + 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 : @@ -21860,6 +25237,7 @@ else /* end confdefs.h. */ #include int x = LC_MESSAGES; + int y = sizeof (((struct lconv *) 0)->decimal_point); int main () { @@ -21925,6 +25303,39 @@ $as_echo "$gl_cv_header_locale_has_locale_t" >&6; } 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 () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + gl_cv_sys_struct_lconv_ok=yes +else + 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_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 + @@ -21951,13 +25362,27 @@ _ACEOF 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_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/locale.h#{ - s#.*"\(.*/locale.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -21979,14 +25404,6 @@ $as_echo "$gl_cv_next_locale_h" >&6; } - 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` @@ -22022,7 +25439,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 @@ -22032,7 +25449,54 @@ fi done - # Code from module lstat: + + + + + if test $REPLACE_STRUCT_LCONV = 1; then + REPLACE_LOCALECONV=1 + fi + +if test $REPLACE_LOCALECONV = 1; then + + + + + + + + + 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 + + +fi + + + + + + GNULIB_LOCALECONV=1 + + + + + +$as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h + + + @@ -22044,19 +25508,39 @@ fi 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. - + 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 - GNULIB_LSTAT=1 + + + + + + gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" + + + + : + +fi + + + + + + GNULIB_LSTAT=1 + + @@ -22064,10 +25548,10 @@ $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h - # Code from module malloc-gnu: - for ac_header in stdlib.h + + 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 : @@ -22079,21 +25563,29 @@ fi done -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 + { $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 : - 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 + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif + # include + #else + char *malloc (); + #endif int main () @@ -22102,6 +25594,7 @@ return ! malloc (0); ; return 0; } + _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes @@ -22112,41 +25605,41 @@ 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 : + 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 + REPLACE_MALLOC=1 +fi +if test $REPLACE_MALLOC = 1; then - gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - REPLACE_MALLOC=1 + gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" fi - - cat >>confdefs.h <<_ACEOF #define GNULIB_MALLOC_GNU 1 _ACEOF - # Code from module malloc-posix: @@ -22155,7 +25648,10 @@ _ACEOF $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h else + REPLACE_MALLOC=1 + fi +if test $REPLACE_MALLOC = 1; then @@ -22166,14 +25662,15 @@ $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - REPLACE_MALLOC=1 +fi + + - fi + GNULIB_MALLOC_POSIX=1 - GNULIB_MALLOC_POSIX=1 @@ -22181,12 +25678,10 @@ $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - # Code from module malloca: - # Code from module mbrtowc: @@ -22352,11 +25847,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -22368,6 +25858,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 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 + +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 @@ -22748,10 +26262,8 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h esac fi fi - if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - - : +if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then @@ -22765,12 +26277,15 @@ $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h : - fi +fi + + + GNULIB_MBRTOWC=1 + - GNULIB_MBRTOWC=1 @@ -22778,7 +26293,6 @@ $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h - # Code from module mbsinit: @@ -22945,11 +26459,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -22961,6 +26470,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 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 + +" +if test "x$ac_cv_have_decl_mbsinit" = xyes; then : + ac_have_decl=1 +else + ac_have_decl=0 +fi + +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 @@ -22970,10 +26503,8 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } esac fi fi - if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - - : +if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then @@ -22987,12 +26518,15 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } : - fi +fi - GNULIB_MBSINIT=1 + + GNULIB_MBSINIT=1 + + @@ -23000,7 +26534,6 @@ $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h - # Code from module mbsrtowcs: @@ -23166,11 +26699,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -23182,6 +26710,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 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 + ac_have_decl=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 if test $REPLACE_MBSTATE_T = 1; then REPLACE_MBSRTOWCS=1 @@ -23305,10 +26857,8 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } esac fi fi - if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then - - : +if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then @@ -23332,12 +26882,15 @@ $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } : - fi +fi + + + GNULIB_MBSRTOWCS=1 + - GNULIB_MBSRTOWCS=1 @@ -23345,14 +26898,14 @@ $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h - # Code from module mbtowc: if false; then REPLACE_MBTOWC=1 fi - if test $REPLACE_MBTOWC = 1; then + +if test $REPLACE_MBTOWC = 1; then @@ -23366,12 +26919,15 @@ $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h : - fi +fi + + + + GNULIB_MBTOWC=1 - GNULIB_MBTOWC=1 @@ -23379,28 +26935,48 @@ $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h - # Code from module memchr: +if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then - GNULIB_MEMCHR=1 -$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h + gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" - # Code from module mempcpy: + 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 + +fi + +done +fi + GNULIB_MEMCHR=1 + + + + + +$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h + + + @@ -23415,25 +26991,36 @@ if test "x$ac_cv_func_mempcpy" = xyes; then : #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 + fi + +if test $HAVE_MEMPCPY = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" + : - fi +fi - GNULIB_MEMPCPY=1 + + GNULIB_MEMPCPY=1 + + @@ -23441,9 +27028,124 @@ $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h - # Code from module multiarch: - # Code from module nl_langinfo: + + + + : + + + + + + if test $ac_cv_func_mkstemp = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5 +$as_echo_n "checking for working mkstemp... " >&6; } +if ${gl_cv_func_working_mkstemp+:} false; then : + $as_echo_n "(cached) " >&6 +else + + mkdir conftest.mkstemp + if test "$cross_compiling" = yes; then : + case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_mkstemp="guessing no" ;; + esac + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +int result = 0; + int i; + off_t large = (off_t) 4294967295u; + if (large < 0) + large = 2147483647; + umask (0); + for (i = 0; i < 70; i++) + { + char templ[] = "conftest.mkstemp/coXXXXXX"; + int (*mkstemp_function) (char *) = mkstemp; + int fd = mkstemp_function (templ); + if (fd < 0) + result |= 1; + else + { + struct stat st; + if (lseek (fd, large, SEEK_SET) != large) + result |= 2; + if (fstat (fd, &st) < 0) + result |= 4; + else if (st.st_mode & 0077) + result |= 8; + if (close (fd)) + result |= 16; + } + } + return result; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_working_mkstemp=yes +else + gl_cv_func_working_mkstemp=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.mkstemp + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5 +$as_echo "$gl_cv_func_working_mkstemp" >&6; } + case "$gl_cv_func_working_mkstemp" in + *yes) ;; + *) + REPLACE_MKSTEMP=1 + ;; + esac + else + HAVE_MKSTEMP=0 + fi + +if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS mkstemp.$ac_objext" + + + +fi + + + + + + GNULIB_MKSTEMP=1 + + + + + +$as_echo "#define GNULIB_TEST_MKSTEMP 1" >>confdefs.h + + + + @@ -23514,6 +27216,12 @@ _ACEOF $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h + fi + else + HAVE_NL_LANGINFO=0 + fi + +if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then @@ -23524,74 +27232,89 @@ $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - fi - else - HAVE_NL_LANGINFO=0 +fi + GNULIB_NL_LANGINFO=1 - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - fi +$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - GNULIB_NL_LANGINFO=1 + : -$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - # Code from module pathmax: - : + for ac_func in rawmemchr +do : + ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" +if test "x$ac_cv_func_rawmemchr" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_RAWMEMCHR 1 +_ACEOF + +fi +done + if test $ac_cv_func_rawmemchr = no; then + HAVE_RAWMEMCHR=0 + fi - : +if test $HAVE_RAWMEMCHR = 0; then - # Code from module readlink: + gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" : +fi - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 + GNULIB_RAWMEMCHR=1 +$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h + - gl_LIBOBJS="$gl_LIBOBJS readlink.$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; } @@ -23629,7 +27352,13 @@ else 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" + 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. */ @@ -23657,40 +27386,44 @@ fi 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 + 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 - - - + REPLACE_READLINK=1 + ;; + esac + fi +if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - elif test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 + gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" + : +fi - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - fi - fi + GNULIB_READLINK=1 - GNULIB_READLINK=1 @@ -23698,7 +27431,6 @@ $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h - # Code from module realloc-posix: @@ -23707,7 +27439,10 @@ $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h else + REPLACE_REALLOC=1 + fi +if test $REPLACE_REALLOC = 1; then @@ -23718,14 +27453,15 @@ $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" - REPLACE_REALLOC=1 +fi + - fi + GNULIB_REALLOC_POSIX=1 + - GNULIB_REALLOC_POSIX=1 @@ -23733,7 +27469,6 @@ $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h - # Code from module regex: # Check whether --with-included-regex was given. @@ -23904,603 +27639,75 @@ else 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 - - 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 - - -$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 - - -$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h - - -$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 - - -$as_echo "#define re_exec rpl_re_exec" >>confdefs.h - - -$as_echo "#define regcomp rpl_regcomp" >>confdefs.h - - -$as_echo "#define regexec rpl_regexec" >>confdefs.h - - -$as_echo "#define regerror rpl_regerror" >>confdefs.h - - -$as_echo "#define regfree rpl_regfree" >>confdefs.h - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext" - - - - - - - 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" = xyes; 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" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ISBLANK $ac_have_decl -_ACEOF - - - fi - - # Code from module safe-alloc: - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS safe-alloc.$ac_objext" - - - # Code from module selinux-h: - - - 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 - - - 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 $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 $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: augeas will be compiled without SELinux support." >&5 -$as_echo "$as_me: WARNING: augeas 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 - -done - - else - SELINUX_CONTEXT_H=selinux/context.h - fi - - - - # 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" = xyes; 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 ${gl_cv_size_max+:} false; 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 ssize_t: - - { $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 - - fi - - # Code from module stat: - - - - : - - - - - - { $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 - 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 - -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 ${gl_cv_func_stat_file_slash+:} false; 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 - -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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stat_file_slash=yes -else - 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_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 -;; +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 - 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_use_included_regex = yes; then +$as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h +$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 - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" +$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h - fi +$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h +$as_echo "#define re_search rpl_re_search" >>confdefs.h - GNULIB_STAT=1 +$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h -$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h +$as_echo "#define re_match rpl_re_match" >>confdefs.h +$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h - # Code from module stdbool: +$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h - # Define two additional variables used in the Makefile substitution. +$as_echo "#define re_comp rpl_re_comp" >>confdefs.h - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi +$as_echo "#define re_exec rpl_re_exec" >>confdefs.h - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi +$as_echo "#define regcomp rpl_regcomp" >>confdefs.h - # Code from module stddef: +$as_echo "#define regexec rpl_regexec" >>confdefs.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 -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; +$as_echo "#define regerror rpl_regerror" >>confdefs.h -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 +$as_echo "#define regfree rpl_regfree" >>confdefs.h + fi - if test -n "$STDDEF_H"; then +if test $ac_use_included_regex = yes; then @@ -24508,99 +27715,75 @@ $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 ${gl_cv_next_stddef_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include + gl_LIBOBJS="$gl_LIBOBJS regex.$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 - }'`'"' + + + 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" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBINTL_H 1 +_ACEOF + 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 +done + : - fi - # 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 - 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_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 +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 "$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 - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi +done + if test "$ac_cv_header_selinux_selinux_h" = yes; then + # We do have , so do compile getfilecon.c + # and arrange to use its wrappers. @@ -24617,553 +27800,454 @@ $as_echo "$gl_cv_next_stddef_h" >&6; } if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' + 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_stdint_h+:} false; 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_selinux_selinux_h+:} false; then : $as_echo_n "(cached) " >&6 else - if test $ac_cv_header_stdint_h = yes; then + if test $ac_cv_header_selinux_selinux_h = yes; then 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 - 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 - }'`'"' + + 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_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' else - gl_cv_next_stdint_h='<'stdint.h'>' + gl_cv_next_selinux_selinux_h='<'selinux/selinux.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; } +{ $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_STDINT_H=$gl_cv_next_stdint_h + 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='<'stdint.h'>' + gl_next_as_first_directive='<'selinux/selinux.h'>' else # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h + gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive + NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 + +$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: augeas will be compiled without SELinux support." >&5 +$as_echo "$as_me: WARNING: augeas will be compiled without SELinux support." >&2;} + esac else - HAVE_STDINT_H=0 + # 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 $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 ${gl_cv_header_working_stdint_h+:} false; then : + + 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 + +done + + else + 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 getfilecon.$ac_objext" + +fi + + 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 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 - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + gl_cv_size_max= + 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 +#if HAVE_STDINT_H #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 +#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* - /* 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 -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 -#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; + if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include "; then : -#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; +else + fits_in_uint= +fi - /* 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; + 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; - /* 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; -}; +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 + + + + { $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 : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - + gt_cv_ssize_t=yes else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ + 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 -#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 + fi - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -#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 - }; + : + + + + + + { $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 + 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 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; - +struct stat st; return stat (".", &st) != stat ("./", &st); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes + 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 -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $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 + 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 -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; } - 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 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +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; + + ; + return 0; +} _ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_stat_file_slash=yes +else + 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_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 -done +$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 $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi +$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h +;; + esac - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi +if test $REPLACE_STAT = 1; then - 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 \${gl_cv_bitsizeof_${gltype}+:} 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 : -else - result=unknown -fi + gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - eval gl_cv_bitsizeof_${gltype}=\$result + + + : 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 -_ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done - fi - 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 \${gl_cv_bitsizeof_${gltype}+:} 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 + GNULIB_STAT=1 -#include "; then : -else - result=unknown -fi - eval gl_cv_bitsizeof_${gltype}=\$result -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 -_ACEOF - eval BITSIZEOF_${GLTYPE}=\$result - done +$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - 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 \${gl_cv_type_${gltype}_signed+:} 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 - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; -int -main () -{ + # Define two additional variables used in the Makefile substitution. - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes + 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 - result=no + GL_GENERATE_STDBOOL_H_TRUE='#' + GL_GENERATE_STDBOOL_H_FALSE= 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 - { $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 -_ACEOF - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done + if test "$ac_cv_type__Bool" = yes; then + HAVE__BOOL=1 + else + HAVE__BOOL=0 + fi - 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 \${gl_cv_type_${gltype}_suffix+:} false; 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 - 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 + int test[2 * (sizeof NULL == sizeof (void *)) -1]; - /* 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 () { @@ -25173,105 +28257,98 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - eval gl_cv_type_${gltype}_suffix=\$glsuf + 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 - 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 -_ACEOF +{ $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 - done + 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 + if test -n "$STDDEF_H"; then - fi - 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 \${gl_cv_type_${gltype}_suffix+:} false; then : + + + + + + 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 - 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 +_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_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' - extern $gltype foo; - extern $gltype1 foo; -int -main () -{ - ; - return 0; -} -_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 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_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 - done - STDINT_H=stdint.h fi - # Code from module stdio: @@ -25301,13 +28378,27 @@ _ACEOF 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_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdio.h#{ - s#.*"\(.*/stdio.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -25328,6 +28419,30 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } + + GNULIB_FSCANF=1 + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_FSCANF 1 +_ACEOF + + + GNULIB_SCANF=1 + + +cat >>confdefs.h <<_ACEOF +#define GNULIB_SCANF 1 +_ACEOF + + + GNULIB_FGETC=1 + GNULIB_GETC=1 + GNULIB_GETCHAR=1 + GNULIB_FGETS=1 + GNULIB_FREAD=1 + + GNULIB_FPRINTF=1 GNULIB_PRINTF=1 GNULIB_VFPRINTF=1 @@ -25341,7 +28456,8 @@ $as_echo "$gl_cv_next_stdio_h" >&6; } - for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf tmpfile vdprintf vsnprintf; do + + 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; } @@ -25371,7 +28487,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 @@ -25381,7 +28497,6 @@ fi done - # Code from module stdlib: @@ -25410,13 +28525,27 @@ _ACEOF 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_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/stdlib.h#{ - s#.*"\(.*/stdlib.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' fi @@ -25439,7 +28568,7 @@ $as_echo "$gl_cv_next_stdlib_h" >&6; } - 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 _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r 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; } @@ -25475,7 +28604,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 @@ -25485,15 +28614,6 @@ fi done - # Code from module stpcpy: - - - - - - - - @@ -25508,25 +28628,36 @@ if test "x$ac_cv_func_stpcpy" = xyes; then : #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 + +if test $HAVE_STPCPY = 0; then + + + + + + + + + gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext" + : - fi +fi + - GNULIB_STPCPY=1 + GNULIB_STPCPY=1 + + @@ -25534,7 +28665,6 @@ $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h - # Code from module stpncpy: @@ -25576,9 +28706,9 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Thanks for using GNU" >/dev/null 2>&1; then : - gl_cv_func_stpncpy=yes + gl_cv_func_stpncpy="guessing yes" else - gl_cv_func_stpncpy=no + gl_cv_func_stpncpy="guessing no" fi rm -f conftest* @@ -25591,7 +28721,11 @@ else #include /* for strcpy */ /* The stpncpy prototype is missing in on AIX 4. */ #if !HAVE_DECL_STPNCPY -extern char *stpncpy (char *dest, const char *src, size_t n); +extern +# ifdef __cplusplus +"C" +# endif +char *stpncpy (char *dest, const char *src, size_t n); #endif int main () { @@ -25633,12 +28767,21 @@ fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stpncpy" >&5 $as_echo "$gl_cv_func_stpncpy" >&6; } - if test $gl_cv_func_stpncpy = yes; then + case "$gl_cv_func_stpncpy" in + *yes) $as_echo "#define HAVE_STPNCPY 1" >>confdefs.h - else - REPLACE_STPNCPY=1 + ;; + *) + REPLACE_STPNCPY=1 + ;; + esac + else + HAVE_STPNCPY=0 + fi + +if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then @@ -25652,41 +28795,134 @@ $as_echo "#define HAVE_STPNCPY 1" >>confdefs.h : - fi +fi + + + + + + GNULIB_STPNCPY=1 + + + + + +$as_echo "#define GNULIB_TEST_STPNCPY 1" >>confdefs.h + + + + + + + + for ac_func in strchrnul +do : + ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" +if test "x$ac_cv_func_strchrnul" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_STRCHRNUL 1 +_ACEOF + +fi +done + + if test $ac_cv_func_strchrnul = no; then + HAVE_STRCHRNUL=0 else - HAVE_STPNCPY=0 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 +$as_echo_n "checking whether strchrnul works... " >&6; } +if ${gl_cv_func_strchrnul_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. */ +#if defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) + 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_strchrnul_works="guessing yes" +else + gl_cv_func_strchrnul_works="guessing no" +fi +rm -f conftest* +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include /* for strchrnul */ + +int +main () +{ +const char *buf = "a"; + return strchrnul (buf, 'b') != buf + 1; + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + gl_cv_func_strchrnul_works=yes +else + gl_cv_func_strchrnul_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_strchrnul_works" >&5 +$as_echo "$gl_cv_func_strchrnul_works" >&6; } + case "$gl_cv_func_strchrnul_works" in + *yes) ;; + *) REPLACE_STRCHRNUL=1 ;; + esac + fi + +if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then - gl_LIBOBJS="$gl_LIBOBJS stpncpy.$ac_objext" + + + + gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext" + : +fi - fi - GNULIB_STPNCPY=1 + GNULIB_STRCHRNUL=1 -$as_echo "#define GNULIB_TEST_STPNCPY 1" >>confdefs.h + + +$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h - # Code from module streq: - # Code from module string: - # Code from module strndup: @@ -25710,6 +28946,7 @@ $as_echo "#define GNULIB_TEST_STPNCPY 1" >>confdefs.h 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'. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 $as_echo_n "checking for working strndup... " >&6; } @@ -25733,8 +28970,12 @@ int main () { -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); @@ -25758,37 +28999,32 @@ 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 - - - - - + *no) REPLACE_STRNDUP=1 ;; + esac + else + HAVE_STRNDUP=0 + fi +if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" - ;; - esac - else + gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" +fi - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" - fi + GNULIB_STRNDUP=1 - GNULIB_STRNDUP=1 @@ -25796,7 +29032,6 @@ $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - # Code from module strnlen: @@ -25812,7 +29047,8 @@ $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 "$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 @@ -25862,22 +29098,15 @@ 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 && - - +test $ac_cv_func_strnlen_working = no && : - - - - gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" - - - if test $ac_cv_func_strnlen_working = no; 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 + +if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then @@ -25888,13 +29117,16 @@ test $ac_cv_func_strnlen_working = no && gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" - : - fi + : +fi + + + + GNULIB_STRNLEN=1 - GNULIB_STRNLEN=1 @@ -25902,8 +29134,6 @@ $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h - # Code from module strnlen1: - # Code from module strstr: if test $REPLACE_STRSTR = 0; then @@ -25913,12 +29143,13 @@ 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 + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef __GNU_LIBRARY__ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ + && !(defined __i386__ || defined __x86_64__) \ && !defined __UCLIBC__ Lucky user #endif @@ -25933,7 +29164,7 @@ else _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_linear=yes + gl_cv_func_strstr_linear="guessing yes" else gl_cv_func_strstr_linear="guessing no" fi @@ -25993,12 +29224,15 @@ fi 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 + case "$gl_cv_func_strstr_linear" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac fi - if test $REPLACE_STRSTR = 1; then +if test $REPLACE_STRSTR = 1; then @@ -26006,26 +29240,15 @@ $as_echo "$gl_cv_func_strstr_linear" >&6; } - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - fi + gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - # Code from module strstr-simple: +fi if test "$gl_cv_func_memchr_works" != yes; then REPLACE_STRSTR=1 - - - - - - - - - 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; } @@ -26054,7 +29277,7 @@ else _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 + gl_cv_func_strstr_works_always="guessing yes" else gl_cv_func_strstr_works_always="guessing no" fi @@ -26092,8 +29315,15 @@ 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 + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac + fi + +if test $REPLACE_STRSTR = 1; then @@ -26104,13 +29334,15 @@ $as_echo "$gl_cv_func_strstr_works_always" >&6; } gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - fi - fi +fi + + + GNULIB_STRSTR=1 + - GNULIB_STRSTR=1 @@ -26118,7 +29350,6 @@ $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h - # Code from module sys_stat: @@ -26162,13 +29393,27 @@ _ACEOF 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_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 - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_stat_h='<'sys/stat.h'>' fi @@ -26193,6 +29438,18 @@ $as_echo "$gl_cv_next_sys_stat_h" >&6; } + + + + + + + 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 " @@ -26206,7 +29463,7 @@ fi - for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do + 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; } @@ -26236,7 +29493,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 @@ -26247,7 +29504,87 @@ fi - # Code from module sys_wait: + + + + + + + + + + + + + + + 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 + + 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/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 + }' + gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | + sed -n "$gl_absolute_header_sed"`'"' + + +fi +{ $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 + + + + + + + + + + + + @@ -26287,13 +29624,27 @@ _ACEOF 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/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_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 - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_sys_wait_h='<'sys/wait.h'>' fi @@ -26319,6 +29670,8 @@ $as_echo "$gl_cv_next_sys_wait_h" >&6; } + + 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 @@ -26348,7 +29701,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 @@ -26359,11 +29712,14 @@ fi - # Code from module time: + + + : + + - # Code from module unistd: @@ -26404,13 +29760,27 @@ _ACEOF 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_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/unistd.h#{ - s#.*"\(.*/unistd.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_unistd_h='<'unistd.h'>' fi @@ -26442,7 +29812,11 @@ $as_echo "$gl_cv_next_unistd_h" >&6; } - 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 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; } @@ -26451,7 +29825,10 @@ if eval \${$as_gl_Symbol+:} false; then : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#include + +#if HAVE_UNISTD_H +# include +#endif /* Some systems declare various items in the wrong headers. */ #if !(defined __GLIBC__ && !defined __UCLIBC__) # include @@ -26481,7 +29858,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 @@ -26491,8 +29868,6 @@ fi done - # Code from module unused-parameter: - # Code from module vasnprintf: : @@ -26584,7 +29959,6 @@ fi fi - # Code from module vasprintf: for ac_func in vasprintf do : @@ -26638,25 +30012,19 @@ done - GNULIB_VASPRINTF=1 - -$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h + GNULIB_VASPRINTF=1 - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format" +$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h - XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format" - # Code from module verify: - # Code from module warn-on-use: - # Code from module wchar: @@ -26696,13 +30064,27 @@ _ACEOF 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_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wchar.h#{ - s#.*"\(.*/wchar.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_wchar_h='<'wchar.h'>' fi @@ -26784,7 +30166,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 @@ -26794,7 +30176,6 @@ fi done - # Code from module wcrtomb: @@ -26960,11 +30341,6 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } else REPLACE_MBSTATE_T=1 fi - if test $REPLACE_MBSTATE_T = 1; then - - : - - fi @@ -26976,6 +30352,30 @@ $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 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 + +cat >>confdefs.h <<_ACEOF +#define HAVE_DECL_WCRTOMB $ac_have_decl +_ACEOF + + if test $ac_cv_have_decl_wcrtomb = yes; then + REPLACE_WCRTOMB=1 + fi else if test $REPLACE_MBSTATE_T = 1; then REPLACE_WCRTOMB=1 @@ -27060,10 +30460,8 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } esac fi fi - if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - - : +if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then @@ -27077,12 +30475,15 @@ $as_echo "$gl_cv_func_wcrtomb_retval" >&6; } : - fi +fi - GNULIB_WCRTOMB=1 + + GNULIB_WCRTOMB=1 + + @@ -27090,7 +30491,6 @@ $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h - # Code from module wctype-h: @@ -27155,13 +30555,27 @@ _ACEOF 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_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n '\#/wctype.h#{ - s#.*"\(.*/wctype.h\)".*#\1# - s#^/[^/]#//&# - p - q - }'`'"' + sed -n "$gl_absolute_header_sed"`'"' else gl_cv_next_wctype_h='<'wctype.h'>' fi @@ -27209,9 +30623,9 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes + gl_cv_func_iswcntrl_works="guessing yes" else - gl_cv_func_iswcntrl_works=no + gl_cv_func_iswcntrl_works="guessing no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext @@ -27251,14 +30665,66 @@ $as_echo "$gl_cv_func_iswcntrl_works" >&6; } fi - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 + 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 - REPLACE_ISWCNTRL=0 + 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_ISWCNTRL = 1; then + if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then : fi @@ -27386,7 +30852,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 @@ -27396,7 +30862,6 @@ fi done - # Code from module xsize: @@ -27442,6 +30907,7 @@ done + { $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 : @@ -27463,9 +30929,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) @@ -27474,7 +30940,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, @@ -27500,10 +30966,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; } @@ -27521,7 +30989,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 @@ -27531,7 +30999,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. @@ -27599,9 +31067,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) @@ -27610,7 +31078,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, @@ -27636,10 +31104,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; } @@ -27657,7 +31127,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 @@ -27667,7 +31137,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. @@ -27722,9 +31192,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) @@ -27733,7 +31203,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, @@ -27759,10 +31229,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; } @@ -27780,7 +31252,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 @@ -27790,7 +31262,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. @@ -27860,9 +31332,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) @@ -27871,7 +31343,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, @@ -27918,7 +31390,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 @@ -27928,7 +31400,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. @@ -27964,6 +31436,13 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; } + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_CLOSE=1 + fi + + + + : @@ -27971,11 +31450,36 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; } + 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 $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 +if test $REPLACE_CLOSE = 1; then @@ -27984,9 +31488,39 @@ $as_echo "$gt_cv_locale_tr_utf8" >&6; } - gltests_LIBOBJS="$gltests_LIBOBJS dup2.$ac_objext" + gltests_LIBOBJS="$gltests_LIBOBJS close.$ac_objext" - else +fi + + + + + + if test "$GNULIB_CLOSE" != 1; then + if test "$GNULIB_CLOSE" = 0; then + GNULIB_CLOSE=$gl_module_indicator_condition + else + GNULIB_CLOSE="($GNULIB_CLOSE || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_CLOSE 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 : @@ -27995,17 +31529,17 @@ 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;; + gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; + 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=no;; + gl_cv_func_dup2_works="guessing no" ;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -28018,13 +31552,13 @@ int main () { int result = 0; -#if HAVE_FCNTL +#ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; -#endif HAVE_FCNTL +#endif if (dup2 (1, 1) == 0) result |= 2; -#if HAVE_FCNTL +#ifdef FD_CLOEXEC if (fcntl (1, F_GETFD) != FD_CLOEXEC) result |= 4; #endif @@ -28040,60 +31574,220 @@ int result = 0; 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 +_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 + ;; + esac + fi + + +if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS dup2.$ac_objext" + + +fi + + + + + + if test "$GNULIB_DUP2" != 1; then + if test "$GNULIB_DUP2" = 0; then + GNULIB_DUP2=$gl_module_indicator_condition + else + GNULIB_DUP2="($GNULIB_DUP2 || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h + + + + + + + + + + if test "$GNULIB_ENVIRON" != 1; then + if test "$GNULIB_ENVIRON" = 0; then + GNULIB_ENVIRON=$gl_module_indicator_condition + else + GNULIB_ENVIRON="($GNULIB_ENVIRON || $gl_module_indicator_condition)" + fi + fi + + + + + +$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + + + + + + + if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + REPLACE_FDOPEN=1 + else + { $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 + + 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 + +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include +#include +int +main (void) +{ + 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_fdopen_works=yes +else + 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_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 + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS fdopen.$ac_objext" + + +fi + + + + + + 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 + -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 - if test $ac_cv_func_dup2 = yes; then - REPLACE_DUP2=1 + + + 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 +if test $REPLACE_FSTAT = 1; then - gltests_LIBOBJS="$gltests_LIBOBJS dup2.$ac_objext" - fi - fi + gltests_LIBOBJS="$gltests_LIBOBJS fstat.$ac_objext" - GNULIB_DUP2=$gl_module_indicator_condition -$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h +fi + if test "$GNULIB_FSTAT" != 1; then + if test "$GNULIB_FSTAT" = 0; then + GNULIB_FSTAT=$gl_module_indicator_condition + else + GNULIB_FSTAT="($GNULIB_FSTAT || $gl_module_indicator_condition)" + fi + fi - GNULIB_ENVIRON=$gl_module_indicator_condition -$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h +$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h @@ -28102,97 +31796,44 @@ $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h + 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 - 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 -_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 - }'`'"' + gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext" 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 + if test "$GNULIB_GETCWD" != 1; then + if test "$GNULIB_GETCWD" = 0; then + GNULIB_GETCWD=$gl_module_indicator_condition + else + GNULIB_GETCWD="($GNULIB_GETCWD || $gl_module_indicator_condition)" + fi + fi - 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 + +$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h + @@ -28245,6 +31886,17 @@ done 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 : + +else + HAVE_DECL_GETPAGESIZE=0 +fi + + +if test $REPLACE_GETPAGESIZE = 1; then @@ -28255,25 +31907,279 @@ done 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" = xyes; then : +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 + + + + + + + + + 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 + + + + { $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 - HAVE_DECL_GETPAGESIZE=0 + 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 $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 + + + 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 + { $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 - GNULIB_GETPAGESIZE=$gl_module_indicator_condition + #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 () +{ + ; + 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 -$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h + else + UINT64_MAX_EQ_ULONG_MAX=-1 + fi @@ -28310,7 +32216,7 @@ 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 + # 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 " @@ -28375,9 +32281,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) @@ -28386,7 +32292,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, @@ -28412,10 +32318,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; } @@ -28433,7 +32341,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 @@ -28443,7 +32351,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. @@ -28511,9 +32419,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) @@ -28522,7 +32430,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, @@ -28548,10 +32456,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; } @@ -28569,7 +32479,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 @@ -28579,7 +32489,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. @@ -28636,9 +32546,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) @@ -28647,7 +32557,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, @@ -28696,13 +32606,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. @@ -28775,9 +32686,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) @@ -28786,7 +32697,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, @@ -28835,7 +32746,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 @@ -28843,9 +32754,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. @@ -28902,9 +32819,272 @@ 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 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 + + + + + + { $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* + +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 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 + + 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 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) @@ -28913,7 +33093,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, @@ -28939,269 +33119,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; - 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 - - - - - - { $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 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; -} - -_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 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 - - 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; } @@ -29219,7 +33142,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 @@ -29229,7 +33152,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. @@ -29286,9 +33209,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) @@ -29297,7 +33220,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, @@ -29346,13 +33269,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. @@ -29425,9 +33349,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) @@ -29436,7 +33360,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, @@ -29485,7 +33409,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 @@ -29493,9 +33417,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. @@ -29549,12 +33479,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* @@ -29565,12 +33495,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 @@ -29604,6 +33534,51 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h + : + + + + + + 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 + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS msvc-inval.$ac_objext" + +fi + + + +if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS msvc-nothrow.$ac_objext" + +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; } @@ -29626,9 +33601,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) @@ -29637,7 +33612,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, @@ -29663,10 +33638,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; } @@ -29684,7 +33661,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 @@ -29694,7 +33671,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. @@ -29762,9 +33739,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) @@ -29773,7 +33750,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, @@ -29799,10 +33776,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; } @@ -29820,7 +33799,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 @@ -29830,7 +33809,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. @@ -29865,25 +33844,7 @@ $as_echo "$gt_cv_locale_fr_utf8" >&6; } case "$host_os" in mingw* | pw*) - - - REPLACE_OPEN=1 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS open.$ac_objext" - - - - - : - - + REPLACE_OPEN=1 ;; *) @@ -29951,9 +33912,15 @@ $as_echo "$gl_cv_func_open_slash" >&6; } $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h + REPLACE_OPEN=1 + ;; + esac + ;; + esac + - REPLACE_OPEN=1 +if test $REPLACE_OPEN = 1; then @@ -29969,16 +33936,21 @@ $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h : +fi + - ;; - esac - ;; - esac + if test "$GNULIB_OPEN" != 1; then + if test "$GNULIB_OPEN" = 0; then + GNULIB_OPEN=$gl_module_indicator_condition + else + GNULIB_OPEN="($GNULIB_OPEN || $gl_module_indicator_condition)" + fi + fi + - GNULIB_OPEN=$gl_module_indicator_condition @@ -29988,13 +33960,19 @@ $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5 + { $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 : - gl_cv_func_svid_putenv=no + 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. */ @@ -30034,8 +34012,14 @@ 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 + case "$gl_cv_func_svid_putenv" in + *yes) ;; + *) + REPLACE_PUTENV=1 + ;; + esac + +if test $REPLACE_PUTENV = 1; then @@ -30046,12 +34030,21 @@ $as_echo "$gl_cv_func_svid_putenv" >&6; } gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext" - fi +fi - GNULIB_PUTENV=$gl_module_indicator_condition + + 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 + + @@ -30061,23 +34054,176 @@ $as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h - if test $HAVE_SETENV$REPLACE_SETENV != 10; then + # 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 "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "I cannot identify this map" >/dev/null 2>&1; then : - gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext" +$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 + : + + + + + + + : + + + + + + + + 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 + +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 + +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 + + + + + + + + + gltests_LIBOBJS="$gltests_LIBOBJS setenv.$ac_objext" + +fi + + + + + + if test "$GNULIB_SETENV" != 1; then + if test "$GNULIB_SETENV" = 0; then + GNULIB_SETENV=$gl_module_indicator_condition + else + GNULIB_SETENV="($GNULIB_SETENV || $gl_module_indicator_condition)" + fi + fi - GNULIB_SETENV=$gl_module_indicator_condition @@ -30090,11 +34236,14 @@ $as_echo "#define GNULIB_TEST_SETENV 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 @@ -30108,12 +34257,21 @@ $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h : - fi +fi + + + + 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 - GNULIB_SETLOCALE=$gl_module_indicator_condition @@ -30145,9 +34303,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) @@ -30156,7 +34314,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, @@ -30182,10 +34340,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; } @@ -30203,7 +34363,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 @@ -30213,7 +34373,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. @@ -30281,9 +34441,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) @@ -30292,7 +34452,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, @@ -30318,10 +34478,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; } @@ -30339,7 +34501,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 @@ -30349,7 +34511,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. @@ -30406,9 +34568,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) @@ -30417,7 +34579,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, @@ -30466,13 +34628,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. @@ -30545,9 +34708,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) @@ -30556,7 +34719,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, @@ -30605,7 +34768,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 @@ -30613,9 +34776,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. @@ -30743,96 +34912,12 @@ $as_echo_n "checking for MAP_ANONYMOUS... " >&6; } #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 -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 -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 - - - : - - - - - - - : - - - - - - - : - - - - - - - - - # 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 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* @@ -30843,12 +34928,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 @@ -30881,6 +34966,74 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 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 "$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 +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 : @@ -30889,9 +35042,8 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - if test $ac_cv_func_symlink = no; then - HAVE_SYMLINK=0 + : @@ -30899,8 +35051,15 @@ $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h - gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" + : + + + + + + if test $ac_cv_func_symlink = no; then + HAVE_SYMLINK=0 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; } @@ -30908,7 +35067,13 @@ 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. */ @@ -30943,8 +35108,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 @@ -30955,13 +35127,21 @@ $as_echo "$gl_cv_func_symlink_works" >&6; } gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" - fi - fi +fi + + + 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 + - GNULIB_SYMLINK=$gl_module_indicator_condition @@ -31018,27 +35198,9 @@ fi done if test $ac_cv_func_unsetenv = no; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext" - - - - - : - - - - - - + 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 : @@ -31054,11 +35216,7 @@ extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) int unsetenv (const char *name); -#else -int unsetenv(); -#endif int main () @@ -31082,16 +35240,6 @@ $as_echo "$gt_cv_func_unsetenv_ret" >&6; } $as_echo "#define VOID_UNSETENV 1" >>confdefs.h REPLACE_UNSETENV=1 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext" - fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 @@ -31100,7 +35248,13 @@ if ${gl_cv_func_unsetenv_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : - gl_cv_func_unsetenv_works="guessing 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 + else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -31145,8 +35299,15 @@ 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 + case "$gl_cv_func_unsetenv_works" in + *yes) ;; + *) + REPLACE_UNSETENV=1 + ;; + esac + fi + +if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then @@ -31157,13 +35318,31 @@ $as_echo "$gl_cv_func_unsetenv_works" >&6; } gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext" - fi - fi + : + + + + + + +fi + + + + + + if test "$GNULIB_UNSETENV" != 1; then + if test "$GNULIB_UNSETENV" = 0; then + GNULIB_UNSETENV=$gl_module_indicator_condition + else + GNULIB_UNSETENV="($GNULIB_UNSETENV || $gl_module_indicator_condition)" + fi + fi + - GNULIB_UNSETENV=$gl_module_indicator_condition @@ -31195,9 +35374,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) @@ -31206,7 +35385,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, @@ -31232,10 +35411,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; } @@ -31253,7 +35434,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 @@ -31263,7 +35444,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. @@ -31331,9 +35512,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) @@ -31342,7 +35523,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, @@ -31368,10 +35549,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; } @@ -31389,7 +35572,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 @@ -31399,7 +35582,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. @@ -31456,9 +35639,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) @@ -31467,7 +35650,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, @@ -31516,13 +35699,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. @@ -31595,9 +35779,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) @@ -31606,7 +35790,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, @@ -31655,7 +35839,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 @@ -31663,9 +35847,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. @@ -31706,24 +35896,10 @@ $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 @@ -31831,24 +36007,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 @@ -31873,17 +36032,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 + - GNULIB_WCTOB=$gl_module_indicator_condition + + + + + gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" + + + : + +fi + + + + + + 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 + + @@ -31897,7 +36078,8 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h if false; then REPLACE_WCTOMB=1 fi - if test $REPLACE_WCTOMB = 1; then + +if test $REPLACE_WCTOMB = 1; then @@ -31911,12 +36093,21 @@ $as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h : - fi +fi + - 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 + + @@ -32032,6 +36223,7 @@ fi + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -32052,7 +36244,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_PKG_CONFIG="$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 @@ -32095,7 +36287,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_ac_pt_PKG_CONFIG="$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 @@ -32160,6 +36352,7 @@ if test -n "$LIBXML_CFLAGS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_CFLAGS=`$PKG_CONFIG --cflags "libxml-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -32176,6 +36369,7 @@ if test -n "$LIBXML_LIBS"; then $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBXML_LIBS=`$PKG_CONFIG --libs "libxml-2.0" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi @@ -32195,9 +36389,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libxml-2.0" 2>&1` + LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` else - LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors "libxml-2.0" 2>&1` + LIBXML_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libxml-2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBXML_PKG_ERRORS" >&5 @@ -32212,7 +36406,6 @@ installed software in a non-standard prefix. Alternatively, you may set the environment variables LIBXML_CFLAGS and LIBXML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 - elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -32228,7 +36421,6 @@ See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } - else LIBXML_CFLAGS=$pkg_cv_LIBXML_CFLAGS LIBXML_LIBS=$pkg_cv_LIBXML_LIBS @@ -32346,7 +36538,6 @@ 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$//' @@ -32361,6 +36552,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -32401,6 +36600,47 @@ 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_ARGZ_H_TRUE}" && test -z "${GL_GENERATE_ARGZ_H_FALSE}"; then + as_fn_error $? "conditional \"GL_GENERATE_ARGZ_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_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 "${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_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 "${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 + gl_libobjs= gl_ltlibobjs= @@ -32731,16 +36971,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 @@ -32800,28 +37040,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'" @@ -32842,8 +37070,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 augeas $as_me 0.10.0, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by augeas $as_me 1.3.0, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -32908,11 +37136,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="\\ -augeas config.status 0.10.0 -configured by $0, generated by GNU Autoconf 2.68, +augeas config.status 1.3.0 +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." @@ -33003,7 +37231,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' @@ -33045,6 +37273,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -33127,7 +37356,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -33183,6 +37411,7 @@ _LTECHO_EOF' # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -33233,7 +37462,6 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -33924,7 +38152,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -33937,7 +38165,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -33971,21 +38199,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || @@ -34039,8 +38265,8 @@ $as_echo X"$file" | # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -34094,6 +38320,9 @@ SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -34395,10 +38624,6 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator diff --git a/configure.ac b/configure.ac index d08d841..08769e6 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ -AC_INIT(augeas, 0.10.0) +AC_INIT(augeas, 1.3.0) AC_CONFIG_SRCDIR([src/augeas.c]) -AC_CONFIG_AUX_DIR([build/aux]) +AC_CONFIG_AUX_DIR([build/ac-aux]) AM_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE([-Wno-portability 1.11 color-tests parallel-tests]) AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. @@ -65,8 +65,8 @@ if test x"$enable_debug" = x"yes"; then fi dnl Version info in libtool's notation -AC_SUBST([LIBAUGEAS_VERSION_INFO], [15:0:15]) -AC_SUBST([LIBFA_VERSION_INFO], [4:5:3]) +AC_SUBST([LIBAUGEAS_VERSION_INFO], [19:0:19]) +AC_SUBST([LIBFA_VERSION_INFO], [5:0:4]) AC_GNU_SOURCE @@ -94,13 +94,16 @@ AC_SUBST(AUGEAS_CFLAGS) AUGEAS_CHECK_READLINE AC_CHECK_FUNCS([open_memstream uselocale]) -VERSION_SCRIPT_FLAGS= -$(/usr/bin/ld --help 2>&1 | grep -- --version-script >/dev/null) && \ +AC_MSG_CHECKING([how to pass version script to the linker ($LD)]) +VERSION_SCRIPT_FLAGS=none +if $LD --help 2>&1 | grep "version-script" >/dev/null 2>/dev/null; then VERSION_SCRIPT_FLAGS=-Wl,--version-script= -test "`uname`" == "SunOS" && \ +elif $LD --help 2>&1 | grep "M mapfile" >/dev/null 2>/dev/null; then VERSION_SCRIPT_FLAGS="-Wl,-M -Wl," +fi +AC_MSG_RESULT([$VERSION_SCRIPT_FLAGS]) AC_SUBST(VERSION_SCRIPT_FLAGS) -AM_CONDITIONAL([USE_VERSION_SCRIPT], [test -n "$VERSION_SCRIPT_FLAGS"]) +AM_CONDITIONAL([USE_VERSION_SCRIPT], [test "$VERSION_SCRIPT_FLAGS" != none]) gl_INIT diff --git a/doc/Makefile.in b/doc/Makefile.in index 70dd818..6713485 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -34,13 +78,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -49,24 +94,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -78,6 +132,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -95,15 +150,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -123,13 +184,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -153,21 +219,33 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = 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_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-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 \ + tags-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/||"`;; \ @@ -189,13 +267,39 @@ 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; }; \ + } am__installdirs = "$(DESTDIR)$(vimdir)" DATA = $(nobase_vim_DATA) 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 \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -233,6 +337,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -276,9 +381,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -290,16 +397,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -307,6 +423,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@ @@ -319,8 +437,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -328,6 +452,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -368,25 +493,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -396,12 +527,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -419,9 +553,11 @@ 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@ @@ -431,7 +567,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -443,8 +579,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@ @@ -493,6 +631,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -503,18 +642,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -530,7 +674,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -544,7 +691,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -578,15 +727,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -596,6 +751,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -612,6 +768,7 @@ 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@ @@ -619,6 +776,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -660,6 +818,7 @@ 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@ @@ -676,6 +835,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -721,6 +882,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -730,6 +892,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -740,6 +904,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -749,6 +914,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -775,6 +942,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -791,6 +960,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -802,6 +972,7 @@ 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@ @@ -810,11 +981,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -843,8 +1018,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -858,9 +1036,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -870,10 +1050,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -906,6 +1090,8 @@ 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@ +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@ @@ -913,6 +1099,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -1023,15 +1211,18 @@ clean-libtool: -rm -rf .libs _libs install-nobase_vimDATA: $(nobase_vim_DATA) @$(NORMAL_INSTALL) - test -z "$(vimdir)" || $(MKDIR_P) "$(DESTDIR)$(vimdir)" @list='$(nobase_vim_DATA)'; test -n "$(vimdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(vimdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(vimdir)" || exit 1; \ + fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ - echo "$(MKDIR_P) '$(DESTDIR)$(vimdir)/$$dir'"; \ + echo " $(MKDIR_P) '$(DESTDIR)$(vimdir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(vimdir)/$$dir"; }; \ echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(vimdir)/$$dir'"; \ $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(vimdir)/$$dir" || exit $$?; }; \ @@ -1041,27 +1232,28 @@ uninstall-nobase_vimDATA: @$(NORMAL_UNINSTALL) @list='$(nobase_vim_DATA)'; test -n "$(vimdir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(vimdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(vimdir)" && rm -f $$files + dir='$(DESTDIR)$(vimdir)'; $(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. -# 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; \ +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1076,57 +1268,12 @@ $(RECURSIVE_TARGETS): $(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 +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1142,12 +1289,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1159,15 +1301,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1176,6 +1314,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1212,13 +1365,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; \ @@ -1256,10 +1406,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: @@ -1337,23 +1492,21 @@ ps-am: uninstall-am: uninstall-nobase_vimDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local ctags ctags-recursive distclean \ - distclean-generic distclean-libtool 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-nobase_vimDATA 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 \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-nobase_vimDATA +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-am clean clean-generic clean-libtool clean-local \ + cscopelist-am ctags ctags-am distclean distclean-generic \ + distclean-libtool 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-nobase_vimDATA 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 mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-nobase_vimDATA all-local: $(PDFDOCS) diff --git a/doc/lenses.tex b/doc/lenses.tex index 4559e43..c9fae11 100644 --- a/doc/lenses.tex +++ b/doc/lenses.tex @@ -78,7 +78,7 @@ in a number of ways: ordered. In addition, several subtrees in such a list may use the same label. This makes it possible to accomodate concrete files where entries that are logically connected are stored scattered between - unrelated entries like hte {\tt AcceptEnv} entries in {\tt + unrelated entries like the {\tt AcceptEnv} entries in {\tt sshd\_config}. \end{itemize} @@ -217,7 +217,7 @@ $C$ and transforms them to trees in $T$. Generally, \subsection{const} -The $\lens{const} E\,t\,v$ maps words mathcing $E$ in the \nget direction +The $\lens{const} E\,t\,v$ maps words matching $E$ in the \nget direction to a fixed tree $t$ and maps that fixed tree $t$ back in the \nput direction. When text needs to be created from $t$, it produces the default word $v$. @@ -402,11 +402,11 @@ $\lput{(\conc{t_2}{t_1})}{\conc{c_1}{c_2}} = \conc{l.\lput{t_2}{c_2}}{l.\lput{t_1}{c_1}}$ This can only happen if the information to be reordered is in subtrees. In particular, comment lines need to become their own subtree, with some support from the language to -create 'hidden' entries. Simplest: allow {\tt NULL} as the key for a +create `hidden' entries. Simplest: allow {\tt NULL} as the key for a subtree and ignore such tree entries in the public API. Need to split a tree $t\in T$ into subtrees according to ?? Keeping a fake -'slot' $\rhd$ around for text that didn't produce a tree should help with +`slot' $\rhd$ around for text that didn't produce a tree should help with that. For $K^*$ to make any sense, must have $\rhd\in K$ and the application of @@ -417,7 +417,7 @@ $(l^*).\nparse$ must return $\rhd$ for all except at most one application. For type checking, we need to compute the following properties of regular languages $R, R_1, R_2$ \begin{itemize} -\item decide unamibuguous concatenation $\uaconc{R_1}{R_2}$ and compute +\item decide unambiguous concatenation $\uaconc{R_1}{R_2}$ and compute $\conc{R_1}{R_2}$ \item decide unambiguous iteration $\uastar{R}$ and compute $R^*$ \item disjointness $R_1 \cap R_2 = \emptyset$ (we don't need general diff --git a/doc/naturaldocs/Makefile.in b/doc/naturaldocs/Makefile.in index 9213cb8..d82095b 100644 --- a/doc/naturaldocs/Makefile.in +++ b/doc/naturaldocs/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -33,13 +77,14 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc/naturaldocs -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -48,24 +93,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -77,6 +131,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -94,15 +149,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -122,13 +183,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -152,14 +218,26 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = 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 +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) pkglibexecdir = @pkglibexecdir@ ACLOCAL = @ACLOCAL@ @@ -169,6 +247,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -212,9 +291,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -226,16 +307,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -243,6 +333,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@ @@ -255,8 +347,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -264,6 +362,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -304,25 +403,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -332,12 +437,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -355,9 +463,11 @@ 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@ @@ -367,7 +477,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -379,8 +489,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@ @@ -429,6 +541,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -439,18 +552,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -466,7 +584,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -480,7 +601,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -514,15 +637,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -532,6 +661,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -548,6 +678,7 @@ 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@ @@ -555,6 +686,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -596,6 +728,7 @@ 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@ @@ -612,6 +745,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -657,6 +792,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -666,6 +802,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -676,6 +814,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -685,6 +824,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -711,6 +852,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -727,6 +870,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -738,6 +882,7 @@ 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@ @@ -746,11 +891,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -779,8 +928,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -794,9 +946,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -806,10 +960,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -842,6 +1000,8 @@ 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@ +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@ @@ -849,6 +1009,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -959,11 +1121,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -1011,10 +1173,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: @@ -1095,16 +1262,17 @@ uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local distclean distclean-generic \ - distclean-libtool 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 mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am + clean-libtool clean-local cscopelist-am ctags-am distclean \ + distclean-generic distclean-libtool 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 \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am @ND_ENABLED_TRUE@all-local: NaturalDocs diff --git a/doc/naturaldocs/conf/c_api/Menu.txt b/doc/naturaldocs/conf/c_api/Menu.txt index afe0596..f56a34d 100644 --- a/doc/naturaldocs/conf/c_api/Menu.txt +++ b/doc/naturaldocs/conf/c_api/Menu.txt @@ -47,8 +47,8 @@ SubTitle: C API Group: Main Links { - Link: Main (http://augeas.net) - Link: Documentation (http://augeas.net/doc) + Link: Main (/index.html) + Link: Documentation (/docs/index.html) } # Group: Main Links File: Public API (no auto-title, augeas.h) diff --git a/doc/naturaldocs/conf/lenses/Menu.txt b/doc/naturaldocs/conf/lenses/Menu.txt index 3616389..17ec75b 100644 --- a/doc/naturaldocs/conf/lenses/Menu.txt +++ b/doc/naturaldocs/conf/lenses/Menu.txt @@ -54,60 +54,140 @@ Group: Main Site { Group: Specific Modules { File: Access (access.aug) + File: ActiveMQ_Conf (activemq_conf.aug) + File: ActiveMQ_XML (activemq_xml.aug) File: Aliases (aliases.aug) - File: Approx (approx.aug) + File: Anacron (anacron.aug) + File: Approx (approx.aug) + File: Apt_Update_Manager (apt_update_manager.aug) + File: AptCacherNGSecurity (aptcacherngsecurity.aug) File: AptConf (aptconf.aug) + File: AptPreferences (aptpreferences.aug) + File: Aptsources (aptsources.aug) + File: Authorized_Keys (authorized_keys.aug) + File: Automaster (automaster.aug) + File: Automounter (automounter.aug) + File: Avahi (avahi.aug) File: BackupPCHosts (backuppchosts.aug) + File: BootConf (bootconf.aug) + File: Cachefilesd (cachefilesd.aug) + File: Carbon (carbon.aug) File: Cgconfig (no auto-title, cgconfig.aug) File: Cgrules (no auto-title, cgrules.aug) + File: Channels (channels.aug) + File: Chrony (chrony.aug) + File: Collectd (collectd.aug) + File: CPanel (cpanel.aug) File: Cron (cron.aug) - File: crypttab.aug (crypttab.aug) + File: Crypttab (crypttab.aug) + File: Cups (cups.aug) File: Debctrl (no auto-title, debctrl.aug) File: Desktop (desktop.aug) File: Dhcpd (dhcpd.aug) + File: Dovecot (dovecot.aug) File: Dpkg (dpkg.aug) File: Exports (exports.aug) File: FAI_DiskConfig (fai_diskconfig.aug) + File: Fonts (fonts.aug) + File: Fuse (fuse.aug) + File: Gshadow (gshadow.aug) File: Grub (grub.aug) + File: GtkBookmarks (gtkbookmarks.aug) + File: Host_Conf (host_conf.aug) File: Hostname (hostname.aug) File: Hosts_Access (hosts_access.aug) - File: Host_Conf (host_conf.aug) + File: Htpasswd (htpasswd.aug) + File: Inputrc (inputrc.aug) + File: JettyRealm (jettyrealm.aug) + File: JMXAccess (jmxaccess.aug) + File: JMXPassword (jmxpassword.aug) File: Iptables (iptables.aug) File: Kdump (kdump.aug) File: Keepalived (keepalived.aug) + File: Known_Hosts (known_hosts.aug) + File: Koji (koji.aug) + File: Ldif (ldif.aug) + File: Ldso (no auto-title, ldso.aug) + File: Lightdm (lightdm.aug) File: Login_defs (login_defs.aug) File: Lokkit (lokkit.aug) + File: LVM (lvm.aug) + File: MCollective (mcollective.aug) + File: Memcached (memcached.aug) File: Mke2fs (mke2fs.aug) File: Modprobe (modprobe.aug) + File: MongoDBServer (mongodbserver.aug) File: Modules (modules.aug) File: Modules_conf (modules_conf.aug) File: NagiosCfg (no auto-title, nagioscfg.aug) File: NagiosObjects (nagiosobjects.aug) + File: Netmasks (netmasks.aug) + File: NetworkManager (networkmanager.aug) File: Networks (networks.aug) + File: Nginx (nginx.aug) File: Nrpe (nrpe.aug) File: Nsswitch (nsswitch.aug) + File: Ntpd (ntpd.aug) + File: OpenShift_Config (openshift_config.aug) + File: OpenShift_Http (openshift_http.aug) + File: OpenShift_Quickstarts (openshift_quickstarts.aug) + File: Pagekite (pagekite.aug) + File: Pam (pam.aug) + File: PamConf (pamconf.aug) + File: Passwd (passwd.aug) File: Pbuilder (pbuilder.aug) File: Pg_Hba (pg_hba.aug) + File: Postfix_Transport (postfix_transport.aug) + File: Postfix_Virtual (postfix_virtual.aug) + File: Postgresql (postgresql.aug) + File: Protocols (protocols.aug) File: PuppetFileserver (no auto-title, puppetfileserver.aug) + File: Puppet_Auth (no auto-title, puppet_auth.aug) + File: Qpid (qpid.aug) + File: Rabbitmq (rabbitmq.aug) + File: Redis (redis.aug) File: Reprepro_Uploaders (reprepro_uploaders.aug) File: Resolv (resolv.aug) + File: Rmt (rmt.aug) + File: Rsyslog (rsyslog.aug) File: Schroot (schroot.aug) File: Services (services.aug) + File: Shadow (shadow.aug) File: Shells (shells.aug) + File: Shellvars (shellvars.aug) + File: Simplelines (simplelines.aug) + File: Simplevars (simplevars.aug) + File: Sip_Conf (sip_conf.aug) + File: SmbUsers (smbusers.aug) + File: Splunk (splunk.aug) File: Solaris_System (solaris_system.aug) File: Ssh (ssh.aug) File: Sshd (sshd.aug) + File: Sssd (no auto-title, sssd.aug) + File: Subversion (subversion.aug) File: Sudoers (sudoers.aug) + File: Sysconfig_Route (sysconfig_route.aug) + File: Sysctl (sysctl.aug) File: Syslog (syslog.aug) + File: Systemd (systemd.aug) + File: Thttpd (thttpd.aug) + File: Tuned (tuned.aug) + File: Up2date (up2date.aug) + File: UpdateDB (updatedb.aug) + File: VWware_Config (vmware_config.aug) + File: Vfstab (vfstab.aug) File: Xinetd (xinetd.aug) + File: Xymon (xymon.aug) + File: XymonAlerting (xymonalerting.aug) File: Xorg (xorg.aug) - File: Shellvars (shellvars.aug) } # Group: Specific Modules Group: Generic Modules { File: Build (build.aug) + File: Erlang (erlang.aug) File: IniFile (inifile.aug) + File: Quote (quote.aug) File: Rx (rx.aug) File: Sep (sep.aug) File: Util (util.aug) @@ -116,14 +196,83 @@ Group: Generic Modules { Group: Tests and Examples { File: Test_Access (tests/test_access.aug) - File: Test_Approx (tests/test_approx.aug) + File: Test_ActiveMQ_Conf (tests/test_activemq_conf.aug) + File: Test_ActiveMQ_XML (tests/test_activemq_xml.aug) File: Test_Aliases (tests/test_aliases.aug) - File: Test_Reprepro_Uploaders (tests/test_reprepro_uploaders.aug) - File: Test_FAI_DiskConfig (tests/test_faidiskconfig.aug) + File: Test_Anacron (tests/test_anacron.aug) + File: Test_Approx (tests/test_approx.aug) + File: Test_Apt_Update_Manager (tests/test_apt_update_manager.aug) + File: Test_Authorized_Keys (tests/test_authorized_keys.aug) + File: Test_BootConf (tests/test_bootconf.aug) + File: Test_Build (tests/test_build.aug) + File: Test_Carbon (tests/test_carbon.aug) + File: Test_Channels (tests/test_channels.aug) + File: Test_Chrony (tests/test_chrony.aug) + File: Test_Collectd (tests/test_collectd.aug) + File: Test_CPanel (tests/test_cpanel.aug) + File: Test_Cups (tests/test_cups.aug) + File: Test_Dovecot (tests/test_dovecot.aug) + File: Test_Erlang (tests/test_erlang.aug) + File: Test_FAI_DiskConfig (tests/test_fai_diskconfig.aug) + File: Test_Fonts (tests/test_fonts.aug) + File: Test_Fuse (tests/test_fuse.aug) + File: Test_GtkBookmarks (tests/test_gtkbookmarks.aug) + File: Test_Htpasswd (tests/test_htpasswd.aug) File: Test_IniFile (tests/test_inifile.aug) + File: Test_Inputrc (tests/test_inputrc.aug) + File: Test_JettyRealm (tests/test_jettyrealm.aug) + File: Test_JMXAccess (tests/test_jmxaccess.aug) + File: Test_JMXPassword (tests/test_jmxpassword.aug) + File: Test_Kdump (tests/test_kdump.aug) File: Test_Keepalived (tests/test_keepalived.aug) - File: Test_login_defs (tests/test_login_defs.aug) + File: Test_Known_Hosts (tests/test_known_hosts.aug) + File: Test_Koji (tests/test_koji.aug) + File: Test_Ldso (tests/test_ldso.aug) + File: Test_Lightdm (tests/test_lightdm.aug) + File: Test_LVM (tests/test_lvm.aug) + File: Test_MCollective (tests/test_mcollective.aug) + File: Test_Memcached (tests/test_memcached.aug) + File: Test_MongoDBServer (tests/test_mongodbserver.aug) + File: Test_NagiosCfg (tests/test_nagioscfg.aug) + File: Test_NetworkManager (tests/test_networkmanager.aug) + File: Test_Nginx (tests/test_nginx.aug) + File: Test_Ntpd (tests/test_ntpd.aug) + File: Test_OpenShift_Config (tests/test_openshift_config.aug) + File: Test_OpenShift_Http (tests/test_openshift_http.aug) + File: Test_OpenShift_Quickstarts (tests/test_openshift_quickstarts.aug) + File: Test_Postfix_Transport (tests/test_postfix_transport.aug) + File: Test_Postfix_Virtual (tests/test_postfix_virtual.aug) + File: Test_Postgresql (tests/test_postgresql.aug) + File: Test_Protocols (tests/test_protocols.aug) + File: Test_Puppet_Auth (tests/test_puppet_auth.aug) + File: Test_Qpid (tests/test_qpid.aug) + File: Test_Quote (tests/test_quote.aug) + File: Test_Rabbitmq (tests/test_rabbitmq.aug) + File: Test_Redis (tests/test_redis.aug) + File: Test_Reprepro_Uploaders (tests/test_reprepro_uploaders.aug) + File: Test_Rmt (tests/test_rmt.aug) + File: Test_Rsyslog (tests/test_rsyslog.aug) + File: Test_Simplelines (tests/test_simplelines.aug) + File: Test_Simplevars (tests/test_simplevars.aug) + File: Test_SmbUsers (tests/test_smbusers.aug) + File: Test_Subversion (tests/test_subversion.aug) + File: Test_Sysconfig_Route (tests/test_sysconfig_route.aug) + File: Test_Sysctl (tests/test_sysctl.aug) + File: Test_Systemd (tests/test_systemd.aug) + File: Test_Thttpd (tests/test_thttpd.aug) + File: Test_Tuned (tests/test_tuned.aug) + File: Test_Up2date (tests/test_up2date.aug) + File: Test_UpdateDB (tests/test_updatedb.aug) + File: Test_VMware_Config (tests/test_vmware_config.aug) File: Test_Xml (tests/test_xml.aug) + File: Test_Xymon (tests/test_xymon.aug) + File: Test_XymonAlerting (tests/test_xymonalerting.aug) + File: Test_Yum (tests/test_yum.aug) + File: Test_login_defs (tests/test_login_defs.aug) + File: Test_sssd (tests/test_sssd.aug) + File: Test_sudoers (no auto-title, tests/test_sudoers.aug) + File: Test_ssh (tests/test_ssh.aug) + File: Test_sshd (tests/test_sshd.aug) } # Group: Tests and Examples Group: Index { diff --git a/doc/naturaldocs/conf/lenses/Menu_Backup.txt b/doc/naturaldocs/conf/lenses/Menu_Backup.txt new file mode 100644 index 0000000..9782647 --- /dev/null +++ b/doc/naturaldocs/conf/lenses/Menu_Backup.txt @@ -0,0 +1,153 @@ +Format: 1.4 + + +Title: Augeas Documentation +SubTitle: Modules + +# You can add a footer to your documentation like this: +# Footer: [text] +# If you want to add a copyright notice, this would be the place to do it. + +# You can add a timestamp to your documentation like one of these: +# Timestamp: Generated on month day, year +# Timestamp: Updated mm/dd/yyyy +# Timestamp: Last updated mon day +# +# m - One or two digit month. January is "1" +# mm - Always two digit month. January is "01" +# mon - Short month word. January is "Jan" +# month - Long month word. January is "January" +# d - One or two digit day. 1 is "1" +# dd - Always two digit day. 1 is "01" +# day - Day with letter extension. 1 is "1st" +# yy - Two digit year. 2006 is "06" +# yyyy - Four digit year. 2006 is "2006" +# year - Four digit year. 2006 is "2006" + + +# -------------------------------------------------------------------------- +# +# Cut and paste the lines below to change the order in which your files +# appear on the menu. Don't worry about adding or removing files, Natural +# Docs will take care of that. +# +# You can further organize the menu by grouping the entries. Add a +# "Group: [name] {" line to start a group, and add a "}" to end it. +# +# You can add text and web links to the menu by adding "Text: [text]" and +# "Link: [name] ([URL])" lines, respectively. +# +# The formatting and comments are auto-generated, so don't worry about +# neatness when editing the file. Natural Docs will clean it up the next +# time it is run. When working with groups, just deal with the braces and +# forget about the indentation and comments. +# +# -------------------------------------------------------------------------- + + +Group: Main Site { + + Link: Main (/index.html) + Link: Documentation (/docs/index.html) + } # Group: Main Site + +Group: Specific Modules { + + File: Aliases (aliases.aug) + File: Approx (approx.aug) + File: AptPreferences (aptpreferences.aug) + File: Aptsources (aptsources.aug) + File: BBhosts (bbhosts.aug) + File: Cgconfig (cgconfig.aug) + File: Cgrules (cgrules.aug) + File: CobblerModules (cobblermodules.aug) + File: CobblerSettings (cobblersettings.aug) + File: Cron (cron.aug) + File: Darkice (darkice.aug) + File: Debctrl (debctrl.aug) + File: Device_map (device_map.aug) + File: Dhclient (dhclient.aug) + File: Dnsmasq (dnsmasq.aug) + File: Dpkg (dpkg.aug) + File: Dput (dput.aug) + File: Ethers (ethers.aug) + File: Exports (exports.aug) + File: Fstab (fstab.aug) + File: Gdm (gdm.aug) + File: Group (group.aug) + File: Grub (grub.aug) + File: Inetd (inetd.aug) + File: Inittab (inittab.aug) + File: Interfaces (interfaces.aug) + File: Iptables (iptables.aug) + File: Json (json.aug) + File: Keepalived (keepalived.aug) + File: Krb5 (krb5.aug) + File: Limits (limits.aug) + File: Login_defs (login_defs.aug) + File: Logrotate (logrotate.aug) + File: Lokkit (lokkit.aug) + File: Mke2fs (mke2fs.aug) + File: Modprobe (modprobe.aug) + File: Modules_conf (modules_conf.aug) + File: Monit (monit.aug) + File: Multipath (multipath.aug) + File: MySQL (mysql.aug) + File: NagiosCfg (nagioscfg.aug) + File: Nrpe (nrpe.aug) + File: Nsswitch (nsswitch.aug) + File: Ntp (ntp.aug) + File: Odbc (odbc.aug) + File: OpenVPN (openvpn.aug) + File: Pam (pam.aug) + File: Passwd (passwd.aug) + File: Pbuilder (pbuilder.aug) + File: Pg_Hba (pg_hba.aug) + File: PHP (php.aug) + File: Phpvars (phpvars.aug) + File: Postfix_Access (postfix_access.aug) + File: Postfix_Main (postfix_main.aug) + File: Postfix_Master (postfix_master.aug) + File: Puppet (puppet.aug) + File: Resolv (resolv.aug) + File: Rsyncd (rsyncd.aug) + File: Samba (samba.aug) + File: Securetty (securetty.aug) + File: Services (services.aug) + File: Shells (shells.aug) + File: Shellvars_list (shellvars_list.aug) + File: Shellvars (shellvars.aug) + File: Slapd (slapd.aug) + File: Soma (soma.aug) + File: Spacevars (spacevars.aug) + File: Squid (squid.aug) + File: Sshd (sshd.aug) + File: Sudoers (sudoers.aug) + File: Sysconfig (sysconfig.aug) + File: Sysctl (sysctl.aug) + File: Syslog (syslog.aug) + File: Vsftpd (vsftpd.aug) + File: Webmin (webmin.aug) + File: Wine (wine.aug) + File: Xinetd (xinetd.aug) + File: Xorg (xorg.aug) + File: Yum (yum.aug) + } # Group: Specific Modules + +Group: Generic Modules { + + File: Build (build.aug) + File: IniFile (inifile.aug) + File: Rx (rx.aug) + File: Sep (sep.aug) + File: Util (util.aug) + } # Group: Generic Modules + +Group: Index { + + Augeas Lens Index: Lenses + Augeas Module Index: Modules + Augeas Variable Index: Variables + Index: Everything + } # Group: Index + diff --git a/doc/syntax/augeas.vim b/doc/syntax/augeas.vim index 16c5cd1..c65d016 100644 --- a/doc/syntax/augeas.vim +++ b/doc/syntax/augeas.vim @@ -44,12 +44,12 @@ syn region augeasComment start="(\*" end="\*)" contains=augeasTodo,augeasSpaceE if !exists("augeas_no_functions") " functions - syn keyword augeasLabel del key store label value - syn keyword augeasFunction Util Build Rx Sep + syn keyword augeasLabel del key store label value square seq + syn keyword augeasFunction Util Build Rx Sep Quote endif -syn region augeasRegexp start="/" end="[^\\]/" -syn region augeasString start=+"+ end=+"\([ \t)\.-]\|$\)+ +syn region augeasRegexp start="/" end="[^\\]/" +syn region augeasString start=+"+ end=+"+ skip=+\\"+ " Define the default highlighting. diff --git a/examples/Makefile.in b/examples/Makefile.in index c76141e..030ee23 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -35,13 +79,15 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = fadot$(EXEEXT) subdir = examples -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build/ac-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -50,24 +96,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -79,6 +134,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -96,15 +152,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -124,13 +186,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -159,11 +226,24 @@ PROGRAMS = $(bin_PROGRAMS) am_fadot_OBJECTS = fadot.$(OBJEXT) fadot_OBJECTS = $(am_fadot_OBJECTS) fadot_DEPENDENCIES = $(top_builddir)/src/libfa.la $(GNULIB) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build/aux/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/ac-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -172,24 +252,42 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(fadot_SOURCES) DIST_SOURCES = $(fadot_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -201,6 +299,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -244,9 +343,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -258,16 +359,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -275,6 +385,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@ @@ -287,8 +399,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -296,6 +414,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -336,25 +455,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -364,12 +489,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -387,9 +515,11 @@ 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@ @@ -399,7 +529,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -411,8 +541,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@ @@ -461,6 +593,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -471,18 +604,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -498,7 +636,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -512,7 +653,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -546,15 +689,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -564,6 +713,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -580,6 +730,7 @@ 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@ @@ -587,6 +738,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -628,6 +780,7 @@ 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@ @@ -644,6 +797,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -689,6 +844,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -698,6 +854,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -708,6 +866,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -717,6 +876,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -743,6 +904,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -759,6 +922,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -770,6 +934,7 @@ 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@ @@ -778,11 +943,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -811,8 +980,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -826,9 +998,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -838,10 +1012,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -874,6 +1052,8 @@ 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@ +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@ @@ -881,6 +1061,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -986,14 +1168,19 @@ $(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 || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ + while read p p1; do if test -f $$p \ + || test -f $$p1 \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ @@ -1014,7 +1201,8 @@ uninstall-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ + -e 's/$$/$(EXEEXT)/' \ + `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files @@ -1027,7 +1215,8 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -fadot$(EXEEXT): $(fadot_OBJECTS) $(fadot_DEPENDENCIES) + +fadot$(EXEEXT): $(fadot_OBJECTS) $(fadot_DEPENDENCIES) $(EXTRA_fadot_DEPENDENCIES) @rm -f fadot$(EXEEXT) $(AM_V_CCLD)$(LINK) $(fadot_OBJECTS) $(fadot_LDADD) $(LIBS) @@ -1042,26 +1231,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -1069,26 +1255,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -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: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ - 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1100,15 +1275,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: $(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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1117,6 +1288,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1168,10 +1354,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: @@ -1255,19 +1446,19 @@ uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool 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-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 mostlyclean-libtool \ - pdf pdf-am ps ps-am tags uninstall uninstall-am \ - uninstall-binPROGRAMS +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool 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-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 mostlyclean-libtool pdf pdf-am ps ps-am \ + tags tags-am uninstall uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am index b299e53..963b22d 100644 --- a/gnulib/lib/Makefile.am +++ b/gnulib/lib/Makefile.am @@ -1,15 +1,27 @@ ## 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-2012 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. -# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build/aux --with-tests --lgpl=2 --libtool --macro-prefix=gl argz canonicalize-lgpl fnmatch getline getopt-gnu gitlog-to-changelog isblank locale regex safe-alloc selinux-h stpcpy stpncpy strndup sys_wait vasprintf +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build/ac-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl argz canonicalize-lgpl fnmatch getline getopt-gnu gitlog-to-changelog isblank locale mkstemp regex safe-alloc selinux-h stpcpy stpncpy strchrnul strndup sys_wait vasprintf AUTOMAKE_OPTIONS = 1.5 gnits @@ -43,12 +55,12 @@ libgnu_la_LDFLAGS += $(LTLIBINTL) ## begin gnulib module alloca +libgnu_la_LIBADD += @LTALLOCA@ +libgnu_la_DEPENDENCIES += @LTALLOCA@ EXTRA_DIST += alloca.c EXTRA_libgnu_la_SOURCES += alloca.c -libgnu_la_LIBADD += @LTALLOCA@ -libgnu_la_DEPENDENCIES += @LTALLOCA@ ## end gnulib module alloca ## begin gnulib module alloca-opt @@ -57,54 +69,40 @@ 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 +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 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 argz BUILT_SOURCES += $(ARGZ_H) # We need the following in order to create when the system # doesn't have one that works with the given compiler. -argz.h: argz.in.h +if GL_GENERATE_ARGZ_H +argz.h: argz.in.h $(top_builddir)/config.status $(AM_V_GEN)rm -f $@-t $@ && \ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ cat $(srcdir)/argz.in.h; \ } > $@-t && \ mv -f $@-t $@ +else +argz.h: $(top_builddir)/config.status + rm -f $@ +endif MOSTLYCLEANFILES += argz.h argz.h-t EXTRA_DIST += argz.c argz.in.h @@ -122,30 +120,6 @@ EXTRA_libgnu_la_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 canonicalize-lgpl @@ -192,11 +166,7 @@ configmake.h: Makefile 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 + mv -f $@-t $@ BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t @@ -209,10 +179,11 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -242,10 +213,12 @@ 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 +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -258,31 +231,79 @@ errno.h: errno.in.h < $(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 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 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 +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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.in.h +EXTRA_DIST += float.c float.in.h itold.c + +EXTRA_libgnu_la_SOURCES += float.c itold.c ## end gnulib module float @@ -292,13 +313,18 @@ 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) +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 @@ -331,10 +357,11 @@ 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) +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|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + 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' \ @@ -357,10 +384,19 @@ libgnu_la_SOURCES += gettext.h ## end gnulib module gettext-h +## begin gnulib module gettimeofday + + +EXTRA_DIST += gettimeofday.c + +EXTRA_libgnu_la_SOURCES += gettimeofday.c + +## end gnulib module gettimeofday + ## begin gnulib module gitlog-to-changelog -EXTRA_DIST += $(top_srcdir)/build/aux/gitlog-to-changelog +EXTRA_DIST += $(top_srcdir)/build/ac-aux/gitlog-to-changelog ## end gnulib module gitlog-to-changelog @@ -379,15 +415,16 @@ 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) +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|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ + 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/@''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' \ @@ -485,19 +522,23 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \ - -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|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)' \ @@ -510,6 +551,15 @@ EXTRA_DIST += locale.in.h ## end gnulib module locale +## begin gnulib module localeconv + + +EXTRA_DIST += localeconv.c + +EXTRA_libgnu_la_SOURCES += localeconv.c + +## end gnulib module localeconv + ## begin gnulib module lstat @@ -599,6 +649,15 @@ EXTRA_libgnu_la_SOURCES += mempcpy.c ## end gnulib module mempcpy +## begin gnulib module mkstemp + + +EXTRA_DIST += mkstemp.c + +EXTRA_libgnu_la_SOURCES += mkstemp.c + +## end gnulib module mkstemp + ## begin gnulib module nl_langinfo @@ -615,6 +674,15 @@ EXTRA_DIST += pathmax.h ## end gnulib module pathmax +## begin gnulib module rawmemchr + + +EXTRA_DIST += rawmemchr.c rawmemchr.valgrind + +EXTRA_libgnu_la_SOURCES += rawmemchr.c + +## end gnulib module rawmemchr + ## begin gnulib module readlink @@ -644,10 +712,9 @@ EXTRA_libgnu_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c ## begin gnulib module safe-alloc +libgnu_la_SOURCES += safe-alloc.c -EXTRA_DIST += safe-alloc.c safe-alloc.h - -EXTRA_libgnu_la_SOURCES += safe-alloc.c +EXTRA_DIST += safe-alloc.h ## end gnulib module safe-alloc @@ -656,11 +723,12 @@ EXTRA_libgnu_la_SOURCES += safe-alloc.c libgnu_la_SOURCES += se-context.in.h se-selinux.in.h BUILT_SOURCES += selinux/selinux.h -selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -672,7 +740,8 @@ selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H) MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t BUILT_SOURCES += $(SELINUX_CONTEXT_H) -selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_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! */' && \ @@ -681,6 +750,10 @@ selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_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 @@ -696,6 +769,112 @@ libgnu_la_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/ac-aux/snippet/_Noreturn.h + +EXTRA_DIST += $(top_srcdir)/build/ac-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/ac-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/warn-on-use.h + +## end gnulib module snippet/warn-on-use + ## begin gnulib module stat @@ -711,12 +890,17 @@ 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 +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 @@ -729,10 +913,12 @@ 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 +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -741,6 +927,10 @@ stddef.h: stddef.in.h < $(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 @@ -753,10 +943,12 @@ 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 +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/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + 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' \ @@ -785,6 +977,10 @@ stdint.h: stdint.in.h < $(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 @@ -797,54 +993,67 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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' \ @@ -857,11 +1066,14 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -882,6 +1094,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -908,41 +1121,46 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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_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' \ @@ -955,7 +1173,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -973,7 +1194,9 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_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' \ @@ -981,6 +1204,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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 && \ @@ -1009,6 +1233,15 @@ EXTRA_libgnu_la_SOURCES += stpncpy.c ## end gnulib module stpncpy +## begin gnulib module strchrnul + + +EXTRA_DIST += strchrnul.c strchrnul.valgrind + +EXTRA_libgnu_la_SOURCES += strchrnul.c + +## end gnulib module strchrnul + ## begin gnulib module streq @@ -1022,50 +1255,55 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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_MBSLEN''@|$(HAVE_MBSLEN)|g' \ + 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' \ @@ -1088,6 +1326,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1149,26 +1388,29 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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|@''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|@''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' \ @@ -1202,21 +1444,81 @@ 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_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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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 '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; \ @@ -1229,24 +1531,33 @@ EXTRA_DIST += sys_wait.in.h ## end gnulib module sys_wait +## begin gnulib module tempname + +libgnu_la_SOURCES += tempname.c + +EXTRA_DIST += tempname.h + +## end gnulib module tempname + ## 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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/@''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' \ @@ -1276,55 +1587,65 @@ 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) +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|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + 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|@''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' \ + -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' \ @@ -1333,6 +1654,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1340,6 +1662,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1349,6 +1672,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1356,10 +1680,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_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' \ @@ -1369,17 +1695,20 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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_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' \ @@ -1402,31 +1731,6 @@ EXTRA_DIST += unistd.in.h ## end gnulib module unistd -## 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 vasnprintf @@ -1447,28 +1751,10 @@ EXTRA_libgnu_la_SOURCES += asprintf.c vasprintf.c ## begin gnulib module verify -libgnu_la_SOURCES += verify.h -## end gnulib module verify - -## begin gnulib module warn-on-use +EXTRA_DIST += verify.h -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 +## end gnulib module verify ## begin gnulib module wchar @@ -1476,54 +1762,55 @@ 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ + -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' \ @@ -1605,10 +1892,11 @@ 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) +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/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + 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' \ @@ -1625,6 +1913,7 @@ wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in index f3b8518..ff9e087 100644 --- a/gnulib/lib/Makefile.in +++ b/gnulib/lib/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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,20 +14,77 @@ @SET_MAKE@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 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. # -# 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 +# 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=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build/aux --with-tests --lgpl=2 --libtool --macro-prefix=gl argz canonicalize-lgpl fnmatch getline getopt-gnu gitlog-to-changelog isblank locale regex safe-alloc selinux-h stpcpy stpncpy strndup sys_wait vasprintf +# Reproduce by: gnulib-tool --import --dir=. --lib=libgnu --source-base=gnulib/lib --m4-base=gnulib/m4 --doc-base=doc --tests-base=gnulib/tests --aux-dir=build/ac-aux --with-tests --lgpl=2 --no-conditional-dependencies --libtool --macro-prefix=gl argz canonicalize-lgpl fnmatch getline getopt-gnu gitlog-to-changelog isblank locale mkstemp regex safe-alloc selinux-h stpcpy stpncpy strchrnul strndup sys_wait vasprintf VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -47,14 +103,15 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = gnulib/lib -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in alloca.c +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am alloca.c \ + $(top_srcdir)/build/ac-aux/depcomp $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -63,24 +120,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -92,6 +158,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -109,15 +176,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -137,13 +210,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -170,16 +248,30 @@ CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -am_libgnu_la_OBJECTS = localcharset.lo malloca.lo strnlen1.lo +am_libgnu_la_OBJECTS = localcharset.lo malloca.lo safe-alloc.lo \ + strnlen1.lo tempname.lo libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build/aux/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/ac-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -188,37 +280,59 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES) DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_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_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-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 \ + tags-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 \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -256,6 +370,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -299,9 +414,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -313,16 +430,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -330,6 +456,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@ @@ -342,8 +470,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -351,6 +485,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -391,25 +526,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -419,12 +560,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -442,9 +586,11 @@ 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@ @@ -454,7 +600,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -466,8 +612,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@ @@ -516,6 +664,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -526,18 +675,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -553,7 +707,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -567,7 +724,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -601,15 +760,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -619,6 +784,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -635,6 +801,7 @@ 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@ @@ -642,6 +809,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -683,6 +851,7 @@ 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@ @@ -699,6 +868,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -744,6 +915,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -753,6 +925,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -763,6 +937,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -772,6 +947,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -798,6 +975,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -814,6 +993,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -825,6 +1005,7 @@ 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@ @@ -833,11 +1014,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -866,8 +1051,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -881,9 +1069,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -893,10 +1083,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -929,6 +1123,8 @@ 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@ +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@ @@ -936,6 +1132,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -1003,29 +1201,33 @@ SUBDIRS = noinst_HEADERS = noinst_LIBRARIES = noinst_LTLIBRARIES = libgnu.la -EXTRA_DIST = alloca.c alloca.in.h \ - $(top_srcdir)/build/aux/arg-nonnull.h argz.c argz.in.h btowc.c \ - $(top_srcdir)/build/aux/c++defs.h canonicalize-lgpl.c \ - ctype.in.h dosname.h errno.in.h float.in.h fnmatch.c \ - fnmatch.in.h fnmatch_loop.c getdelim.c getline.c getopt.c \ - getopt.in.h getopt1.c getopt_int.h \ - $(top_srcdir)/build/aux/gitlog-to-changelog isblank.c \ +EXTRA_DIST = alloca.c alloca.in.h argz.c argz.in.h btowc.c \ + canonicalize-lgpl.c ctype.in.h dosname.h errno.in.h fcntl.in.h \ + float.c float.in.h itold.c fnmatch.c fnmatch.in.h \ + fnmatch_loop.c getdelim.c getline.c getopt.c getopt.in.h \ + getopt1.c getopt_int.h gettimeofday.c \ + $(top_srcdir)/build/ac-aux/gitlog-to-changelog isblank.c \ langinfo.in.h config.charset ref-add.sin ref-del.sin \ - locale.in.h lstat.c malloc.c malloc.c malloca.h \ + locale.in.h localeconv.c lstat.c malloc.c malloc.c malloca.h \ malloca.valgrind mbrtowc.c mbsinit.c mbsrtowcs-impl.h \ mbsrtowcs-state.c mbsrtowcs.c mbtowc-impl.h mbtowc.c memchr.c \ - memchr.valgrind mempcpy.c nl_langinfo.c pathmax.h readlink.c \ - realloc.c regcomp.c regex.c regex.h regex_internal.c \ - regex_internal.h regexec.c safe-alloc.c safe-alloc.h \ - getfilecon.c stat.c stdbool.in.h stddef.in.h stdint.in.h \ - stdio.in.h stdlib.in.h stpcpy.c stpncpy.c streq.h string.in.h \ - strndup.c strnlen.c str-two-way.h strstr.c sys_stat.in.h \ - sys_wait.in.h time.in.h unistd.in.h \ - $(top_srcdir)/build/aux/unused-parameter.h asnprintf.c \ - float+.h printf-args.c printf-args.h printf-parse.c \ - printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \ - vasprintf.c $(top_srcdir)/build/aux/warn-on-use.h wchar.in.h \ - wcrtomb.c wctype.in.h + memchr.valgrind mempcpy.c mkstemp.c nl_langinfo.c pathmax.h \ + rawmemchr.c rawmemchr.valgrind readlink.c realloc.c regcomp.c \ + regex.c regex.h regex_internal.c regex_internal.h regexec.c \ + safe-alloc.h getfilecon.c \ + $(top_srcdir)/build/ac-aux/snippet/_Noreturn.h \ + $(top_srcdir)/build/ac-aux/snippet/arg-nonnull.h \ + $(top_srcdir)/build/ac-aux/snippet/c++defs.h \ + $(top_srcdir)/build/ac-aux/snippet/unused-parameter.h \ + $(top_srcdir)/build/ac-aux/snippet/warn-on-use.h stat.c \ + stdbool.in.h stddef.in.h stdint.in.h stdio.in.h stdlib.in.h \ + stpcpy.c stpncpy.c strchrnul.c strchrnul.valgrind streq.h \ + string.in.h strndup.c strnlen.c str-two-way.h strstr.c \ + sys_stat.in.h sys_time.in.h sys_types.in.h sys_wait.in.h \ + tempname.h time.in.h unistd.in.h asnprintf.c float+.h \ + printf-args.c printf-args.h printf-parse.c printf-parse.h \ + vasnprintf.c vasnprintf.h asprintf.c vasprintf.c verify.h \ + wchar.in.h wcrtomb.c wctype.in.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 @@ -1041,24 +1243,26 @@ EXTRA_DIST = alloca.c alloca.in.h \ # 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 $(ARGZ_H) c++defs.h \ - configmake.h ctype.h $(ERRNO_H) $(FLOAT_H) $(FNMATCH_H) \ - $(GETOPT_H) langinfo.h locale.h selinux/selinux.h \ - $(SELINUX_CONTEXT_H) $(STDBOOL_H) $(STDDEF_H) $(STDINT_H) \ - stdio.h stdlib.h string.h sys/stat.h sys/wait.h time.h \ - unistd.h unused-parameter.h warn-on-use.h wchar.h wctype.h +BUILT_SOURCES = $(ALLOCA_H) $(ARGZ_H) configmake.h ctype.h $(ERRNO_H) \ + fcntl.h $(FLOAT_H) $(FNMATCH_H) $(GETOPT_H) langinfo.h \ + locale.h selinux/selinux.h $(SELINUX_CONTEXT_H) arg-nonnull.h \ + c++defs.h unused-parameter.h warn-on-use.h $(STDBOOL_H) \ + $(STDDEF_H) $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h \ + sys/time.h sys/types.h sys/wait.h time.h unistd.h wchar.h \ + wctype.h SUFFIXES = .sed .sin -MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \ - arg-nonnull.h-t argz.h argz.h-t c++defs.h c++defs.h-t ctype.h \ - ctype.h-t errno.h errno.h-t float.h float.h-t fnmatch.h \ - fnmatch.h-t getopt.h getopt.h-t langinfo.h langinfo.h-t \ - locale.h locale.h-t selinux/selinux.h selinux/selinux.h-t \ - selinux/context.h selinux/context.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 sys/stat.h \ - sys/stat.h-t sys/wait.h sys/wait.h-t time.h time.h-t unistd.h \ - unistd.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 \ +MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t argz.h \ + argz.h-t ctype.h ctype.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 \ + langinfo.h langinfo.h-t locale.h locale.h-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 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 sys/stat.h sys/stat.h-t sys/time.h \ + sys/time.h-t sys/types.h sys/types.h-t sys/wait.h sys/wait.h-t \ + time.h time.h-t unistd.h unistd.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 \ @@ -1068,25 +1272,31 @@ MAINTAINERCLEANFILES = AM_CPPFLAGS = AM_CFLAGS = libgnu_la_SOURCES = gettext.h localcharset.h localcharset.c malloca.c \ - se-context.in.h se-selinux.in.h size_max.h strnlen1.h \ - strnlen1.c verify.h xsize.h + safe-alloc.c se-context.in.h se-selinux.in.h size_max.h \ + strnlen1.h strnlen1.c tempname.c xsize.h libgnu_la_LIBADD = $(gl_LTLIBOBJS) @LTALLOCA@ libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) @LTALLOCA@ EXTRA_libgnu_la_SOURCES = alloca.c argz.c btowc.c canonicalize-lgpl.c \ - fnmatch.c fnmatch_loop.c getdelim.c getline.c getopt.c \ - getopt1.c isblank.c lstat.c malloc.c malloc.c mbrtowc.c \ - mbsinit.c mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c \ - mempcpy.c nl_langinfo.c readlink.c realloc.c regcomp.c regex.c \ - regex_internal.c regexec.c safe-alloc.c getfilecon.c stat.c \ - stpcpy.c stpncpy.c strndup.c strnlen.c strstr.c asnprintf.c \ - printf-args.c printf-parse.c vasnprintf.c asprintf.c \ - vasprintf.c wcrtomb.c + float.c itold.c fnmatch.c fnmatch_loop.c getdelim.c getline.c \ + getopt.c getopt1.c gettimeofday.c isblank.c localeconv.c \ + lstat.c malloc.c malloc.c mbrtowc.c mbsinit.c \ + mbsrtowcs-state.c mbsrtowcs.c mbtowc.c memchr.c mempcpy.c \ + mkstemp.c nl_langinfo.c rawmemchr.c readlink.c realloc.c \ + regcomp.c regex.c regex_internal.c regexec.c getfilecon.c \ + stat.c stpcpy.c stpncpy.c strchrnul.c strndup.c strnlen.c \ + strstr.c asnprintf.c printf-args.c printf-parse.c vasnprintf.c \ + asprintf.c vasprintf.c wcrtomb.c libgnu_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(LIB_SELINUX) \ $(LTLIBINTL) -ARG_NONNULL_H = arg-nonnull.h -CXXDEFS_H = c++defs.h 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/ac-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) @@ -1130,13 +1340,16 @@ clean-noinstLIBRARIES: 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 -libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) + @list='$(noinst_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + +libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES) $(EXTRA_libgnu_la_DEPENDENCIES) $(AM_V_CCLD)$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -1152,6 +1365,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/float.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fnmatch_loop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdelim.Plo@am__quote@ @@ -1159,8 +1373,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt1.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isblank.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/itold.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localeconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Plo@am__quote@ @@ -1171,9 +1388,11 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbtowc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mempcpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/realloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@ @@ -1184,10 +1403,12 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpcpy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stpncpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strstr.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@ @@ -1195,26 +1416,23 @@ distclean-compile: .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -1223,22 +1441,25 @@ clean-libtool: -rm -rf .libs _libs # 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; \ +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1253,57 +1474,12 @@ $(RECURSIVE_TARGETS): $(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: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -1319,12 +1495,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -1336,15 +1507,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -1353,6 +1520,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -1389,13 +1571,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; \ @@ -1432,10 +1611,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) @@ -1523,60 +1707,47 @@ 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-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \ - ctags ctags-recursive distclean distclean-compile \ - distclean-generic distclean-libtool 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 \ +.MAKE: $(am__recursive_targets) all check install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \ + check check-am clean clean-generic clean-libtool \ + clean-noinstLIBRARIES clean-noinstLTLIBRARIES cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool 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-libtool mostlyclean-local pdf pdf-am ps ps-am tags \ - tags-recursive uninstall uninstall-am uninstall-local + tags-am 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 $@ +@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 that works with the given compiler. -argz.h: argz.in.h - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/argz.in.h; \ - } > $@-t && \ - mv -f $@-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 $@ +@GL_GENERATE_ARGZ_H_TRUE@argz.h: argz.in.h $(top_builddir)/config.status +@GL_GENERATE_ARGZ_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ +@GL_GENERATE_ARGZ_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ +@GL_GENERATE_ARGZ_H_TRUE@ cat $(srcdir)/argz.in.h; \ +@GL_GENERATE_ARGZ_H_TRUE@ } > $@-t && \ +@GL_GENERATE_ARGZ_H_TRUE@ mv -f $@-t $@ +@GL_GENERATE_ARGZ_H_FALSE@argz.h: $(top_builddir)/config.status +@GL_GENERATE_ARGZ_H_FALSE@ rm -f $@ # Listed in the same order as the GNU makefile conventions, and # provided by autoconf 2.59c+. @@ -1613,18 +1784,15 @@ configmake.h: Makefile 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 + 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 $(CXXDEFS_H) $(WARN_ON_USE_H) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -1638,52 +1806,88 @@ ctype.h: ctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_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 +@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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + { 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; \ + -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. -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 $@ +@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. -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 $@ +@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 $(ARG_NONNULL_H) +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|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ + 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' \ @@ -1695,15 +1899,16 @@ getopt.h: getopt.in.h $(ARG_NONNULL_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) +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|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ + 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/@''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' \ @@ -1777,30 +1982,35 @@ charset.alias: config.charset # 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_SETLOCALE''@|$(GNULIB_SETLOCALE)|g' \ - -e 's|@''GNULIB_DUPLOCALE''@|$(GNULIB_DUPLOCALE)|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 $@ -selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ @@ -1809,125 +2019,183 @@ selinux/selinux.h: se-selinux.in.h $(UNUSED_PARAMETER_H) } > $@-t && \ chmod a-x $@-t && \ mv $@-t $@ -selinux/context.h: se-context.in.h $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux +@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/ac-aux/snippet/arg-nonnull.h $(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 && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build/ac-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. -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 $@ +@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. -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 $@ +@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. -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 $@ +@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 $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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' \ @@ -1940,11 +2208,14 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1965,6 +2236,7 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -1982,41 +2254,46 @@ stdio.h: stdio.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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_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' \ @@ -2029,7 +2306,10 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -2047,7 +2327,9 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ + -e 's|@''REPLACE_PTSNAME_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' \ @@ -2055,6 +2337,7 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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 && \ @@ -2062,50 +2345,55 @@ stdlib.h: stdlib.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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' \ + -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_MBSLEN''@|$(HAVE_MBSLEN)|g' \ + 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' \ @@ -2128,6 +2416,7 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -2147,26 +2436,29 @@ string.h: string.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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|@''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|@''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' \ @@ -2194,17 +2486,59 @@ sys/stat.h: sys_stat.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(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. +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 # has one that is incomplete. -sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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 '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; \ @@ -2213,18 +2547,19 @@ sys/wait.h: sys_wait.in.h $(CXXDEFS_H) $(WARN_ON_USE_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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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/@''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' \ @@ -2245,55 +2580,65 @@ time.h: time.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_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) +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|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ + 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|@''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' \ + -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' \ @@ -2302,6 +2647,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -2309,6 +2655,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -2318,6 +2665,7 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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' \ @@ -2325,10 +2673,12 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ -e 's|@''HAVE_DECL_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' \ @@ -2338,17 +2688,20 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -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_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' \ @@ -2365,74 +2718,58 @@ unistd.h: unistd.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_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 - $(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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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' \ + -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' \ @@ -2496,10 +2833,11 @@ wchar.h: wchar.in.h $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_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) +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/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ + 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' \ @@ -2516,6 +2854,7 @@ wctype.h: wctype.in.h $(CXXDEFS_H) $(WARN_ON_USE_H) -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ + -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ < $(srcdir)/wctype.in.h; \ diff --git a/gnulib/lib/alloca.c b/gnulib/lib/alloca.c index 0e5b796..ee0f018 100644 --- a/gnulib/lib/alloca.c +++ b/gnulib/lib/alloca.c @@ -93,25 +93,15 @@ long i00afunc (); static int stack_dir; /* 1 or -1 once known. */ # define STACK_DIR stack_dir -static void -find_stack_direction (char **ptr) +static int +find_stack_direction (int *addr, int depth) { - 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. */ - } + 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 */ @@ -154,10 +144,7 @@ alloca (size_t size) # if STACK_DIRECTION == 0 if (STACK_DIR == 0) /* Unknown growth direction. */ - { - char *addr = NULL; /* Address of first `dummy', once known. */ - find_stack_direction (&addr); - } + STACK_DIR = find_stack_direction (NULL, (size & 1) + 20); # endif /* Reclaim garbage, defined as all alloca'd storage that @@ -488,4 +475,4 @@ i00afunc (long address) # endif /* CRAY */ # endif /* no alloca */ -#endif /* not GCC version 2.1 */ +#endif /* not GCC 2 */ diff --git a/gnulib/lib/alloca.in.h b/gnulib/lib/alloca.in.h index 8012ce9..feafbc5 100644 --- a/gnulib/lib/alloca.in.h +++ b/gnulib/lib/alloca.in.h @@ -1,6 +1,6 @@ /* Memory allocation on the stack. - Copyright (C) 1995, 1999, 2001-2004, 2006-2011 Free Software Foundation, + Copyright (C) 1995, 1999, 2001-2004, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -14,9 +14,9 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, - USA. */ + 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. */ @@ -44,6 +44,13 @@ # define alloca _alloca # elif defined __DECC && defined __VMS # define alloca __ALLOCA +# elif defined __TANDEM && defined _TNS_E_TARGET +# ifdef __cplusplus +extern "C" +# endif +void *_alloca (unsigned short); +# pragma intrinsic (_alloca) +# define alloca _alloca # else # include # ifdef __cplusplus diff --git a/gnulib/lib/argz.c b/gnulib/lib/argz.c index 0239432..30bf9b8 100644 --- a/gnulib/lib/argz.c +++ b/gnulib/lib/argz.c @@ -1,5 +1,5 @@ /* Functions for dealing with '\0' separated arg vectors. - Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2011 Free Software + Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #include diff --git a/gnulib/lib/argz.in.h b/gnulib/lib/argz.in.h index 3a5adf3..95ba6a1 100644 --- a/gnulib/lib/argz.in.h +++ b/gnulib/lib/argz.in.h @@ -1,5 +1,5 @@ /* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995-2000, 2004, 2007, 2009-2011 Free Software Foundation, + Copyright (C) 1995-2000, 2004, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. diff --git a/gnulib/lib/asnprintf.c b/gnulib/lib/asnprintf.c index 0239f4a..2f0fd50 100644 --- a/gnulib/lib/asnprintf.c +++ b/gnulib/lib/asnprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #include diff --git a/gnulib/lib/asprintf.c b/gnulib/lib/asprintf.c index 84728b1..42b5e0e 100644 --- a/gnulib/lib/asprintf.c +++ b/gnulib/lib/asprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2007, 2009-2011 Free Software Foundation, + Copyright (C) 1999, 2002, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #include diff --git a/gnulib/lib/btowc.c b/gnulib/lib/btowc.c index d0fe426..7a96f7b 100644 --- a/gnulib/lib/btowc.c +++ b/gnulib/lib/btowc.c @@ -1,5 +1,5 @@ /* Convert unibyte character to wide character. - Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/canonicalize-lgpl.c b/gnulib/lib/canonicalize-lgpl.c index 2c5ca9a..d43f17b 100644 --- a/gnulib/lib/canonicalize-lgpl.c +++ b/gnulib/lib/canonicalize-lgpl.c @@ -1,5 +1,5 @@ /* Return the canonical absolute name of a given file. - Copyright (C) 1996-2011 Free Software Foundation, Inc. + Copyright (C) 1996-2012 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 @@ -16,6 +16,7 @@ along with this program. If not, see . */ #ifndef _LIBC +# define _GL_USE_STDLIB_ALLOC 1 # include #endif @@ -68,8 +69,6 @@ # endif # define __readlink readlink # define __set_errno(e) errno = (e) -/* Use the system functions, not the gnulib overrides in this file. */ -# undef malloc # ifndef MAXSYMLINKS # ifdef SYMLOOP_MAX # define MAXSYMLINKS SYMLOOP_MAX @@ -85,10 +84,10 @@ #if !FUNC_REALPATH_WORKS || defined _LIBC /* Return the canonical absolute name of file NAME. A canonical name - does not contain any `.', `..' components nor any repeated path + does not contain any ".", ".." components nor any repeated path separators ('/') or symlinks. All path components must exist. If RESOLVED is null, the result is malloc'd; otherwise, if the - canonical name is PATH_MAX chars or more, returns null with `errno' + canonical name is PATH_MAX chars or more, returns null with 'errno' set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars, returns the name in RESOLVED. If the name cannot be resolved and RESOLVED is non-NULL, it contains the path of the first component @@ -126,7 +125,7 @@ __realpath (const char *name, char *resolved) #else path_max = pathconf (name, _PC_PATH_MAX); if (path_max <= 0) - path_max = 1024; + path_max = 8192; #endif if (resolved == NULL) @@ -157,8 +156,12 @@ __realpath (const char *name, char *resolved) { rpath[0] = '/'; dest = rpath + 1; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/') - *dest++ = '/'; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT) + { + if (name[1] == '/' && name[2] != '/') + *dest++ = '/'; + *dest = '\0'; + } } for (start = end = name; *start; start = end) @@ -188,7 +191,7 @@ __realpath (const char *name, char *resolved) if (dest > rpath + 1) while ((--dest)[-1] != '/'); if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 - && *dest == '/') + && *dest == '/' && dest[1] != '/') dest++; } else @@ -299,8 +302,12 @@ __realpath (const char *name, char *resolved) if (buf[0] == '/') { dest = rpath + 1; /* It's an absolute symlink */ - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/') - *dest++ = '/'; + if (DOUBLE_SLASH_IS_DISTINCT_ROOT) + { + if (buf[1] == '/' && buf[2] != '/') + *dest++ = '/'; + *dest = '\0'; + } } else { @@ -309,7 +316,7 @@ __realpath (const char *name, char *resolved) if (dest > rpath + 1) while ((--dest)[-1] != '/'); if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 - && *dest == '/') + && *dest == '/' && dest[1] != '/') dest++; } } @@ -322,7 +329,8 @@ __realpath (const char *name, char *resolved) } if (dest > rpath + 1 && dest[-1] == '/') --dest; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/') + if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 + && *dest == '/' && dest[1] != '/') dest++; *dest = '\0'; diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset index 74f7fec..ea44c6c 100644 --- a/gnulib/lib/config.charset +++ b/gnulib/lib/config.charset @@ -1,7 +1,7 @@ #! /bin/sh # Output a system dependent table of character encoding aliases. # -# Copyright (C) 2000-2004, 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2004, 2006-2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -14,8 +14,7 @@ # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# with this program; if not, see . # # The table consists of lines of the form # ALIAS CANONICAL @@ -30,6 +29,8 @@ # 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 diff --git a/gnulib/lib/ctype.in.h b/gnulib/lib/ctype.in.h index d44d82a..86f4edb 100644 --- a/gnulib/lib/ctype.in.h +++ b/gnulib/lib/ctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms on which it is incomplete. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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. */ @@ -23,7 +22,7 @@ * */ -#ifndef _GL_CTYPE_H +#ifndef _@GUARD_PREFIX@_CTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -34,8 +33,8 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_CTYPE_H@ -#ifndef _GL_CTYPE_H -#define _GL_CTYPE_H +#ifndef _@GUARD_PREFIX@_CTYPE_H +#define _@GUARD_PREFIX@_CTYPE_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -54,5 +53,5 @@ _GL_WARN_ON_USE (isblank, "isblank is unportable - " # endif #endif -#endif /* _GL_CTYPE_H */ -#endif /* _GL_CTYPE_H */ +#endif /* _@GUARD_PREFIX@_CTYPE_H */ +#endif /* _@GUARD_PREFIX@_CTYPE_H */ diff --git a/gnulib/lib/dosname.h b/gnulib/lib/dosname.h index 70bb5c2..08c0c68 100644 --- a/gnulib/lib/dosname.h +++ b/gnulib/lib/dosname.h @@ -1,6 +1,6 @@ /* File names on MS-DOS/Windows systems. - Copyright (C) 2000-2001, 2004-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2001, 2004-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h index 2f9ac45..a7df255 100644 --- a/gnulib/lib/errno.in.h +++ b/gnulib/lib/errno.in.h @@ -1,6 +1,6 @@ /* A POSIX-like . - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,10 +13,9 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ -#ifndef _GL_ERRNO_H +#ifndef _@GUARD_PREFIX@_ERRNO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -26,57 +25,125 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_ERRNO_H@ -#ifndef _GL_ERRNO_H -#define _GL_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__ -/* 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 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 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 +# define GNULIB_defined_EWINSOCK 1 # endif @@ -147,6 +214,16 @@ # define GNULIB_defined_ENOTSUP 1 # endif +# ifndef ENETRESET +# define ENETRESET 2011 +# define GNULIB_defined_ENETRESET 1 +# endif + +# ifndef ECONNABORTED +# define ECONNABORTED 2012 +# define GNULIB_defined_ECONNABORTED 1 +# endif + # ifndef ESTALE # define ESTALE 2009 # define GNULIB_defined_ESTALE 1 @@ -162,6 +239,36 @@ # 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 -#endif /* _GL_ERRNO_H */ -#endif /* _GL_ERRNO_H */ +#endif /* _@GUARD_PREFIX@_ERRNO_H */ +#endif /* _@GUARD_PREFIX@_ERRNO_H */ diff --git a/gnulib/tests/fcntl.in.h b/gnulib/lib/fcntl.in.h similarity index 83% rename from gnulib/tests/fcntl.in.h rename to gnulib/lib/fcntl.in.h index 18cac45..14e5780 100644 --- a/gnulib/tests/fcntl.in.h +++ b/gnulib/lib/fcntl.in.h @@ -1,18 +1,18 @@ /* Like , but with non-working flags defined to 0. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-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 + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + GNU Lesser General Public License for more details. - You should have received a copy of the GNU General Public License + You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ /* written by Paul Eggert */ @@ -25,6 +25,8 @@ #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. @@ -40,8 +42,10 @@ #else /* Normal invocation convention. */ -#ifndef _GL_FCNTL_H +#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. @@ -55,13 +59,19 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FCNTL_H@ -#ifndef _GL_FCNTL_H -#define _GL_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. */ @@ -177,13 +187,12 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " /* Fix up the O_* macros. */ #if !defined O_DIRECT && defined O_DIRECTIO -/* Tru64 spells it `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. */ +/* Mingw spells it 'O_NOINHERIT'. */ # define O_CLOEXEC O_NOINHERIT #endif @@ -219,6 +228,19 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # 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 @@ -247,6 +269,11 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " # define O_TTY_INIT 0 #endif +#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) +# 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 @@ -303,6 +330,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - " #endif -#endif /* _GL_FCNTL_H */ -#endif /* _GL_FCNTL_H */ +#endif /* _@GUARD_PREFIX@_FCNTL_H */ +#endif /* _@GUARD_PREFIX@_FCNTL_H */ #endif diff --git a/gnulib/lib/float+.h b/gnulib/lib/float+.h index f40544f..6933c4a 100644 --- a/gnulib/lib/float+.h +++ b/gnulib/lib/float+.h @@ -1,5 +1,5 @@ /* Supplemental information about the floating-point formats. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2007. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _FLOATPLUS_H #define _FLOATPLUS_H diff --git a/gnulib/lib/float.c b/gnulib/lib/float.c new file mode 100644 index 0000000..50276a5 --- /dev/null +++ b/gnulib/lib/float.c @@ -0,0 +1,33 @@ +/* Auxiliary definitions for . + Copyright (C) 2011-2012 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 Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#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/gnulib/lib/float.in.h b/gnulib/lib/float.in.h index f77a5ef..a769007 100644 --- a/gnulib/lib/float.in.h +++ b/gnulib/lib/float.in.h @@ -1,6 +1,6 @@ /* A correct . - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -15,7 +15,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#ifndef _GL_FLOAT_H +#ifndef _@GUARD_PREFIX@_FLOAT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -25,10 +25,11 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_FLOAT_H@ -#ifndef _GL_FLOAT_H -#define _GL_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 @@ -59,5 +60,129 @@ # define LDBL_MAX_10_EXP 4932 #endif -#endif /* _GL_FLOAT_H */ -#endif /* _GL_FLOAT_H */ +/* 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/gnulib/lib/fnmatch.c b/gnulib/lib/fnmatch.c index 83a1722..444b6d8 100644 --- a/gnulib/lib/fnmatch.c +++ b/gnulib/lib/fnmatch.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2007, 2009-2011 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -11,8 +11,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _LIBC # include @@ -42,7 +41,7 @@ (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) -/* For platform which support the ISO C amendement 1 functionality we +/* For platform which support the ISO C amendment 1 functionality we support user defined character classes. */ #if defined _LIBC || WIDE_CHAR_SUPPORT # include @@ -78,7 +77,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); 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, + 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 @@ -92,7 +91,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); # 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. */ + and the functions from ISO C amendment 1. */ # ifdef CHARCLASS_NAME_MAX # define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX # else @@ -119,7 +118,7 @@ extern int fnmatch (const char *pattern, const char *string, int flags); # endif # else -# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ +# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, 'xdigit'. */ # define IS_CHAR_CLASS(string) \ (STREQ (string, "alpha") || STREQ (string, "upper") \ @@ -168,7 +167,6 @@ static int posixly_correct; # endif # endif # define MEMCHR(S, C, N) memchr (S, C, N) -# define STRCOLL(S1, S2) strcoll (S1, S2) # include "fnmatch_loop.c" @@ -196,7 +194,6 @@ static int posixly_correct; # 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 diff --git a/gnulib/lib/fnmatch.in.h b/gnulib/lib/fnmatch.in.h index d5ebd70..0fcf991 100644 --- a/gnulib/lib/fnmatch.in.h +++ b/gnulib/lib/fnmatch.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2011 Free +/* Copyright (C) 1991-1993, 1996-1999, 2001-2003, 2005, 2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _FNMATCH_H #define _FNMATCH_H 1 @@ -32,23 +31,23 @@ extern "C" { #undef FNM_NOESCAPE #undef FNM_PERIOD -/* Bits set in the FLAGS argument to `fnmatch'. */ -#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */ +/* 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. */ +#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_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. */ +/* 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 + '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 diff --git a/gnulib/lib/fnmatch_loop.c b/gnulib/lib/fnmatch_loop.c index bbeb94d..580a320 100644 --- a/gnulib/lib/fnmatch_loop.c +++ b/gnulib/lib/fnmatch_loop.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1993, 1996-2006, 2009-2011 Free Software Foundation, Inc. +/* Copyright (C) 1991-1993, 1996-2006, 2009-2012 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 @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* Match STRING against the file name pattern PATTERN, returning zero if it matches, nonzero if not. */ @@ -200,6 +199,8 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, 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; @@ -214,7 +215,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, return FNM_NOMATCH; if (*n == L_('/') && (flags & FNM_FILE_NAME)) - /* `/' cannot be matched. */ + /* '/' cannot be matched. */ return FNM_NOMATCH; not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); @@ -380,7 +381,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, { /* We found a table entry. Now see whether the character we are currently at has the same - equivalance class value. */ + equivalence class value. */ int len = weights[idx & 0xffffff]; int32_t idx2; const UCHAR *np = (const UCHAR *) n; @@ -410,8 +411,13 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, } #endif else if (c == L_('\0')) - /* [ (unterminated) loses. */ - return FNM_NOMATCH; + { + /* [ unterminated, treat as normal character. */ + p = p_init; + n = n_init; + c = L_('['); + goto normal_match; + } else { bool is_range = false; @@ -629,7 +635,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, UCHAR cend = *p++; # ifdef WIDE_CHAR_VERSION - /* Search in the `names' array for the characters. */ + /* 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 @@ -832,7 +838,7 @@ FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, #else /* We use a boring value comparison of the character values. This is better than comparing using - `strcoll' since the latter would have surprising + 'strcoll' since the latter would have surprising and sometimes fatal consequences. */ UCHAR cend = *p++; @@ -1149,7 +1155,7 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, case L_('@'): do - /* I cannot believe it but `strcat' is actually acceptable + /* 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. */ @@ -1207,7 +1213,6 @@ EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, #undef END #undef MEMPCPY #undef MEMCHR -#undef STRCOLL #undef STRLEN #undef STRCAT #undef L_ diff --git a/gnulib/lib/getdelim.c b/gnulib/lib/getdelim.c index e00e9b5..5ac31f4 100644 --- a/gnulib/lib/getdelim.c +++ b/gnulib/lib/getdelim.c @@ -1,5 +1,5 @@ /* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2011 Free Software + Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or @@ -13,9 +13,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA - 02110-1301, USA. */ + along with this program; if not, see . */ /* Ported from glibc by Simon Josefsson. */ diff --git a/gnulib/lib/getfilecon.c b/gnulib/lib/getfilecon.c index c793367..968915a 100644 --- a/gnulib/lib/getfilecon.c +++ b/gnulib/lib/getfilecon.c @@ -1,5 +1,5 @@ /* wrap getfilecon, lgetfilecon, and fgetfilecon - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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 Jim Meyering */ diff --git a/gnulib/lib/getline.c b/gnulib/lib/getline.c index 9f9afec..d29b929 100644 --- a/gnulib/lib/getline.c +++ b/gnulib/lib/getline.c @@ -1,5 +1,5 @@ /* getline.c --- Implementation of replacement getline function. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -12,9 +12,7 @@ Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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. */ diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c index 9e79ad4..bf570fb 100644 --- a/gnulib/lib/getopt.c +++ b/gnulib/lib/getopt.c @@ -2,7 +2,7 @@ NOTE: getopt is part of the C library, so if you don't know what "Keep this file name-space clean" means, talk to drepper@gnu.org before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2011 Free Software + Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -41,15 +41,15 @@ # include #endif -/* This version of `getopt' appears to the caller like standard Unix `getopt' +/* 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, + 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 + Using 'getopt' or setting the environment variable POSIXLY_CORRECT disables permutation. Then the behavior is completely standard. @@ -58,24 +58,24 @@ #include "getopt_int.h" -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, +/* 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, + 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'. + and for communication between successive calls to 'getopt'. - On entry to `getopt', zero means this is the first call; initialize. + 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 + 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 + 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. */ @@ -137,7 +137,7 @@ extern char *__getopt_nonoption_flags; 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 + '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 @@ -154,7 +154,7 @@ exchange (char **argv, struct _getopt_data *d) 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' + /* 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) @@ -291,48 +291,48 @@ _getopt_initialize (int argc _GL_UNUSED, 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' + (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 + 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 + 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 + 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 + 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. + it is returned in 'optarg', otherwise 'optarg' is set to zero. - If OPTSTRING starts with `-' or `+', it requests different methods of + 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 `-'. + 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. + 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 + 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. @@ -409,7 +409,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, d->__last_nonopt = d->optind; } - /* The special ARGV-element `--' means premature end of options. + /* 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. */ @@ -479,23 +479,28 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, || !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 ambig = 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, nameend - d->__nextchar)) + if (!strncmp (p->name, d->__nextchar, namelen)) { - if ((unsigned int) (nameend - d->__nextchar) - == (unsigned int) strlen (p->name)) + if (namelen == (unsigned int) strlen (p->name)) { /* Exact match found. */ pfound = p; @@ -513,35 +518,71 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; + { + /* 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 && !exact) + 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; + char *buf = NULL; + size_t buflen = 0; - if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"), - argv[0], argv[d->optind]) >= 0) + FILE *fp = open_memstream (&buf, &buflen); + if (fp != NULL) { - _IO_flockfile (stderr); + fprintf (fp, + _("%s: option '%s' is ambiguous; possibilities:"), + argv[0], argv[d->optind]); - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; + do + { + fprintf (fp, " '--%s'", ambig_list->p->name); + ambig_list = ambig_list->next; + } + while (ambig_list != NULL); - __fxprintf (NULL, "%s", buf); + fputc_unlocked ('\n', fp); - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); + if (__builtin_expect (fclose (fp) != EOF, 1)) + { + _IO_flockfile (stderr); - free (buf); + 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"), + 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); @@ -550,6 +591,13 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, return '?'; } + while (ambig_list != NULL) + { + struct option_list *pn = ambig_list->next; + free (ambig_list); + ambig_list = pn; + } + if (pfound != NULL) { option_index = indfound; @@ -740,7 +788,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, char c = *d->__nextchar++; const char *temp = strchr (optstring, c); - /* Increment `optind' when we start to process its last character. */ + /* Increment 'optind' when we start to process its last character. */ if (*d->__nextchar == '\0') ++d->optind; @@ -791,6 +839,9 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, int indfound = 0; int option_index; + if (longopts == NULL) + goto no_longs; + /* This is an option that requires an argument. */ if (*d->__nextchar != '\0') { @@ -836,7 +887,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, return c; } else - /* We already incremented `d->optind' once; + /* We already incremented 'd->optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; @@ -998,8 +1049,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, } return pfound->val; } - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ + + no_longs: + d->__nextchar = NULL; + return 'W'; /* Let the application handle it. */ } if (temp[1] == ':') { @@ -1061,7 +1114,7 @@ _getopt_internal_r (int argc, char **argv, const char *optstring, c = '?'; } else - /* We already incremented `optind' once; + /* We already incremented 'optind' once; increment it again when taking next ARGV-elt as argument. */ d->optarg = argv[d->optind++]; d->__nextchar = NULL; @@ -1124,7 +1177,7 @@ __posix_getopt (int argc, char *const *argv, const char *optstring) #ifdef TEST /* Compile with -DTEST to make an executable for use in testing - the above definition of `getopt'. */ + the above definition of 'getopt'. */ int main (int argc, char **argv) diff --git a/gnulib/lib/getopt.in.h b/gnulib/lib/getopt.in.h index 479493c..09c0a12 100644 --- a/gnulib/lib/getopt.in.h +++ b/gnulib/lib/getopt.in.h @@ -1,5 +1,5 @@ /* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2011 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -16,7 +16,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#ifndef _GL_GETOPT_H +#ifndef _@GUARD_PREFIX@_GETOPT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -32,10 +32,10 @@ # undef _GL_SYSTEM_GETOPT #endif -#ifndef _GL_GETOPT_H +#ifndef _@GUARD_PREFIX@_GETOPT_H #ifndef __need_getopt -# define _GL_GETOPT_H 1 +# define _@GUARD_PREFIX@_GETOPT_H 1 #endif /* Standalone applications should #define __GETOPT_PREFIX to an @@ -82,7 +82,7 @@ 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', + 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. @@ -128,29 +128,29 @@ extern "C" { #endif -/* For communication from `getopt' to the caller. - When `getopt' finds an option that takes an argument, +/* 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, + 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'. + and for communication between successive calls to 'getopt'. - On entry to `getopt', zero means this is the first call; initialize. + 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 + 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 + 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 +/* Callers store zero here to inhibit the error message 'getopt' prints for unrecognized options. */ extern int opterr; @@ -162,24 +162,24 @@ 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 + of 'struct option' terminated by an element containing a name which is zero. - The field `has_arg' is: + 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 + 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 + 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. */ + 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 @@ -194,7 +194,7 @@ struct option # define GNULIB_defined_struct_option 1 # endif -/* Names for the values of the `has_arg' field of `struct option'. */ +/* Names for the values of the 'has_arg' field of 'struct option'. */ # define no_argument 0 # define required_argument 1 @@ -208,23 +208,23 @@ struct option 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 + 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'. + 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'. + 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 + 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 + 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 + '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) @@ -249,5 +249,5 @@ extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, /* Make sure we later can get all the definitions and declarations. */ #undef __need_getopt -#endif /* getopt.h */ -#endif /* getopt.h */ +#endif /* _@GUARD_PREFIX@_GETOPT_H */ +#endif /* _@GUARD_PREFIX@_GETOPT_H */ diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c index 5cceeb4..cd053bd 100644 --- a/gnulib/lib/getopt1.c +++ b/gnulib/lib/getopt1.c @@ -1,5 +1,5 @@ /* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2011 Free Software + Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -141,11 +141,11 @@ main (int argc, char **argv) break; case 'c': - printf ("option c with value `%s'\n", optarg); + printf ("option c with value '%s'\n", optarg); break; case 'd': - printf ("option d with value `%s'\n", optarg); + printf ("option d with value '%s'\n", optarg); break; case '?': diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h index 17be98e..ce0853d 100644 --- a/gnulib/lib/getopt_int.h +++ b/gnulib/lib/getopt_int.h @@ -1,5 +1,5 @@ /* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2011 Free Software + Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -40,7 +40,7 @@ extern int _getopt_internal (int ___argc, char **___argv, 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 + 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 @@ -52,12 +52,12 @@ extern int _getopt_internal (int ___argc, char **___argv, 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 + 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. */ + 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 { @@ -99,8 +99,8 @@ struct _getopt_data /* 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. */ + 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; diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h index c6b7925..151ba4f 100644 --- a/gnulib/lib/gettext.h +++ b/gnulib/lib/gettext.h @@ -1,5 +1,5 @@ /* Convenience header for conditional use of GNU . - Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2011 Free Software + Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 @@ -184,9 +183,12 @@ npgettext_aux (const char *domain, #include -#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ - (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) +#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ + /* || __STDC_VERSION__ >= 199901L */ ) +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 +#else +# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 +#endif #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include diff --git a/gnulib/lib/gettimeofday.c b/gnulib/lib/gettimeofday.c new file mode 100644 index 0000000..17fcd43 --- /dev/null +++ b/gnulib/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-2012 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . */ + +/* 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/gnulib/lib/isblank.c b/gnulib/lib/isblank.c index b7e1289..cc7fefa 100644 --- a/gnulib/lib/isblank.c +++ b/gnulib/lib/isblank.c @@ -1,6 +1,6 @@ /* Test whether a character is a blank. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gnulib/lib/itold.c b/gnulib/lib/itold.c new file mode 100644 index 0000000..8bc02ff --- /dev/null +++ b/gnulib/lib/itold.c @@ -0,0 +1,28 @@ +/* Replacement for 'int' to 'long double' conversion routine. + Copyright (C) 2011-2012 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 Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#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/gnulib/lib/langinfo.in.h b/gnulib/lib/langinfo.in.h index 0f5d5dc..30b5560 100644 --- a/gnulib/lib/langinfo.in.h +++ b/gnulib/lib/langinfo.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,15 +12,14 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* * POSIX for platforms that lack it or have an incomplete one. * */ -#ifndef _GL_LANGINFO_H +#ifndef _@GUARD_PREFIX@_LANGINFO_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -32,8 +31,8 @@ # @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ #endif -#ifndef _GL_LANGINFO_H -#define _GL_LANGINFO_H +#ifndef _@GUARD_PREFIX@_LANGINFO_H +#define _@GUARD_PREFIX@_LANGINFO_H #if !@HAVE_LANGINFO_H@ @@ -173,5 +172,5 @@ _GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " #endif -#endif /* _GL_LANGINFO_H */ -#endif /* _GL_LANGINFO_H */ +#endif /* _@GUARD_PREFIX@_LANGINFO_H */ +#endif /* _@GUARD_PREFIX@_LANGINFO_H */ diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c index 3a49593..48e8a48 100644 --- a/gnulib/lib/localcharset.c +++ b/gnulib/lib/localcharset.c @@ -1,6 +1,6 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2006, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ /* Written by Bruno Haible . */ @@ -30,11 +29,11 @@ #include #if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET -# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */ +# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ #endif #if defined _WIN32 || defined __WIN32__ -# define WIN32_NATIVE +# define WINDOWS_NATIVE #endif #if defined __EMX__ @@ -44,7 +43,7 @@ # endif #endif -#if !defined WIN32_NATIVE +#if !defined WINDOWS_NATIVE # include # if HAVE_LANGINFO_CODESET # include @@ -57,7 +56,7 @@ # define WIN32_LEAN_AND_MEAN # include # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_NATIVE # define WIN32_LEAN_AND_MEAN # include #endif @@ -83,7 +82,7 @@ #endif #if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Win32, Cygwin, OS/2, DOS */ + /* Native Windows, Cygwin, OS/2, DOS */ # define ISSLASH(C) ((C) == '/' || (C) == '\\') #endif @@ -123,7 +122,7 @@ get_charset_aliases (void) cp = charset_aliases; if (cp == NULL) { -#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__) +#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) const char *dir; const char *base = "charset.alias"; char *file_name; @@ -308,7 +307,7 @@ get_charset_aliases (void) "DECKOREAN" "\0" "EUC-KR" "\0"; # endif -# if defined WIN32_NATIVE || defined __CYGWIN__ +# 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. */ @@ -360,7 +359,7 @@ locale_charset (void) const char *codeset; const char *aliases; -#if !(defined WIN32_NATIVE || defined OS2) +#if !(defined WINDOWS_NATIVE || defined OS2) # if HAVE_LANGINFO_CODESET @@ -407,10 +406,10 @@ locale_charset (void) } } - /* 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). + /* 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 @@ -453,12 +452,12 @@ locale_charset (void) # endif -#elif defined WIN32_NATIVE +#elif defined WINDOWS_NATIVE static char buf[2 + 10 + 1]; - /* Woe32 has a function returning the locale's codepage as a number: - GetACP(). + /* 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. diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h index a38a1f6..7c30e69 100644 --- a/gnulib/lib/localcharset.h +++ b/gnulib/lib/localcharset.h @@ -1,5 +1,5 @@ /* Determine a canonical name for the current locale's character encoding. - Copyright (C) 2000-2003, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2009-2012 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 @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _LOCALCHARSET_H #define _LOCALCHARSET_H diff --git a/gnulib/lib/locale.in.h b/gnulib/lib/locale.in.h index 266b093..605b3fe 100644 --- a/gnulib/lib/locale.in.h +++ b/gnulib/lib/locale.in.h @@ -1,5 +1,5 @@ /* A POSIX . - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -14,7 +14,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#ifndef _GL_LOCALE_H +#ifndef _@GUARD_PREFIX@_LOCALE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -24,13 +24,13 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_LOCALE_H@ -#ifndef _GL_LOCALE_H -#define _GL_LOCALE_H +#ifndef _@GUARD_PREFIX@_LOCALE_H +#define _@GUARD_PREFIX@_LOCALE_H /* NetBSD 5.0 mis-defines NULL. */ #include -/* MacOS X 10.5 defines the locale_t type in . */ +/* Mac OS X 10.5 defines the locale_t type in . */ #if @HAVE_XLOCALE_H@ # include #endif @@ -47,6 +47,111 @@ # 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) @@ -92,5 +197,5 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " # endif #endif -#endif /* _GL_LOCALE_H */ -#endif /* _GL_LOCALE_H */ +#endif /* _@GUARD_PREFIX@_LOCALE_H */ +#endif /* _@GUARD_PREFIX@_LOCALE_H */ diff --git a/gnulib/lib/localeconv.c b/gnulib/lib/localeconv.c new file mode 100644 index 0000000..1e1640f --- /dev/null +++ b/gnulib/lib/localeconv.c @@ -0,0 +1,103 @@ +/* Query locale dependent information for formatting numbers. + Copyright (C) 2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#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/gnulib/lib/lstat.c b/gnulib/lib/lstat.c index bfb2b02..cee2649 100644 --- a/gnulib/lib/lstat.c +++ b/gnulib/lib/lstat.c @@ -1,6 +1,6 @@ /* Work around a bug of lstat on some systems - Copyright (C) 1997-2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 1997-2006, 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -17,6 +17,10 @@ /* 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 @@ -27,7 +31,6 @@ typedef int dummy; #else /* HAVE_LSTAT */ /* Get the original definition of lstat. It might be defined as a macro. */ -# define __need_system_sys_stat_h # include # include # undef __need_system_sys_stat_h @@ -39,17 +42,20 @@ orig_lstat (const char *filename, struct stat *buf) } /* Specification. */ -# include +/* 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 + "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)', + '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, diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c index bc84c41..1edf22d 100644 --- a/gnulib/lib/malloc.c +++ b/gnulib/lib/malloc.c @@ -1,6 +1,6 @@ /* malloc() function that is glibc compatible. - Copyright (C) 1997-1998, 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,11 +13,11 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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 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 @@ -28,14 +28,10 @@ # 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. */ diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c index 32d3a30..c80c3a2 100644 --- a/gnulib/lib/malloca.c +++ b/gnulib/lib/malloca.c @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003, 2006-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2006-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -13,18 +13,17 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ +#define _GL_USE_STDLIB_ALLOC 1 #include /* Specification. */ #include "malloca.h" -#include "verify.h" +#include -/* Use the system functions, not the gnulib overrides in this file. */ -#undef malloc +#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 @@ -87,7 +86,7 @@ mmalloca (size_t n) ((int *) p)[-1] = MAGIC_NUMBER; /* Enter p into the hash table. */ - slot = (unsigned long) p % HASH_TABLE_SIZE; + slot = (uintptr_t) p % HASH_TABLE_SIZE; ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; mmalloca_results[slot] = p; @@ -120,7 +119,7 @@ freea (void *p) { /* 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; + size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; void **chain = &mmalloca_results[slot]; for (; *chain != NULL;) { diff --git a/gnulib/lib/malloca.h b/gnulib/lib/malloca.h index 086e903..160f146 100644 --- a/gnulib/lib/malloca.h +++ b/gnulib/lib/malloca.h @@ -1,5 +1,5 @@ /* Safe automatic memory allocation. - Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2003. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _MALLOCA_H #define _MALLOCA_H diff --git a/gnulib/lib/mbrtowc.c b/gnulib/lib/mbrtowc.c index b087cf3..ad53b4c 100644 --- a/gnulib/lib/mbrtowc.c +++ b/gnulib/lib/mbrtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 1999-2002, 2005-2011 Free Software Foundation, Inc. + Copyright (C) 1999-2002, 2005-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -128,7 +128,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { const char *encoding = locale_charset (); - if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) + 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]; @@ -185,7 +185,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) /* 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 (STREQ_OPT (encoding, + "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) { if (m == 1) { @@ -208,9 +209,12 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } 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 (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) { @@ -221,7 +225,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) + if (STREQ_OPT (encoding, + "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) { if (m == 1) { @@ -239,7 +244,8 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) + if (STREQ_OPT (encoding, + "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) { if (m == 1) { @@ -272,7 +278,7 @@ mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) } goto invalid; } - if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) + if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) { if (m == 1) { @@ -335,7 +341,7 @@ rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) { static mbstate_t internal_state; - /* Override mbrtowc's internal state. We can not call mbsinit() on the + /* 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; diff --git a/gnulib/lib/mbsinit.c b/gnulib/lib/mbsinit.c index f48af0e..ff1b230 100644 --- a/gnulib/lib/mbsinit.c +++ b/gnulib/lib/mbsinit.c @@ -1,5 +1,5 @@ /* Test for initial conversion state. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/mbsrtowcs-impl.h b/gnulib/lib/mbsrtowcs-impl.h index 8c3224d..0585291 100644 --- a/gnulib/lib/mbsrtowcs-impl.h +++ b/gnulib/lib/mbsrtowcs-impl.h @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/mbsrtowcs-state.c b/gnulib/lib/mbsrtowcs-state.c index a75f31e..b4c67cb 100644 --- a/gnulib/lib/mbsrtowcs-state.c +++ b/gnulib/lib/mbsrtowcs-state.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify @@ -22,7 +22,7 @@ /* 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, + 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 diff --git a/gnulib/lib/mbsrtowcs.c b/gnulib/lib/mbsrtowcs.c index eeba1c2..03f5077 100644 --- a/gnulib/lib/mbsrtowcs.c +++ b/gnulib/lib/mbsrtowcs.c @@ -1,5 +1,5 @@ /* Convert string to wide string. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/mbtowc-impl.h b/gnulib/lib/mbtowc-impl.h index d81db18..6a859bc 100644 --- a/gnulib/lib/mbtowc-impl.h +++ b/gnulib/lib/mbtowc-impl.h @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/mbtowc.c b/gnulib/lib/mbtowc.c index ab6c3eb..744954b 100644 --- a/gnulib/lib/mbtowc.c +++ b/gnulib/lib/mbtowc.c @@ -1,5 +1,5 @@ /* Convert multibyte character to wide character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c index 05cf97f..e7d5b10 100644 --- a/gnulib/lib/memchr.c +++ b/gnulib/lib/memchr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2011 +/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2012 Free Software Foundation, Inc. Based on strlen implementation by Torbjorn Granlund (tege@sics.se), diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c index d8e7ffb..c68331a 100644 --- a/gnulib/lib/mempcpy.c +++ b/gnulib/lib/mempcpy.c @@ -1,5 +1,5 @@ /* Copy memory area and return pointer after last written byte. - Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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/gnulib/lib/mkstemp.c b/gnulib/lib/mkstemp.c new file mode 100644 index 0000000..541425f --- /dev/null +++ b/gnulib/lib/mkstemp.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2012 Free Software + Foundation, Inc. + This file is derived from the one in the GNU C Library. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#if !_LIBC +# include +#endif + +#include + +#if !_LIBC +# include "tempname.h" +# define __gen_tempname gen_tempname +# ifndef __GT_FILE +# define __GT_FILE GT_FILE +# endif +#endif + +#include + +#ifndef __GT_FILE +# define __GT_FILE 0 +#endif + +/* Generate a unique temporary file name from XTEMPLATE. + The last six characters of XTEMPLATE must be "XXXXXX"; + they are replaced with a string that makes the file name unique. + Then open the file and return a fd. + + If you are creating temporary files which will later be removed, + consider using the clean-temp module, which avoids several pitfalls + of using mkstemp directly. */ +int +mkstemp (char *xtemplate) +{ + return __gen_tempname (xtemplate, 0, 0, __GT_FILE); +} diff --git a/gnulib/lib/nl_langinfo.c b/gnulib/lib/nl_langinfo.c index bb2cf90..d4e4173 100644 --- a/gnulib/lib/nl_langinfo.c +++ b/gnulib/lib/nl_langinfo.c @@ -1,6 +1,6 @@ /* nl_langinfo() replacement: query locale dependent information. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -141,7 +141,8 @@ nl_langinfo (nl_item item) { static char buf[2 + 10 + 1]; - /* Woe32 has a function returning the locale's codepage as a number. */ + /* The Windows API has a function returning the locale's codepage as + a number. */ sprintf (buf, "CP%u", GetACP ()); return buf; } diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h index 4d8fc3b..c16bbf6 100644 --- a/gnulib/lib/pathmax.h +++ b/gnulib/lib/pathmax.h @@ -1,5 +1,5 @@ /* Define PATH_MAX somehow. Requires sys/types.h. - Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2011 Free Software + Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,12 +13,32 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + 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 @@ -27,11 +47,6 @@ # define _POSIX_PATH_MAX 256 # endif -# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF -# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \ - : pathconf ("/", _PC_PATH_MAX)) -# endif - /* Don't include sys/param.h if it already has been. */ # if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN # include @@ -41,8 +56,28 @@ # define PATH_MAX MAXPATHLEN # endif -# ifndef PATH_MAX -# define PATH_MAX _POSIX_PATH_MAX +# 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/gnulib/lib/printf-args.c b/gnulib/lib/printf-args.c index f913a96..d40ef25 100644 --- a/gnulib/lib/printf-args.c +++ b/gnulib/lib/printf-args.c @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2011 Free Software + Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + 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. diff --git a/gnulib/lib/printf-args.h b/gnulib/lib/printf-args.h index 3b8d9af..3e192a1 100644 --- a/gnulib/lib/printf-args.h +++ b/gnulib/lib/printf-args.h @@ -1,5 +1,5 @@ /* Decomposed printf argument list. - Copyright (C) 1999, 2002-2003, 2006-2007, 2011 Free Software + Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _PRINTF_ARGS_H #define _PRINTF_ARGS_H diff --git a/gnulib/lib/printf-parse.c b/gnulib/lib/printf-parse.c index a147412..5bc6ef6 100644 --- a/gnulib/lib/printf-parse.c +++ b/gnulib/lib/printf-parse.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999-2000, 2002-2003, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1999-2000, 2002-2003, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ /* This file can be parametrized with the following macros: CHAR_T The element type of the format string. @@ -402,7 +401,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) cp++; } #if defined __APPLE__ && defined __MACH__ - /* On MacOS X 10.3, PRIdMAX is defined as "qd". + /* On Mac OS X 10.3, PRIdMAX is defined as "qd". We cannot change it to "lld" because PRIdMAX must also be understood by the system's printf routines. */ else if (*cp == 'q') @@ -421,7 +420,7 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) } #endif #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Win32, PRIdMAX is defined as "I64d". + /* 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') diff --git a/gnulib/lib/printf-parse.h b/gnulib/lib/printf-parse.h index b8583e3..627bb98 100644 --- a/gnulib/lib/printf-parse.h +++ b/gnulib/lib/printf-parse.h @@ -1,5 +1,5 @@ /* Parse printf format string. - Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2011 Free Software + Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _PRINTF_PARSE_H #define _PRINTF_PARSE_H diff --git a/gnulib/lib/rawmemchr.c b/gnulib/lib/rawmemchr.c new file mode 100644 index 0000000..f7416ca --- /dev/null +++ b/gnulib/lib/rawmemchr.c @@ -0,0 +1,136 @@ +/* Searching in a string. + Copyright (C) 2008-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Find the first occurrence of C in S. */ +void * +rawmemchr (const void *s, int c_in) +{ + /* 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 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; + (size_t) char_ptr % sizeof (longword) != 0; + ++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 NUL or + 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. + + The test whether any byte in longword1 is zero is equivalent + to testing whether tmp is nonzero. + + This test can read beyond the end of a string, depending on where + C_IN is encountered. However, this is considered safe since the + initialization phase ensured that the read will be aligned, + therefore, the read will not cross page boundaries and will not + cause a fault. */ + + while (1) + { + longword longword1 = *longword_ptr ^ repeated_c; + + if ((((longword1 - repeated_one) & ~longword1) + & (repeated_one << 7)) != 0) + break; + longword_ptr++; + } + + char_ptr = (const unsigned char *) longword_ptr; + + /* At this point, we know that 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. */ + + char_ptr = (unsigned char *) longword_ptr; + while (*char_ptr != c) + char_ptr++; + return (void *) char_ptr; +} diff --git a/gnulib/lib/rawmemchr.valgrind b/gnulib/lib/rawmemchr.valgrind new file mode 100644 index 0000000..6363923 --- /dev/null +++ b/gnulib/lib/rawmemchr.valgrind @@ -0,0 +1,12 @@ +# Suppress a valgrind message about use of uninitialized memory in rawmemchr(). +# This use is OK because it provides only a speedup. +{ + rawmemchr-value4 + Memcheck:Value4 + fun:rawmemchr +} +{ + rawmemchr-value8 + Memcheck:Value8 + fun:rawmemchr +} diff --git a/gnulib/lib/readlink.c b/gnulib/lib/readlink.c index 8470f06..1e58aa8 100644 --- a/gnulib/lib/readlink.c +++ b/gnulib/lib/readlink.c @@ -1,5 +1,5 @@ /* Stub for readlink(). - Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c index e0a7a16..6e9a51e 100644 --- a/gnulib/lib/realloc.c +++ b/gnulib/lib/realloc.c @@ -1,6 +1,6 @@ /* realloc() function that is glibc compatible. - Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2011 Free Software + Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify @@ -18,6 +18,7 @@ /* 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. */ @@ -34,23 +35,10 @@ # 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. */ diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin index 12835d0..e4e6c79 100644 --- a/gnulib/lib/ref-add.sin +++ b/gnulib/lib/ref-add.sin @@ -1,6 +1,6 @@ # Add this package to a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# with this program; if not, see . # # Written by Bruno Haible . # diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin index 360e4d6..73d01d5 100644 --- a/gnulib/lib/ref-del.sin +++ b/gnulib/lib/ref-del.sin @@ -1,6 +1,6 @@ # Remove this package from a list of references stored in a text file. # -# Copyright (C) 2000, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000, 2009-2012 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ # GNU Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public License along -# with this program; if not, write to the Free Software Foundation, -# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# with this program; if not, see . # # Written by Bruno Haible . # diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c index b6dfe4a..707b123 100644 --- a/gnulib/lib/regcomp.c +++ b/gnulib/lib/regcomp.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, size_t length, reg_syntax_t syntax); @@ -206,7 +205,7 @@ static const size_t __re_error_msgid_idx[] = 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 + Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields are set in BUFP on entry. */ #ifdef _LIBC @@ -241,7 +240,7 @@ re_compile_pattern (const char *pattern, size_t length, weak_alias (__re_compile_pattern, re_compile_pattern) #endif -/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can +/* 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 @@ -273,7 +272,7 @@ int re_compile_fastmap (bufp) struct re_pattern_buffer *bufp; { - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; + re_dfa_t *dfa = bufp->buffer; char *fastmap = bufp->fastmap; memset (fastmap, '\0', sizeof (char) * SBC_MAX); @@ -307,7 +306,7 @@ 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; + 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) @@ -439,15 +438,15 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, 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 + '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. + '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. @@ -586,19 +585,23 @@ weak_alias (__regerror, regerror) 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 +# ifdef __GNUC__ + [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 +# elif 2 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 1 * BITSET_WORD_BITS < ASCII_CHARS +# elif 1 * BITSET_WORD_BITS < ASCII_CHARS BITSET_WORD_MAX, -# endif +# endif (BITSET_WORD_MAX >> (SBC_MAX % BITSET_WORD_BITS == 0 ? 0 : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) +# endif }; #endif @@ -657,7 +660,7 @@ void regfree (preg) regex_t *preg; { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *dfa = preg->buffer; if (BE (dfa != NULL, 1)) free_dfa_content (dfa); preg->buffer = NULL; @@ -718,7 +721,7 @@ re_comp (s) + __re_error_msgid_idx[(int) REG_ESPACE]); } - /* Since `re_exec' always passes NULL for the `regs' argument, we + /* 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. */ @@ -729,7 +732,7 @@ re_comp (s) if (!ret) return NULL; - /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */ + /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); } @@ -764,7 +767,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length, preg->regs_allocated = REGS_UNALLOCATED; /* Initialize the dfa. */ - dfa = (re_dfa_t *) preg->buffer; + dfa = preg->buffer; if (BE (preg->allocated < sizeof (re_dfa_t), 0)) { /* If zero allocated, but buffer is non-null, try to realloc @@ -775,7 +778,7 @@ re_compile_internal (regex_t *preg, const char * pattern, size_t length, if (dfa == NULL) return REG_ESPACE; preg->allocated = sizeof (re_dfa_t); - preg->buffer = (unsigned char *) dfa; + preg->buffer = dfa; } preg->used = sizeof (re_dfa_t); @@ -850,7 +853,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) { __re_size_t table_size; #ifndef _LIBC - char *codeset_name; + const char *codeset_name; #endif #ifdef RE_ENABLE_I18N size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); @@ -873,7 +876,7 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) 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)) + if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0)) return REG_ESPACE; dfa->nodes_alloc = pat_len + 1; @@ -896,8 +899,10 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) != 0); #else codeset_name = nl_langinfo (CODESET); - if (strcasecmp (codeset_name, "UTF-8") == 0 - || strcasecmp (codeset_name, "UTF8") == 0) + 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 @@ -947,9 +952,43 @@ 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) + int i = 0; + int j; + int ch = 0; + 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; @@ -960,7 +999,7 @@ init_word_char (re_dfa_t *dfa) static void free_workarea_compile (regex_t *preg) { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *dfa = preg->buffer; bin_tree_storage_t *storage, *next; for (storage = dfa->str_tree_storage; storage; storage = next) { @@ -1144,7 +1183,7 @@ optimize_utf8 (re_dfa_t *dfa) static reg_errcode_t analyze (regex_t *preg) { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *dfa = preg->buffer; reg_errcode_t ret; /* Allocate arrays. */ @@ -1325,7 +1364,7 @@ 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) { - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *dfa = preg->buffer; bin_tree_t *body = node->left; bin_tree_t *op, *cls, *tree1, *tree; @@ -1659,7 +1698,7 @@ calc_eclosure (re_dfa_t *dfa) /* If we have already calculated, skip it. */ if (dfa->eclosures[node_idx].nelem != 0) continue; - /* Calculate epsilon closure of `node_idx'. */ + /* Calculate epsilon closure of 'node_idx'. */ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); if (BE (err != REG_NOERROR, 0)) return err; @@ -1709,14 +1748,14 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) { re_node_set eclosure_elem; Idx edest = dfa->edests[node].elems[i]; - /* If calculating the epsilon closure of `edest' is in progress, + /* 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, + /* If we haven't calculated the epsilon closure of 'edest' yet, calculate now. Otherwise use calculated epsilon closure. */ if (dfa->eclosures[edest].nelem == 0) { @@ -1726,11 +1765,11 @@ calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) } else eclosure_elem = dfa->eclosures[edest]; - /* Merge the epsilon closure of `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, + /* If the epsilon closure of 'edest' is incomplete, the epsilon closure of this node is also incomplete. */ if (dfa->eclosures[edest].nelem == 0) { @@ -2092,7 +2131,7 @@ peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) /* 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. + If an error occurs, ERR is set by error code, and return NULL. This function build the following tree, from regular expression : CAT / \ @@ -2106,7 +2145,7 @@ 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; + re_dfa_t *dfa = preg->buffer; bin_tree_t *tree, *eor, *root; re_token_t current_token; dfa->syntax = syntax; @@ -2134,13 +2173,13 @@ parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, / \ - ALT means alternative, which represents the operator `|'. */ + 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; + 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)) @@ -2182,7 +2221,7 @@ 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; + 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; @@ -2193,16 +2232,21 @@ parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, 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) { - tree = create_tree (dfa, tree, expr, CONCAT); - if (tree == 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; @@ -2221,7 +2265,7 @@ 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; + re_dfa_t *dfa = preg->buffer; bin_tree_t *tree; switch (token->type) { @@ -2437,7 +2481,7 @@ 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; + re_dfa_t *dfa = preg->buffer; bin_tree_t *tree; size_t cur_nsub; cur_nsub = preg->re_nsub++; @@ -2451,7 +2495,11 @@ parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, { 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 (tree != NULL) + postorder (tree, free_tree, NULL); + *err = REG_EPAREN; + } if (BE (*err != REG_NOERROR, 0)) return NULL; } @@ -2529,6 +2577,12 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, *err = REG_BADBR; return NULL; } + + if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0)) + { + *err = REG_ESIZE; + return NULL; + } } else { @@ -2569,7 +2623,10 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, old_tree = NULL; if (elem->token.type == SUBEXP) - postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx); + { + 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)); @@ -2615,7 +2672,7 @@ parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, 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 + mbcset->range_ends, is a pointer argument since we may update it. */ static reg_errcode_t @@ -2749,11 +2806,12 @@ build_range_exp (const reg_syntax_t syntax, 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) +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)) @@ -2781,8 +2839,8 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, 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. + /* 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. */ auto inline int32_t @@ -2885,11 +2943,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, return UINT_MAX; } - /* Local function for parse_bracket_exp used in _LIBC environement. + /* 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 sinse we may + mbcset->range_ends, is a pointer argument since we may update it. */ auto inline reg_errcode_t @@ -2969,11 +3027,11 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, return REG_NOERROR; } - /* Local function for parse_bracket_exp used in _LIBC environement. + /* 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 sinse we may update it. */ + pointer argument since we may update it. */ auto inline reg_errcode_t __attribute ((always_inline)) @@ -3075,6 +3133,10 @@ parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, 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; } @@ -3413,7 +3475,7 @@ parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, 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. */ + is a pointer argument since we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N @@ -3444,19 +3506,18 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name) _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)) + idx1 = findidx (&cp, -1); + if (BE (idx1 == 0 || *cp != '\0', 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'; + /* 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); + idx2 = findidx (&cp, 1); /* idx2 = table[ch]; */ @@ -3509,7 +3570,7 @@ build_equiv_class (bitset_t sbcset, const unsigned char *name) 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. */ + is a pointer argument since we may update it. */ static reg_errcode_t #ifdef RE_ENABLE_I18N @@ -3703,8 +3764,9 @@ build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, } /* This is intended for the expressions like "a{1,3}". - Fetch a number from `input', and return the number. + 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 @@ -3723,8 +3785,9 @@ fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) 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; + : num == REG_MISSING + ? c - '0' + : MIN (RE_DUP_MAX + 1, num * 10 + c - '0')); } return num; } @@ -3798,7 +3861,7 @@ create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node) { - Idx idx = (Idx) (long) extra; + Idx idx = (uintptr_t) extra; if (node->token.type == SUBEXP && node->token.opr.idx == idx) node->token.opt_subexp = 1; diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c index b1e34ac..14362b6 100644 --- a/gnulib/lib/regex.c +++ b/gnulib/lib/regex.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2003, 2005-2006, 2009-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,12 +14,20 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ -#include +#ifndef _LIBC +# include -/* Make sure noone compiles this code with a C++ compiler. */ +# 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 "-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 diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h index 0089a47..32ef4ac 100644 --- a/gnulib/lib/regex.h +++ b/gnulib/lib/regex.h @@ -1,6 +1,6 @@ /* Definitions for data structures and routines for the regular expression library. - Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2006, 2009-2011 + Copyright (C) 1985, 1989-1993, 1995-1998, 2000-2003, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -15,8 +15,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _REGEX_H #define _REGEX_H 1 @@ -28,13 +27,10 @@ extern "C" { #endif -/* Define __USE_GNU_REGEX to declare GNU extensions that violate the +/* Define __USE_GNU 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 +#ifdef _GNU_SOURCE +# define __USE_GNU 1 #endif #ifdef _REGEX_LARGE_OFFSETS @@ -45,16 +41,6 @@ extern "C" { 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. */ @@ -69,10 +55,8 @@ 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; +/* 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; @@ -93,8 +77,7 @@ typedef unsigned long int active_reg_t; add or remove a bit, only one other definition need change. */ typedef unsigned long int reg_syntax_t; -#ifdef __USE_GNU_REGEX - +#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) @@ -161,9 +144,9 @@ typedef unsigned long int reg_syntax_t; 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 \} +/* If this bit is set, then '{...}' defines an interval, and \{ and \} are literals. - If not set, then `\{...\}' defines an interval. */ + 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. @@ -225,8 +208,7 @@ typedef unsigned long int reg_syntax_t; /* 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 */ +#endif /* This global variable defines the particular regexp syntax to use (for some interfaces). When a regexp is compiled, the syntax used is @@ -234,7 +216,7 @@ typedef unsigned long int reg_syntax_t; already-compiled regexps. */ extern reg_syntax_t re_syntax_options; -#ifdef __USE_GNU_REGEX +#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!) */ @@ -246,16 +228,19 @@ extern reg_syntax_t re_syntax_options; | 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_DEBUG) \ - & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \ - | RE_CONTEXT_INVALID_OPS )) + ((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_INTERVALS | RE_NO_GNU_OPS \ + | RE_INVALID_INTERVAL_ORD) # define RE_SYNTAX_GREP \ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ @@ -306,13 +291,12 @@ extern reg_syntax_t re_syntax_options; | 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 _REGEX_INCLUDE_LIMITS_H +# include +# endif # ifdef RE_DUP_MAX # undef RE_DUP_MAX # endif @@ -320,16 +304,15 @@ extern reg_syntax_t re_syntax_options; /* 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. + ((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 /* defined __USE_GNU_REGEX */ +#endif -/* POSIX `cflags' bits (i.e., information for `regcomp'). */ +/* 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. */ @@ -349,7 +332,7 @@ extern reg_syntax_t re_syntax_options; #define REG_NOSUB (1 << 3) -/* POSIX `eflags' bits (i.e., information for regexec). */ +/* 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 @@ -367,7 +350,7 @@ extern reg_syntax_t re_syntax_options; /* If any error codes are removed, changed, or added, update the - `__re_error_msgid' table in regcomp.c. */ + '__re_error_msgid' table in regcomp.c. */ typedef enum { @@ -392,11 +375,11 @@ typedef enum /* Error codes we've added. */ _REG_EEND, /* Premature end. */ - _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */ + _REG_ESIZE, /* Too large (e.g., repeat count too large). */ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ } reg_errcode_t; -#ifdef _XOPEN_SOURCE +#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K # define REG_ENOSYS _REG_ENOSYS #endif #define REG_NOERROR _REG_NOERROR @@ -417,126 +400,127 @@ typedef enum #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 +/* 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 -/* 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 +#ifdef __USE_GNU +# define __REPB_PREFIX(name) name #else -# define REG_TRANSLATE_TYPE unsigned char * +# define __REPB_PREFIX(name) __##name #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); + /* 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 _REG_RE_NAME (allocated); + /* 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 _REG_RE_NAME (used); + /* 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 _REG_RE_NAME (syntax); + 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 *_REG_RE_NAME (fastmap); + 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. */ - REG_TRANSLATE_TYPE _REG_RE_NAME (translate); + __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 + 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; + 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_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 +#ifdef __USE_GNU # define REGS_UNALLOCATED 0 # define REGS_REALLOCATE 1 # define REGS_FIXED 2 #endif - unsigned int _REG_RE_NAME (regs_allocated) : 2; + 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 int _REG_RE_NAME (fastmap_accurate) : 1; + /* 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 + /* If set, 're_match_2' does not return information about subexpressions. */ - unsigned int _REG_RE_NAME (no_sub) : 1; + unsigned __REPB_PREFIX(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; + unsigned __REPB_PREFIX(not_bol) : 1; /* Similarly for an end-of-line anchor. */ - unsigned int _REG_RE_NAME (not_eol) : 1; + unsigned __REPB_PREFIX(not_eol) : 1; /* If true, an anchor at a newline matches. */ - unsigned int _REG_RE_NAME (newline_anchor) : 1; - -/* [[[end pattern_buffer]]] */ + 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 _REG_RM_NAME (num_regs); - regoff_t *_REG_RM_NAME (start); - regoff_t *_REG_RM_NAME (end); + __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. */ -#if !defined RE_NREGS && defined __USE_GNU_REGEX -# define RE_NREGS 30 +/* 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 + 're_registers', POSIX uses an array of structures, instead of a structure of arrays. */ typedef struct { @@ -546,13 +530,19 @@ typedef struct /* 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. */ + 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. */ + 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); @@ -574,7 +564,7 @@ extern regoff_t re_search (struct re_pattern_buffer *__buffer, struct re_registers *__regs); -/* Like `re_search', but search in the concatenation of STRING1 and +/* 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, @@ -584,14 +574,14 @@ extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, __re_idx_t __stop); -/* Like `re_search', but return how many characters in STRING the regexp +/* 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'. */ +/* 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, @@ -602,21 +592,22 @@ extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, /* 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 + 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. */ + 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 +#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD) # ifndef _CRAY /* 4.2 bsd compatibility. */ extern char *re_comp (const char *); @@ -644,7 +635,7 @@ extern int re_exec (const char *); #ifndef _Restrict_arr_ # if ((199901L <= __STDC_VERSION__ \ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !__STRICT_ANSI__)) \ + && !defined __STRICT_ANSI__)) \ && !defined __GNUG__) # define _Restrict_arr_ _Restrict_ # else diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c index 8147779..ca046cf 100644 --- a/gnulib/lib/regex_internal.c +++ b/gnulib/lib/regex_internal.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ static void re_string_construct_common (const char *str, Idx len, re_string_t *pstr, @@ -134,9 +133,9 @@ re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) { 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)) + /* 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); @@ -236,13 +235,8 @@ build_wcs_buffer (re_string_t *pstr) 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)) + 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; @@ -251,6 +245,12 @@ build_wcs_buffer (re_string_t *pstr) 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; @@ -333,9 +333,11 @@ build_wcs_upper_buffer (re_string_t *pstr) for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } - else if (mbclen == (size_t) -1 || mbclen == 0) + 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. */ + /* 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. */ @@ -448,7 +450,8 @@ build_wcs_upper_buffer (re_string_t *pstr) for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) pstr->wcs[byte_idx++] = WEOF; } - else if (mbclen == (size_t) -1 || mbclen == 0) + 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]; @@ -495,8 +498,7 @@ re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) rawbuf_idx < new_raw_idx;) { wchar_t wc2; - Idx remain_len; - remain_len = pstr->len - rawbuf_idx; + 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); @@ -732,21 +734,21 @@ re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) mbstate_t cur_state; wchar_t wc2; Idx mlen = raw + pstr->len - p; + unsigned char buf[6]; size_t mbclen; -#if 0 /* dead code: buf is set but never used */ - unsigned char buf[6]; + 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; } -#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, + mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, &cur_state); if (raw + offset - p <= mbclen && mbclen < (size_t) -2) @@ -868,7 +870,7 @@ re_string_peek_byte_case (const re_string_t *pstr, Idx idx) } static unsigned char -internal_function __attribute ((pure)) +internal_function re_string_fetch_byte_case (re_string_t *pstr) { if (BE (!pstr->mbs_allocated, 1)) @@ -1412,13 +1414,12 @@ re_dfa_add_node (re_dfa_t *dfa, re_token_t token) 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)) + /* 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); @@ -1550,7 +1551,7 @@ re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, && re_node_set_compare (state->entrance_nodes, nodes)) return state; } - /* There are no appropriate state in `dfa', create the new one. */ + /* 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; @@ -1579,7 +1580,7 @@ register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, { 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)) + if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem)) return REG_ESPACE; } @@ -1614,7 +1615,7 @@ free_state (re_dfastate_t *state) re_free (state); } -/* Create the new state which is independ of contexts. +/* Create the new state which is independent of contexts. Return the new state if succeeded, otherwise return NULL. */ static re_dfastate_t * diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h index e18e7a0..2e36fe5 100644 --- a/gnulib/lib/regex_internal.h +++ b/gnulib/lib/regex_internal.h @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,15 +14,13 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _REGEX_INTERNAL_H #define _REGEX_INTERNAL_H 1 #include #include -#include #include #include #include @@ -32,13 +30,14 @@ # include "localcharset.h" #endif #include - #include #include +#include #include #if defined _LIBC # include #else +# define __libc_lock_define(CLASS,NAME) # define __libc_lock_init(NAME) do { } while (0) # define __libc_lock_lock(NAME) do { } while (0) # define __libc_lock_unlock(NAME) do { } while (0) @@ -76,11 +75,6 @@ # 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 @@ -111,8 +105,8 @@ # define __wctype wctype # define __iswctype iswctype # define __btowc btowc -# define __wcrtomb wcrtomb # define __mbrtowc mbrtowc +# define __wcrtomb wcrtomb # define __regfree regfree # define attribute_hidden #endif /* not _LIBC */ @@ -124,6 +118,11 @@ #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) @@ -334,7 +333,7 @@ typedef struct Idx idx; /* for BACK_REF */ re_context_type ctx_type; /* for ANCHOR */ } opr; -#if __GNUC__ >= 2 && !__STRICT_ANSI__ +#if __GNUC__ >= 2 && !defined __STRICT_ANSI__ re_token_type_t type : 8; #else re_token_type_t type; @@ -415,26 +414,24 @@ 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 +# 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 +# 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 */ + 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) \ @@ -472,6 +469,9 @@ static unsigned int re_string_context_at (const re_string_t *input, Idx idx, #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))) @@ -487,8 +487,8 @@ struct bin_tree_t re_token_t token; - /* `node_idx' is the index in dfa->nodes, if `type' == 0. - Otherwise `type' indicate the type of this node. */ + /* '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; @@ -541,9 +541,9 @@ struct re_dfastate_t struct re_dfastate_t **trtable, **word_trtable; unsigned int context : 4; unsigned int halt : 1; - /* If this state can accept `multi byte'. + /* If this state can accept "multi byte". Note that we refer to multibyte characters, and multi character - collating elements as `multi byte'. */ + collating elements as "multi byte". */ unsigned int accept_mb : 1; /* If this state has backreference node(s). */ unsigned int has_backref : 1; @@ -672,7 +672,7 @@ struct re_dfa_t re_bitset_ptr_t sb_char; int str_tree_storage_idx; - /* number of subexpressions `re_nsub' is in regex_t. */ + /* 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. */ @@ -696,9 +696,7 @@ struct re_dfa_t #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)) @@ -822,15 +820,15 @@ re_string_wchar_at (const re_string_t *pstr, Idx idx) return (wint_t) pstr->wcs[idx]; } +# ifndef NOT_IN_libc static int internal_function __attribute ((pure)) re_string_elem_size_at (const re_string_t *pstr, Idx idx) { -# ifdef _LIBC +# ifdef _LIBC const unsigned char *p, *extra; const int32_t *table, *indirect; - int32_t tmp; -# include +# include uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); if (nrules != 0) @@ -841,13 +839,14 @@ re_string_elem_size_at (const re_string_t *pstr, Idx idx) indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); p = pstr->mbs + idx; - tmp = findidx (&p); + findidx (&p, pstr->len - idx); return p - pstr->mbs - idx; } else -# endif /* _LIBC */ +# endif /* _LIBC */ return 1; } +# endif #endif /* RE_ENABLE_I18N */ #ifndef __GNUC_PREREQ diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c index 421a354..0b095a7 100644 --- a/gnulib/lib/regexec.c +++ b/gnulib/lib/regexec.c @@ -1,5 +1,5 @@ /* Extended regular expression matching and search library. - Copyright (C) 2002-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Isamu Hasegawa . @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, Idx n) internal_function; @@ -51,9 +50,8 @@ static regoff_t re_search_stub (struct re_pattern_buffer *bufp, 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 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, @@ -209,11 +207,11 @@ static reg_errcode_t extend_buffers (re_match_context_t *mctx) 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 + '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 + 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. @@ -230,7 +228,7 @@ regexec (preg, string, nmatch, pmatch, eflags) reg_errcode_t err; Idx start, length; #ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) preg->buffer; + re_dfa_t *dfa = preg->buffer; #endif if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) @@ -365,7 +363,6 @@ 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, @@ -413,7 +410,6 @@ re_search_2_stub (struct re_pattern_buffer *bufp, 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, @@ -425,7 +421,7 @@ re_search_stub (struct re_pattern_buffer *bufp, regoff_t rval; int eflags = 0; #ifdef _LIBC - re_dfa_t *dfa = (re_dfa_t *) bufp->buffer; + re_dfa_t *dfa = bufp->buffer; #endif Idx last_start = start + range; @@ -477,9 +473,9 @@ re_search_stub (struct re_pattern_buffer *bufp, rval = 0; - /* I hope we needn't fill ther regs with -1's when no match was found. */ + /* I hope we needn't fill their regs with -1's when no match was found. */ if (result != REG_NOERROR) - rval = -1; + rval = result == REG_NOMATCH ? -1 : -2; else if (regs != NULL) { /* If caller wants register contents data back, copy them. */ @@ -505,15 +501,14 @@ re_search_stub (struct re_pattern_buffer *bufp, return rval; } -static unsigned int -internal_function +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 + /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code uses. */ /* Have the register data arrays been allocated? */ @@ -636,7 +631,7 @@ re_exec (s) (0 <= LAST_START && LAST_START <= LENGTH) */ static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ re_search_internal (const regex_t *preg, const char *string, Idx length, Idx start, Idx last_start, Idx stop, @@ -644,7 +639,7 @@ re_search_internal (const regex_t *preg, int eflags) { reg_errcode_t err; - const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer; + const re_dfa_t *dfa = preg->buffer; Idx left_lim, right_lim; int incr; bool fl_longest_match; @@ -719,7 +714,8 @@ re_search_internal (const regex_t *preg, if (nmatch > 1 || dfa->has_mb_node) { /* Avoid overflow. */ - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0)) + if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) + <= mctx.input.bufs_len), 0)) { err = REG_ESPACE; goto free_return; @@ -921,7 +917,7 @@ re_search_internal (const regex_t *preg, goto free_return; } - /* At last, add the offset to the each registers, since we slided + /* 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) @@ -971,7 +967,7 @@ re_search_internal (const regex_t *preg, } static reg_errcode_t -internal_function __attribute_warn_unused_result__ +__attribute_warn_unused_result__ prune_impossible_nodes (re_match_context_t *mctx) { const re_dfa_t *const dfa = mctx->dfa; @@ -987,7 +983,7 @@ prune_impossible_nodes (re_match_context_t *mctx) halt_node = mctx->last_node; /* Avoid overflow. */ - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0)) + 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); @@ -1105,7 +1101,7 @@ acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, 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 + Note that the matcher assumes that the matching starts from the current index of the buffer. */ static Idx @@ -1174,7 +1170,8 @@ check_matching (re_match_context_t *mctx, bool fl_longest_match, 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) + 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)) { @@ -1435,7 +1432,7 @@ 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; + const re_dfa_t *dfa = preg->buffer; Idx idx, cur_node; re_node_set eps_via_nodes; struct re_fail_stack_t *fs; @@ -1607,21 +1604,21 @@ update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, 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... + 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': + 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'. + 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'. + 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'. + node 'a'. ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, - we throw away the node `a'. */ + we throw away the node 'a'. */ #define STATE_NODE_CONTAINS(state,node) \ ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) @@ -1694,11 +1691,11 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, 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'. + 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]' + '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++) { @@ -1711,7 +1708,7 @@ build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N - /* If the node may accept `multi byte'. */ + /* 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); @@ -1752,7 +1749,8 @@ 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 + 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)) { @@ -2267,17 +2265,17 @@ sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, { const re_dfa_t *const dfa = mctx->dfa; int naccepted; - /* Check the node can accept `multi byte'. */ + /* 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 + /* 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'. */ + could't accept the current input "multi byte". */ naccepted = 0; /* Otherwise, it is sure that the node could accept - `naccepted' bytes input. */ + 'naccepted' bytes input. */ return naccepted; } #endif /* RE_ENABLE_I18N */ @@ -2456,7 +2454,7 @@ find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) /* 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. */ + corresponding back references. */ static reg_errcode_t internal_function @@ -2567,7 +2565,7 @@ transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) if (naccepted == 0) continue; - /* The node can accepts `naccepted' bytes. */ + /* 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); @@ -2619,7 +2617,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) const re_token_t *node = dfa->nodes + node_idx; re_node_set *new_dest_nodes; - /* Check whether `node' is a backreference or not. */ + /* Check whether 'node' is a backreference or not. */ if (node->type != OP_BACK_REF) continue; @@ -2631,14 +2629,14 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) continue; } - /* `node' is a backreference. + /* '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 + /* 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); @@ -2662,7 +2660,7 @@ transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) 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. */ + /* Add 'new_dest_node' to state_log. */ if (dest_state == NULL) { mctx->state_log[dest_str_idx] @@ -2936,9 +2934,12 @@ check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, { 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)) + 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)) @@ -3101,7 +3102,7 @@ check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, assert (!IS_EPSILON_NODE (type)); #endif #ifdef RE_ENABLE_I18N - /* If the node may accept `multi byte'. */ + /* If the node may accept "multi byte". */ if (dfa->nodes[cur_node].accept_mb) { naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, @@ -3358,7 +3359,7 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) bitset_word_t elem, mask; bool dests_node_malloced = false; bool dest_states_malloced = false; - Idx ndests; /* Number of the destination states from `state'. */ + 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; @@ -3372,8 +3373,8 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) } *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 + 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)); @@ -3387,16 +3388,17 @@ build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) dests_node = dests_alloc->dests_node; dests_ch = dests_alloc->dests_ch; - /* Initialize transiton table. */ + /* Initialize transition table. */ state->word_trtable = state->trtable = NULL; - /* At first, group all nodes belonging to `state' into several + /* 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 **) @@ -3592,13 +3594,13 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, reg_errcode_t err; bool ok; Idx i, j, k; - Idx ndests; /* Number of the destinations from `state'. */ + 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 all the nodes belonging to 'state', */ for (i = 0; i < cur_nodes->nelem; ++i) { re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; @@ -3641,7 +3643,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, else continue; - /* Check the `accepts' and sift the characters which are not + /* Check the 'accepts' and sift the characters which are not match it the context. */ if (constraint) { @@ -3700,7 +3702,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, } } - /* Then divide `accepts' into DFA states, or create a new + /* 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) { @@ -3713,7 +3715,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) continue; - /* Enumerate the intersection set of this state and `accepts'. */ + /* 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]; @@ -3721,7 +3723,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, if (!has_intersec) continue; - /* Then check if this state is a subset of `accepts'. */ + /* Then check if this state is a subset of 'accepts'. */ not_subset = not_consumed = 0; for (k = 0; k < BITSET_WORDS; ++k) { @@ -3729,8 +3731,8 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, 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 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); @@ -3769,7 +3771,7 @@ group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, } #ifdef RE_ENABLE_I18N -/* Check how many bytes the node `dfa->nodes[node_idx]' accepts. +/* 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. @@ -3896,7 +3898,6 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, const int32_t *table, *indirect; const unsigned char *weights, *extra; const char *collseqwc; - int32_t idx; /* This #include defines a local function! */ # include @@ -3954,7 +3955,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - int32_t idx = findidx (&cp); + int32_t idx = findidx (&cp, elem_len); if (idx > 0) for (i = 0; i < cset->nequiv_classes; ++i) { @@ -3985,7 +3986,7 @@ check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, # endif /* _LIBC */ { /* match with range expression? */ -#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__) +#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && defined __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'}; @@ -4066,7 +4067,7 @@ find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) /* 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); + 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); @@ -4140,11 +4141,12 @@ extend_buffers (re_match_context_t *mctx) re_string_t *pstr = &mctx->input; /* Avoid overflow. */ - if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0)) + if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 + <= pstr->bufs_len, 0)) return REG_ESPACE; - /* Double the lengthes of the buffers. */ - ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); + /* Double the lengths of the buffers. */ + ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); if (BE (ret != REG_NOERROR, 0)) return ret; @@ -4207,7 +4209,7 @@ match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) 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)) + 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); diff --git a/gnulib/lib/safe-alloc.c b/gnulib/lib/safe-alloc.c index eaf7b5e..e08b6c2 100644 --- a/gnulib/lib/safe-alloc.c +++ b/gnulib/lib/safe-alloc.c @@ -1,6 +1,6 @@ /* safe-alloc.c: safer memory allocation - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the diff --git a/gnulib/lib/safe-alloc.h b/gnulib/lib/safe-alloc.h index 7044380..b0377a6 100644 --- a/gnulib/lib/safe-alloc.h +++ b/gnulib/lib/safe-alloc.h @@ -1,6 +1,6 @@ /* safe-alloc.h: safer memory allocation - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the diff --git a/gnulib/lib/se-selinux.in.h b/gnulib/lib/se-selinux.in.h index 4b2a9a2..1081e90 100644 --- a/gnulib/lib/se-selinux.in.h +++ b/gnulib/lib/se-selinux.in.h @@ -1,5 +1,5 @@ /* Replacement for platforms that lack it. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -14,8 +14,8 @@ You should have received a copy of the GNU Lesser General Public License along with this program. If not, see . */ -#ifndef _GL_SELINUX_SELINUX_H -# define _GL_SELINUX_SELINUX_H +#ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H +# define _@GUARD_PREFIX@_SELINUX_SELINUX_H # if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -94,4 +94,4 @@ static inline int matchpathcon_init_prefix # endif # endif -#endif /* _GL_SELINUX_SELINUX_H */ +#endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */ diff --git a/gnulib/lib/size_max.h b/gnulib/lib/size_max.h index 7ea0c2e..7187be7 100644 --- a/gnulib/lib/size_max.h +++ b/gnulib/lib/size_max.h @@ -1,5 +1,5 @@ /* size_max.h -- declare SIZE_MAX through system headers - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef GNULIB_SIZE_MAX_H #define GNULIB_SIZE_MAX_H diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c index 2ddb5d1..0a0b05c 100644 --- a/gnulib/lib/stat.c +++ b/gnulib/lib/stat.c @@ -1,5 +1,5 @@ /* Work around platform bugs in stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -16,14 +16,32 @@ /* 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. */ -#define __need_system_sys_stat_h #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 inline int orig_stat (const char *filename, struct stat *buf) { @@ -31,13 +49,26 @@ orig_stat (const char *filename, struct stat *buf) } /* Specification. */ -#include +/* 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 @@ -63,6 +94,7 @@ rpl_stat (char const *name, struct stat *st) } #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 @@ -77,6 +109,7 @@ rpl_stat (char const *name, struct stat *st) 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) diff --git a/gnulib/lib/stdbool.in.h b/gnulib/lib/stdbool.in.h index 12efde3..a329c70 100644 --- a/gnulib/lib/stdbool.in.h +++ b/gnulib/lib/stdbool.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2003, 2006-2011 Free Software Foundation, Inc. +/* Copyright (C) 2001-2003, 2006-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2001. This program is free software; you can redistribute it and/or modify @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _GL_STDBOOL_H #define _GL_STDBOOL_H diff --git a/gnulib/lib/stddef.in.h b/gnulib/lib/stddef.in.h index b3fc2b5..9384cf6 100644 --- a/gnulib/lib/stddef.in.h +++ b/gnulib/lib/stddef.in.h @@ -1,6 +1,6 @@ /* A substitute for POSIX 2008 , for platforms that have issues. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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. */ @@ -38,9 +37,9 @@ 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) +# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) # ifdef __need_wint_t -# undef _GL_STDDEF_H +# undef _@GUARD_PREFIX@_STDDEF_H # define _GL_STDDEF_WINT_T # endif # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ @@ -49,14 +48,14 @@ #else /* Normal invocation convention. */ -# ifndef _GL_STDDEF_H +# ifndef _@GUARD_PREFIX@_STDDEF_H /* The include_next requires a split double-inclusion guard. */ # @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# ifndef _GL_STDDEF_H -# define _GL_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@ @@ -82,6 +81,6 @@ # define wchar_t int #endif -# endif /* _GL_STDDEF_H */ -# endif /* _GL_STDDEF_H */ +# endif /* _@GUARD_PREFIX@_STDDEF_H */ +# endif /* _@GUARD_PREFIX@_STDDEF_H */ #endif /* __need_XXX */ diff --git a/gnulib/lib/stdint.in.h b/gnulib/lib/stdint.in.h index 1140c12..4f61f95 100644 --- a/gnulib/lib/stdint.in.h +++ b/gnulib/lib/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2011 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2012 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -13,15 +13,14 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ /* * ISO C 99 for platforms that lack it. * */ -#ifndef _GL_STDINT_H +#ifndef _@GUARD_PREFIX@_STDINT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -34,6 +33,16 @@ . */ #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 _SYS_TYPES_H_ && !defined _SSIZE_T_DEFINED_ +# @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 @@ -49,28 +58,40 @@ 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 - _GL_STDINT_H is defined. + _@GUARD_PREFIX@_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 +#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. - MacOS X 10.4.6 includes (which is us), but + 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 LONG_MIN, LONG_MAX, ULONG_MAX. */ +/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, + LONG_MIN, LONG_MAX, ULONG_MAX. */ #include #if @HAVE_INTTYPES_H@ @@ -93,7 +114,7 @@ #undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H -/* Minimum and maximum values for a integer type under the usual assumption. +/* 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. */ @@ -226,8 +247,9 @@ typedef unsigned long long int gl_uint64_t; /* 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. */ + 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 @@ -237,12 +259,21 @@ typedef unsigned long long int gl_uint64_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 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 @@ -270,26 +301,36 @@ typedef unsigned long int gl_uintptr_t; /* 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 +/* 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 +# 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 +# define intmax_t gl_intmax_t +# endif #endif -#undef uintmax_t -#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +#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 +# 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 +# define uintmax_t gl_uintmax_t +# endif #endif /* Verify that intmax_t and uintmax_t have the same size. Too much code @@ -303,8 +344,6 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* 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 @@ -390,23 +429,29 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) #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 +#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 LONG_MIN -#define INT_FAST16_MAX LONG_MAX -#define UINT_FAST16_MAX ULONG_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 -#define INT_FAST32_MIN LONG_MIN -#define INT_FAST32_MAX LONG_MAX -#define UINT_FAST32_MAX ULONG_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 @@ -431,21 +476,23 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* 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 +#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 -#undef UINTMAX_MAX -#ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -#else -# define UINTMAX_MAX UINT32_MAX +#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 */ @@ -522,12 +569,8 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) #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 */ @@ -568,25 +611,26 @@ typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) /* 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 +#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 -#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 +#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 /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */ - -#endif /* _GL_STDINT_H */ -#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ +#endif /* _@GUARD_PREFIX@_STDINT_H */ +#endif /* !(defined __ANDROID__ && ...) */ +#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h index 9091497..44b5d87 100644 --- a/gnulib/lib/stdio.in.h +++ b/gnulib/lib/stdio.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -35,7 +34,7 @@ #else /* Normal invocation convention. */ -#ifndef _GL_STDIO_H +#ifndef _@GUARD_PREFIX@_STDIO_H #define _GL_ALREADY_INCLUDING_STDIO_H @@ -44,8 +43,8 @@ #undef _GL_ALREADY_INCLUDING_STDIO_H -#ifndef _GL_STDIO_H -#define _GL_STDIO_H +#ifndef _@GUARD_PREFIX@_STDIO_H +#define _@GUARD_PREFIX@_STDIO_H /* Get va_list. Needed on many systems, including glibc 2.8. */ #include @@ -53,7 +52,8 @@ #include /* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. */ + 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. @@ -67,9 +67,45 @@ #else # define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ #endif -#define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ + +/* _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 \ @@ -134,6 +170,26 @@ _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. @@ -158,11 +214,34 @@ _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_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@ @@ -180,20 +259,26 @@ _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 - " +_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_SIGPIPE@) + || (@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, ...)); @@ -239,7 +324,7 @@ _GL_WARN_ON_USE (fpurge, "fpurge is not always present - " #endif #if @GNULIB_FPUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -253,7 +338,7 @@ _GL_CXXALIASWARN (fputc); #endif #if @GNULIB_FPUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -267,6 +352,21 @@ _GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); _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) @@ -287,10 +387,26 @@ _GL_CXXALIASWARN (freopen); # undef freopen /* Assume freopen is always declared. */ _GL_WARN_ON_USE (freopen, - "freopen on Win32 platforms is not POSIX compatible - " + "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 @@ -365,25 +481,6 @@ _GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) _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 @@ -443,25 +540,6 @@ _GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); _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 @@ -483,7 +561,7 @@ _GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " #if @GNULIB_FWRITE@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -496,10 +574,55 @@ _GL_CXXALIAS_RPL (fwrite, size_t, # 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_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). @@ -576,6 +699,15 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " # 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 @@ -627,6 +759,20 @@ _GL_CXXALIAS_SYS (obstack_vprintf, int, _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 ": ", @@ -658,6 +804,10 @@ _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); @@ -671,18 +821,27 @@ _GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " #if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ # if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ - || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) + || (@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) @@ -711,7 +870,7 @@ _GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " #endif #if @GNULIB_PUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -725,7 +884,7 @@ _GL_CXXALIASWARN (putc); #endif #if @GNULIB_PUTCHAR@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -739,7 +898,7 @@ _GL_CXXALIASWARN (putchar); #endif #if @GNULIB_PUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@ +# 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 @@ -823,6 +982,37 @@ _GL_WARN_ON_USE (renameat, "renameat is not portable - " # 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) @@ -853,9 +1043,9 @@ _GL_WARN_ON_USE (snprintf, "snprintf is unportable - " # 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. +/* 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 @@ -982,14 +1172,20 @@ _GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " #if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ # if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ - || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@) + || (@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 @@ -1010,16 +1206,41 @@ _GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " "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_SIGPIPE@) + || (@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 @@ -1039,6 +1260,22 @@ _GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " "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) @@ -1097,6 +1334,6 @@ _GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " #endif -#endif /* _GL_STDIO_H */ -#endif /* _GL_STDIO_H */ +#endif /* _@GUARD_PREFIX@_STDIO_H */ +#endif /* _@GUARD_PREFIX@_STDIO_H */ #endif diff --git a/gnulib/lib/stdlib.in.h b/gnulib/lib/stdlib.in.h index 0829a96..f270075 100644 --- a/gnulib/lib/stdlib.in.h +++ b/gnulib/lib/stdlib.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995, 2001-2004, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1995, 2001-2004, 2006-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -28,13 +28,13 @@ #else /* Normal invocation convention. */ -#ifndef _GL_STDLIB_H +#ifndef _@GUARD_PREFIX@_STDLIB_H /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STDLIB_H@ -#ifndef _GL_STDLIB_H -#define _GL_STDLIB_H +#ifndef _@GUARD_PREFIX@_STDLIB_H +#define _@GUARD_PREFIX@_STDLIB_H /* NetBSD 5.0 mis-defines NULL. */ #include @@ -49,6 +49,11 @@ # 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 @@ -58,7 +63,7 @@ # include # endif -# if !@HAVE_STRUCT_RANDOM_DATA@ || !@HAVE_RANDOM_R@ +# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ # include # endif @@ -81,19 +86,24 @@ struct random_data # 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. */ +#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 -#if 3 <= __GNUC__ || __GNUC__ == 2 && 8 <= __GNUC_MINOR__ -# define _GL_ATTRIBUTE_NORETURN __attribute__ ((__noreturn__)) +/* 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_NORETURN +# 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. */ @@ -119,7 +129,7 @@ struct random_data /* 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); +_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); # endif _GL_CXXALIAS_SYS (_Exit, void, (int status)); _GL_CXXALIASWARN (_Exit); @@ -136,7 +146,9 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - " /* 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))); +_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); @@ -250,14 +262,19 @@ _GL_CXXALIASWARN (grantpt); #elif defined GNULIB_POSIXCHECK # undef grantpt # if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (ptsname, "grantpt is not portable - " +_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) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) # undef malloc # define malloc rpl_malloc # endif @@ -267,7 +284,7 @@ _GL_CXXALIAS_RPL (malloc, void *, (size_t size)); _GL_CXXALIAS_SYS (malloc, void *, (size_t size)); # endif _GL_CXXALIASWARN (malloc); -#elif defined GNULIB_POSIXCHECK +#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 - " @@ -421,6 +438,22 @@ _GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " # 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. */ @@ -437,6 +470,32 @@ _GL_WARN_ON_USE (ptsname, "ptsname is not portable - " # 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) @@ -460,12 +519,83 @@ _GL_CXXALIASWARN (putenv); # 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 !@HAVE_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 +# 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 @@ -476,13 +606,25 @@ _GL_WARN_ON_USE (random_r, "random_r is unportable - " #endif #if @GNULIB_RANDOM_R@ -# if !@HAVE_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 +# 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 @@ -493,15 +635,29 @@ _GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " #endif #if @GNULIB_RANDOM_R@ -# if !@HAVE_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 +# 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 @@ -512,13 +668,25 @@ _GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " #endif #if @GNULIB_RANDOM_R@ -# if !@HAVE_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 +# 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 @@ -531,7 +699,8 @@ _GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " #if @GNULIB_REALLOC_POSIX@ # if @REPLACE_REALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ + || _GL_USE_STDLIB_ALLOC) # undef realloc # define realloc rpl_realloc # endif @@ -541,7 +710,7 @@ _GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); _GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); # endif _GL_CXXALIASWARN (realloc); -#elif defined GNULIB_POSIXCHECK +#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 - " @@ -754,6 +923,6 @@ _GL_CXXALIASWARN (wctomb); #endif -#endif /* _GL_STDLIB_H */ -#endif /* _GL_STDLIB_H */ +#endif /* _@GUARD_PREFIX@_STDLIB_H */ +#endif /* _@GUARD_PREFIX@_STDLIB_H */ #endif diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c index f465d07..5f10a54 100644 --- a/gnulib/lib/stpcpy.c +++ b/gnulib/lib/stpcpy.c @@ -1,5 +1,5 @@ /* stpcpy.c -- copy a string and return pointer to end of new string - Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2011 Free Software + Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2012 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. diff --git a/gnulib/lib/stpncpy.c b/gnulib/lib/stpncpy.c index 1c42891..5fdfe36 100644 --- a/gnulib/lib/stpncpy.c +++ b/gnulib/lib/stpncpy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007, 2009-2011 Free Software +/* Copyright (C) 1993, 1995-1997, 2002-2003, 2005-2007, 2009-2012 Free Software * Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. diff --git a/gnulib/lib/str-two-way.h b/gnulib/lib/str-two-way.h index a8b31c3..dcb0854 100644 --- a/gnulib/lib/str-two-way.h +++ b/gnulib/lib/str-two-way.h @@ -1,5 +1,5 @@ /* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Eric Blake , 2008. @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ /* Before including this file, you need to include and , and define: diff --git a/gnulib/lib/strchrnul.c b/gnulib/lib/strchrnul.c new file mode 100644 index 0000000..2ced7f2 --- /dev/null +++ b/gnulib/lib/strchrnul.c @@ -0,0 +1,142 @@ +/* Searching in a string. + Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +#include + +/* Specification. */ +#include + +/* Find the first occurrence of C in S or the final NUL byte. */ +char * +strchrnul (const char *s, int c_in) +{ + /* 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 char c; + + c = (unsigned char) c_in; + if (!c) + return rawmemchr (s, 0); + + /* 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; + (size_t) char_ptr % sizeof (longword) != 0; + ++char_ptr) + if (!*char_ptr || *char_ptr == c) + return (char *) 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 NUL or + c. We first use an xor with repeated_c. This reduces the task + to testing whether *any of the four* bytes in longword1 or + longword2 is zero. + + Let's consider longword1. 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. + + The test whether any byte in longword1 or longword2 is zero is equivalent + to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine + this into a single test, whether (tmp1 | tmp2) is nonzero. + + This test can read more than one byte beyond the end of a string, + depending on where the terminating NUL is encountered. However, + this is considered safe since the initialization phase ensured + that the read will be aligned, therefore, the read will not cross + page boundaries and will not cause a fault. */ + + while (1) + { + longword longword1 = *longword_ptr ^ repeated_c; + longword longword2 = *longword_ptr; + + if (((((longword1 - repeated_one) & ~longword1) + | ((longword2 - repeated_one) & ~longword2)) + & (repeated_one << 7)) != 0) + break; + longword_ptr++; + } + + char_ptr = (const unsigned char *) longword_ptr; + + /* At this point, we know that one of the sizeof (longword) bytes + starting at char_ptr is == 0 or == 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. */ + + char_ptr = (unsigned char *) longword_ptr; + while (*char_ptr && (*char_ptr != c)) + char_ptr++; + return (char *) char_ptr; +} diff --git a/gnulib/lib/strchrnul.valgrind b/gnulib/lib/strchrnul.valgrind new file mode 100644 index 0000000..b14fa13 --- /dev/null +++ b/gnulib/lib/strchrnul.valgrind @@ -0,0 +1,12 @@ +# Suppress a valgrind message about use of uninitialized memory in strchrnul(). +# This use is OK because it provides only a speedup. +{ + strchrnul-value4 + Memcheck:Value4 + fun:strchrnul +} +{ + strchrnul-value8 + Memcheck:Value8 + fun:strchrnul +} diff --git a/gnulib/lib/streq.h b/gnulib/lib/streq.h index 73cfa29..6101168 100644 --- a/gnulib/lib/streq.h +++ b/gnulib/lib/streq.h @@ -1,5 +1,5 @@ /* Optimized string comparison. - Copyright (C) 2001-2002, 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2002, 2007, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published @@ -21,8 +21,8 @@ #include -/* STREQ allows to optimize string comparison with a small literal string. - STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) +/* 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. */ @@ -163,12 +163,12 @@ streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, return 0; } -#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ +#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(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ +#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ (strcmp (s1, s2) == 0) #endif diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h index d86d283..ed187c9 100644 --- a/gnulib/lib/string.in.h +++ b/gnulib/lib/string.in.h @@ -1,6 +1,6 @@ /* A GNU-like . - Copyright (C) 1995-1996, 2001-2011 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2001-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,10 +13,9 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ -#ifndef _GL_STRING_H +#ifndef _@GUARD_PREFIX@_STRING_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -26,8 +25,8 @@ /* The include_next requires a split double-inclusion guard. */ #@INCLUDE_NEXT@ @NEXT_STRING_H@ -#ifndef _GL_STRING_H -#define _GL_STRING_H +#ifndef _@GUARD_PREFIX@_STRING_H +#define _@GUARD_PREFIX@_STRING_H /* NetBSD 5.0 mis-defines NULL. */ #include @@ -59,6 +58,36 @@ /* 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@ @@ -277,17 +306,28 @@ _GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " /* Find the first occurrence of C in S or the final NUL byte. */ #if @GNULIB_STRCHRNUL@ -# if ! @HAVE_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 +# 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)); @@ -684,10 +724,14 @@ _GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " # 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_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_ARG_NONNULL ((1))); +_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); @@ -697,6 +741,7 @@ _GL_CXXALIASWARN (mbslen); /* 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 @@ -710,10 +755,12 @@ _GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) # 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 @@ -725,15 +772,17 @@ _GL_CXXALIASWARN (mbschr); 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 __hpux || defined __INTERIX # if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */ +# 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 @@ -746,6 +795,7 @@ _GL_CXXALIASWARN (mbsrchr); 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 @@ -757,6 +807,7 @@ _GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) 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 @@ -771,6 +822,7 @@ _GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) 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 @@ -784,6 +836,7 @@ _GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) 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 @@ -794,6 +847,7 @@ _GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) 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 @@ -804,6 +858,7 @@ _GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) 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 @@ -817,10 +872,12 @@ _GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) # 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 @@ -834,6 +891,7 @@ _GL_CXXALIASWARN (mbspbrk); 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 @@ -953,6 +1011,7 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - " #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 *)); @@ -966,5 +1025,5 @@ _GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " #endif -#endif /* _GL_STRING_H */ -#endif /* _GL_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */ +#endif /* _@GUARD_PREFIX@_STRING_H */ diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c index 06c6b84..b6313b2 100644 --- a/gnulib/lib/strndup.c +++ b/gnulib/lib/strndup.c @@ -1,6 +1,6 @@ /* A replacement function, for systems that lack strndup. - Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2011 Free Software + Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it @@ -14,8 +14,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c index 44f7b45..ec6c674 100644 --- a/gnulib/lib/strnlen.c +++ b/gnulib/lib/strnlen.c @@ -1,5 +1,5 @@ /* Find the length of STRING, but scan at most MAXLEN characters. - Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2007, 2009-2012 Free Software Foundation, Inc. Written by Simon Josefsson. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c index 299bd65..bdfcc37 100644 --- a/gnulib/lib/strnlen1.c +++ b/gnulib/lib/strnlen1.c @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h index cb0f756..9af1d38 100644 --- a/gnulib/lib/strnlen1.h +++ b/gnulib/lib/strnlen1.h @@ -1,5 +1,5 @@ /* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -28,7 +28,8 @@ extern "C" { /* 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); +extern size_t strnlen1 (const char *string, size_t maxlen) + _GL_ATTRIBUTE_PURE; #ifdef __cplusplus diff --git a/gnulib/lib/strstr.c b/gnulib/lib/strstr.c index 65d69e0..8e50d62 100644 --- a/gnulib/lib/strstr.c +++ b/gnulib/lib/strstr.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2011 Free Software +/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ /* This particular implementation was written by Eric Blake, 2008. */ diff --git a/gnulib/lib/sys_stat.in.h b/gnulib/lib/sys_stat.in.h index 0ce19ed..8b6372f 100644 --- a/gnulib/lib/sys_stat.in.h +++ b/gnulib/lib/sys_stat.in.h @@ -1,5 +1,5 @@ /* Provide a more complete sys/stat header file. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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, Paul Eggert, and Jim Meyering. */ @@ -34,9 +33,10 @@ #else /* Normal invocation convention. */ -#ifndef _GL_SYS_STAT_H +#ifndef _@GUARD_PREFIX@_SYS_STAT_H -/* Get nlink_t. */ +/* Get nlink_t. + May also define off_t to a 64-bit type on native Windows. */ #include /* Get struct timespec. */ @@ -45,8 +45,8 @@ /* 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 +#ifndef _@GUARD_PREFIX@_SYS_STAT_H +#define _@GUARD_PREFIX@_SYS_STAT_H /* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ @@ -55,10 +55,27 @@ /* 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(). */ + 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 */ +# 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 @@ -312,16 +329,28 @@ _GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " #endif -#if @REPLACE_FSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fstat rpl_fstat -# 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 +# else _GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); -#endif +# 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@ @@ -355,7 +384,11 @@ _GL_WARN_ON_USE (fstatat, "fstatat is not portable - " #if @GNULIB_FUTIMENS@ -# if @REPLACE_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 @@ -368,7 +401,9 @@ _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 @@ -589,14 +624,55 @@ _GL_WARN_ON_USE (mknodat, "mknodat is not portable - " /* 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 +# 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(). */ -# define stat stat64 # undef stat64 # define stat64(name, st) rpl_stat (name, st) -# else /* !_LARGE_FILES */ +# 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) @@ -612,7 +688,11 @@ _GL_WARN_ON_USE (stat, "stat is unportable - " #if @GNULIB_UTIMENSAT@ -# if @REPLACE_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 @@ -631,7 +711,9 @@ _GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, _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 @@ -641,6 +723,6 @@ _GL_WARN_ON_USE (utimensat, "utimensat is not portable - " #endif -#endif /* _GL_SYS_STAT_H */ -#endif /* _GL_SYS_STAT_H */ +#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ +#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ #endif diff --git a/gnulib/lib/sys_time.in.h b/gnulib/lib/sys_time.in.h new file mode 100644 index 0000000..b4d6d2a --- /dev/null +++ b/gnulib/lib/sys_time.in.h @@ -0,0 +1,205 @@ +/* Provide a more complete sys/time.h. + + Copyright (C) 2007-2012 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . */ + +/* Written by Paul Eggert. */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#if defined _@GUARD_PREFIX@_SYS_TIME_H + +/* Simply delegate to the system's header, without adding anything. */ +# if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +# endif + +#else + +# define _@GUARD_PREFIX@_SYS_TIME_H + +# if @HAVE_SYS_TIME_H@ +# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@ +# else +# 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 */ diff --git a/gnulib/lib/sys_types.in.h b/gnulib/lib/sys_types.in.h new file mode 100644 index 0000000..b503870 --- /dev/null +++ b/gnulib/lib/sys_types.in.h @@ -0,0 +1,51 @@ +/* Provide a more complete sys/types.h. + + Copyright (C) 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 Lesser General Public License as published by + the Free Software Foundation; either version 2.1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . */ + +#if __GNUC__ >= 3 +@PRAGMA_SYSTEM_HEADER@ +#endif +@PRAGMA_COLUMNS@ + +#ifndef _@GUARD_PREFIX@_SYS_TYPES_H + +/* The include_next requires a split double-inclusion guard. */ +#@INCLUDE_NEXT@ @NEXT_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/gnulib/lib/sys_wait.in.h b/gnulib/lib/sys_wait.in.h index 91d5bfa..ed3a694 100644 --- a/gnulib/lib/sys_wait.in.h +++ b/gnulib/lib/sys_wait.in.h @@ -1,5 +1,5 @@ /* A POSIX-like . - Copyright (C) 2001-2003, 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2003, 2005-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,11 +12,10 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ -#ifndef _GL_SYS_WAIT_H +#ifndef _@GUARD_PREFIX@_SYS_WAIT_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -28,8 +27,8 @@ # @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ #endif -#ifndef _GL_SYS_WAIT_H -#define _GL_SYS_WAIT_H +#ifndef _@GUARD_PREFIX@_SYS_WAIT_H +#define _@GUARD_PREFIX@_SYS_WAIT_H /* Get pid_t. */ #include @@ -126,5 +125,5 @@ _GL_WARN_ON_USE (waitpid, "waitpid is unportable - " #endif -#endif /* _GL_SYS_WAIT_H */ -#endif /* _GL_SYS_WAIT_H */ +#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ +#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ diff --git a/gnulib/lib/tempname.c b/gnulib/lib/tempname.c new file mode 100644 index 0000000..4639f80 --- /dev/null +++ b/gnulib/lib/tempname.c @@ -0,0 +1,309 @@ +/* tempname.c - generate the name of a temporary file. + + Copyright (C) 1991-2003, 2005-2007, 2009-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */ + +#if !_LIBC +# include +# include "tempname.h" +#endif + +#include +#include + +#include +#ifndef __set_errno +# define __set_errno(Val) errno = (Val) +#endif + +#include +#ifndef P_tmpdir +# define P_tmpdir "/tmp" +#endif +#ifndef TMP_MAX +# define TMP_MAX 238328 +#endif +#ifndef __GT_FILE +# define __GT_FILE 0 +# define __GT_DIR 1 +# define __GT_NOCREATE 2 +#endif +#if !_LIBC && (GT_FILE != __GT_FILE || GT_DIR != __GT_DIR \ + || GT_NOCREATE != __GT_NOCREATE) +# error report this to bug-gnulib@gnu.org +#endif + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#if _LIBC +# define struct_stat64 struct stat64 +#else +# define struct_stat64 struct stat +# define __gen_tempname gen_tempname +# define __getpid getpid +# define __gettimeofday gettimeofday +# define __mkdir mkdir +# define __open open +# define __lxstat64(version, file, buf) lstat (file, buf) +#endif + +#if ! (HAVE___SECURE_GETENV || _LIBC) +# define __secure_getenv getenv +#endif + +#ifdef _LIBC +# include +# if HP_TIMING_AVAIL +# define RANDOM_BITS(Var) \ + if (__builtin_expect (value == UINT64_C (0), 0)) \ + { \ + /* If this is the first time this function is used initialize \ + the variable we accumulate the value in to some somewhat \ + random value. If we'd not do this programs at startup time \ + might have a reduced set of possible names, at least on slow \ + machines. */ \ + struct timeval tv; \ + __gettimeofday (&tv, NULL); \ + value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \ + } \ + HP_TIMING_NOW (Var) +# endif +#endif + +/* Use the widest available unsigned type if uint64_t is not + available. The algorithm below extracts a number less than 62**6 + (approximately 2**35.725) from uint64_t, so ancient hosts where + uintmax_t is only 32 bits lose about 3.725 bits of randomness, + which is better than not having mkstemp at all. */ +#if !defined UINT64_MAX && !defined uint64_t +# define uint64_t uintmax_t +#endif + +#if _LIBC +/* Return nonzero if DIR is an existent directory. */ +static int +direxists (const char *dir) +{ + struct_stat64 buf; + return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode); +} + +/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is + non-null and exists, uses it; otherwise uses the first of $TMPDIR, + P_tmpdir, /tmp that exists. Copies into TMPL a template suitable + for use with mk[s]temp. Will fail (-1) if DIR is non-null and + doesn't exist, none of the searched dirs exists, or there's not + enough space in TMPL. */ +int +__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, + int try_tmpdir) +{ + const char *d; + size_t dlen, plen; + + if (!pfx || !pfx[0]) + { + pfx = "file"; + plen = 4; + } + else + { + plen = strlen (pfx); + if (plen > 5) + plen = 5; + } + + if (try_tmpdir) + { + d = __secure_getenv ("TMPDIR"); + if (d != NULL && direxists (d)) + dir = d; + else if (dir != NULL && direxists (dir)) + /* nothing */ ; + else + dir = NULL; + } + if (dir == NULL) + { + if (direxists (P_tmpdir)) + dir = P_tmpdir; + else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp")) + dir = "/tmp"; + else + { + __set_errno (ENOENT); + return -1; + } + } + + dlen = strlen (dir); + while (dlen > 1 && dir[dlen - 1] == '/') + dlen--; /* remove trailing slashes */ + + /* check we have room for "${dir}/${pfx}XXXXXX\0" */ + if (tmpl_len < dlen + 1 + plen + 6 + 1) + { + __set_errno (EINVAL); + return -1; + } + + sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx); + return 0; +} +#endif /* _LIBC */ + +/* These are the characters used in temporary file names. */ +static const char letters[] = +"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; + +/* Generate a temporary file name based on TMPL. TMPL must match the + rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). + The name constructed does not exist at the time of the call to + __gen_tempname. TMPL is overwritten with the result. + + KIND may be one of: + __GT_NOCREATE: simply verify that the name does not exist + at the time of the call. + __GT_FILE: create the file using open(O_CREAT|O_EXCL) + and return a read-write fd. The file is mode 0600. + __GT_DIR: create a directory, which will be mode 0700. + + We use a clever algorithm to get hard-to-predict names. */ +int +__gen_tempname (char *tmpl, int suffixlen, int flags, int kind) +{ + int len; + char *XXXXXX; + static uint64_t value; + uint64_t random_time_bits; + unsigned int count; + int fd = -1; + int save_errno = errno; + struct_stat64 st; + + /* A lower bound on the number of temporary files to attempt to + generate. The maximum total number of temporary file names that + can exist for a given template is 62**6. It should never be + necessary to try all of these combinations. Instead if a reasonable + number of names is tried (we define reasonable as 62**3) fail to + give the system administrator the chance to remove the problems. */ +#define ATTEMPTS_MIN (62 * 62 * 62) + + /* The number of times to attempt to generate a temporary file. To + conform to POSIX, this must be no smaller than TMP_MAX. */ +#if ATTEMPTS_MIN < TMP_MAX + unsigned int attempts = TMP_MAX; +#else + unsigned int attempts = ATTEMPTS_MIN; +#endif + + len = strlen (tmpl); + if (len < 6 + suffixlen || memcmp (&tmpl[len - 6 - suffixlen], "XXXXXX", 6)) + { + __set_errno (EINVAL); + return -1; + } + + /* This is where the Xs start. */ + XXXXXX = &tmpl[len - 6 - suffixlen]; + + /* Get some more or less random data. */ +#ifdef RANDOM_BITS + RANDOM_BITS (random_time_bits); +#else + { + struct timeval tv; + __gettimeofday (&tv, NULL); + random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; + } +#endif + value += random_time_bits ^ __getpid (); + + for (count = 0; count < attempts; value += 7777, ++count) + { + uint64_t v = value; + + /* Fill in the random bits. */ + XXXXXX[0] = letters[v % 62]; + v /= 62; + XXXXXX[1] = letters[v % 62]; + v /= 62; + XXXXXX[2] = letters[v % 62]; + v /= 62; + XXXXXX[3] = letters[v % 62]; + v /= 62; + XXXXXX[4] = letters[v % 62]; + v /= 62; + XXXXXX[5] = letters[v % 62]; + + switch (kind) + { + case __GT_FILE: + fd = __open (tmpl, + (flags & ~O_ACCMODE) + | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR); + break; + + case __GT_DIR: + fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR); + break; + + case __GT_NOCREATE: + /* This case is backward from the other three. __gen_tempname + succeeds if __xstat fails because the name does not exist. + Note the continue to bypass the common logic at the bottom + of the loop. */ + if (__lxstat64 (_STAT_VER, tmpl, &st) < 0) + { + if (errno == ENOENT) + { + __set_errno (save_errno); + return 0; + } + else + /* Give up now. */ + return -1; + } + continue; + + default: + assert (! "invalid KIND in __gen_tempname"); + abort (); + } + + if (fd >= 0) + { + __set_errno (save_errno); + return fd; + } + else if (errno != EEXIST) + return -1; + } + + /* We got out of the loop because we ran out of combinations to try. */ + __set_errno (EEXIST); + return -1; +} diff --git a/gnulib/lib/tempname.h b/gnulib/lib/tempname.h new file mode 100644 index 0000000..bcb8d27 --- /dev/null +++ b/gnulib/lib/tempname.h @@ -0,0 +1,50 @@ +/* Create a temporary file or directory. + + Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License as published by + the Free Software Foundation; either version 2.1 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program. If not, see . */ + +/* header written by Eric Blake */ + +#ifndef GL_TEMPNAME_H +# define GL_TEMPNAME_H + +# include + +# ifdef __GT_FILE +# define GT_FILE __GT_FILE +# define GT_DIR __GT_DIR +# define GT_NOCREATE __GT_NOCREATE +# else +# define GT_FILE 0 +# define GT_DIR 1 +# define GT_NOCREATE 2 +# endif + +/* Generate a temporary file name based on TMPL. TMPL must match the + rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix). + The name constructed does not exist at the time of the call to + gen_tempname. TMPL is overwritten with the result. + + KIND may be one of: + GT_NOCREATE: simply verify that the name does not exist + at the time of the call. + GT_FILE: create a large file using open(O_CREAT|O_EXCL) + and return a read-write fd. The file is mode 0600. + GT_DIR: create a directory, which will be mode 0700. + + We use a clever algorithm to get hard-to-predict names. */ +extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind); + +#endif /* GL_TEMPNAME_H */ diff --git a/gnulib/lib/time.in.h b/gnulib/lib/time.in.h index 8c17915..1c61df8 100644 --- a/gnulib/lib/time.in.h +++ b/gnulib/lib/time.in.h @@ -1,6 +1,6 @@ /* A more-standard . - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -28,13 +27,13 @@ without adding our own declarations. */ #if (defined __need_time_t || defined __need_clock_t \ || defined __need_timespec \ - || defined _GL_TIME_H) + || defined _@GUARD_PREFIX@_TIME_H) # @INCLUDE_NEXT@ @NEXT_TIME_H@ #else -# define _GL_TIME_H +# define _@GUARD_PREFIX@_TIME_H # @INCLUDE_NEXT@ @NEXT_TIME_H@ diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h index 1713c33..28d1477 100644 --- a/gnulib/lib/unistd.in.h +++ b/gnulib/lib/unistd.in.h @@ -1,5 +1,5 @@ /* Substitute for and wrapper around . - Copyright (C) 2003-2011 Free Software Foundation, Inc. + Copyright (C) 2003-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -36,7 +35,7 @@ # define _GL_WINSOCK2_H_WITNESS /* Normal invocation. */ -#elif !defined _GL_UNISTD_H +#elif !defined _@GUARD_PREFIX@_UNISTD_H /* The include_next requires a split double-inclusion guard. */ #if @HAVE_UNISTD_H@ @@ -51,8 +50,8 @@ # undef _GL_INCLUDING_WINSOCK2_H #endif -#if !defined _GL_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H -#define _GL_UNISTD_H +#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 @@ -75,16 +74,27 @@ #endif /* mingw fails to declare _exit in . */ -/* mingw, BeOS, Haiku declare environ in , not in . */ +/* mingw, MSVC, 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) \ +/* 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 @@ -97,7 +107,15 @@ # include #endif -#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ +/* 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 @@ -116,78 +134,77 @@ /* 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 +/* 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 -# 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 +# 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 @@ -223,12 +240,24 @@ _GL_WARN_ON_USE (access, "the access function is a security risk - " #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:2001 specification - . */ + See the POSIX:2008 specification + . */ + See the POSIX:2008 specification + . */ # if @REPLACE_DUP2@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define dup2 rpl_dup2 @@ -425,8 +462,8 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - " /* 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 - . */ + See the POSIX:2008 specification + . */ # if ! @HAVE_FCHDIR@ _GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); @@ -483,11 +520,30 @@ _GL_WARN_ON_USE (fchownat, "fchownat is not portable - " #endif -#if @GNULIB_FSYNC@ +#if @GNULIB_FDATASYNC@ /* Synchronize changes to a file. Return 0 if successful, otherwise -1 and errno set. - See POSIX:2001 specification - . */ + 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 @@ -505,12 +561,21 @@ _GL_WARN_ON_USE (fsync, "fsync is unportable - " #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@ + 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 +# endif _GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); +# endif _GL_CXXALIASWARN (ftruncate); #elif defined GNULIB_POSIXCHECK # undef ftruncate @@ -526,8 +591,8 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " 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 - . + 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 @@ -870,12 +935,49 @@ _GL_WARN_ON_USE (endusershell, "endusershell is unportable - " #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:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_LCHOWN@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef lchown @@ -904,8 +1006,8 @@ _GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " #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 - . */ + See POSIX:2008 specification + . */ # if @REPLACE_LINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define link rpl_link @@ -970,8 +1072,8 @@ _GL_WARN_ON_USE (linkat, "linkat is unportable - " #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 - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_LSEEK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define lseek rpl_lseek @@ -1041,10 +1143,12 @@ _GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " #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 . */ + 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, @@ -1075,10 +1179,11 @@ _GL_WARN_ON_USE (pread, "pread is unportable - " /* 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 - . */ + 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, @@ -1105,12 +1210,34 @@ _GL_WARN_ON_USE (pwrite, "pwrite is unportable - " #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:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_READLINK@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define readlink rpl_readlink @@ -1178,11 +1305,38 @@ _GL_WARN_ON_USE (rmdir, "rmdir is unportable - " #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:2001 specification - . */ + See the POSIX:2008 specification + . */ # if @REPLACE_SLEEP@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef sleep @@ -1331,7 +1485,7 @@ _GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " /* 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 @@ -1357,9 +1511,9 @@ _GL_WARN_ON_USE (usleep, "usleep is unportable - " #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@ + See the POSIX:2008 specification + . */ +# if @REPLACE_WRITE@ # if !(defined __cplusplus && defined GNULIB_NAMESPACE) # undef write # define write rpl_write @@ -1377,5 +1531,5 @@ _GL_CXXALIASWARN (write); #endif -#endif /* _GL_UNISTD_H */ -#endif /* _GL_UNISTD_H */ +#endif /* _@GUARD_PREFIX@_UNISTD_H */ +#endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c index 6d426a9..d875f7a 100644 --- a/gnulib/lib/vasnprintf.c +++ b/gnulib/lib/vasnprintf.c @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 1999, 2002-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ /* This file can be parametrized with the following macros: VASNPRINTF The name of the function being defined. @@ -276,7 +275,7 @@ decimal_point_char (void) { const char *point; /* Determine it in a multithread-safe way. We know nl_langinfo is - multithread-safe on glibc systems and MacOS X systems, but is not required + multithread-safe on glibc systems and Mac OS X systems, but is not required to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. localeconv() is rarely multithread-safe. */ # if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) @@ -553,32 +552,61 @@ divide (mpn_t a, mpn_t b, mpn_t *q) 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) + /* 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) { - msd = msd >> 2; - s -= 2; + /* 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); } - if (msd >= 0x2) + else +# undef NWORDS +# endif { - msd = msd >> 1; - s -= 1; + 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. */ @@ -885,9 +913,9 @@ decode_long_double (long double x, int *ep, mpn_t *mp) 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 + /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the latter is an integer. */ - /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs. + /* 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', @@ -973,9 +1001,9 @@ decode_double (double x, int *ep, mpn_t *mp) 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 + /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the latter is an integer. */ - /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs. + /* 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', @@ -2785,7 +2813,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, if (has_width) { # if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width + /* Outside POSIX, it's preferable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, characters); @@ -4856,7 +4884,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, 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 + /* 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 @@ -4865,7 +4893,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - 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 + 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 @@ -5388,7 +5416,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, { size_t w; # if ENABLE_UNISTDIO - /* Outside POSIX, it's preferrable to compare the width + /* Outside POSIX, it's preferable to compare the width against the number of _characters_ of the converted value. */ w = DCHAR_MBSNLEN (result + length, count); diff --git a/gnulib/lib/vasnprintf.h b/gnulib/lib/vasnprintf.h index 740f7e9..f6cb1e4 100644 --- a/gnulib/lib/vasnprintf.h +++ b/gnulib/lib/vasnprintf.h @@ -1,5 +1,5 @@ /* vsprintf with automatic memory allocation. - Copyright (C) 2002-2004, 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2002-2004, 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #ifndef _VASNPRINTF_H #define _VASNPRINTF_H diff --git a/gnulib/lib/vasprintf.c b/gnulib/lib/vasprintf.c index 86d0328..0ac17a6 100644 --- a/gnulib/lib/vasprintf.c +++ b/gnulib/lib/vasprintf.c @@ -1,5 +1,5 @@ /* Formatted output to strings. - Copyright (C) 1999, 2002, 2006-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2002, 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -12,8 +12,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along - with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + with this program; if not, see . */ #include diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h index d51ba68..f87a08c 100644 --- a/gnulib/lib/verify.h +++ b/gnulib/lib/verify.h @@ -1,6 +1,6 @@ /* Compile-time assert-like macros. - Copyright (C) 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2005-2006, 2009-2012 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -17,21 +17,39 @@ /* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ -#ifndef VERIFY_H -# define VERIFY_H 1 +#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__ || (__GNUC__ == 4 && 6 <= __GNUC_MINOR__)) && !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 /* 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. + 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. + 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 @@ -39,7 +57,9 @@ constant and nonnegative. * Next this expression W is wrapped in a type - struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }. + 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. @@ -53,7 +73,7 @@ void function (int n) { verify (n < 0); } - * For the verify macro, the struct verify_type__ will need to + * 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, @@ -91,11 +111,11 @@ Which of the following alternatives can be used? extern int dummy [sizeof (struct {...})]; - extern int dummy [sizeof (struct verify_type__ {...})]; + extern int dummy [sizeof (struct _gl_verify_type {...})]; extern void dummy (int [sizeof (struct {...})]); - extern void dummy (int [sizeof (struct verify_type__ {...})]); + extern void dummy (int [sizeof (struct _gl_verify_type {...})]); extern int (*dummy (void)) [sizeof (struct {...})]; - extern int (*dummy (void)) [sizeof (struct verify_type__ {...})]; + 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 @@ -109,15 +129,9 @@ __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 + * 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. * In C++, any struct definition inside sizeof is invalid. Use a template type to work around the problem. */ @@ -140,24 +154,88 @@ possible. */ # define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) -/* Verify requirement R at compile-time, as an integer constant expression. - Return 1. */ +/* 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 verify_type__ { unsigned int verify_error_if_negative_size__: w; }; -# define verify_true(R) \ - (!!sizeof (verify_type__<(R) ? 1 : -1>)) + 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 verify_true(R) \ - (!!sizeof \ - (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; })) +# 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) \ - extern int (* _GL_GENSYM (verify_function) (void)) [verify_true (R)] +# define verify(R) _GL_VERIFY (R, "verify (" #R ")") + +/* @assert.h omit end@ */ #endif diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h index 5bc137c..fa37325 100644 --- a/gnulib/lib/wchar.in.h +++ b/gnulib/lib/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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. */ @@ -49,7 +48,7 @@ #else /* Normal invocation convention. */ -#ifndef _GL_WCHAR_H +#ifndef _@GUARD_PREFIX@_WCHAR_H #define _GL_ALREADY_INCLUDING_WCHAR_H @@ -61,9 +60,13 @@ . 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. */ -#ifndef __GLIBC__ +#if !(defined __GLIBC__ && !defined __UCLIBC__) # include +#endif +#ifndef __GLIBC__ # include # include #endif @@ -77,8 +80,16 @@ #undef _GL_ALREADY_INCLUDING_WCHAR_H -#ifndef _GL_WCHAR_H -#define _GL_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. */ @@ -94,6 +105,18 @@ # 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 @@ -120,11 +143,11 @@ typedef int rpl_mbstate_t; # undef btowc # define btowc rpl_btowc # endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c)); +_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_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (btowc, wint_t, (int c)); # endif @@ -145,12 +168,12 @@ _GL_WARN_ON_USE (btowc, "btowc is unportable - " # undef wctob # define wctob rpl_wctob # endif -_GL_FUNCDECL_RPL (wctob, int, (wint_t wc)); +_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_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); # endif @@ -411,12 +434,12 @@ _GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " # undef wcwidth # define wcwidth rpl_wcwidth # endif -_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t)); +_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_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); # endif _GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); # endif @@ -433,10 +456,25 @@ _GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " /* 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 -_GL_CXXALIAS_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n)); +_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 @@ -450,7 +488,8 @@ _GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " #if @GNULIB_WMEMCMP@ # if !@HAVE_WMEMCMP@ _GL_FUNCDECL_SYS (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); + (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)); @@ -520,7 +559,7 @@ _GL_WARN_ON_USE (wmemset, "wmemset is unportable - " /* 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_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); @@ -536,7 +575,8 @@ _GL_WARN_ON_USE (wcslen, "wcslen is unportable - " /* 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_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); @@ -655,7 +695,8 @@ _GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " /* Compare S1 and S2. */ #if @GNULIB_WCSCMP@ # if !@HAVE_WCSCMP@ -_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); +_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); @@ -672,7 +713,8 @@ _GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " #if @GNULIB_WCSNCMP@ # if !@HAVE_WCSNCMP@ _GL_FUNCDECL_SYS (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); + (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)); @@ -689,7 +731,8 @@ _GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " /* 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_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); @@ -706,7 +749,8 @@ _GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " #if @GNULIB_WCSNCASECMP@ # if !@HAVE_WCSNCASECMP@ _GL_FUNCDECL_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); + (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)); @@ -774,10 +818,24 @@ _GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " /* 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 -_GL_CXXALIAS_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); +_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 @@ -790,10 +848,24 @@ _GL_WARN_ON_USE (wcschr, "wcschr is unportable - " /* 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 -_GL_CXXALIAS_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc)); +_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 @@ -807,7 +879,8 @@ _GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " 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_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); @@ -824,7 +897,8 @@ _GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " 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_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); @@ -841,11 +915,26 @@ _GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " #if @GNULIB_WCSPBRK@ # if !@HAVE_WCSPBRK@ _GL_FUNCDECL_SYS (wcspbrk, wchar_t *, - (const wchar_t *wcs, const wchar_t *accept)); -# endif -_GL_CXXALIAS_SYS (wcspbrk, wchar_t *, - (const wchar_t *wcs, const wchar_t *accept)); + (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 @@ -859,11 +948,26 @@ _GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " #if @GNULIB_WCSSTR@ # if !@HAVE_WCSSTR@ _GL_FUNCDECL_SYS (wcsstr, wchar_t *, - (const wchar_t *haystack, const wchar_t *needle)); -# endif -_GL_CXXALIAS_SYS (wcsstr, wchar_t *, - (const wchar_t *haystack, const wchar_t *needle)); + (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 @@ -899,11 +1003,13 @@ _GL_WARN_ON_USE (wcstok, "wcstok is unportable - " # undef wcswidth # define wcswidth rpl_wcswidth # endif -_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n)); +_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_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 @@ -917,6 +1023,6 @@ _GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " #endif -#endif /* _GL_WCHAR_H */ -#endif /* _GL_WCHAR_H */ +#endif /* _@GUARD_PREFIX@_WCHAR_H */ +#endif /* _@GUARD_PREFIX@_WCHAR_H */ #endif diff --git a/gnulib/lib/wcrtomb.c b/gnulib/lib/wcrtomb.c index 00e7b85..f15b545 100644 --- a/gnulib/lib/wcrtomb.c +++ b/gnulib/lib/wcrtomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h index 18a5dd7..373adc5 100644 --- a/gnulib/lib/wctype.in.h +++ b/gnulib/lib/wctype.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that lack it. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, 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 and Paul Eggert. */ @@ -26,7 +25,7 @@ * wctrans_t, and wctype_t are not yet implemented. */ -#ifndef _GL_WCTYPE_H +#ifndef _@GUARD_PREFIX@_WCTYPE_H #if __GNUC__ >= 3 @PRAGMA_SYSTEM_HEADER@ @@ -52,13 +51,26 @@ # @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ #endif -#ifndef _GL_WCTYPE_H -#define _GL_WCTYPE_H +#ifndef _@GUARD_PREFIX@_WCTYPE_H +#define _@GUARD_PREFIX@_WCTYPE_H /* 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 @@ -66,6 +78,18 @@ # 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 @@ -115,6 +139,10 @@ # define iswspace rpl_iswspace # define iswupper rpl_iswupper # define iswxdigit rpl_iswxdigit +# endif +# endif +# if @REPLACE_TOWLOWER@ +# if !(defined __cplusplus && defined GNULIB_NAMESPACE) # define towlower rpl_towlower # define towupper rpl_towupper # endif @@ -258,7 +286,7 @@ iswxdigit } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towlower # else towlower @@ -269,7 +297,7 @@ towlower } static inline wint_t -# if @REPLACE_ISWCNTRL@ +# if @REPLACE_TOWLOWER@ rpl_towupper # else towupper @@ -416,7 +444,7 @@ _GL_WARN_ON_USE (iswctype, "iswctype is unportable - " # endif #endif -#if @REPLACE_ISWCNTRL@ || defined __MINGW32__ +#if @REPLACE_TOWLOWER@ || defined __MINGW32__ _GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); _GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); #else @@ -466,5 +494,5 @@ _GL_WARN_ON_USE (towctrans, "towctrans is unportable - " #endif -#endif /* _GL_WCTYPE_H */ -#endif /* _GL_WCTYPE_H */ +#endif /* _@GUARD_PREFIX@_WCTYPE_H */ +#endif /* _@GUARD_PREFIX@_WCTYPE_H */ diff --git a/gnulib/lib/xsize.h b/gnulib/lib/xsize.h index 5816dcf..92985ae 100644 --- a/gnulib/lib/xsize.h +++ b/gnulib/lib/xsize.h @@ -1,6 +1,6 @@ /* xsize.h -- Checked size_t computations. - Copyright (C) 2003, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2003, 2008-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -13,8 +13,7 @@ GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with this program; if not, write to the Free Software Foundation, - Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ + along with this program; if not, see . */ #ifndef _XSIZE_H #define _XSIZE_H diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4 index 7feed46..d978cb8 100644 --- a/gnulib/m4/00gnulib.m4 +++ b/gnulib/m4/00gnulib.m4 @@ -1,5 +1,5 @@ # 00gnulib.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4 index e2e8a05..656924b 100644 --- a/gnulib/m4/alloca.m4 +++ b/gnulib/m4/alloca.m4 @@ -1,5 +1,5 @@ -# alloca.m4 serial 10 -dnl Copyright (C) 2002-2004, 2006-2007, 2009-2011 Free Software Foundation, +# alloca.m4 serial 14 +dnl Copyright (C) 2002-2004, 2006-2007, 2009-2012 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, @@ -36,8 +36,86 @@ AC_DEFUN([gl_FUNC_ALLOCA], 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/gnulib/m4/argz.m4 b/gnulib/m4/argz.m4 index f4fa3a0..38f1e61 100644 --- a/gnulib/m4/argz.m4 +++ b/gnulib/m4/argz.m4 @@ -1,13 +1,13 @@ # Portability macros for glibc argz. -*- Autoconf -*- # -# Copyright (C) 2004-2011 Free Software Foundation, Inc. +# Copyright (C) 2004-2012 Free Software Foundation, Inc. # Written by Gary V. Vaughan # # 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 8 argz.m4 +# serial 11 argz.m4 AC_DEFUN([gl_FUNC_ARGZ], [gl_PREREQ_ARGZ @@ -19,7 +19,7 @@ AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT]) AC_CHECK_TYPES([error_t], [], [AC_DEFINE([error_t], [int], - [Define to a type to use for `error_t' if it is not otherwise available.]) + [Define to a type to use for 'error_t' if it is not otherwise available.]) AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h does not typedef error_t.])], [#if defined(HAVE_ARGZ_H) @@ -27,7 +27,7 @@ AC_CHECK_TYPES([error_t], #endif]) ARGZ_H= -AC_CHECK_FUNC([argz_replace], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])]) +AC_CHECK_FUNC([argz_replace], [], [ARGZ_H=argz.h]) dnl if have system argz functions, allow forced use of dnl libltdl-supplied implementation (and default to do so @@ -70,10 +70,10 @@ AS_IF([test -z "$ARGZ_H"], AS_IF([test "$lt_cv_sys_argz_works" = yes], [AC_DEFINE([HAVE_WORKING_ARGZ], [1], [This value is set to 1 to indicate that the system argz facility works])], - [ARGZ_H=argz.h - AC_LIBOBJ([argz])])]) + [ARGZ_H=argz.h])]) AC_SUBST([ARGZ_H]) +AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) ]) # Prerequisites of lib/argz.c. diff --git a/gnulib/m4/btowc.m4 b/gnulib/m4/btowc.m4 index 603298f..e565321 100644 --- a/gnulib/m4/btowc.m4 +++ b/gnulib/m4/btowc.m4 @@ -1,5 +1,5 @@ -# btowc.m4 serial 8 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# btowc.m4 serial 10 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -108,11 +108,6 @@ int main () *) 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. diff --git a/gnulib/m4/canonicalize.m4 b/gnulib/m4/canonicalize.m4 index dcc6039..ea51ac4 100644 --- a/gnulib/m4/canonicalize.m4 +++ b/gnulib/m4/canonicalize.m4 @@ -1,6 +1,6 @@ -# canonicalize.m4 serial 17 +# canonicalize.m4 serial 26 -dnl Copyright (C) 2003-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -10,40 +10,49 @@ dnl with or without modifications, as long as this notice is preserved. # 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 + 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 - 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 + else + case "$gl_cv_func_realpath_works" in + *yes) ;; + *) REPLACE_REALPATH=1 ;; + esac fi - elif test "$gl_cv_func_realpath_works" != yes; then - AC_LIBOBJ([canonicalize-lgpl]) - REPLACE_REALPATH=1 - REPLACE_CANONICALIZE_FILE_NAME=1 + 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 AC_LIBOBJ). +# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ). AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) @@ -59,11 +68,15 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], 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; { @@ -81,14 +94,31 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS], 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], - [gl_cv_func_realpath_works="guessing no"]) + ], + [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 ]) - 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 + 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/gnulib/m4/close.m4 b/gnulib/m4/close.m4 new file mode 100644 index 0000000..379e70d --- /dev/null +++ b/gnulib/m4/close.m4 @@ -0,0 +1,33 @@ +# close.m4 serial 8 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/codeset.m4 b/gnulib/m4/codeset.m4 index da73552..cf53d24 100644 --- a/gnulib/m4/codeset.m4 +++ b/gnulib/m4/codeset.m4 @@ -1,5 +1,5 @@ # codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/configmake.m4 b/gnulib/m4/configmake.m4 index a029823..8c82371 100644 --- a/gnulib/m4/configmake.m4 +++ b/gnulib/m4/configmake.m4 @@ -1,5 +1,5 @@ # configmake.m4 serial 1 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/ctype.m4 b/gnulib/m4/ctype.m4 index 4a86ba9..c1a4f22 100644 --- a/gnulib/m4/ctype.m4 +++ b/gnulib/m4/ctype.m4 @@ -1,5 +1,5 @@ # ctype_h.m4 serial 6 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4 index 16a4e3e..1e03751 100644 --- a/gnulib/m4/double-slash-root.m4 +++ b/gnulib/m4/double-slash-root.m4 @@ -1,5 +1,5 @@ # double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4 index def263b..fc86e80 100644 --- a/gnulib/m4/dup2.m4 +++ b/gnulib/m4/dup2.m4 @@ -1,5 +1,5 @@ -#serial 12 -dnl Copyright (C) 2002, 2005, 2007, 2009-2011 Free Software Foundation, Inc. +#serial 18 +dnl Copyright (C) 2002, 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -8,24 +8,28 @@ 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 + 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; -#if HAVE_FCNTL +#ifdef FD_CLOEXEC if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) result |= 1; -#endif HAVE_FCNTL +#endif if (dup2 (1, 1) == 0) result |= 2; -#if HAVE_FCNTL +#ifdef FD_CLOEXEC if (fcntl (1, F_GETFD) != FD_CLOEXEC) result |= 4; #endif @@ -41,30 +45,37 @@ AC_DEFUN([gl_FUNC_DUP2], [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;; + gl_cv_func_dup2_works="guessing no" ;; cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works=no;; + 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=no;; + gl_cv_func_dup2_works="guessing no" ;; freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works=no;; + gl_cv_func_dup2_works="guessing no" ;; haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works=no;; - *) gl_cv_func_dup2_works=yes;; + gl_cv_func_dup2_works="guessing no" ;; + *) gl_cv_func_dup2_works="guessing yes" ;; esac]) ]) - if test "$gl_cv_func_dup2_works" = no; then - gl_REPLACE_DUP2 - fi + case "$gl_cv_func_dup2_works" in + *yes) ;; + *) + REPLACE_DUP2=1 + ;; + 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 + ]) ]) -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]) -]) +# Prerequisites of lib/dup2.c. +AC_DEFUN([gl_PREREQ_DUP2], []) diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4 index 3006c48..75f17e2 100644 --- a/gnulib/m4/eealloc.m4 +++ b/gnulib/m4/eealloc.m4 @@ -1,5 +1,5 @@ # eealloc.m4 serial 2 -dnl Copyright (C) 2003, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/environ.m4 b/gnulib/m4/environ.m4 index 7457ad1..8eb57c9 100644 --- a/gnulib/m4/environ.m4 +++ b/gnulib/m4/environ.m4 @@ -1,5 +1,5 @@ -# environ.m4 serial 5 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +# environ.m4 serial 6 +dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,16 @@ 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) + + 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 diff --git a/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4 index 687baff..1e76ba2 100644 --- a/gnulib/m4/errno_h.m4 +++ b/gnulib/m4/errno_h.m4 @@ -1,5 +1,5 @@ -# errno_h.m4 serial 8 -dnl Copyright (C) 2004, 2006, 2008-2011 Free Software Foundation, Inc. +# errno_h.m4 serial 11 +dnl Copyright (C) 2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,6 +10,9 @@ AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], 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 @@ -34,6 +37,12 @@ booboo #if !defined ENOTSUP booboo #endif +#if !defined ENETRESET +booboo +#endif +#if !defined ECONNABORTED +booboo +#endif #if !defined ESTALE booboo #endif @@ -43,6 +52,12 @@ booboo #if !defined ECANCELED booboo #endif +#if !defined EOWNERDEAD +booboo +#endif +#if !defined ENOTRECOVERABLE +booboo +#endif ], [gl_cv_header_errno_h_complete=no], [gl_cv_header_errno_h_complete=yes]) @@ -54,6 +69,7 @@ booboo 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]) diff --git a/gnulib/m4/exponentd.m4 b/gnulib/m4/exponentd.m4 new file mode 100644 index 0000000..0ae4ccf --- /dev/null +++ b/gnulib/m4/exponentd.m4 @@ -0,0 +1,116 @@ +# exponentd.m4 serial 3 +dnl Copyright (C) 2007-2008, 2010-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4 index 1330503..6d17d8a 100644 --- a/gnulib/m4/extensions.m4 +++ b/gnulib/m4/extensions.m4 @@ -1,7 +1,7 @@ -# serial 9 -*- Autoconf -*- +# serial 12 -*- Autoconf -*- # Enable extensions on systems that normally disable them. -# Copyright (C) 2003, 2006-2011 Free Software Foundation, Inc. +# Copyright (C) 2003, 2006-2012 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. @@ -43,7 +43,7 @@ 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 + [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 @@ -67,6 +67,10 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif +/* Enable general extensions on Mac 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 @@ -95,6 +99,7 @@ AC_BEFORE([$0], [AC_RUN_IFELSE])dnl 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]) diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4 index 88db07e..9862741 100644 --- a/gnulib/m4/fcntl-o.m4 +++ b/gnulib/m4/fcntl-o.m4 @@ -1,5 +1,5 @@ -# fcntl-o.m4 serial 3 -dnl Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. +# fcntl-o.m4 serial 4 +dnl Copyright (C) 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,12 +17,21 @@ AC_DEFUN([gl_FCNTL_O_FLAGS], 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 - #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 @@ -38,6 +47,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS], ]], [[ int result = !constants; + #if HAVE_SYMLINK { static char const sym[] = "conftest.sym"; if (symlink (".", sym) != 0) @@ -53,6 +63,7 @@ AC_DEFUN([gl_FCNTL_O_FLAGS], } unlink (sym); } + #endif { static char const file[] = "confdefs.h"; int fd = open (file, O_RDONLY | O_NOATIME); diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4 index 1ef4f45..cac28ae 100644 --- a/gnulib/m4/fcntl_h.m4 +++ b/gnulib/m4/fcntl_h.m4 @@ -1,6 +1,6 @@ -# serial 13 +# serial 15 # Configure fcntl.h. -dnl Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,6 +13,12 @@ AC_DEFUN([gl_FCNTL_H], 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. @@ -31,13 +37,14 @@ AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], 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]) + 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]) + 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/fdopen.m4 b/gnulib/m4/fdopen.m4 new file mode 100644 index 0000000..14f1554 --- /dev/null +++ b/gnulib/m4/fdopen.m4 @@ -0,0 +1,47 @@ +# fdopen.m4 serial 3 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/float_h.m4 b/gnulib/m4/float_h.m4 index 265a4c1..51c9c7b 100644 --- a/gnulib/m4/float_h.m4 +++ b/gnulib/m4/float_h.m4 @@ -1,5 +1,5 @@ -# float_h.m4 serial 5 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# float_h.m4 serial 9 +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,11 +9,90 @@ 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 - beos* | openbsd* | mirbsd*) + aix* | beos* | openbsd* | mirbsd* | irix*) FLOAT_H=float.h - gl_NEXT_HEADERS([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/gnulib/m4/fnmatch.m4 b/gnulib/m4/fnmatch.m4 index 9b537a7..e46b6e5 100644 --- a/gnulib/m4/fnmatch.m4 +++ b/gnulib/m4/fnmatch.m4 @@ -1,6 +1,6 @@ -# Check for fnmatch - serial 5. +# Check for fnmatch - serial 9. -# Copyright (C) 2000-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2007, 2009-2012 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. @@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], FNMATCH_H= gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]' + 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], @@ -65,6 +65,8 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], 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)) @@ -126,19 +128,9 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX], 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]) + AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) ]) # Request a POSIX compliant fnmatch function with GNU extensions. @@ -148,3 +140,17 @@ AC_DEFUN([gl_FUNC_FNMATCH_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/gnulib/m4/fpieee.m4 b/gnulib/m4/fpieee.m4 new file mode 100644 index 0000000..82fd778 --- /dev/null +++ b/gnulib/m4/fpieee.m4 @@ -0,0 +1,54 @@ +# fpieee.m4 serial 2 +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/fstat.m4 b/gnulib/m4/fstat.m4 new file mode 100644 index 0000000..3ab3297 --- /dev/null +++ b/gnulib/m4/fstat.m4 @@ -0,0 +1,39 @@ +# fstat.m4 serial 3 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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], +[ + AC_REQUIRE([AC_C_INLINE]) +]) diff --git a/gnulib/m4/getcwd.m4 b/gnulib/m4/getcwd.m4 new file mode 100644 index 0000000..50b96c6 --- /dev/null +++ b/gnulib/m4/getcwd.m4 @@ -0,0 +1,155 @@ +# getcwd.m4 - check for working getcwd that is compatible with glibc + +# Copyright (C) 2001, 2003-2007, 2009-2012 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, 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/gnulib/m4/getdelim.m4 b/gnulib/m4/getdelim.m4 index ef12736..a6f4872 100644 --- a/gnulib/m4/getdelim.m4 +++ b/gnulib/m4/getdelim.m4 @@ -1,6 +1,6 @@ -# getdelim.m4 serial 8 +# getdelim.m4 serial 10 -dnl Copyright (C) 2005-2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2007, 2009-2012 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, @@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_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 @@ -62,24 +63,21 @@ AC_DEFUN([gl_FUNC_GETDELIM], #endif #endif ], - [gl_cv_func_working_getdelim=yes], - [gl_cv_func_working_getdelim=no])] + [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 - gl_cv_func_working_getdelim=no + HAVE_GETDELIM=0 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. diff --git a/gnulib/m4/getline.m4 b/gnulib/m4/getline.m4 index ec001b9..72fbc9d 100644 --- a/gnulib/m4/getline.m4 +++ b/gnulib/m4/getline.m4 @@ -1,6 +1,6 @@ -# getline.m4 serial 23 +# getline.m4 serial 26 -dnl Copyright (C) 1998-2003, 2005-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 1998-2003, 2005-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl dnl This file is free software; the Free Software Foundation @@ -70,8 +70,8 @@ AC_DEFUN([gl_FUNC_GETLINE], #endif #endif ], - [am_cv_func_working_getline=yes], - [am_cv_func_working_getline=no])] + [am_cv_func_working_getline="guessing yes"], + [am_cv_func_working_getline="guessing no"])] )]) fi @@ -79,19 +79,18 @@ AC_DEFUN([gl_FUNC_GETLINE], 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 + 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], [ - gl_FUNC_GETDELIM + : ]) diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4 index 035a530..f6902b5 100644 --- a/gnulib/m4/getopt.m4 +++ b/gnulib/m4/getopt.m4 @@ -1,5 +1,5 @@ -# getopt.m4 serial 34 -dnl Copyright (C) 2002-2006, 2008-2011 Free Software Foundation, Inc. +# getopt.m4 serial 44 +dnl Copyright (C) 2002-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,10 +9,22 @@ 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 - ], - []) + 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 @@ -25,27 +37,6 @@ AC_DEFUN([gl_FUNC_GETOPT_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], [ @@ -75,11 +66,6 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS], AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) fi - dnl mingw's getopt (in libmingwex.a) does weird things when the options - dnl strings starts with '+' and it's not the first call. Some internal state - dnl is left over from earlier calls, and neither setting optind = 0 nor - dnl setting optreset = 1 get rid of this internal state. - dnl POSIX is silent on optind vs. optreset, so we allow either behavior. dnl POSIX 2008 does not specify leading '+' behavior, but see dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on dnl the next version of POSIX. For now, we only guarantee leading '+' @@ -88,30 +74,16 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS], AC_CACHE_CHECK([whether getopt is POSIX compatible], [gl_cv_func_getopt_posix], [ - dnl BSD getopt_long uses an incompatible method to reset - 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([[ + 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 @@ -119,91 +91,107 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS], 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; + 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 (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; + 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 - 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; +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 (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; - } + 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], - [case "$host_os" in - mingw*) gl_cv_func_getopt_posix="guessing no";; - darwin* | aix*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - ]) - CPPFLAGS=$gl_save_CPPFLAGS + [gl_cv_func_getopt_posix=yes], + [gl_cv_func_getopt_posix=no]) + fi + else + case "$host_os" in + darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; + *) gl_cv_func_getopt_posix="guessing yes";; + esac + fi ]) case "$gl_cv_func_getopt_posix" in *no) gl_replace_getopt=yes ;; @@ -232,25 +220,32 @@ dnl is ambiguous with environment values that contain newlines. [AC_LANG_PROGRAM([[#include #include #include + ]GL_NOCRASH[ ]], [[ int result = 0; + + nocrash_init(); + /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, + and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 10. */ { - char *myargv[3]; - myargv[0] = "conftest"; - myargv[1] = "-+"; - myargv[2] = 0; + static char conftest[] = "conftest"; + static char plus[] = "-+"; + char *argv[3] = { conftest, plus, NULL }; opterr = 0; - if (getopt (2, myargv, "+a") != '?') + if (getopt (2, argv, "+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, + 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. */ { - char *argv[] = { "program", "-p", "foo", "bar", NULL }; + 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') @@ -264,32 +259,44 @@ dnl is ambiguous with environment values that contain newlines. } /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ { - char *argv[] = { "program", "foo", "-p", NULL }; + 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 |= 32; + result |= 16; } /* This code fails on glibc 2.11. */ { - char *argv[] = { "program", "-b", "-a", NULL }; + 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 |= 64; + 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. Guess based on host and declarations. - case $host_os:$ac_cv_have_decl_optreset in - *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;; - *:yes) gl_cv_func_getopt_gnu=no;; - *) gl_cv_func_getopt_gnu=yes;; - esac + [dnl Cross compiling. Assume the worst, even on glibc platforms. + gl_cv_func_getopt_gnu="guessing no" ]) case $gl_had_POSIXLY_CORRECT in exported) ;; @@ -297,13 +304,54 @@ dnl is ambiguous with environment values that contain newlines. *) AS_UNSET([POSIXLY_CORRECT]) ;; esac ]) - if test "$gl_cv_func_getopt_gnu" = "no"; then + if test "$gl_cv_func_getopt_gnu" != yes; then gl_replace_getopt=yes + else + AC_CACHE_CHECK([for working GNU getopt_long function], + [gl_cv_func_getopt_long_gnu], + [AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [[#include + #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 ]) -# emacs' configure.in uses this. AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [ GETOPT_H=getopt.h @@ -314,7 +362,6 @@ AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], ]) # Prerequisites of lib/getopt*. -# emacs' configure.in uses this. AC_DEFUN([gl_PREREQ_GETOPT], [ AC_CHECK_DECLS_ONCE([getenv]) diff --git a/gnulib/m4/getpagesize.m4 b/gnulib/m4/getpagesize.m4 index 79dfbbe..156133a 100644 --- a/gnulib/m4/getpagesize.m4 +++ b/gnulib/m4/getpagesize.m4 @@ -1,5 +1,5 @@ -# getpagesize.m4 serial 8 -dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2011 Free Software Foundation, +# getpagesize.m4 serial 9 +dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2012 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, @@ -24,7 +24,6 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE], case "$host_os" in mingw*) REPLACE_GETPAGESIZE=1 - AC_LIBOBJ([getpagesize]) ;; esac dnl Also check whether it's declared. diff --git a/gnulib/m4/gettimeofday.m4 b/gnulib/m4/gettimeofday.m4 new file mode 100644 index 0000000..eda9702 --- /dev/null +++ b/gnulib/m4/gettimeofday.m4 @@ -0,0 +1,140 @@ +# serial 20 + +# Copyright (C) 2001-2003, 2005, 2007, 2009-2012 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], [ + 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/glibc21.m4 b/gnulib/m4/glibc21.m4 index bc81c11..c938fb1 100644 --- a/gnulib/m4/glibc21.m4 +++ b/gnulib/m4/glibc21.m4 @@ -1,5 +1,5 @@ # glibc21.m4 serial 5 -dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2011 Free Software Foundation, +dnl Copyright (C) 2000-2002, 2004, 2008, 2010-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4 index ecbf336..15d2b2b 100644 --- a/gnulib/m4/gnulib-common.m4 +++ b/gnulib/m4/gnulib-common.m4 @@ -1,5 +1,5 @@ -# gnulib-common.m4 serial 23 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# gnulib-common.m4 serial 33 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -12,11 +12,25 @@ AC_DEFUN([gl_COMMON], [ 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 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__ @@ -34,6 +48,20 @@ AC_DEFUN([gl_COMMON_BODY], [ /* 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 @@ -47,16 +75,49 @@ AC_DEFUN([gl_COMMON_BODY], [ # 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]) +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], [ - GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=gl_MODULE_INDICATOR_CONDITION + 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]) @@ -109,7 +170,8 @@ AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], [ dnl Override gl_WARN_ON_USE_PREPARE. - AC_DEFUN([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 @@ -150,6 +212,83 @@ 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. diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 index e42948b..b1c95fe 100644 --- a/gnulib/m4/gnulib-comp.m4 +++ b/gnulib/m4/gnulib-comp.m4 @@ -1,10 +1,22 @@ # DO NOT EDIT! GENERATED AUTOMATICALLY! -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 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. @@ -25,23 +37,23 @@ AC_DEFUN([gl_EARLY], m4_pattern_allow([^gl_ES$])dnl a valid locale name m4_pattern_allow([^gl_LIBOBJS$])dnl a variable m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([AC_PROG_RANLIB]) + AC_REQUIRE([gl_PROG_AR_RANLIB]) # Code from module alloca: # Code from module alloca-opt: # Code from module alloca-opt-tests: - # Code from module arg-nonnull: # Code from module argz: # Code from module binary-io: # Code from module binary-io-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 canonicalize-lgpl: # Code from module canonicalize-lgpl-tests: + # Code from module close: + # Code from module close-tests: # Code from module configmake: # Code from module ctype: # Code from module ctype-tests: @@ -56,9 +68,24 @@ AC_DEFUN([gl_EARLY], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) # Code from module fcntl-h: # Code from module fcntl-h-tests: + # Code from module fd-hook: + # Code from module fdopen: + # Code from module fdopen-tests: + # Code from module fgetc-tests: # Code from module float: + # Code from module float-tests: # Code from module fnmatch: # Code from module fnmatch-tests: + # Code from module fpieee: + AC_REQUIRE([gl_FP_IEEE]) + # Code from module fpucw: + # Code from module fputc-tests: + # Code from module fread-tests: + # Code from module fstat: + # Code from module fstat-tests: + # Code from module fwrite-tests: + # Code from module getcwd-lgpl: + # Code from module getcwd-lgpl-tests: # Code from module getdelim: # Code from module getdelim-tests: # Code from module getline: @@ -68,19 +95,29 @@ AC_DEFUN([gl_EARLY], # Code from module getopt-posix-tests: # Code from module getpagesize: # Code from module gettext-h: + # Code from module gettimeofday: + # Code from module gettimeofday-tests: # Code from module gitlog-to-changelog: # Code from module havelib: # Code from module ignore-value: # Code from module ignore-value-tests: # Code from module include_next: # Code from module intprops: + # Code from module intprops-tests: + # Code from module inttypes: + # Code from module inttypes-incomplete: + # Code from module inttypes-tests: # Code from module isblank: # Code from module isblank-tests: # Code from module langinfo: # Code from module langinfo-tests: + # Code from module largefile: + AC_REQUIRE([AC_SYS_LARGEFILE]) # 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: @@ -102,13 +139,20 @@ AC_DEFUN([gl_EARLY], # Code from module memchr: # Code from module memchr-tests: # Code from module mempcpy: + # Code from module mkstemp: + # Code from module msvc-inval: + # Code from module msvc-nothrow: # Code from module multiarch: # 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 pathmax: + # Code from module pathmax-tests: # Code from module putenv: + # Code from module rawmemchr: + # Code from module rawmemchr-tests: # Code from module readlink: # Code from module readlink-tests: # Code from module realloc-posix: @@ -122,6 +166,11 @@ AC_DEFUN([gl_EARLY], # Code from module setlocale: # Code from module setlocale-tests: # Code from module size_max: + # 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 ssize_t: # Code from module stat: # Code from module stat-tests: @@ -137,6 +186,8 @@ AC_DEFUN([gl_EARLY], # Code from module stdlib-tests: # Code from module stpcpy: # Code from module stpncpy: + # Code from module strchrnul: + # Code from module strchrnul-tests: # Code from module streq: # Code from module string: # Code from module string-tests: @@ -151,9 +202,17 @@ AC_DEFUN([gl_EARLY], # Code from module symlink-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_wait: # Code from module sys_wait-tests: + # Code from module tempname: + # 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: @@ -162,14 +221,12 @@ AC_DEFUN([gl_EARLY], # Code from module unistd-tests: # Code from module unsetenv: # Code from module unsetenv-tests: - # Code from module unused-parameter: # Code from module vasnprintf: # Code from module vasnprintf-tests: # Code from module vasprintf: # Code from module vasprintf-tests: # Code from module verify: # Code from module verify-tests: - # Code from module warn-on-use: # Code from module wchar: # Code from module wchar-tests: # Code from module wcrtomb: @@ -196,182 +253,274 @@ AC_DEFUN([gl_INIT], m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gnulib/lib' - # Code from module alloca: changequote(,)dnl LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` changequote([, ])dnl AC_SUBST([LTALLOCA]) - # Code from module alloca-opt: - gl_FUNC_ALLOCA - # Code from module arg-nonnull: - # Code from module argz: - gl_FUNC_ARGZ - # Code from module btowc: - gl_FUNC_BTOWC - gl_WCHAR_MODULE_INDICATOR([btowc]) - # Code from module c++defs: - # Code from module canonicalize-lgpl: - gl_CANONICALIZE_LGPL - gl_MODULE_INDICATOR([canonicalize-lgpl]) - gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) - gl_STDLIB_MODULE_INDICATOR([realpath]) - # Code from module configmake: - gl_CONFIGMAKE_PREP - # Code from module ctype: - gl_CTYPE_H - # Code from module dosname: - # Code from module errno: - gl_HEADER_ERRNO_H - # Code from module extensions: - # Code from module float: - gl_FLOAT_H - # Code from module fnmatch: - gl_FUNC_FNMATCH_POSIX - # Code from module getdelim: - gl_FUNC_GETDELIM - gl_STDIO_MODULE_INDICATOR([getdelim]) - # 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-h: - AC_SUBST([LIBINTL]) - AC_SUBST([LTLIBINTL]) - # Code from module gitlog-to-changelog: - # Code from module include_next: - # Code from module isblank: - gl_FUNC_ISBLANK - gl_CTYPE_MODULE_INDICATOR([isblank]) - # Code from module langinfo: - gl_LANGINFO_H - # 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 lstat: - gl_FUNC_LSTAT - gl_SYS_STAT_MODULE_INDICATOR([lstat]) - # 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 mbrtowc: - gl_FUNC_MBRTOWC - gl_WCHAR_MODULE_INDICATOR([mbrtowc]) - # Code from module mbsinit: - gl_FUNC_MBSINIT - gl_WCHAR_MODULE_INDICATOR([mbsinit]) - # Code from module mbsrtowcs: - gl_FUNC_MBSRTOWCS - gl_WCHAR_MODULE_INDICATOR([mbsrtowcs]) - # Code from module mbtowc: - gl_FUNC_MBTOWC - gl_STDLIB_MODULE_INDICATOR([mbtowc]) - # 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 multiarch: - gl_MULTIARCH - # Code from module nl_langinfo: - gl_FUNC_NL_LANGINFO - gl_LANGINFO_MODULE_INDICATOR([nl_langinfo]) - # Code from module pathmax: - gl_PATHMAX - # Code from module readlink: - gl_FUNC_READLINK - gl_UNISTD_MODULE_INDICATOR([readlink]) - # Code from module realloc-posix: - gl_FUNC_REALLOC_POSIX - gl_STDLIB_MODULE_INDICATOR([realloc-posix]) - # Code from module regex: - gl_REGEX - # Code from module safe-alloc: - gl_SAFE_ALLOC - # Code from module selinux-h: - gl_HEADERS_SELINUX_SELINUX_H - gl_HEADERS_SELINUX_CONTEXT_H - AC_REQUIRE([AC_C_INLINE]) - # Code from module size_max: - gl_SIZE_MAX - # 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 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 stpncpy: - gl_FUNC_STPNCPY - gl_STRING_MODULE_INDICATOR([stpncpy]) - # Code from module streq: - # Code from module string: - gl_HEADER_STRING_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 sys_stat: - gl_HEADER_SYS_STAT_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 unistd: - gl_UNISTD_H - # Code from module unused-parameter: - # Code from module vasnprintf: - gl_FUNC_VASNPRINTF - # Code from module vasprintf: - gl_FUNC_VASPRINTF - gl_STDIO_MODULE_INDICATOR([vasprintf]) - m4_ifdef([AM_XGETTEXT_OPTION], - [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format]) - AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) - # Code from module verify: - # Code from module warn-on-use: - # 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 xsize: - gl_XSIZE +gl_FUNC_ALLOCA +gl_FUNC_ARGZ +if test -n "$ARGZ_H"; then + AC_LIBOBJ([argz]) +fi +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_CANONICALIZE_LGPL +if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then + AC_LIBOBJ([canonicalize-lgpl]) +fi +gl_MODULE_INDICATOR([canonicalize-lgpl]) +gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name]) +gl_STDLIB_MODULE_INDICATOR([realpath]) +gl_CONFIGMAKE_PREP +gl_CTYPE_H +gl_HEADER_ERRNO_H +gl_FCNTL_H +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_GETDELIM +if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then + AC_LIBOBJ([getdelim]) + gl_PREREQ_GETDELIM +fi +gl_STDIO_MODULE_INDICATOR([getdelim]) +gl_FUNC_GETLINE +if test $REPLACE_GETLINE = 1; then + AC_LIBOBJ([getline]) + gl_PREREQ_GETLINE +fi +gl_STDIO_MODULE_INDICATOR([getline]) +gl_FUNC_GETOPT_GNU +if test $REPLACE_GETOPT = 1; then + AC_LIBOBJ([getopt]) + AC_LIBOBJ([getopt1]) + gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=1 +fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) +gl_MODULE_INDICATOR_FOR_TESTS([getopt-gnu]) +gl_FUNC_GETOPT_POSIX +if test $REPLACE_GETOPT = 1; then + AC_LIBOBJ([getopt]) + AC_LIBOBJ([getopt1]) + gl_PREREQ_GETOPT + dnl Arrange for unistd.h to include getopt.h. + GNULIB_GL_UNISTD_H_GETOPT=1 +fi +AC_SUBST([GNULIB_GL_UNISTD_H_GETOPT]) +AC_SUBST([LIBINTL]) +AC_SUBST([LTLIBINTL]) +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]) +gl_FUNC_ISBLANK +if test $HAVE_ISBLANK = 0; then + AC_LIBOBJ([isblank]) +fi +gl_CTYPE_MODULE_INDICATOR([isblank]) +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_FUNC_LSTAT +if test $REPLACE_LSTAT = 1; then + AC_LIBOBJ([lstat]) + gl_PREREQ_LSTAT +fi +gl_SYS_STAT_MODULE_INDICATOR([lstat]) +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_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_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_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_FUNC_MBTOWC +if test $REPLACE_MBTOWC = 1; then + AC_LIBOBJ([mbtowc]) + gl_PREREQ_MBTOWC +fi +gl_STDLIB_MODULE_INDICATOR([mbtowc]) +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_MKSTEMP +if test $HAVE_MKSTEMP = 0 || test $REPLACE_MKSTEMP = 1; then + AC_LIBOBJ([mkstemp]) + gl_PREREQ_MKSTEMP +fi +gl_STDLIB_MODULE_INDICATOR([mkstemp]) +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_PATHMAX +gl_FUNC_RAWMEMCHR +if test $HAVE_RAWMEMCHR = 0; then + AC_LIBOBJ([rawmemchr]) + gl_PREREQ_RAWMEMCHR +fi +gl_STRING_MODULE_INDICATOR([rawmemchr]) +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_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_SAFE_ALLOC +gl_HEADERS_SELINUX_SELINUX_H +gl_HEADERS_SELINUX_CONTEXT_H +AC_REQUIRE([AC_C_INLINE]) +if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then + AC_LIBOBJ([getfilecon]) +fi +gl_SIZE_MAX +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]) +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_FUNC_STPNCPY +if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then + AC_LIBOBJ([stpncpy]) + gl_PREREQ_STPNCPY +fi +gl_STRING_MODULE_INDICATOR([stpncpy]) +gl_FUNC_STRCHRNUL +if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then + AC_LIBOBJ([strchrnul]) + gl_PREREQ_STRCHRNUL +fi +gl_STRING_MODULE_INDICATOR([strchrnul]) +gl_HEADER_STRING_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_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_SYS_WAIT_H +AC_PROG_MKDIR_P +gl_FUNC_GEN_TEMPNAME +gl_HEADER_TIME_H +gl_UNISTD_H +gl_FUNC_VASNPRINTF +gl_FUNC_VASPRINTF +gl_STDIO_MODULE_INDICATOR([vasprintf]) +m4_ifdef([AM_XGETTEXT_OPTION], + [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format]) + AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])]) +gl_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_XSIZE # End of code from modules m4_ifval(gl_LIBSOURCES_LIST, [ m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || @@ -418,74 +567,146 @@ 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 - gl_FUNC_DUP2 - gl_UNISTD_MODULE_INDICATOR([dup2]) - gl_ENVIRON - gl_UNISTD_MODULE_INDICATOR([environ]) - gl_FCNTL_H - gl_FUNC_GETPAGESIZE - gl_UNISTD_MODULE_INDICATOR([getpagesize]) - AC_REQUIRE([AC_C_INLINE]) - 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_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - 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]) - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gl_FUNC_OPEN - gl_FCNTL_MODULE_INDICATOR([open]) - gl_FUNC_PUTENV - gl_STDLIB_MODULE_INDICATOR([putenv]) - gl_FUNC_SETENV - gl_STDLIB_MODULE_INDICATOR([setenv]) - gl_FUNC_SETLOCALE - gl_LOCALE_MODULE_INDICATOR([setlocale]) - gt_LOCALE_FR - gt_LOCALE_FR_UTF8 - gt_LOCALE_JA - gt_LOCALE_ZH_CN - gt_TYPE_WCHAR_T - gt_TYPE_WINT_T - 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_THREAD - gl_THREADLIB - gl_FUNC_UNSETENV - gl_STDLIB_MODULE_INDICATOR([unsetenv]) - 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 +AC_REQUIRE([AC_C_INLINE]) +gt_LOCALE_FR +gt_LOCALE_FR_UTF8 +gt_LOCALE_FR +gt_LOCALE_TR_UTF8 +gl_FUNC_CLOSE +if test $REPLACE_CLOSE = 1; then + AC_LIBOBJ([close]) +fi +gl_UNISTD_MODULE_INDICATOR([close]) +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_FUNC_FDOPEN +if test $REPLACE_FDOPEN = 1; then + AC_LIBOBJ([fdopen]) + gl_PREREQ_FDOPEN +fi +gl_STDIO_MODULE_INDICATOR([fdopen]) +gl_FUNC_FSTAT +if test $REPLACE_FSTAT = 1; then + AC_LIBOBJ([fstat]) + gl_PREREQ_FSTAT +fi +gl_SYS_STAT_MODULE_INDICATOR([fstat]) +gl_FUNC_GETCWD_LGPL +if test $REPLACE_GETCWD = 1; then + AC_LIBOBJ([getcwd-lgpl]) +fi +gl_UNISTD_MODULE_INDICATOR([getcwd]) +gl_FUNC_GETPAGESIZE +if test $REPLACE_GETPAGESIZE = 1; then + AC_LIBOBJ([getpagesize]) +fi +gl_UNISTD_MODULE_INDICATOR([getpagesize]) +AC_REQUIRE([AC_C_INLINE]) +gl_INTTYPES_H +gl_INTTYPES_INCOMPLETE +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_FR +gt_LOCALE_FR_UTF8 +gt_LOCALE_JA +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_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 +gt_LOCALE_FR +gt_LOCALE_FR_UTF8 +gl_FUNC_OPEN +if test $REPLACE_OPEN = 1; then + AC_LIBOBJ([open]) + gl_PREREQ_OPEN +fi +gl_FCNTL_MODULE_INDICATOR([open]) +gl_FUNC_PUTENV +if test $REPLACE_PUTENV = 1; then + AC_LIBOBJ([putenv]) +fi +gl_STDLIB_MODULE_INDICATOR([putenv]) +dnl Check for prerequisites for memory fence checks. +gl_FUNC_MMAP_ANON +AC_CHECK_HEADERS_ONCE([sys/mman.h]) +AC_CHECK_FUNCS_ONCE([mprotect]) +gl_FUNC_SETENV +if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then + AC_LIBOBJ([setenv]) +fi +gl_STDLIB_MODULE_INDICATOR([setenv]) +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 +gt_TYPE_WCHAR_T +gt_TYPE_WINT_T +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_THREAD +gl_THREADLIB +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]) +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])[ || @@ -578,12 +799,13 @@ AC_DEFUN([gltests_LIBSOURCES], [ # 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/gitlog-to-changelog - build-aux/unused-parameter.h - build-aux/warn-on-use.h + 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 lib/alloca.c lib/alloca.in.h lib/argz.c @@ -596,7 +818,9 @@ AC_DEFUN([gl_FILE_LIST], [ lib/ctype.in.h lib/dosname.h lib/errno.in.h + lib/fcntl.in.h lib/float+.h + lib/float.c lib/float.in.h lib/fnmatch.c lib/fnmatch.in.h @@ -609,11 +833,14 @@ AC_DEFUN([gl_FILE_LIST], [ lib/getopt1.c lib/getopt_int.h lib/gettext.h + lib/gettimeofday.c lib/isblank.c + lib/itold.c lib/langinfo.in.h lib/localcharset.c lib/localcharset.h lib/locale.in.h + lib/localeconv.c lib/lstat.c lib/malloc.c lib/malloca.c @@ -629,12 +856,15 @@ AC_DEFUN([gl_FILE_LIST], [ lib/memchr.c lib/memchr.valgrind lib/mempcpy.c + lib/mkstemp.c lib/nl_langinfo.c lib/pathmax.h lib/printf-args.c lib/printf-args.h lib/printf-parse.c lib/printf-parse.h + lib/rawmemchr.c + lib/rawmemchr.valgrind lib/readlink.c lib/realloc.c lib/ref-add.sin @@ -659,6 +889,8 @@ AC_DEFUN([gl_FILE_LIST], [ lib/stpcpy.c lib/stpncpy.c lib/str-two-way.h + lib/strchrnul.c + lib/strchrnul.valgrind lib/streq.h lib/string.in.h lib/strndup.c @@ -667,7 +899,11 @@ AC_DEFUN([gl_FILE_LIST], [ lib/strnlen1.h lib/strstr.c lib/sys_stat.in.h + lib/sys_time.in.h + lib/sys_types.in.h lib/sys_wait.in.h + lib/tempname.c + lib/tempname.h lib/time.in.h lib/unistd.in.h lib/vasnprintf.c @@ -683,6 +919,7 @@ AC_DEFUN([gl_FILE_LIST], [ m4/argz.m4 m4/btowc.m4 m4/canonicalize.m4 + m4/close.m4 m4/codeset.m4 m4/configmake.m4 m4/ctype.m4 @@ -691,23 +928,32 @@ AC_DEFUN([gl_FILE_LIST], [ m4/eealloc.m4 m4/environ.m4 m4/errno_h.m4 + m4/exponentd.m4 m4/extensions.m4 m4/fcntl-o.m4 m4/fcntl_h.m4 + m4/fdopen.m4 m4/float_h.m4 m4/fnmatch.m4 + m4/fpieee.m4 + m4/fstat.m4 + m4/getcwd.m4 m4/getdelim.m4 m4/getline.m4 m4/getopt.m4 m4/getpagesize.m4 + m4/gettimeofday.m4 m4/glibc21.m4 m4/gnulib-common.m4 m4/include_next.m4 m4/intlmacosx.m4 m4/intmax_t.m4 + m4/inttypes-pri.m4 + m4/inttypes.m4 m4/inttypes_h.m4 m4/isblank.m4 m4/langinfo_h.m4 + m4/largefile.m4 m4/lcmessage.m4 m4/lib-ld.m4 m4/lib-link.m4 @@ -718,12 +964,14 @@ AC_DEFUN([gl_FILE_LIST], [ 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/lstat.m4 m4/malloc.m4 m4/malloca.m4 + m4/math_h.m4 m4/mbrtowc.m4 m4/mbsinit.m4 m4/mbsrtowcs.m4 @@ -731,15 +979,21 @@ AC_DEFUN([gl_FILE_LIST], [ m4/mbtowc.m4 m4/memchr.m4 m4/mempcpy.m4 + m4/mkstemp.m4 m4/mmap-anon.m4 m4/mode_t.m4 + m4/msvc-inval.m4 + m4/msvc-nothrow.m4 m4/multiarch.m4 m4/nl_langinfo.m4 + m4/nocrash.m4 + m4/off_t.m4 m4/onceonly.m4 m4/open.m4 m4/pathmax.m4 m4/printf.m4 m4/putenv.m4 + m4/rawmemchr.m4 m4/readlink.m4 m4/realloc.m4 m4/regex.m4 @@ -759,13 +1013,18 @@ AC_DEFUN([gl_FILE_LIST], [ m4/stdlib_h.m4 m4/stpcpy.m4 m4/stpncpy.m4 + m4/strchrnul.m4 m4/string_h.m4 m4/strndup.m4 m4/strnlen.m4 m4/strstr.m4 m4/symlink.m4 + m4/sys_socket_h.m4 m4/sys_stat_h.m4 + m4/sys_time_h.m4 + m4/sys_types_h.m4 m4/sys_wait_h.m4 + m4/tempname.m4 m4/thread.m4 m4/threadlib.m4 m4/time_h.m4 @@ -796,21 +1055,35 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-c-strcasecmp.c tests/test-c-strncasecmp.c tests/test-canonicalize-lgpl.c + tests/test-close.c tests/test-ctype.c tests/test-dup2.c tests/test-environ.c tests/test-errno.c tests/test-fcntl-h.c + tests/test-fdopen.c + tests/test-fgetc.c + tests/test-float.c tests/test-fnmatch.c + tests/test-fputc.c + tests/test-fread.c + tests/test-fstat.c + tests/test-fwrite.c + tests/test-getcwd-lgpl.c tests/test-getdelim.c tests/test-getline.c tests/test-getopt.c tests/test-getopt.h tests/test-getopt_long.h + tests/test-gettimeofday.c tests/test-ignore-value.c + tests/test-init.sh + tests/test-intprops.c + tests/test-inttypes.c tests/test-isblank.c tests/test-langinfo.c tests/test-locale.c + tests/test-localeconv.c tests/test-localename.c tests/test-lock.c tests/test-lstat.c @@ -840,6 +1113,8 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-nl_langinfo.sh tests/test-open.c tests/test-open.h + tests/test-pathmax.c + tests/test-rawmemchr.c tests/test-readlink.c tests/test-readlink.h tests/test-safe-alloc.c @@ -855,14 +1130,19 @@ AC_DEFUN([gl_FILE_LIST], [ tests/test-stdint.c tests/test-stdio.c tests/test-stdlib.c + tests/test-strchrnul.c tests/test-string.c tests/test-strnlen.c tests/test-strstr.c tests/test-symlink.c tests/test-symlink.h tests/test-sys_stat.c + tests/test-sys_time.c + tests/test-sys_types.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-unistd.c tests/test-unsetenv.c @@ -887,8 +1167,14 @@ AC_DEFUN([gl_FILE_LIST], [ tests=lib/c-strcase.h tests=lib/c-strcasecmp.c tests=lib/c-strncasecmp.c + tests=lib/close.c tests=lib/dup2.c - tests=lib/fcntl.in.h + tests=lib/fd-hook.c + tests=lib/fd-hook.h + tests=lib/fdopen.c + tests=lib/fpucw.h + tests=lib/fstat.c + tests=lib/getcwd-lgpl.c tests=lib/getpagesize.c tests=lib/glthread/lock.c tests=lib/glthread/lock.h @@ -898,8 +1184,13 @@ AC_DEFUN([gl_FILE_LIST], [ tests=lib/glthread/yield.h tests=lib/ignore-value.h tests=lib/intprops.h + tests=lib/inttypes.in.h tests=lib/localename.c tests=lib/localename.h + tests=lib/msvc-inval.c + tests=lib/msvc-inval.h + tests=lib/msvc-nothrow.c + tests=lib/msvc-nothrow.h tests=lib/open.c tests=lib/putenv.c tests=lib/same-inode.h diff --git a/gnulib/m4/include_next.m4 b/gnulib/m4/include_next.m4 index b3c7849..a60a261 100644 --- a/gnulib/m4/include_next.m4 +++ b/gnulib/m4/include_next.m4 @@ -1,5 +1,5 @@ -# include_next.m4 serial 18 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +# include_next.m4 serial 23 +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -143,7 +143,7 @@ choke me # 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. +# 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. @@ -175,11 +175,13 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], [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'>']) + AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) else AC_CACHE_CHECK( [absolute name of <]m4_defn([gl_HEADER_NAME])[>], @@ -205,33 +207,57 @@ AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], 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' +changequote([,]) + gl_header_literal_regex=`echo ']m4_defn([gl_HEADER_NAME])[' \ + | 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/ +changequote(,)dnl + s|^/[^/]|//&| +changequote([,])dnl + p + q + }' 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], + 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 - }'`'"']) + sed -n "$gl_absolute_header_sed"`'"']) m4_if([$2], [check], [else - AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>']) + 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])]) + [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]) + 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])), diff --git a/gnulib/m4/intlmacosx.m4 b/gnulib/m4/intlmacosx.m4 index 51f8547..d4da190 100644 --- a/gnulib/m4/intlmacosx.m4 +++ b/gnulib/m4/intlmacosx.m4 @@ -1,5 +1,5 @@ -# intlmacosx.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2004-2011 Free Software Foundation, Inc. +# intlmacosx.m4 serial 5 (gettext-0.18.2) +dnl Copyright (C) 2004-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,11 +13,11 @@ dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. -dnl Checks for special options needed on MacOS X. +dnl Checks for special options needed on Mac OS X. dnl Defines INTL_MACOSX_LIBS. AC_DEFUN([gt_INTL_MACOSX], [ - dnl Check for API introduced in MacOS X 10.2. + dnl Check for API introduced in Mac OS X 10.2. AC_CACHE_CHECK([for CFPreferencesCopyAppValue], [gt_cv_func_CFPreferencesCopyAppValue], [gt_save_LIBS="$LIBS" @@ -31,9 +31,9 @@ AC_DEFUN([gt_INTL_MACOSX], LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) + [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) fi - dnl Check for API introduced in MacOS X 10.3. + dnl Check for API introduced in Mac OS X 10.3. AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], [gt_save_LIBS="$LIBS" LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" @@ -46,7 +46,7 @@ AC_DEFUN([gt_INTL_MACOSX], LIBS="$gt_save_LIBS"]) if test $gt_cv_func_CFLocaleCopyCurrent = yes; then AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) + [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) fi INTL_MACOSX_LIBS= if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then diff --git a/gnulib/m4/intmax_t.m4 b/gnulib/m4/intmax_t.m4 index 7341054..c1a4a75 100644 --- a/gnulib/m4/intmax_t.m4 +++ b/gnulib/m4/intmax_t.m4 @@ -1,5 +1,5 @@ # intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 1997-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gnulib/m4/inttypes-pri.m4 b/gnulib/m4/inttypes-pri.m4 new file mode 100644 index 0000000..977206f --- /dev/null +++ b/gnulib/m4/inttypes-pri.m4 @@ -0,0 +1,42 @@ +# inttypes-pri.m4 serial 7 (gettext-0.18.2) +dnl Copyright (C) 1997-2002, 2006, 2008-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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 new file mode 100644 index 0000000..eec4f41 --- /dev/null +++ b/gnulib/m4/inttypes.m4 @@ -0,0 +1,157 @@ +# inttypes.m4 serial 26 +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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]) + 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/gnulib/m4/inttypes_h.m4 b/gnulib/m4/inttypes_h.m4 index f10fd54..91c7bca 100644 --- a/gnulib/m4/inttypes_h.m4 +++ b/gnulib/m4/inttypes_h.m4 @@ -1,5 +1,5 @@ # inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/isblank.m4 b/gnulib/m4/isblank.m4 index 771deef..98e926d 100644 --- a/gnulib/m4/isblank.m4 +++ b/gnulib/m4/isblank.m4 @@ -1,5 +1,5 @@ -# isblank.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +# isblank.m4 serial 3 +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,6 +13,5 @@ AC_DEFUN([gl_FUNC_ISBLANK], 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/langinfo_h.m4 b/gnulib/m4/langinfo_h.m4 index 4cced8a..b93fe70 100644 --- a/gnulib/m4/langinfo_h.m4 +++ b/gnulib/m4/langinfo_h.m4 @@ -1,5 +1,5 @@ # langinfo_h.m4 serial 7 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/largefile.m4 b/gnulib/m4/largefile.m4 new file mode 100644 index 0000000..a88850a --- /dev/null +++ b/gnulib/m4/largefile.m4 @@ -0,0 +1,149 @@ +# Enable large files on systems where this is not the default. + +# Copyright 1992-1996, 1998-2012 Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# The following implementation works around a problem in autoconf <= 2.68; +# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5. +m4_version_prereq([2.69], [] ,[ + +# _AC_SYS_LARGEFILE_TEST_INCLUDES +# ------------------------------- +m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], +[@%:@include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]];[]dnl +]) + + +# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE, +# CACHE-VAR, +# DESCRIPTION, +# PROLOGUE, [FUNCTION-BODY]) +# -------------------------------------------------------- +m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE], +[AC_CACHE_CHECK([for $1 value needed for large files], [$3], +[while :; do + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([$5], [$6])], + [$3=no; break]) + m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])( + [AC_LANG_PROGRAM([@%:@define $1 $2 +$5], [$6])], + [$3=$2; break]) + $3=unknown + break +done]) +case $$3 in #( + no | unknown) ;; + *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);; +esac +rm -rf conftest*[]dnl +])# _AC_SYS_LARGEFILE_MACRO_VALUE + + +# AC_SYS_LARGEFILE +# ---------------- +# By default, many hosts won't let programs access large files; +# one must use special compiler options to get large-file access to work. +# For more details about this brain damage please see: +# http://www.unix-systems.org/version2/whatsnew/lfs20mar.html +AC_DEFUN([AC_SYS_LARGEFILE], +[AC_ARG_ENABLE(largefile, + [ --disable-largefile omit support for large files]) +if test "$enable_largefile" != no; then + + AC_CACHE_CHECK([for special C compiler options needed for large files], + ac_cv_sys_largefile_CC, + [ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])]) + AC_COMPILE_IFELSE([], [break]) + CC="$CC -n32" + AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break]) + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi]) + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64, + ac_cv_sys_file_offset_bits, + [Number of bits in a file offset, on hosts where this is settable.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + if test $ac_cv_sys_file_offset_bits = unknown; then + _AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES, 1, + ac_cv_sys_large_files, + [Define for large files, on AIX-style hosts.], + [_AC_SYS_LARGEFILE_TEST_INCLUDES]) + fi + + AH_VERBATIM([_DARWIN_USE_64_BIT_INODE], +[/* Enable large inode numbers on Mac OS X. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif]) +fi +])# AC_SYS_LARGEFILE + +])# m4_version_prereq 2.69 + +# 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/gnulib/m4/lcmessage.m4 b/gnulib/m4/lcmessage.m4 index baf41c5..4ed0eb6 100644 --- a/gnulib/m4/lcmessage.m4 +++ b/gnulib/m4/lcmessage.m4 @@ -1,5 +1,5 @@ # lcmessage.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-2011 Free Software Foundation, +dnl Copyright (C) 1995-2002, 2004-2005, 2008-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4 index ae003f7..4e1374d 100644 --- a/gnulib/m4/lib-ld.m4 +++ b/gnulib/m4/lib-ld.m4 @@ -1,5 +1,5 @@ # lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1996-2003, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4 index e7c9ba9..d11b4b4 100644 --- a/gnulib/m4/lib-link.m4 +++ b/gnulib/m4/lib-link.m4 @@ -1,5 +1,5 @@ # lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4 index 7e5f0bd..007aa05 100644 --- a/gnulib/m4/lib-prefix.m4 +++ b/gnulib/m4/lib-prefix.m4 @@ -1,5 +1,5 @@ # lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2005, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/libtool.m4 b/gnulib/m4/libtool.m4 index 88de383..126202f 100644 --- a/gnulib/m4/libtool.m4 +++ b/gnulib/m4/libtool.m4 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1268,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1282,7 +1326,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1301,7 +1348,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -1330,14 +1380,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1477,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1663,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1707,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2253,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2262,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2327,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2466,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2474,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2481,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2499,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2455,17 +2519,18 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2526,7 +2591,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2542,7 +2607,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2579,9 +2644,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2648,7 +2713,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2717,7 +2782,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2742,7 +2807,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2766,7 +2831,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2797,7 +2862,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2807,7 +2872,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3229,7 +3294,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3649,6 +3714,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4233,7 +4299,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4325,18 +4393,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4496,7 +4579,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4521,7 +4606,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4772,8 +4856,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5068,6 +5151,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5114,10 +5198,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5130,7 +5210,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5169,7 +5249,6 @@ _LT_EOF fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5611,9 +5690,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5771,7 +5847,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6141,7 +6216,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6902,12 +6977,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7104,7 +7185,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7237,7 +7317,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7424,6 +7503,77 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7493,6 +7643,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4 index 6801ca9..8010379 100644 --- a/gnulib/m4/localcharset.m4 +++ b/gnulib/m4/localcharset.m4 @@ -1,5 +1,5 @@ # localcharset.m4 serial 7 -dnl Copyright (C) 2002, 2004, 2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002, 2004, 2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4 index 3f4f954..71b6847 100644 --- a/gnulib/m4/locale-fr.m4 +++ b/gnulib/m4/locale-fr.m4 @@ -1,5 +1,5 @@ -# locale-fr.m4 serial 13 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. +# locale-fr.m4 serial 17 +dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -26,9 +26,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) @@ -37,7 +37,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, @@ -63,10 +63,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; } changequote([,])dnl @@ -80,7 +82,7 @@ changequote([,])dnl # "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 @@ -90,7 +92,7 @@ changequote([,])dnl ;; *) # 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. @@ -152,9 +154,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) @@ -163,7 +165,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, @@ -189,10 +191,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; } changequote([,])dnl @@ -206,7 +210,7 @@ changequote([,])dnl # "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 @@ -216,7 +220,7 @@ changequote([,])dnl ;; *) # 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. diff --git a/gnulib/m4/locale-ja.m4 b/gnulib/m4/locale-ja.m4 index d44c2c8..5ba0e43 100644 --- a/gnulib/m4/locale-ja.m4 +++ b/gnulib/m4/locale-ja.m4 @@ -1,5 +1,5 @@ -# locale-ja.m4 serial 9 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. +# locale-ja.m4 serial 12 +dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -28,9 +28,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) @@ -39,7 +39,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, @@ -84,13 +84,14 @@ changequote([,])dnl # "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. diff --git a/gnulib/m4/locale-tr.m4 b/gnulib/m4/locale-tr.m4 index 19ded1b..5f3bf80 100644 --- a/gnulib/m4/locale-tr.m4 +++ b/gnulib/m4/locale-tr.m4 @@ -1,5 +1,5 @@ -# locale-tr.m4 serial 7 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. +# locale-tr.m4 serial 10 +dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -31,9 +31,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) @@ -42,7 +42,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, @@ -85,7 +85,7 @@ changequote([,])dnl # "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 @@ -95,7 +95,7 @@ changequote([,])dnl ;; *) # 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. diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4 index e03f91f..e5502b2 100644 --- a/gnulib/m4/locale-zh.m4 +++ b/gnulib/m4/locale-zh.m4 @@ -1,5 +1,5 @@ -# locale-zh.m4 serial 8 -dnl Copyright (C) 2003, 2005-2011 Free Software Foundation, Inc. +# locale-zh.m4 serial 12 +dnl Copyright (C) 2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,9 +29,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) @@ -40,7 +40,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, @@ -85,7 +85,7 @@ changequote([,])dnl # "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 @@ -93,9 +93,15 @@ changequote([,])dnl 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. diff --git a/gnulib/m4/locale_h.m4 b/gnulib/m4/locale_h.m4 index 4d0f894..c0f4d52 100644 --- a/gnulib/m4/locale_h.m4 +++ b/gnulib/m4/locale_h.m4 @@ -1,5 +1,5 @@ -# locale_h.m4 serial 13 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# locale_h.m4 serial 19 +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,18 +10,29 @@ AC_DEFUN([gl_LOCALE_H], dnl once only, before all statements that occur in other macros. AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - dnl Persuade glibc to define locale_t. + 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 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])]) @@ -31,7 +42,7 @@ AC_DEFUN([gl_LOCALE_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 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], @@ -54,15 +65,29 @@ AC_DEFUN([gl_LOCALE_H], 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]) - 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 @@ -74,13 +99,6 @@ AC_DEFUN([gl_LOCALE_H], [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. @@ -92,10 +110,13 @@ AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], 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_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) - REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) + 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/gnulib/m4/localeconv.m4 b/gnulib/m4/localeconv.m4 new file mode 100644 index 0000000..5fae06d --- /dev/null +++ b/gnulib/m4/localeconv.m4 @@ -0,0 +1,22 @@ +# localeconv.m4 serial 1 +dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/localename.m4 b/gnulib/m4/localename.m4 index 926ada6..2ba295e 100644 --- a/gnulib/m4/localename.m4 +++ b/gnulib/m4/localename.m4 @@ -1,5 +1,5 @@ # localename.m4 serial 2 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/lock.m4 b/gnulib/m4/lock.m4 index 9686945..19c6d45 100644 --- a/gnulib/m4/lock.m4 +++ b/gnulib/m4/lock.m4 @@ -1,5 +1,5 @@ -# lock.m4 serial 11 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +# lock.m4 serial 12 (gettext-0.18.2) +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,7 +10,7 @@ AC_DEFUN([gl_LOCK], [ AC_REQUIRE([gl_THREADLIB]) if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the + # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the # pthread_rwlock_* functions. AC_CHECK_TYPE([pthread_rwlock_t], [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4 index aed816c..b9c65c7 100644 --- a/gnulib/m4/longlong.m4 +++ b/gnulib/m4/longlong.m4 @@ -1,5 +1,5 @@ -# longlong.m4 serial 16 -dnl Copyright (C) 1999-2007, 2009-2011 Free Software Foundation, Inc. +# longlong.m4 serial 17 +dnl Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -51,7 +51,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT], 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'.]) + [Define to 1 if the system has the type 'long long int'.]) fi ]) @@ -77,7 +77,7 @@ AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], 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'.]) + [Define to 1 if the system has the type 'unsigned long long int'.]) fi ]) diff --git a/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4 index b9b22a6..b7335bd 100644 --- a/gnulib/m4/lstat.m4 +++ b/gnulib/m4/lstat.m4 @@ -1,6 +1,6 @@ -# serial 21 +# serial 25 -# Copyright (C) 1997-2001, 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 1997-2001, 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,24 +15,30 @@ AC_DEFUN([gl_FUNC_LSTAT], 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]) + 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 ]) -# Redefine AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK, because it is no longer -# maintained in Autoconf. -AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], +# Prerequisites of lib/lstat.c. +AC_DEFUN([gl_PREREQ_LSTAT], [ + AC_REQUIRE([AC_C_INLINE]) + : +]) + +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], - [ac_cv_func_lstat_dereferences_slashed_symlink], + [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 @@ -45,25 +51,27 @@ AC_DEFUN([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK], 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 + [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. - ac_cv_func_lstat_dereferences_slashed_symlink=no + gl_cv_func_lstat_dereferences_slashed_symlink="guessing 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 + 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/gnulib/m4/ltoptions.m4 b/gnulib/m4/ltoptions.m4 index 17cfd51..5d9acd8 100644 --- a/gnulib/m4/ltoptions.m4 +++ b/gnulib/m4/ltoptions.m4 @@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff --git a/gnulib/m4/ltversion.m4 b/gnulib/m4/ltversion.m4 index 9c7b5d4..07a8602 100644 --- a/gnulib/m4/ltversion.m4 +++ b/gnulib/m4/ltversion.m4 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/gnulib/m4/malloc.m4 b/gnulib/m4/malloc.m4 index 8094444..8fa48e9 100644 --- a/gnulib/m4/malloc.m4 +++ b/gnulib/m4/malloc.m4 @@ -1,9 +1,47 @@ -# malloc.m4 serial 12 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# malloc.m4 serial 14 +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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 @@ -17,7 +55,7 @@ AC_DEFUN([gl_FUNC_MALLOC_GNU], [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 + REPLACE_MALLOC=1 ]) ]) @@ -33,7 +71,7 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX], AC_DEFINE([HAVE_MALLOC_POSIX], [1], [Define if the 'malloc' function is POSIX compliant.]) else - gl_REPLACE_MALLOC + REPLACE_MALLOC=1 fi ]) @@ -58,9 +96,3 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], [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 index aec43f5..7841979 100644 --- a/gnulib/m4/malloca.m4 +++ b/gnulib/m4/malloca.m4 @@ -1,5 +1,5 @@ # malloca.m4 serial 1 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4 index c353862..8f829c8 100644 --- a/gnulib/m4/mbrtowc.m4 +++ b/gnulib/m4/mbrtowc.m4 @@ -1,5 +1,5 @@ -# mbrtowc.m4 serial 22 -dnl Copyright (C) 2001-2002, 2004-2005, 2008-2011 Free Software Foundation, +# mbrtowc.m4 serial 25 +dnl Copyright (C) 2001-2002, 2004-2005, 2008-2012 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, @@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBRTOWC], AC_CHECK_FUNCS_ONCE([mbrtowc]) if test $ac_cv_func_mbrtowc = no; then HAVE_MBRTOWC=0 + AC_CHECK_DECLS([mbrtowc],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: 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 @@ -53,11 +69,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC], 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 @@ -88,9 +99,6 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN], 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 diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4 index 47e2d14..da56c3d 100644 --- a/gnulib/m4/mbsinit.m4 +++ b/gnulib/m4/mbsinit.m4 @@ -1,5 +1,5 @@ -# mbsinit.m4 serial 5 -dnl Copyright (C) 2008, 2010-2011 Free Software Foundation, Inc. +# mbsinit.m4 serial 8 +dnl Copyright (C) 2008, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,6 +15,22 @@ AC_DEFUN([gl_FUNC_MBSINIT], AC_CHECK_FUNCS_ONCE([mbsinit]) if test $ac_cv_func_mbsinit = no; then HAVE_MBSINIT=0 + AC_CHECK_DECLS([mbsinit],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: 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 @@ -27,11 +43,6 @@ AC_DEFUN([gl_FUNC_MBSINIT], 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. diff --git a/gnulib/m4/mbsrtowcs.m4 b/gnulib/m4/mbsrtowcs.m4 index 1fe8dcf..a95f606 100644 --- a/gnulib/m4/mbsrtowcs.m4 +++ b/gnulib/m4/mbsrtowcs.m4 @@ -1,5 +1,5 @@ -# mbsrtowcs.m4 serial 10 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# mbsrtowcs.m4 serial 13 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,6 +14,22 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS], AC_CHECK_FUNCS_ONCE([mbsrtowcs]) if test $ac_cv_func_mbsrtowcs = no; then HAVE_MBSRTOWCS=0 + AC_CHECK_DECLS([mbsrtowcs],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: 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 @@ -25,12 +41,6 @@ AC_DEFUN([gl_FUNC_MBSRTOWCS], 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. diff --git a/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4 index f7c46b8..61a8190 100644 --- a/gnulib/m4/mbstate_t.m4 +++ b/gnulib/m4/mbstate_t.m4 @@ -1,5 +1,5 @@ # mbstate_t.m4 serial 13 -dnl Copyright (C) 2000-2002, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2000-2002, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/mbtowc.m4 b/gnulib/m4/mbtowc.m4 index 9215892..fec0d25 100644 --- a/gnulib/m4/mbtowc.m4 +++ b/gnulib/m4/mbtowc.m4 @@ -1,5 +1,5 @@ -# mbtowc.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# mbtowc.m4 serial 2 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_MBTOWC], 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. diff --git a/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4 index 3c2b313..0040294 100644 --- a/gnulib/m4/memchr.m4 +++ b/gnulib/m4/memchr.m4 @@ -1,5 +1,5 @@ -# memchr.m4 serial 10 -dnl Copyright (C) 2002-2004, 2009-2011 Free Software Foundation, Inc. +# memchr.m4 serial 12 +dnl Copyright (C) 2002-2004, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,10 +11,16 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], 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 + 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 @@ -73,12 +79,6 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR], 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 ]) diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4 index cc36900..c926941 100644 --- a/gnulib/m4/mempcpy.m4 +++ b/gnulib/m4/mempcpy.m4 @@ -1,5 +1,5 @@ -# mempcpy.m4 serial 10 -dnl Copyright (C) 2003-2004, 2006-2007, 2009-2011 Free Software Foundation, +# mempcpy.m4 serial 11 +dnl Copyright (C) 2003-2004, 2006-2007, 2009-2012 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, @@ -14,10 +14,9 @@ AC_DEFUN([gl_FUNC_MEMPCPY], AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([mempcpy]) + AC_CHECK_FUNCS([mempcpy]) if test $ac_cv_func_mempcpy = no; then HAVE_MEMPCPY=0 - gl_PREREQ_MEMPCPY fi ]) diff --git a/gnulib/m4/mkstemp.m4 b/gnulib/m4/mkstemp.m4 new file mode 100644 index 0000000..cee0572 --- /dev/null +++ b/gnulib/m4/mkstemp.m4 @@ -0,0 +1,82 @@ +#serial 23 + +# Copyright (C) 2001, 2003-2007, 2009-2012 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 hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a +# silly limit that it can create no more than 26 files from a given template. +# Other systems lack mkstemp altogether. +# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create +# only 32 files per process. +# On some hosts, mkstemp creates files with mode 0666, which is a security +# problem and a violation of POSIX 2008. +# On systems like the above, arrange to use the replacement function. +AC_DEFUN([gl_FUNC_MKSTEMP], +[ + AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles + + AC_CHECK_FUNCS_ONCE([mkstemp]) + if test $ac_cv_func_mkstemp = yes; then + AC_CACHE_CHECK([for working mkstemp], + [gl_cv_func_working_mkstemp], + [ + mkdir conftest.mkstemp + AC_RUN_IFELSE( + [AC_LANG_PROGRAM( + [AC_INCLUDES_DEFAULT], + [[int result = 0; + int i; + off_t large = (off_t) 4294967295u; + if (large < 0) + large = 2147483647; + umask (0); + for (i = 0; i < 70; i++) + { + char templ[] = "conftest.mkstemp/coXXXXXX"; + int (*mkstemp_function) (char *) = mkstemp; + int fd = mkstemp_function (templ); + if (fd < 0) + result |= 1; + else + { + struct stat st; + if (lseek (fd, large, SEEK_SET) != large) + result |= 2; + if (fstat (fd, &st) < 0) + result |= 4; + else if (st.st_mode & 0077) + result |= 8; + if (close (fd)) + result |= 16; + } + } + return result;]])], + [gl_cv_func_working_mkstemp=yes], + [gl_cv_func_working_mkstemp=no], + [case "$host_os" in + # Guess yes on glibc systems. + *-gnu*) gl_cv_func_working_mkstemp="guessing yes" ;; + # If we don't know, assume the worst. + *) gl_cv_func_working_mkstemp="guessing no" ;; + esac + ]) + rm -rf conftest.mkstemp + ]) + case "$gl_cv_func_working_mkstemp" in + *yes) ;; + *) + REPLACE_MKSTEMP=1 + ;; + esac + else + HAVE_MKSTEMP=0 + fi +]) + +# Prerequisites of lib/mkstemp.c. +AC_DEFUN([gl_PREREQ_MKSTEMP], +[ +]) diff --git a/gnulib/m4/mmap-anon.m4 b/gnulib/m4/mmap-anon.m4 index 7ba7fd2..748b17d 100644 --- a/gnulib/m4/mmap-anon.m4 +++ b/gnulib/m4/mmap-anon.m4 @@ -1,5 +1,5 @@ -# mmap-anon.m4 serial 9 -dnl Copyright (C) 2005, 2007, 2009-2011 Free Software Foundation, Inc. +# mmap-anon.m4 serial 10 +dnl Copyright (C) 2005, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,7 @@ dnl with or without modifications, as long as this notice is preserved. # - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS # and MAP_ANON exist and have the same value. # - On HP-UX, only MAP_ANONYMOUS exists. -# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. +# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. # - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be # used. @@ -27,18 +27,18 @@ AC_DEFUN([gl_FUNC_MMAP_ANON], 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.], [ + AC_EGREP_CPP([I cannot identify this map], [ #include #ifdef MAP_ANONYMOUS - I cant identify this map. + I cannot 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.], [ + AC_EGREP_CPP([I cannot identify this map], [ #include #ifdef MAP_ANON - I cant identify this map. + I cannot identify this map #endif ], [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], diff --git a/gnulib/m4/mode_t.m4 b/gnulib/m4/mode_t.m4 index f9cf704..40f612a 100644 --- a/gnulib/m4/mode_t.m4 +++ b/gnulib/m4/mode_t.m4 @@ -1,5 +1,5 @@ # mode_t.m4 serial 2 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/msvc-inval.m4 b/gnulib/m4/msvc-inval.m4 new file mode 100644 index 0000000..8db4617 --- /dev/null +++ b/gnulib/m4/msvc-inval.m4 @@ -0,0 +1,19 @@ +# msvc-inval.m4 serial 1 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/msvc-nothrow.m4 b/gnulib/m4/msvc-nothrow.m4 new file mode 100644 index 0000000..0125050 --- /dev/null +++ b/gnulib/m4/msvc-nothrow.m4 @@ -0,0 +1,10 @@ +# msvc-nothrow.m4 serial 1 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/multiarch.m4 b/gnulib/m4/multiarch.m4 index 691d892..0c288b8 100644 --- a/gnulib/m4/multiarch.m4 +++ b/gnulib/m4/multiarch.m4 @@ -1,12 +1,12 @@ -# multiarch.m4 serial 6 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# multiarch.m4 serial 7 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. # Determine whether the compiler is or may be producing universal binaries. # -# On MacOS X 10.5 and later systems, the user can create libraries and +# On Mac OS X 10.5 and later systems, the user can create libraries and # executables that work on multiple system types--known as "fat" or # "universal" binaries--by specifying multiple '-arch' options to the # compiler but only a single '-arch' option to the preprocessor. Like diff --git a/gnulib/m4/nl_langinfo.m4 b/gnulib/m4/nl_langinfo.m4 index ca9d28d..80fe60d 100644 --- a/gnulib/m4/nl_langinfo.m4 +++ b/gnulib/m4/nl_langinfo.m4 @@ -1,5 +1,5 @@ -# nl_langinfo.m4 serial 4 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +# nl_langinfo.m4 serial 5 +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -43,10 +43,8 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO], 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/nocrash.m4 b/gnulib/m4/nocrash.m4 new file mode 100644 index 0000000..c2638df --- /dev/null +++ b/gnulib/m4/nocrash.m4 @@ -0,0 +1,130 @@ +# nocrash.m4 serial 4 +dnl Copyright (C) 2005, 2009-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/off_t.m4 b/gnulib/m4/off_t.m4 new file mode 100644 index 0000000..dfca2df --- /dev/null +++ b/gnulib/m4/off_t.m4 @@ -0,0 +1,18 @@ +# off_t.m4 serial 1 +dnl Copyright (C) 2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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/gnulib/m4/onceonly.m4 b/gnulib/m4/onceonly.m4 index 223071a..275d73c 100644 --- a/gnulib/m4/onceonly.m4 +++ b/gnulib/m4/onceonly.m4 @@ -1,9 +1,22 @@ -# onceonly.m4 serial 7 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2011 Free Software Foundation, +# onceonly.m4 serial 9 +dnl Copyright (C) 2002-2003, 2005-2006, 2008-2012 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 +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. @@ -67,7 +80,7 @@ AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ [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.]) + [Define to 1 if you have the ']m4_defn([gl_FUNC_NAME])[' function.]) ]) AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) ]) diff --git a/gnulib/m4/open.m4 b/gnulib/m4/open.m4 index bfebdab..c85971d 100644 --- a/gnulib/m4/open.m4 +++ b/gnulib/m4/open.m4 @@ -1,5 +1,5 @@ -# open.m4 serial 11 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# open.m4 serial 13 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_OPEN], AC_REQUIRE([AC_CANONICAL_HOST]) case "$host_os" in mingw* | pw*) - gl_REPLACE_OPEN + REPLACE_OPEN=1 ;; *) dnl open("foo/") should not create a file when the file name has a @@ -57,19 +57,30 @@ changequote([,])dnl *no) AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], [Define to 1 if open() fails to recognize a trailing slash.]) - gl_REPLACE_OPEN + REPLACE_OPEN=1 ;; esac ;; esac -]) - -AC_DEFUN([gl_REPLACE_OPEN], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - REPLACE_OPEN=1 - AC_LIBOBJ([open]) - gl_PREREQ_OPEN + 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. diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4 index 17b3d64..0117861 100644 --- a/gnulib/m4/pathmax.m4 +++ b/gnulib/m4/pathmax.m4 @@ -1,5 +1,5 @@ -# pathmax.m4 serial 8 -dnl Copyright (C) 2002-2003, 2005-2006, 2009-2011 Free Software Foundation, +# pathmax.m4 serial 10 +dnl Copyright (C) 2002-2003, 2005-2006, 2009-2012 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, @@ -8,6 +8,35 @@ 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]) ]) + +# 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/gnulib/m4/printf.m4 b/gnulib/m4/printf.m4 index 9c2ed1e..751e896 100644 --- a/gnulib/m4/printf.m4 +++ b/gnulib/m4/printf.m4 @@ -1,5 +1,5 @@ -# printf.m4 serial 42 -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. +# printf.m4 serial 50 +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -63,7 +63,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. @@ -178,28 +178,28 @@ static double zero = 0.0; int main () { int result = 0; - if (sprintf (buf, "%f", 1.0 / 0.0) < 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 / 0.0) < 0 + 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 / 0.0) < 0 + if (sprintf (buf, "%e", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 4; - if (sprintf (buf, "%e", -1.0 / 0.0) < 0 + 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 / 0.0) < 0 + if (sprintf (buf, "%g", 1.0 / zero) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 16; - if (sprintf (buf, "%g", -1.0 / 0.0) < 0 + 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 @@ -222,7 +222,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; darwin*) gl_cv_func_printf_infinite="guessing yes";; # Guess yes on HP-UX >= 11. @@ -251,6 +251,7 @@ 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. @@ -294,34 +295,34 @@ int main () { int result = 0; nocrash_init(); - if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0 + if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; - if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0 + 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 / 0.0L) < 0 + if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; - if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0 + 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 / 0.0L) < 0 + if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) result |= 1; - if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0 + 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_)) +#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 @@ -478,6 +479,7 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_A], #include #include static char buf[100]; +static double zero = 0.0; int main () { int result = 0; @@ -502,17 +504,17 @@ int main () result |= 4; /* This catches a FreeBSD 6.1 bug. See */ - if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0 + if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 || buf[0] == '0') result |= 8; - /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */ + /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */ if (sprintf (buf, "%.1a", 1.999) < 0 || (strcmp (buf, "0x1.0p+1") != 0 && strcmp (buf, "0x2.0p+0") != 0 && strcmp (buf, "0x4.0p-1") != 0 && strcmp (buf, "0x8.0p-2") != 0)) result |= 16; - /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a + /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a glibc 2.4 bug . */ if (sprintf (buf, "%.1La", 1.999L) < 0 || (strcmp (buf, "0x1.0p+1") != 0 @@ -562,13 +564,14 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_F], #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 / 0.0) < 0 + 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. */ @@ -587,7 +590,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 6. freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; darwin*) gl_cv_func_printf_directive_f="guessing yes";; # Guess yes on Solaris >= 2.10. @@ -615,12 +618,27 @@ AC_DEFUN([gl_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. */ @@ -636,7 +654,8 @@ int main () [ changequote(,)dnl case "$host_os" in - *) gl_cv_func_printf_directive_n="guessing yes";; + mingw*) gl_cv_func_printf_directive_n="guessing no";; + *) gl_cv_func_printf_directive_n="guessing yes";; esac changequote([,])dnl ]) @@ -862,9 +881,10 @@ AC_DEFUN([gl_PRINTF_FLAG_ZERO], #include #include static char buf[100]; +static double zero = 0.0; int main () { - if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0 + if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 || (strcmp (buf, " inf") != 0 && strcmp (buf, " infinity") != 0)) return 1; @@ -892,7 +912,8 @@ 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 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], @@ -921,6 +942,9 @@ int main () 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], @@ -928,7 +952,7 @@ int main () [ changequote(,)dnl case "$host_os" in - # Guess no only on Solaris, native Win32, and BeOS systems. + # 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" ;; @@ -1004,8 +1028,9 @@ int main() changequote([,])dnl ])]) if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - (./conftest + (./conftest 2>&AS_MESSAGE_LOG_FD result=$? + _AS_ECHO_LOG([\$? = $result]) if test $result != 0 && test $result != 77; then result=1; fi exit $result ) >/dev/null 2>/dev/null @@ -1019,7 +1044,7 @@ changequote([,])dnl fi rm -fr conftest* else - dnl A universal build on Apple MacOS X platforms. + dnl A universal build on Apple Mac OS X platforms. dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. dnl But we need a configuration result that is valid in both modes. gl_cv_func_printf_enomem="guessing no" @@ -1072,6 +1097,7 @@ 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], [ @@ -1079,11 +1105,25 @@ AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [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"); - snprintf (buf, 3, "%d %d", 4567, 89); + my_snprintf (buf, 3, "%d %d", 4567, 89); if (memcmp (buf, "45\0DEF", 6) != 0) return 1; return 0; @@ -1098,7 +1138,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. @@ -1153,6 +1193,7 @@ 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], [ @@ -1160,15 +1201,29 @@ AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], [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 (snprintf (buf, 3, "%d %d", 4567, 89) != 7) + if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) return 1; - if (snprintf (buf, 0, "%d %d", 4567, 89) != 7) + if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) return 2; - if (snprintf (NULL, 0, "%d %d", 4567, 89) != 7) + if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) return 3; return 0; }]])], @@ -1182,7 +1237,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; # Guess yes on OpenBSD >= 3.9. @@ -1217,6 +1272,7 @@ 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], [ @@ -1224,6 +1280,20 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [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 () @@ -1233,7 +1303,7 @@ int main () 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); + my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); if (count != 6) return 1; return 0; @@ -1248,7 +1318,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; # Guess yes on Solaris >= 2.6. @@ -1285,16 +1355,31 @@ 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' }; - snprintf (buf, 1, "%d", 12345); + my_snprintf (buf, 1, "%d", 12345); return buf[1] != 'E'; }]])], [gl_cv_func_snprintf_size1=yes], @@ -1375,7 +1460,7 @@ changequote(,)dnl # Guess yes on FreeBSD >= 5. freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on MacOS X >= 10.3. + # Guess yes on Mac OS X >= 10.3. darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; # Guess yes on Cygwin. @@ -1455,17 +1540,18 @@ dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . -dnl MacOS X 10.5.8 . . . # # . . . . . . # . . . . . . . . -dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . . +dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . . +dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . . dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 11 2010-11 . . # # # . . # . . . # . . . . . . . . +dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # -dnl AIX 5.2, 7.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} # . . . # # . . . . . # . . . . # # . # @@ -1478,4 +1564,7 @@ dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . dnl Haiku . . . # # # . # . . . . . ? . . ? . . . dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . -dnl mingw # # # # # # . . # # . # # ? . # # # . . +dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . . +dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . . +dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . . +dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . . diff --git a/gnulib/m4/putenv.m4 b/gnulib/m4/putenv.m4 index de3900b..b971b12 100644 --- a/gnulib/m4/putenv.m4 +++ b/gnulib/m4/putenv.m4 @@ -1,5 +1,5 @@ -# putenv.m4 serial 17 -dnl Copyright (C) 2002-2011 Free Software Foundation, Inc. +# putenv.m4 serial 19 +dnl Copyright (C) 2002-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -12,6 +12,7 @@ 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],[[ @@ -32,10 +33,18 @@ AC_DEFUN([gl_FUNC_PUTENV], 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) + [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 + ]) ]) - if test $gl_cv_func_svid_putenv = no; then - REPLACE_PUTENV=1 - AC_LIBOBJ([putenv]) - fi + case "$gl_cv_func_svid_putenv" in + *yes) ;; + *) + REPLACE_PUTENV=1 + ;; + esac ]) diff --git a/gnulib/m4/rawmemchr.m4 b/gnulib/m4/rawmemchr.m4 new file mode 100644 index 0000000..1930164 --- /dev/null +++ b/gnulib/m4/rawmemchr.m4 @@ -0,0 +1,20 @@ +# rawmemchr.m4 serial 2 +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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_RAWMEMCHR], +[ + dnl Persuade glibc to declare rawmemchr(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([rawmemchr]) + if test $ac_cv_func_rawmemchr = no; then + HAVE_RAWMEMCHR=0 + fi +]) + +# Prerequisites of lib/strchrnul.c. +AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:]) diff --git a/gnulib/m4/readlink.m4 b/gnulib/m4/readlink.m4 index a502ca5..ccf5141 100644 --- a/gnulib/m4/readlink.m4 +++ b/gnulib/m4/readlink.m4 @@ -1,5 +1,5 @@ -# readlink.m4 serial 9 -dnl Copyright (C) 2003, 2007, 2009-2011 Free Software Foundation, Inc. +# readlink.m4 serial 12 +dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,11 +7,10 @@ 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 - AC_LIBOBJ([readlink]) - gl_PREREQ_READLINK else AC_CACHE_CHECK([whether readlink signature is correct], [gl_cv_decl_readlink_works], @@ -34,21 +33,31 @@ AC_DEFUN([gl_FUNC_READLINK], ]], [[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"]) + [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]) - 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 + 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 AC_LIBOBJ). +# 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]) diff --git a/gnulib/m4/realloc.m4 b/gnulib/m4/realloc.m4 index a403d9f..954c2f0 100644 --- a/gnulib/m4/realloc.m4 +++ b/gnulib/m4/realloc.m4 @@ -1,9 +1,47 @@ -# realloc.m4 serial 11 -dnl Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. +# realloc.m4 serial 13 +dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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 @@ -17,7 +55,7 @@ AC_DEFUN([gl_FUNC_REALLOC_GNU], [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 + REPLACE_REALLOC=1 ]) ])# gl_FUNC_REALLOC_GNU @@ -33,12 +71,6 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX], AC_DEFINE([HAVE_REALLOC_POSIX], [1], [Define if the 'realloc' function is POSIX compliant.]) else - gl_REPLACE_REALLOC + REPLACE_REALLOC=1 fi ]) - -AC_DEFUN([gl_REPLACE_REALLOC], -[ - AC_LIBOBJ([realloc]) - REPLACE_REALLOC=1 -]) diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4 index 24198b5..41be5e8 100644 --- a/gnulib/m4/regex.m4 +++ b/gnulib/m4/regex.m4 @@ -1,6 +1,6 @@ -# serial 58 +# serial 61 -# Copyright (C) 1996-2001, 2003-2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2001, 2003-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -175,6 +175,9 @@ AC_DEFUN([gl_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], @@ -207,8 +210,6 @@ AC_DEFUN([gl_REGEX], [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 ]) @@ -221,5 +222,5 @@ AC_DEFUN([gl_PREREQ_REGEX], AC_REQUIRE([AC_TYPE_MBSTATE_T]) AC_CHECK_HEADERS([libintl.h]) AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) - AC_CHECK_DECLS([isblank], [], [], [#include ]) + AC_CHECK_DECLS([isblank], [], [], [[#include ]]) ]) diff --git a/gnulib/m4/safe-alloc.m4 b/gnulib/m4/safe-alloc.m4 index cdd3928..abd6589 100644 --- a/gnulib/m4/safe-alloc.m4 +++ b/gnulib/m4/safe-alloc.m4 @@ -1,9 +1,10 @@ -# safe-alloc.m4 serial 1 -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +# safe-alloc.m4 serial 2 +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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_SAFE_ALLOC], [ - AC_LIBOBJ([safe-alloc]) + : ]) diff --git a/gnulib/m4/selinux-context-h.m4 b/gnulib/m4/selinux-context-h.m4 index 227ab6b..7ad67bb 100644 --- a/gnulib/m4/selinux-context-h.m4 +++ b/gnulib/m4/selinux-context-h.m4 @@ -1,5 +1,5 @@ -# serial 2 -*- Autoconf -*- -# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. +# serial 3 -*- Autoconf -*- +# Copyright (C) 2006-2007, 2009-2012 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. @@ -18,4 +18,5 @@ AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], 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/gnulib/m4/selinux-selinux-h.m4 b/gnulib/m4/selinux-selinux-h.m4 index 7afd416..ed5215b 100644 --- a/gnulib/m4/selinux-selinux-h.m4 +++ b/gnulib/m4/selinux-selinux-h.m4 @@ -1,5 +1,5 @@ -# serial 4 -*- Autoconf -*- -# Copyright (C) 2006-2007, 2009-2011 Free Software Foundation, Inc. +# serial 5 -*- Autoconf -*- +# Copyright (C) 2006-2007, 2009-2012 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. @@ -18,7 +18,6 @@ AC_DEFUN([gl_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.]) diff --git a/gnulib/m4/setenv.m4 b/gnulib/m4/setenv.m4 index ba619b0..e1931e7 100644 --- a/gnulib/m4/setenv.m4 +++ b/gnulib/m4/setenv.m4 @@ -1,5 +1,5 @@ -# setenv.m4 serial 21 -dnl Copyright (C) 2001-2004, 2006-2011 Free Software Foundation, Inc. +# setenv.m4 serial 26 +dnl Copyright (C) 2001-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,20 +7,7 @@ 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]) + AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles if test $ac_cv_func_setenv = no; then HAVE_SETENV=0 else @@ -47,27 +34,48 @@ AC_DEFUN([gl_FUNC_SETENV_SEPARATE], 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 + [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 - AC_LIBOBJ([unsetenv]) - gl_PREREQ_UNSETENV + 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( @@ -80,11 +88,7 @@ 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'], @@ -93,7 +97,6 @@ int unsetenv(); 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. @@ -123,11 +126,19 @@ int unsetenv(); 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 + [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 ]) diff --git a/gnulib/m4/setlocale.m4 b/gnulib/m4/setlocale.m4 index 6672c34..c605241 100644 --- a/gnulib/m4/setlocale.m4 +++ b/gnulib/m4/setlocale.m4 @@ -1,5 +1,5 @@ -# setlocale.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# setlocale.m4 serial 4 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -12,12 +12,14 @@ AC_DEFUN([gl_FUNC_SETLOCALE], 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 - if test $REPLACE_SETLOCALE = 1; then - gl_REPLACE_LOCALE_H - AC_LIBOBJ([setlocale]) - gl_PREREQ_SETLOCALE - fi ]) # Prerequisites of lib/setlocale.c. diff --git a/gnulib/m4/size_max.m4 b/gnulib/m4/size_max.m4 index e807098..5a8162b 100644 --- a/gnulib/m4/size_max.m4 +++ b/gnulib/m4/size_max.m4 @@ -1,5 +1,5 @@ # size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2005-2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4 index d712752..209d64c 100644 --- a/gnulib/m4/ssize_t.m4 +++ b/gnulib/m4/ssize_t.m4 @@ -1,5 +1,5 @@ # ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2001-2003, 2006, 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/stat.m4 b/gnulib/m4/stat.m4 index 27f82d5..a8b79f5 100644 --- a/gnulib/m4/stat.m4 +++ b/gnulib/m4/stat.m4 @@ -1,6 +1,6 @@ -# serial 7 +# serial 10 -# Copyright (C) 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -23,8 +23,9 @@ AC_DEFUN([gl_FUNC_STAT], 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/") + 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 @@ -46,7 +47,13 @@ AC_DEFUN([gl_FUNC_STAT], return result; ]])], [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], - [gl_cv_func_stat_file_slash="guessing 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 @@ -58,9 +65,11 @@ AC_DEFUN([gl_FUNC_STAT], 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 +]) + +# Prerequisites of lib/stat.c. +AC_DEFUN([gl_PREREQ_STAT], +[ + AC_REQUIRE([AC_C_INLINE]) + : ]) diff --git a/gnulib/m4/stdbool.m4 b/gnulib/m4/stdbool.m4 index 838cf0f..eabfa64 100644 --- a/gnulib/m4/stdbool.m4 +++ b/gnulib/m4/stdbool.m4 @@ -1,11 +1,11 @@ # Check for stdbool.h that conforms to C99. -dnl Copyright (C) 2002-2006, 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2006, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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 +#serial 5 # Prepare for substituting if it is not supported. @@ -21,6 +21,7 @@ AC_DEFUN([AM_STDBOOL_H], 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 diff --git a/gnulib/m4/stddef_h.m4 b/gnulib/m4/stddef_h.m4 index 1942b6a..cc11609 100644 --- a/gnulib/m4/stddef_h.m4 +++ b/gnulib/m4/stddef_h.m4 @@ -1,6 +1,6 @@ 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. +# stddef_h.m4 serial 4 +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,6 +9,7 @@ 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 @@ -24,6 +25,8 @@ AC_DEFUN([gl_STDDEF_H], 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 @@ -41,5 +44,4 @@ 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 index e7d0d07..28d342e 100644 --- a/gnulib/m4/stdint.m4 +++ b/gnulib/m4/stdint.m4 @@ -1,5 +1,5 @@ -# stdint.m4 serial 39 -dnl Copyright (C) 2001-2011 Free Software Foundation, Inc. +# stdint.m4 serial 43 +dnl Copyright (C) 2001-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -7,7 +7,7 @@ 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_DEFUN_ONCE([gl_STDINT_H], [ AC_PREREQ([2.59])dnl @@ -69,8 +69,6 @@ AC_DEFUN([gl_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 . */ @@ -219,8 +217,6 @@ struct s { 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 ] @@ -305,6 +301,7 @@ static const char *macro_values[] = 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) @@ -465,6 +462,14 @@ AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], 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. diff --git a/gnulib/m4/stdint_h.m4 b/gnulib/m4/stdint_h.m4 index 356b14e..581de96 100644 --- a/gnulib/m4/stdint_h.m4 +++ b/gnulib/m4/stdint_h.m4 @@ -1,5 +1,5 @@ # stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 1997-2004, 2006, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4 index 7f3ae56..5298dd6 100644 --- a/gnulib/m4/stdio_h.m4 +++ b/gnulib/m4/stdio_h.m4 @@ -1,5 +1,5 @@ -# stdio_h.m4 serial 33 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# stdio_h.m4 serial 42 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -9,6 +9,31 @@ 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_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 @@ -21,9 +46,11 @@ AC_DEFUN([gl_STDIO_H], 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. + 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 @@ -31,13 +58,25 @@ AC_DEFUN([gl_STDIO_H], 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 C89. + dnl guaranteed by both C89 and C11. gl_WARN_ON_USE_PREPARE([[#include - ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat - snprintf tmpfile vdprintf vsnprintf]) + ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen + renameat snprintf tmpfile vdprintf vsnprintf]) ]) AC_DEFUN([gl_STDIO_MODULE_INDICATOR], @@ -53,23 +92,31 @@ 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]) @@ -80,11 +127,15 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], 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]) @@ -104,11 +155,14 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], 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]) @@ -129,6 +183,7 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS], 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]) diff --git a/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4 index 25fdada..ab43728 100644 --- a/gnulib/m4/stdlib_h.m4 +++ b/gnulib/m4/stdlib_h.m4 @@ -1,5 +1,5 @@ -# stdlib_h.m4 serial 37 -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +# stdlib_h.m4 serial 41 +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -19,10 +19,11 @@ AC_DEFUN([gl_STDLIB_H], #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]) + ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt + initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps + posix_openpt ptsname ptsname_r random random_r realpath rpmatch + setenv setstate setstate_r srandom srandom_r + strtod strtoll strtoull unlockpt unsetenv]) ]) AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], @@ -50,8 +51,11 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], 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]) @@ -76,7 +80,10 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], 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]) @@ -95,7 +102,9 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS], REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) + REPLACE_PTSNAME_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]) diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4 index c321d49..8e95457 100644 --- a/gnulib/m4/stpcpy.m4 +++ b/gnulib/m4/stpcpy.m4 @@ -1,5 +1,5 @@ -# stpcpy.m4 serial 7 -dnl Copyright (C) 2002, 2007, 2009-2011 Free Software Foundation, Inc. +# stpcpy.m4 serial 8 +dnl Copyright (C) 2002, 2007, 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,10 +13,9 @@ AC_DEFUN([gl_FUNC_STPCPY], AC_REQUIRE([AC_C_RESTRICT]) AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REPLACE_FUNCS([stpcpy]) + AC_CHECK_FUNCS([stpcpy]) if test $ac_cv_func_stpcpy = no; then HAVE_STPCPY=0 - gl_PREREQ_STPCPY fi ]) diff --git a/gnulib/m4/stpncpy.m4 b/gnulib/m4/stpncpy.m4 index cc7796a..90ae53b 100644 --- a/gnulib/m4/stpncpy.m4 +++ b/gnulib/m4/stpncpy.m4 @@ -1,5 +1,5 @@ -# stpncpy.m4 serial 13 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, +# stpncpy.m4 serial 16 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 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, @@ -35,7 +35,11 @@ AC_DEFUN([gl_FUNC_STPNCPY], #include /* for strcpy */ /* The stpncpy prototype is missing in on AIX 4. */ #if !HAVE_DECL_STPNCPY -extern char *stpncpy (char *dest, const char *src, size_t n); +extern +# ifdef __cplusplus +"C" +# endif +char *stpncpy (char *dest, const char *src, size_t n); #endif int main () { @@ -70,21 +74,20 @@ int main () #ifdef __GNU_LIBRARY__ Thanks for using GNU #endif -], [gl_cv_func_stpncpy=yes], [gl_cv_func_stpncpy=no]) +], [gl_cv_func_stpncpy="guessing yes"], [gl_cv_func_stpncpy="guessing no"]) ]) ]) - if test $gl_cv_func_stpncpy = yes; then - AC_DEFINE([HAVE_STPNCPY], [1], - [Define if you have the stpncpy() function and it works.]) - else - REPLACE_STPNCPY=1 - AC_LIBOBJ([stpncpy]) - gl_PREREQ_STPNCPY - fi + case "$gl_cv_func_stpncpy" in + *yes) + AC_DEFINE([HAVE_STPNCPY], [1], + [Define if you have the stpncpy() function and it works.]) + ;; + *) + REPLACE_STPNCPY=1 + ;; + esac else HAVE_STPNCPY=0 - AC_LIBOBJ([stpncpy]) - gl_PREREQ_STPNCPY fi ]) diff --git a/gnulib/m4/strchrnul.m4 b/gnulib/m4/strchrnul.m4 new file mode 100644 index 0000000..d3dfb9a --- /dev/null +++ b/gnulib/m4/strchrnul.m4 @@ -0,0 +1,50 @@ +# strchrnul.m4 serial 9 +dnl Copyright (C) 2003, 2007, 2009-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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_STRCHRNUL], +[ + dnl Persuade glibc to declare strchrnul(). + AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) + + AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) + AC_CHECK_FUNCS([strchrnul]) + if test $ac_cv_func_strchrnul = no; then + HAVE_STRCHRNUL=0 + else + AC_CACHE_CHECK([whether strchrnul works], + [gl_cv_func_strchrnul_works], + [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ +#include /* for strchrnul */ +]], [[const char *buf = "a"; + return strchrnul (buf, 'b') != buf + 1; + ]])], + [gl_cv_func_strchrnul_works=yes], + [gl_cv_func_strchrnul_works=no], + [dnl Cygwin 1.7.9 introduced strchrnul, but it was broken until 1.7.10 + AC_EGREP_CPP([Lucky user], + [ +#if defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) + Lucky user + #endif +#else + Lucky user +#endif + ], + [gl_cv_func_strchrnul_works="guessing yes"], + [gl_cv_func_strchrnul_works="guessing no"]) + ]) + ]) + case "$gl_cv_func_strchrnul_works" in + *yes) ;; + *) REPLACE_STRCHRNUL=1 ;; + esac + fi +]) + +# Prerequisites of lib/strchrnul.c. +AC_DEFUN([gl_PREREQ_STRCHRNUL], [:]) diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4 index 30ddfbc..5677e09 100644 --- a/gnulib/m4/string_h.m4 +++ b/gnulib/m4/string_h.m4 @@ -1,11 +1,11 @@ # Configure a GNU-like replacement for . -# Copyright (C) 2007-2011 Free Software Foundation, Inc. +# Copyright (C) 2007-2012 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 +# serial 21 # Written by Paul Eggert. @@ -27,9 +27,9 @@ AC_DEFUN([gl_HEADER_STRING_H_BODY], 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]) + [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], @@ -43,6 +43,8 @@ AC_DEFUN([gl_STRING_MODULE_INDICATOR], 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]) @@ -80,6 +82,8 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 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]) @@ -104,6 +108,7 @@ AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], 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]) diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4 index d8f00ca..cef6889 100644 --- a/gnulib/m4/strndup.m4 +++ b/gnulib/m4/strndup.m4 @@ -1,5 +1,5 @@ -# strndup.m4 serial 18 -dnl Copyright (C) 2002-2003, 2005-2011 Free Software Foundation, Inc. +# strndup.m4 serial 21 +dnl Copyright (C) 2002-2003, 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -18,13 +18,18 @@ AC_DEFUN([gl_FUNC_STRNDUP], 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 ]], [[ -#ifndef HAVE_DECL_STRNDUP - extern char *strndup (const char *, size_t); +#if !HAVE_DECL_STRNDUP + extern + #ifdef __cplusplus + "C" + #endif + char *strndup (const char *, size_t); #endif char *s; s = strndup ("some longer string", 15); @@ -42,12 +47,9 @@ changequote(,)dnl changequote([,])dnl ])]) case $gl_cv_func_strndup_works in - *no) - REPLACE_STRNDUP=1 - AC_LIBOBJ([strndup]) - ;; + *no) REPLACE_STRNDUP=1 ;; esac else - AC_LIBOBJ([strndup]) + HAVE_STRNDUP=0 fi ]) diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4 index a1c59ac..d97e307 100644 --- a/gnulib/m4/strnlen.m4 +++ b/gnulib/m4/strnlen.m4 @@ -1,5 +1,5 @@ -# strnlen.m4 serial 12 -dnl Copyright (C) 2002-2003, 2005-2007, 2009-2011 Free Software Foundation, +# strnlen.m4 serial 13 +dnl Copyright (C) 2002-2003, 2005-2007, 2009-2012 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, @@ -16,16 +16,14 @@ AC_DEFUN([gl_FUNC_STRNLEN], if test $ac_cv_have_decl_strnlen = no; then HAVE_DECL_STRNLEN=0 else - AC_FUNC_STRNLEN + 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 - if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then - AC_LIBOBJ([strnlen]) - gl_PREREQ_STRNLEN - fi ]) # Prerequisites of lib/strnlen.c. diff --git a/gnulib/m4/strstr.m4 b/gnulib/m4/strstr.m4 index a42a1db..b8f94bf 100644 --- a/gnulib/m4/strstr.m4 +++ b/gnulib/m4/strstr.m4 @@ -1,5 +1,5 @@ -# strstr.m4 serial 13 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# strstr.m4 serial 16 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,7 +11,6 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], 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], @@ -47,14 +46,16 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], Lucky user #endif ], - [gl_cv_func_strstr_works_always=yes], + [gl_cv_func_strstr_works_always="guessing 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 + case "$gl_cv_func_strstr_works_always" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac fi ]) # gl_FUNC_STRSTR_SIMPLE @@ -95,13 +96,15 @@ static void quit (int sig) { exit (sig + 128); } 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. + [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 @@ -113,15 +116,15 @@ static void quit (int sig) { exit (sig + 128); } #endif #endif ], - [gl_cv_func_strstr_linear=yes], + [gl_cv_func_strstr_linear="guessing 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]) + case "$gl_cv_func_strstr_linear" in + *yes) ;; + *) + REPLACE_STRSTR=1 + ;; + esac fi ]) # gl_FUNC_STRSTR diff --git a/gnulib/m4/symlink.m4 b/gnulib/m4/symlink.m4 index 917d5f0..cfd90ec 100644 --- a/gnulib/m4/symlink.m4 +++ b/gnulib/m4/symlink.m4 @@ -1,7 +1,7 @@ -# serial 4 +# serial 6 # See if we need to provide symlink replacement. -dnl Copyright (C) 2009-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2009-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,13 +11,13 @@ dnl with or without modifications, as long as this notice is preserved. 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 - AC_LIBOBJ([symlink]) else AC_CACHE_CHECK([whether symlink handles trailing slash correctly], [gl_cv_func_symlink_works], @@ -35,11 +35,19 @@ AC_DEFUN([gl_FUNC_SYMLINK], return result; ]])], [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], - [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 + ]) rm -f conftest.f conftest.link conftest.lnk2]) - if test "$gl_cv_func_symlink_works" != yes; then - REPLACE_SYMLINK=1 - AC_LIBOBJ([symlink]) - fi + case "$gl_cv_func_symlink_works" in + *yes) ;; + *) + REPLACE_SYMLINK=1 + ;; + esac fi ]) diff --git a/gnulib/m4/sys_socket_h.m4 b/gnulib/m4/sys_socket_h.m4 new file mode 100644 index 0000000..8d4e7e1 --- /dev/null +++ b/gnulib/m4/sys_socket_h.m4 @@ -0,0 +1,177 @@ +# sys_socket_h.m4 serial 22 +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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]) + AC_REQUIRE([AC_C_INLINE]) + + dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have + dnl old-style declarations (with return type 'int' instead of 'ssize_t') + 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/gnulib/m4/sys_stat_h.m4 b/gnulib/m4/sys_stat_h.m4 index fc41912..f45dee1 100644 --- a/gnulib/m4/sys_stat_h.m4 +++ b/gnulib/m4/sys_stat_h.m4 @@ -1,5 +1,5 @@ -# sys_stat_h.m4 serial 24 -*- Autoconf -*- -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +# sys_stat_h.m4 serial 27 -*- Autoconf -*- +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -19,6 +19,22 @@ AC_DEFUN([gl_HEADER_SYS_STAT_H], 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], [], @@ -30,7 +46,7 @@ AC_DEFUN([gl_HEADER_SYS_STAT_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 - ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat + ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat]) ]) # gl_HEADER_SYS_STAT_H @@ -47,6 +63,7 @@ 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]) diff --git a/gnulib/m4/sys_time_h.m4 b/gnulib/m4/sys_time_h.m4 new file mode 100644 index 0000000..c4a30cd --- /dev/null +++ b/gnulib/m4/sys_time_h.m4 @@ -0,0 +1,110 @@ +# Configure a replacement for . +# serial 8 + +# Copyright (C) 2007, 2009-2012 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/gnulib/m4/sys_types_h.m4 b/gnulib/m4/sys_types_h.m4 new file mode 100644 index 0000000..f11eef2 --- /dev/null +++ b/gnulib/m4/sys_types_h.m4 @@ -0,0 +1,24 @@ +# sys_types_h.m4 serial 4 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. +dnl This file is free software; the Free 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_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/gnulib/m4/sys_wait_h.m4 b/gnulib/m4/sys_wait_h.m4 index e3b147c..c0bba86 100644 --- a/gnulib/m4/sys_wait_h.m4 +++ b/gnulib/m4/sys_wait_h.m4 @@ -1,5 +1,5 @@ -# sys_wait_h.m4 serial 5 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# sys_wait_h.m4 serial 6 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,6 +11,9 @@ AC_DEFUN([gl_SYS_WAIT_H], 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 ]], diff --git a/gnulib/m4/tempname.m4 b/gnulib/m4/tempname.m4 new file mode 100644 index 0000000..20ad78b --- /dev/null +++ b/gnulib/m4/tempname.m4 @@ -0,0 +1,19 @@ +#serial 5 + +# Copyright (C) 2006-2007, 2009-2012 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. + +# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose +# it as a public API, and provide it on systems that are lacking. +AC_DEFUN([gl_FUNC_GEN_TEMPNAME], +[ + gl_PREREQ_TEMPNAME +]) + +# Prerequisites of lib/tempname.c. +AC_DEFUN([gl_PREREQ_TEMPNAME], +[ + : +]) diff --git a/gnulib/m4/thread.m4 b/gnulib/m4/thread.m4 index 49a4bc7..cd66c3e 100644 --- a/gnulib/m4/thread.m4 +++ b/gnulib/m4/thread.m4 @@ -1,5 +1,5 @@ # thread.m4 serial 2 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4 index 8a621fd..cb93391 100644 --- a/gnulib/m4/threadlib.m4 +++ b/gnulib/m4/threadlib.m4 @@ -1,5 +1,5 @@ -# threadlib.m4 serial 8 (gettext-0.18.2) -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +# threadlib.m4 serial 10 (gettext-0.18.2) +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ 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 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). @@ -53,7 +53,7 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY], [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([--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 @@ -276,17 +276,19 @@ int main () 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 + 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]) @@ -317,50 +319,50 @@ AC_DEFUN([gl_DISABLE_THREADS], [ dnl Survey of platforms: dnl -dnl Platform Available Compiler Supports test-lock -dnl flavours option weak result -dnl --------------- --------- --------- -------- --------- -dnl Linux 2.4/glibc posix -lpthread Y OK +dnl Platform Available Compiler Supports test-lock +dnl flavours option weak result +dnl --------------- --------- --------- -------- --------- +dnl Linux 2.4/glibc posix -lpthread Y OK dnl -dnl GNU Hurd/glibc posix +dnl GNU Hurd/glibc posix dnl -dnl FreeBSD 5.3 posix -lc_r Y -dnl posix -lkse ? Y -dnl posix -lpthread ? Y -dnl posix -lthr Y +dnl FreeBSD 5.3 posix -lc_r Y +dnl posix -lkse ? Y +dnl posix -lpthread ? Y +dnl posix -lthr Y dnl -dnl FreeBSD 5.2 posix -lc_r Y -dnl posix -lkse Y -dnl posix -lthr Y +dnl FreeBSD 5.2 posix -lc_r Y +dnl posix -lkse Y +dnl posix -lthr Y dnl -dnl FreeBSD 4.0,4.10 posix -lc_r Y OK +dnl FreeBSD 4.0,4.10 posix -lc_r Y OK dnl -dnl NetBSD 1.6 -- +dnl NetBSD 1.6 -- dnl -dnl OpenBSD 3.4 posix -lpthread Y OK +dnl OpenBSD 3.4 posix -lpthread Y OK dnl -dnl MacOS X 10.[123] posix -lpthread Y OK +dnl Mac OS X 10.[123] posix -lpthread Y OK dnl -dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK -dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK +dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK +dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK dnl -dnl HP-UX 11 posix -lpthread N (cc) OK +dnl HP-UX 11 posix -lpthread N (cc) OK dnl Y (gcc) dnl -dnl IRIX 6.5 posix -lpthread Y 0.5 +dnl IRIX 6.5 posix -lpthread Y 0.5 dnl -dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK +dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK dnl -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK +dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK dnl -lpthread (gcc) Y dnl -dnl Cygwin posix -lpthread Y OK +dnl Cygwin posix -lpthread Y OK dnl -dnl Any of the above pth -lpth 0.0 +dnl Any of the above pth -lpth 0.0 dnl -dnl Mingw win32 N OK +dnl Mingw windows N OK dnl -dnl BeOS 5 -- +dnl BeOS 5 -- dnl dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is dnl turned off: diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4 index 615da1c..6415bfb 100644 --- a/gnulib/m4/time_h.m4 +++ b/gnulib/m4/time_h.m4 @@ -1,8 +1,8 @@ # Configure a more-standard replacement for . -# Copyright (C) 2000-2001, 2003-2007, 2009-2011 Free Software Foundation, Inc. +# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. -# serial 4 +# serial 7 # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -25,7 +25,7 @@ AC_DEFUN([gl_HEADER_TIME_H_BODY], AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) ]) -dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared +dnl Check whether 'struct timespec' is declared dnl in time.h, sys/time.h, or pthread.h. AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4 index c81a113..7e7651b 100644 --- a/gnulib/m4/unistd_h.m4 +++ b/gnulib/m4/unistd_h.m4 @@ -1,5 +1,5 @@ -# unistd_h.m4 serial 53 -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +# unistd_h.m4 serial 65 +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,9 +21,18 @@ AC_DEFUN([gl_UNISTD_H], 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([[#include + 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 @@ -33,12 +42,13 @@ AC_DEFUN([gl_UNISTD_H], # 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]) + ]], [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], @@ -52,47 +62,54 @@ AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], 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]) + 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]) @@ -101,6 +118,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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]) @@ -108,6 +126,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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]) @@ -117,6 +136,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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]) @@ -124,10 +144,12 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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]) @@ -136,17 +158,20 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS], 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_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]) diff --git a/gnulib/m4/vasnprintf.m4 b/gnulib/m4/vasnprintf.m4 index 32ea985..0ce11da 100644 --- a/gnulib/m4/vasnprintf.m4 +++ b/gnulib/m4/vasnprintf.m4 @@ -1,5 +1,5 @@ -# vasnprintf.m4 serial 32 -dnl Copyright (C) 2002-2004, 2006-2011 Free Software Foundation, Inc. +# vasnprintf.m4 serial 35 +dnl Copyright (C) 2002-2004, 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -29,7 +29,7 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF], gl_PREREQ_ASNPRINTF ]) -# Prequisites of lib/printf-args.h, lib/printf-args.c. +# Prerequisites of lib/printf-args.h, lib/printf-args.c. AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [ AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) @@ -37,7 +37,7 @@ AC_DEFUN([gl_PREREQ_PRINTF_ARGS], AC_REQUIRE([gt_TYPE_WINT_T]) ]) -# Prequisites of lib/printf-parse.h, lib/printf-parse.c. +# Prerequisites of lib/printf-parse.h, lib/printf-parse.c. AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [ AC_REQUIRE([gl_FEATURES_H]) @@ -63,7 +63,10 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], 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 ]) + 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]) diff --git a/gnulib/m4/vasprintf.m4 b/gnulib/m4/vasprintf.m4 index 6db52b1..205ceea 100644 --- a/gnulib/m4/vasprintf.m4 +++ b/gnulib/m4/vasprintf.m4 @@ -1,5 +1,5 @@ # vasprintf.m4 serial 6 -dnl Copyright (C) 2002-2003, 2006-2007, 2009-2011 Free Software Foundation, +dnl Copyright (C) 2002-2003, 2006-2007, 2009-2012 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, diff --git a/gnulib/m4/warn-on-use.m4 b/gnulib/m4/warn-on-use.m4 index e0d0f27..a77802e 100644 --- a/gnulib/m4/warn-on-use.m4 +++ b/gnulib/m4/warn-on-use.m4 @@ -1,5 +1,5 @@ -# warn-on-use.m4 serial 2 -dnl Copyright (C) 2010-2011 Free Software Foundation, Inc. +# warn-on-use.m4 serial 5 +dnl Copyright (C) 2010-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -18,8 +18,8 @@ dnl with or without modifications, as long as this notice is preserved. # 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 +# 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], [ @@ -27,6 +27,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], [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], @@ -35,8 +37,8 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE], [@%:@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]) + 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]) diff --git a/gnulib/m4/wchar_h.m4 b/gnulib/m4/wchar_h.m4 index 6255ff3..c7a8b2d 100644 --- a/gnulib/m4/wchar_h.m4 +++ b/gnulib/m4/wchar_h.m4 @@ -1,13 +1,13 @@ dnl A placeholder for ISO C99 , for platforms that have issues. -dnl Copyright (C) 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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 +# wchar_h.m4 serial 39 AC_DEFUN([gl_WCHAR_H], [ @@ -119,13 +119,6 @@ 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. diff --git a/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4 index d2c03c4..534735d 100644 --- a/gnulib/m4/wchar_t.m4 +++ b/gnulib/m4/wchar_t.m4 @@ -1,5 +1,5 @@ # wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2002-2003, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4 index 2905d9b..00d7302 100644 --- a/gnulib/m4/wcrtomb.m4 +++ b/gnulib/m4/wcrtomb.m4 @@ -1,5 +1,5 @@ -# wcrtomb.m4 serial 8 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# wcrtomb.m4 serial 11 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -14,6 +14,22 @@ AC_DEFUN([gl_FUNC_WCRTOMB], AC_CHECK_FUNCS_ONCE([wcrtomb]) if test $ac_cv_func_wcrtomb = no; then HAVE_WCRTOMB=0 + AC_CHECK_DECLS([wcrtomb],,, [[ +/* Tru64 with Desktop Toolkit C has a bug: 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 @@ -88,11 +104,6 @@ int main () 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. diff --git a/gnulib/m4/wctob.m4 b/gnulib/m4/wctob.m4 index 3b4633c..786c881 100644 --- a/gnulib/m4/wctob.m4 +++ b/gnulib/m4/wctob.m4 @@ -1,5 +1,5 @@ -# wctob.m4 serial 7 -dnl Copyright (C) 2008-2011 Free Software Foundation, Inc. +# wctob.m4 serial 10 +dnl Copyright (C) 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -10,11 +10,10 @@ AC_DEFUN([gl_FUNC_WCTOB], AC_CHECK_FUNCS_ONCE([wctob]) if test $ac_cv_func_wctob = no; then + HAVE_WCTOB=0 HAVE_DECL_WCTOB=0 - gl_REPLACE_WCHAR_H - AC_LIBOBJ([wctob]) - gl_PREREQ_WCTOB 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 @@ -102,14 +101,10 @@ int main () *yes) ;; *) REPLACE_WCTOB=1 ;; esac - if test $REPLACE_WCTOB = 1; then - gl_REPLACE_WCHAR_H - AC_LIBOBJ([wctob]) - gl_PREREQ_WCTOB - else + if test $REPLACE_WCTOB = 0; then dnl IRIX 6.5 has the wctob() function but does not declare it. - AC_CHECK_DECLS([wctob], [], [], [ + 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 @@ -118,10 +113,9 @@ int main () #include #include #include -]) +]]) if test $ac_cv_have_decl_wctob != yes; then HAVE_DECL_WCTOB=0 - gl_REPLACE_WCHAR_H fi fi fi diff --git a/gnulib/m4/wctomb.m4 b/gnulib/m4/wctomb.m4 index bc21b5b..88fd6be 100644 --- a/gnulib/m4/wctomb.m4 +++ b/gnulib/m4/wctomb.m4 @@ -1,5 +1,5 @@ -# wctomb.m4 serial 1 -dnl Copyright (C) 2011 Free Software Foundation, Inc. +# wctomb.m4 serial 2 +dnl Copyright (C) 2011-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -11,10 +11,6 @@ AC_DEFUN([gl_FUNC_WCTOMB], 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. diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4 index ef9fb04..4b19f64 100644 --- a/gnulib/m4/wctype_h.m4 +++ b/gnulib/m4/wctype_h.m4 @@ -1,8 +1,8 @@ -# wctype_h.m4 serial 14 +# wctype_h.m4 serial 17 dnl A placeholder for ISO C99 , for platforms that lack it. -dnl Copyright (C) 2006-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2006-2012 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -57,7 +57,8 @@ AC_DEFUN([gl_WCTYPE_H], #if __GNU_LIBRARY__ == 1 Linux libc5 i18n is broken. #endif]], [])], - [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no]) + [gl_cv_func_iswcntrl_works="guessing yes"], + [gl_cv_func_iswcntrl_works="guessing no"]) ]) ]) fi @@ -67,15 +68,51 @@ AC_DEFUN([gl_WCTYPE_H], fi AC_SUBST([HAVE_WCTYPE_H]) - if test "$gl_cv_func_iswcntrl_works" = no; then - REPLACE_ISWCNTRL=1 - else - REPLACE_ISWCNTRL=0 - fi + 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, ..., towupper in . + 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 diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4 index da1ce3d..3260cce 100644 --- a/gnulib/m4/wint_t.m4 +++ b/gnulib/m4/wint_t.m4 @@ -1,5 +1,5 @@ # wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003, 2007-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/xsize.m4 b/gnulib/m4/xsize.m4 index 8c693bc..b3b7fee 100644 --- a/gnulib/m4/xsize.m4 +++ b/gnulib/m4/xsize.m4 @@ -1,5 +1,5 @@ # xsize.m4 serial 4 -dnl Copyright (C) 2003-2004, 2008-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2004, 2008-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/m4/yield.m4 b/gnulib/m4/yield.m4 index 15d5ac2..94e69c4 100644 --- a/gnulib/m4/yield.m4 +++ b/gnulib/m4/yield.m4 @@ -1,5 +1,5 @@ # yield.m4 serial 2 -dnl Copyright (C) 2005-2011 Free Software Foundation, Inc. +dnl Copyright (C) 2005-2012 Free Software Foundation, Inc. dnl This file is free software; the Free 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/gnulib/tests/Makefile.am b/gnulib/tests/Makefile.am index 3676a7d..34645eb 100644 --- a/gnulib/tests/Makefile.am +++ b/gnulib/tests/Makefile.am @@ -1,11 +1,23 @@ ## 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-2012 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. @@ -55,30 +67,6 @@ EXTRA_DIST += test-alloca-opt.c ## end gnulib module alloca-opt-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 binary-io libtests_a_SOURCES += binary-io.h @@ -104,30 +92,6 @@ 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 - -# 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 libtests_a_SOURCES += c-ctype.h c-ctype.c @@ -166,6 +130,23 @@ EXTRA_DIST += test-canonicalize-lgpl.c signature.h macros.h ## end gnulib module canonicalize-lgpl-tests +## begin gnulib module close + + +EXTRA_DIST += close.c + +EXTRA_libtests_a_SOURCES += close.c + +## end gnulib module close + +## 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 ctype-tests TESTS += test-ctype @@ -209,39 +190,6 @@ EXTRA_DIST += test-errno.c ## end gnulib module errno-tests -## 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-h-tests TESTS += test-fcntl-h @@ -250,6 +198,47 @@ EXTRA_DIST += test-fcntl-h.c ## end gnulib module fcntl-h-tests +## begin gnulib module fd-hook + +libtests_a_SOURCES += fd-hook.c + +EXTRA_DIST += fd-hook.h + +## end gnulib module fd-hook + +## 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 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 @@ -258,6 +247,72 @@ EXTRA_DIST += test-fnmatch.c signature.h macros.h ## end gnulib module fnmatch-tests +## begin gnulib module fpucw + + +EXTRA_DIST += fpucw.h + +## end gnulib module fpucw + +## 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 fstat + + +EXTRA_DIST += fstat.c + +EXTRA_libtests_a_SOURCES += fstat.c + +## end gnulib module fstat + +## 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 + +## 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 + + +EXTRA_DIST += getcwd-lgpl.c + +EXTRA_libtests_a_SOURCES += getcwd-lgpl.c + +## end gnulib module getcwd-lgpl + +## 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 getdelim-tests TESTS += test-getdelim @@ -294,16 +349,26 @@ EXTRA_libtests_a_SOURCES += getpagesize.c ## end gnulib module getpagesize +## begin gnulib module gettimeofday-tests + +TESTS += test-gettimeofday +check_PROGRAMS += test-gettimeofday + +EXTRA_DIST += signature.h test-gettimeofday.c + +## end gnulib module gettimeofday-tests + ## begin gnulib module havelib -EXTRA_DIST += $(top_srcdir)/build/aux/config.rpath +EXTRA_DIST += $(top_srcdir)/build/ac-aux/config.rpath ## end gnulib module havelib ## begin gnulib module ignore-value -libtests_a_SOURCES += ignore-value.h + +EXTRA_DIST += ignore-value.h ## end gnulib module ignore-value @@ -322,6 +387,66 @@ EXTRA_DIST += intprops.h ## end gnulib module intprops +## 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 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/@''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 inttypes-tests + +TESTS += test-inttypes +check_PROGRAMS += test-inttypes +EXTRA_DIST += test-inttypes.c + +## end gnulib module inttypes-tests + ## begin gnulib module isblank-tests TESTS += test-isblank @@ -346,6 +471,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 @@ -358,7 +491,7 @@ 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 @@ -453,6 +586,24 @@ EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h ## end gnulib module memchr-tests +## begin gnulib module msvc-inval + + +EXTRA_DIST += msvc-inval.c msvc-inval.h + +EXTRA_libtests_a_SOURCES += msvc-inval.c + +## end gnulib module msvc-inval + +## begin gnulib module msvc-nothrow + + +EXTRA_DIST += msvc-nothrow.c msvc-nothrow.h + +EXTRA_libtests_a_SOURCES += msvc-nothrow.c + +## end gnulib module msvc-nothrow + ## begin gnulib module nl_langinfo-tests TESTS += test-nl_langinfo.sh @@ -479,6 +630,14 @@ EXTRA_DIST += test-open.h test-open.c signature.h macros.h ## end gnulib module open-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 putenv @@ -488,6 +647,14 @@ EXTRA_libtests_a_SOURCES += putenv.c ## end gnulib module putenv +## begin gnulib module rawmemchr-tests + +TESTS += test-rawmemchr +check_PROGRAMS += test-rawmemchr +EXTRA_DIST += test-rawmemchr.c zerosize-ptr.h signature.h macros.h + +## end gnulib module rawmemchr-tests + ## begin gnulib module readlink-tests TESTS += test-readlink @@ -550,10 +717,117 @@ EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlo ## end gnulib module setlocale-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/ac-aux/snippet/_Noreturn.h + +EXTRA_DIST += $(top_srcdir)/build/ac-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/ac-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/unused-parameter.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-aux/snippet/warn-on-use.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/^.ifndef/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/warn-on-use.h + +## end gnulib module snippet/warn-on-use + ## 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 @@ -598,6 +872,14 @@ EXTRA_DIST += test-stdlib.c test-sys_wait.h ## end gnulib module stdlib-tests +## begin gnulib module strchrnul-tests + +TESTS += test-strchrnul +check_PROGRAMS += test-strchrnul +EXTRA_DIST += test-strchrnul.c signature.h macros.h + +## end gnulib module strchrnul-tests + ## begin gnulib module string-tests TESTS += test-string @@ -647,6 +929,22 @@ EXTRA_DIST += test-sys_stat.c ## end gnulib module sys_stat-tests +## begin gnulib module sys_time-tests + +TESTS += test-sys_time +check_PROGRAMS += test-sys_time +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_wait-tests TESTS += test-sys_wait @@ -655,17 +953,35 @@ 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 thread-tests + +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 thread-tests + ## begin gnulib module threadlib libtests_a_SOURCES += glthread/threadlib.c -EXTRA_DIST += $(top_srcdir)/build/aux/config.rpath +EXTRA_DIST += $(top_srcdir)/build/ac-aux/config.rpath ## end gnulib module threadlib @@ -702,31 +1018,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 vasnprintf-tests TESTS += test-vasnprintf @@ -750,29 +1041,10 @@ EXTRA_DIST += test-vasprintf.c signature.h macros.h 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 -## 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 diff --git a/gnulib/tests/Makefile.in b/gnulib/tests/Makefile.in index 2e36ff5..37b527a 100644 --- a/gnulib/tests/Makefile.in +++ b/gnulib/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 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. +# Copyright (C) 1994-2013 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 +14,24 @@ @SET_MAKE@ -# Copyright (C) 2002-2011 Free Software Foundation, Inc. +# Copyright (C) 2002-2012 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 . # -# 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 +# 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 +39,51 @@ VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -47,13 +103,18 @@ build_triplet = @build@ host_triplet = @host@ TESTS = test-alloca-opt$(EXEEXT) test-binary-io.sh test-btowc1.sh \ test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \ - test-canonicalize-lgpl$(EXEEXT) test-ctype$(EXEEXT) \ - test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \ - test-fcntl-h$(EXEEXT) test-fnmatch$(EXEEXT) \ + test-canonicalize-lgpl$(EXEEXT) test-close$(EXEEXT) \ + test-ctype$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \ + test-errno$(EXEEXT) test-fcntl-h$(EXEEXT) test-fdopen$(EXEEXT) \ + test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ + test-fputc$(EXEEXT) test-fread$(EXEEXT) test-fstat$(EXEEXT) \ + test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getdelim$(EXEEXT) test-getline$(EXEEXT) \ - test-getopt$(EXEEXT) test-ignore-value$(EXEEXT) \ - test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-locale$(EXEEXT) test-localename$(EXEEXT) \ + test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \ + test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \ + test-inttypes$(EXEEXT) test-isblank$(EXEEXT) \ + test-langinfo$(EXEEXT) test-locale$(EXEEXT) \ + test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \ @@ -62,14 +123,18 @@ TESTS = test-alloca-opt$(EXEEXT) test-binary-io.sh test-btowc1.sh \ test-mbrtowc-w32-5.sh test-mbsinit.sh test-mbsrtowcs1.sh \ test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh \ test-memchr$(EXEEXT) test-nl_langinfo.sh test-open$(EXEEXT) \ + test-pathmax$(EXEEXT) test-rawmemchr$(EXEEXT) \ test-readlink$(EXEEXT) test-safe-alloc$(EXEEXT) \ test-setenv$(EXEEXT) test-setlocale1.sh test-setlocale2.sh \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ - test-string$(EXEEXT) test-strnlen$(EXEEXT) \ - test-strstr$(EXEEXT) test-symlink$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_wait$(EXEEXT) \ - test-time$(EXEEXT) test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \ + test-strchrnul$(EXEEXT) test-string$(EXEEXT) \ + test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \ + test-symlink$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_wait$(EXEEXT) test-init.sh test-thread_self$(EXEEXT) \ + test-thread_create$(EXEEXT) test-time$(EXEEXT) \ + test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vasprintf$(EXEEXT) \ test-verify$(EXEEXT) test-verify.sh test-wchar$(EXEEXT) \ test-wcrtomb.sh test-wcrtomb-w32-1.sh test-wcrtomb-w32-2.sh \ @@ -80,39 +145,50 @@ noinst_PROGRAMS = check_PROGRAMS = test-alloca-opt$(EXEEXT) test-binary-io$(EXEEXT) \ test-btowc$(EXEEXT) test-c-ctype$(EXEEXT) \ test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \ - test-canonicalize-lgpl$(EXEEXT) test-ctype$(EXEEXT) \ - test-dup2$(EXEEXT) test-environ$(EXEEXT) test-errno$(EXEEXT) \ - test-fcntl-h$(EXEEXT) test-fnmatch$(EXEEXT) \ + test-canonicalize-lgpl$(EXEEXT) test-close$(EXEEXT) \ + test-ctype$(EXEEXT) test-dup2$(EXEEXT) test-environ$(EXEEXT) \ + test-errno$(EXEEXT) test-fcntl-h$(EXEEXT) test-fdopen$(EXEEXT) \ + test-fgetc$(EXEEXT) test-float$(EXEEXT) test-fnmatch$(EXEEXT) \ + test-fputc$(EXEEXT) test-fread$(EXEEXT) test-fstat$(EXEEXT) \ + test-fwrite$(EXEEXT) test-getcwd-lgpl$(EXEEXT) \ test-getdelim$(EXEEXT) test-getline$(EXEEXT) \ - test-getopt$(EXEEXT) test-ignore-value$(EXEEXT) \ - test-isblank$(EXEEXT) test-langinfo$(EXEEXT) \ - test-locale$(EXEEXT) test-localename$(EXEEXT) \ + test-getopt$(EXEEXT) test-gettimeofday$(EXEEXT) \ + test-ignore-value$(EXEEXT) test-intprops$(EXEEXT) \ + test-inttypes$(EXEEXT) test-isblank$(EXEEXT) \ + test-langinfo$(EXEEXT) test-locale$(EXEEXT) \ + test-localeconv$(EXEEXT) test-localename$(EXEEXT) \ test-lock$(EXEEXT) test-lstat$(EXEEXT) \ test-malloc-gnu$(EXEEXT) test-malloca$(EXEEXT) \ test-mbrtowc$(EXEEXT) test-mbrtowc-w32$(EXEEXT) \ test-mbsinit$(EXEEXT) test-mbsrtowcs$(EXEEXT) \ test-memchr$(EXEEXT) test-nl_langinfo$(EXEEXT) \ - test-open$(EXEEXT) test-readlink$(EXEEXT) \ + test-open$(EXEEXT) test-pathmax$(EXEEXT) \ + test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \ test-safe-alloc$(EXEEXT) test-setenv$(EXEEXT) \ test-setlocale1$(EXEEXT) test-setlocale2$(EXEEXT) \ test-stat$(EXEEXT) test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \ - test-string$(EXEEXT) test-strnlen$(EXEEXT) \ - test-strstr$(EXEEXT) test-symlink$(EXEEXT) \ - test-sys_stat$(EXEEXT) test-sys_wait$(EXEEXT) \ - test-time$(EXEEXT) test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \ + test-strchrnul$(EXEEXT) test-string$(EXEEXT) \ + test-strnlen$(EXEEXT) test-strstr$(EXEEXT) \ + test-symlink$(EXEEXT) test-sys_stat$(EXEEXT) \ + test-sys_time$(EXEEXT) test-sys_types$(EXEEXT) \ + test-sys_wait$(EXEEXT) test-thread_self$(EXEEXT) \ + test-thread_create$(EXEEXT) test-time$(EXEEXT) \ + test-unistd$(EXEEXT) test-unsetenv$(EXEEXT) \ test-vasnprintf$(EXEEXT) test-vasprintf$(EXEEXT) \ test-verify$(EXEEXT) test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) \ test-wcrtomb-w32$(EXEEXT) test-wctype-h$(EXEEXT) subdir = gnulib/tests -DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build/ac-aux/depcomp $(noinst_HEADERS) \ + $(top_srcdir)/build/ac-aux/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/alloca.m4 \ $(top_srcdir)/gnulib/m4/argz.m4 \ $(top_srcdir)/gnulib/m4/btowc.m4 \ $(top_srcdir)/gnulib/m4/canonicalize.m4 \ + $(top_srcdir)/gnulib/m4/close.m4 \ $(top_srcdir)/gnulib/m4/codeset.m4 \ $(top_srcdir)/gnulib/m4/configmake.m4 \ $(top_srcdir)/gnulib/m4/ctype.m4 \ @@ -121,24 +197,33 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/eealloc.m4 \ $(top_srcdir)/gnulib/m4/environ.m4 \ $(top_srcdir)/gnulib/m4/errno_h.m4 \ + $(top_srcdir)/gnulib/m4/exponentd.m4 \ $(top_srcdir)/gnulib/m4/extensions.m4 \ $(top_srcdir)/gnulib/m4/fcntl-o.m4 \ $(top_srcdir)/gnulib/m4/fcntl_h.m4 \ + $(top_srcdir)/gnulib/m4/fdopen.m4 \ $(top_srcdir)/gnulib/m4/float_h.m4 \ $(top_srcdir)/gnulib/m4/fnmatch.m4 \ + $(top_srcdir)/gnulib/m4/fpieee.m4 \ + $(top_srcdir)/gnulib/m4/fstat.m4 \ + $(top_srcdir)/gnulib/m4/getcwd.m4 \ $(top_srcdir)/gnulib/m4/getdelim.m4 \ $(top_srcdir)/gnulib/m4/getline.m4 \ $(top_srcdir)/gnulib/m4/getopt.m4 \ $(top_srcdir)/gnulib/m4/getpagesize.m4 \ + $(top_srcdir)/gnulib/m4/gettimeofday.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/include_next.m4 \ $(top_srcdir)/gnulib/m4/intlmacosx.m4 \ $(top_srcdir)/gnulib/m4/intmax_t.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/langinfo_h.m4 \ + $(top_srcdir)/gnulib/m4/largefile.m4 \ $(top_srcdir)/gnulib/m4/lcmessage.m4 \ $(top_srcdir)/gnulib/m4/lib-ld.m4 \ $(top_srcdir)/gnulib/m4/lib-link.m4 \ @@ -150,6 +235,7 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.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/localeconv.m4 \ $(top_srcdir)/gnulib/m4/localename.m4 \ $(top_srcdir)/gnulib/m4/lock.m4 \ $(top_srcdir)/gnulib/m4/longlong.m4 \ @@ -167,15 +253,21 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/mbtowc.m4 \ $(top_srcdir)/gnulib/m4/memchr.m4 \ $(top_srcdir)/gnulib/m4/mempcpy.m4 \ + $(top_srcdir)/gnulib/m4/mkstemp.m4 \ $(top_srcdir)/gnulib/m4/mmap-anon.m4 \ $(top_srcdir)/gnulib/m4/mode_t.m4 \ + $(top_srcdir)/gnulib/m4/msvc-inval.m4 \ + $(top_srcdir)/gnulib/m4/msvc-nothrow.m4 \ $(top_srcdir)/gnulib/m4/multiarch.m4 \ $(top_srcdir)/gnulib/m4/nl_langinfo.m4 \ + $(top_srcdir)/gnulib/m4/nocrash.m4 \ + $(top_srcdir)/gnulib/m4/off_t.m4 \ $(top_srcdir)/gnulib/m4/onceonly.m4 \ $(top_srcdir)/gnulib/m4/open.m4 \ $(top_srcdir)/gnulib/m4/pathmax.m4 \ $(top_srcdir)/gnulib/m4/printf.m4 \ $(top_srcdir)/gnulib/m4/putenv.m4 \ + $(top_srcdir)/gnulib/m4/rawmemchr.m4 \ $(top_srcdir)/gnulib/m4/readlink.m4 \ $(top_srcdir)/gnulib/m4/realloc.m4 \ $(top_srcdir)/gnulib/m4/regex.m4 \ @@ -195,13 +287,18 @@ am__aclocal_m4_deps = $(top_srcdir)/gnulib/m4/00gnulib.m4 \ $(top_srcdir)/gnulib/m4/stdlib_h.m4 \ $(top_srcdir)/gnulib/m4/stpcpy.m4 \ $(top_srcdir)/gnulib/m4/stpncpy.m4 \ + $(top_srcdir)/gnulib/m4/strchrnul.m4 \ $(top_srcdir)/gnulib/m4/string_h.m4 \ $(top_srcdir)/gnulib/m4/strndup.m4 \ $(top_srcdir)/gnulib/m4/strnlen.m4 \ $(top_srcdir)/gnulib/m4/strstr.m4 \ $(top_srcdir)/gnulib/m4/symlink.m4 \ + $(top_srcdir)/gnulib/m4/sys_socket_h.m4 \ $(top_srcdir)/gnulib/m4/sys_stat_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_time_h.m4 \ + $(top_srcdir)/gnulib/m4/sys_types_h.m4 \ $(top_srcdir)/gnulib/m4/sys_wait_h.m4 \ + $(top_srcdir)/gnulib/m4/tempname.m4 \ $(top_srcdir)/gnulib/m4/thread.m4 \ $(top_srcdir)/gnulib/m4/threadlib.m4 \ $(top_srcdir)/gnulib/m4/time_h.m4 \ @@ -226,18 +323,15 @@ CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -AM_V_AR = $(am__v_AR_$(V)) -am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY)) -am__v_AR_0 = @echo " AR " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) -am__v_at_0 = @ +AM_V_AR = $(am__v_AR_@AM_V@) +am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) +am__v_AR_0 = @echo " AR " $@; +am__v_AR_1 = libtests_a_AR = $(AR) $(ARFLAGS) am__DEPENDENCIES_1 = am__dirstamp = $(am__leading_dot)dirstamp am_libtests_a_OBJECTS = c-ctype.$(OBJEXT) c-strcasecmp.$(OBJEXT) \ - c-strncasecmp.$(OBJEXT) localename.$(OBJEXT) \ + c-strncasecmp.$(OBJEXT) fd-hook.$(OBJEXT) localename.$(OBJEXT) \ glthread/lock.$(OBJEXT) glthread/thread.$(OBJEXT) \ glthread/threadlib.$(OBJEXT) libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) @@ -247,9 +341,10 @@ test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) test_alloca_opt_LDADD = $(LDADD) test_alloca_opt_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = test_binary_io_SOURCES = test-binary-io.c test_binary_io_OBJECTS = test-binary-io.$(OBJEXT) test_binary_io_LDADD = $(LDADD) @@ -280,6 +375,11 @@ test_canonicalize_lgpl_OBJECTS = test-canonicalize-lgpl.$(OBJEXT) test_canonicalize_lgpl_LDADD = $(LDADD) test_canonicalize_lgpl_DEPENDENCIES = libtests.a \ ../../gnulib/lib/libgnu.la 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 ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_ctype_SOURCES = test-ctype.c test_ctype_OBJECTS = test-ctype.$(OBJEXT) test_ctype_LDADD = $(LDADD) @@ -305,11 +405,52 @@ test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT) test_fcntl_h_LDADD = $(LDADD) test_fcntl_h_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ 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 ../../gnulib/lib/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + 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/libgnu.la \ 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 ../../gnulib/lib/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) +test_getcwd_lgpl_SOURCES = test-getcwd-lgpl.c +test_getcwd_lgpl_OBJECTS = test-getcwd-lgpl.$(OBJEXT) +am__DEPENDENCIES_2 = libtests.a ../../gnulib/lib/libgnu.la libtests.a \ + $(am__DEPENDENCIES_1) +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) @@ -322,14 +463,27 @@ test_getline_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) test_getopt_SOURCES = test-getopt.c test_getopt_OBJECTS = test-getopt.$(OBJEXT) -am__DEPENDENCIES_2 = libtests.a ../../gnulib/lib/libgnu.la libtests.a \ - $(am__DEPENDENCIES_1) 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/libgnu.la \ + 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/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) +test_intprops_SOURCES = test-intprops.c +test_intprops_OBJECTS = test-intprops.$(OBJEXT) +test_intprops_LDADD = $(LDADD) +test_intprops_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + 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/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_isblank_SOURCES = test-isblank.c test_isblank_OBJECTS = test-isblank.$(OBJEXT) test_isblank_LDADD = $(LDADD) @@ -345,9 +499,15 @@ test_locale_OBJECTS = test-locale.$(OBJEXT) test_locale_LDADD = $(LDADD) test_locale_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ 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 ../../gnulib/lib/libgnu.la \ + 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) @@ -401,6 +561,16 @@ test_open_OBJECTS = test-open.$(OBJEXT) test_open_LDADD = $(LDADD) test_open_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) +test_pathmax_SOURCES = test-pathmax.c +test_pathmax_OBJECTS = test-pathmax.$(OBJEXT) +test_pathmax_LDADD = $(LDADD) +test_pathmax_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) +test_rawmemchr_SOURCES = test-rawmemchr.c +test_rawmemchr_OBJECTS = test-rawmemchr.$(OBJEXT) +test_rawmemchr_LDADD = $(LDADD) +test_rawmemchr_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_readlink_SOURCES = test-readlink.c test_readlink_OBJECTS = test-readlink.$(OBJEXT) test_readlink_LDADD = $(LDADD) @@ -428,9 +598,7 @@ test_setlocale2_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) test_stat_SOURCES = test-stat.c test_stat_OBJECTS = test-stat.$(OBJEXT) -test_stat_LDADD = $(LDADD) -test_stat_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) +test_stat_DEPENDENCIES = $(am__DEPENDENCIES_2) $(am__DEPENDENCIES_1) test_stdbool_SOURCES = test-stdbool.c test_stdbool_OBJECTS = test-stdbool.$(OBJEXT) test_stdbool_LDADD = $(LDADD) @@ -456,6 +624,11 @@ test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) test_stdlib_LDADD = $(LDADD) test_stdlib_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) +test_strchrnul_SOURCES = test-strchrnul.c +test_strchrnul_OBJECTS = test-strchrnul.$(OBJEXT) +test_strchrnul_LDADD = $(LDADD) +test_strchrnul_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ + libtests.a $(am__DEPENDENCIES_1) test_string_SOURCES = test-string.c test_string_OBJECTS = test-string.$(OBJEXT) test_string_LDADD = $(LDADD) @@ -481,11 +654,27 @@ test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) test_sys_stat_LDADD = $(LDADD) test_sys_stat_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ 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/libgnu.la \ + 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 ../../gnulib/lib/libgnu.la \ + 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/libgnu.la \ 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) @@ -536,8 +725,20 @@ test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT) test_wctype_h_LDADD = $(LDADD) test_wctype_h_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ libtests.a $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -depcomp = $(SHELL) $(top_srcdir)/build/aux/depcomp +depcomp = $(SHELL) $(top_srcdir)/build/ac-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ @@ -546,84 +747,126 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) -am__v_CC_0 = @echo " CC " $@; +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) -am__v_GEN_0 = @echo " GEN " $@; +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-binary-io.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c \ - test-canonicalize-lgpl.c test-ctype.c test-dup2.c \ - test-environ.c test-errno.c test-fcntl-h.c test-fnmatch.c \ + test-canonicalize-lgpl.c test-close.c test-ctype.c test-dup2.c \ + test-environ.c test-errno.c test-fcntl-h.c test-fdopen.c \ + test-fgetc.c test-float.c test-fnmatch.c test-fputc.c \ + test-fread.c test-fstat.c test-fwrite.c test-getcwd-lgpl.c \ test-getdelim.c test-getline.c test-getopt.c \ - test-ignore-value.c test-isblank.c test-langinfo.c \ - test-locale.c test-localename.c test-lock.c test-lstat.c \ + test-gettimeofday.c test-ignore-value.c test-intprops.c \ + test-inttypes.c test-isblank.c test-langinfo.c test-locale.c \ + test-localeconv.c test-localename.c test-lock.c test-lstat.c \ test-malloc-gnu.c test-malloca.c test-mbrtowc.c \ test-mbrtowc-w32.c test-mbsinit.c test-mbsrtowcs.c \ - test-memchr.c test-nl_langinfo.c test-open.c test-readlink.c \ - test-safe-alloc.c test-setenv.c test-setlocale1.c \ - test-setlocale2.c test-stat.c test-stdbool.c test-stddef.c \ - test-stdint.c test-stdio.c test-stdlib.c test-string.c \ - test-strnlen.c test-strstr.c test-symlink.c test-sys_stat.c \ - test-sys_wait.c test-time.c test-unistd.c test-unsetenv.c \ + test-memchr.c test-nl_langinfo.c test-open.c test-pathmax.c \ + test-rawmemchr.c test-readlink.c test-safe-alloc.c \ + test-setenv.c test-setlocale1.c test-setlocale2.c test-stat.c \ + test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ + test-stdlib.c test-strchrnul.c test-string.c test-strnlen.c \ + test-strstr.c test-symlink.c test-sys_stat.c test-sys_time.c \ + test-sys_types.c test-sys_wait.c test-thread_create.c \ + test-thread_self.c test-time.c test-unistd.c test-unsetenv.c \ test-vasnprintf.c test-vasprintf.c test-verify.c test-wchar.c \ test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \ test-alloca-opt.c test-binary-io.c test-btowc.c test-c-ctype.c \ test-c-strcasecmp.c test-c-strncasecmp.c \ - test-canonicalize-lgpl.c test-ctype.c test-dup2.c \ - test-environ.c test-errno.c test-fcntl-h.c test-fnmatch.c \ + test-canonicalize-lgpl.c test-close.c test-ctype.c test-dup2.c \ + test-environ.c test-errno.c test-fcntl-h.c test-fdopen.c \ + test-fgetc.c test-float.c test-fnmatch.c test-fputc.c \ + test-fread.c test-fstat.c test-fwrite.c test-getcwd-lgpl.c \ test-getdelim.c test-getline.c test-getopt.c \ - test-ignore-value.c test-isblank.c test-langinfo.c \ - test-locale.c test-localename.c test-lock.c test-lstat.c \ + test-gettimeofday.c test-ignore-value.c test-intprops.c \ + test-inttypes.c test-isblank.c test-langinfo.c test-locale.c \ + test-localeconv.c test-localename.c test-lock.c test-lstat.c \ test-malloc-gnu.c test-malloca.c test-mbrtowc.c \ test-mbrtowc-w32.c test-mbsinit.c test-mbsrtowcs.c \ - test-memchr.c test-nl_langinfo.c test-open.c test-readlink.c \ - test-safe-alloc.c test-setenv.c test-setlocale1.c \ - test-setlocale2.c test-stat.c test-stdbool.c test-stddef.c \ - test-stdint.c test-stdio.c test-stdlib.c test-string.c \ - test-strnlen.c test-strstr.c test-symlink.c test-sys_stat.c \ - test-sys_wait.c test-time.c test-unistd.c test-unsetenv.c \ + test-memchr.c test-nl_langinfo.c test-open.c test-pathmax.c \ + test-rawmemchr.c test-readlink.c test-safe-alloc.c \ + test-setenv.c test-setlocale1.c test-setlocale2.c test-stat.c \ + test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \ + test-stdlib.c test-strchrnul.c test-string.c test-strnlen.c \ + test-strstr.c test-symlink.c test-sys_stat.c test-sys_time.c \ + test-sys_types.c test-sys_wait.c test-thread_create.c \ + test-thread_self.c test-time.c test-unistd.c test-unsetenv.c \ test-vasnprintf.c test-vasprintf.c test-verify.c test-wchar.c \ test-wcrtomb.c test-wcrtomb-w32.c test-wctype-h.c -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_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-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 \ + tags-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 \ - check check-html recheck recheck-html distdir +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + check recheck distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -# If stdout is a non-dumb tty, use colors. If test -t is not supported, -# then this fails; a conservative approach. Of course do not redirect -# stdout here, just stderr. -am__tty_colors = \ -red=; grn=; lgn=; blu=; std=; \ -test "X$(AM_COLOR_TESTS)" != Xno \ -&& test "X$$TERM" != Xdumb \ -&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \ -&& { \ - red=''; \ - grn=''; \ - lgn=''; \ - blu=''; \ - std=''; \ +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ } am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -646,54 +889,166 @@ 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' -# 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. -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 line; \ - for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\ - print line; \ +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; }; \ + } +am__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ }' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, -# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem +# 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 +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" # 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. +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ -rm -f $@-t; \ -trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \ - 1 2 13 15; \ -am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \ -test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(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) +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log -TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html) TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build/ac-aux/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build/ac-aux/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) -TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t) DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ @@ -729,6 +1084,7 @@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@ AR = @AR@ +ARFLAGS = @ARFLAGS@ ARGZ_H = @ARGZ_H@ AUGEAS_CFLAGS = @AUGEAS_CFLAGS@ AUTOCONF = @AUTOCONF@ @@ -772,9 +1128,11 @@ GNULIB_ATOLL = @GNULIB_ATOLL@ GNULIB_BTOWC = @GNULIB_BTOWC@ GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@ GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@ +GNULIB_CHDIR = @GNULIB_CHDIR@ GNULIB_CHOWN = @GNULIB_CHOWN@ GNULIB_CLOSE = @GNULIB_CLOSE@ GNULIB_DPRINTF = @GNULIB_DPRINTF@ +GNULIB_DUP = @GNULIB_DUP@ GNULIB_DUP2 = @GNULIB_DUP2@ GNULIB_DUP3 = @GNULIB_DUP3@ GNULIB_DUPLOCALE = @GNULIB_DUPLOCALE@ @@ -786,16 +1144,25 @@ 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_FFLUSH = @GNULIB_FFLUSH@ +GNULIB_FFSL = @GNULIB_FFSL@ +GNULIB_FFSLL = @GNULIB_FFSLL@ +GNULIB_FGETC = @GNULIB_FGETC@ +GNULIB_FGETS = @GNULIB_FGETS@ 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_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@ @@ -803,6 +1170,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@ @@ -815,8 +1184,14 @@ 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_GL_UNISTD_H_GETOPT = @GNULIB_GL_UNISTD_H_GETOPT@ GNULIB_GRANTPT = @GNULIB_GRANTPT@ +GNULIB_GROUP_MEMBER = @GNULIB_GROUP_MEMBER@ +GNULIB_IMAXABS = @GNULIB_IMAXABS@ +GNULIB_IMAXDIV = @GNULIB_IMAXDIV@ +GNULIB_ISATTY = @GNULIB_ISATTY@ GNULIB_ISBLANK = @GNULIB_ISBLANK@ GNULIB_ISWBLANK = @GNULIB_ISWBLANK@ GNULIB_ISWCTYPE = @GNULIB_ISWCTYPE@ @@ -824,6 +1199,7 @@ GNULIB_LCHMOD = @GNULIB_LCHMOD@ GNULIB_LCHOWN = @GNULIB_LCHOWN@ GNULIB_LINK = @GNULIB_LINK@ GNULIB_LINKAT = @GNULIB_LINKAT@ +GNULIB_LOCALECONV = @GNULIB_LOCALECONV@ GNULIB_LSEEK = @GNULIB_LSEEK@ GNULIB_LSTAT = @GNULIB_LSTAT@ GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@ @@ -864,25 +1240,31 @@ GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ GNULIB_MKTIME = @GNULIB_MKTIME@ 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_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_PREAD = @GNULIB_PREAD@ GNULIB_PRINTF = @GNULIB_PRINTF@ GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@ 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_RANDOM = @GNULIB_RANDOM@ GNULIB_RANDOM_R = @GNULIB_RANDOM_R@ GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@ +GNULIB_READ = @GNULIB_READ@ GNULIB_READLINK = @GNULIB_READLINK@ GNULIB_READLINKAT = @GNULIB_READLINKAT@ GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@ @@ -892,12 +1274,15 @@ GNULIB_RENAME = @GNULIB_RENAME@ GNULIB_RENAMEAT = @GNULIB_RENAMEAT@ GNULIB_RMDIR = @GNULIB_RMDIR@ GNULIB_RPMATCH = @GNULIB_RPMATCH@ +GNULIB_SCANF = @GNULIB_SCANF@ GNULIB_SETENV = @GNULIB_SETENV@ +GNULIB_SETHOSTNAME = @GNULIB_SETHOSTNAME@ GNULIB_SETLOCALE = @GNULIB_SETLOCALE@ GNULIB_SLEEP = @GNULIB_SLEEP@ GNULIB_SNPRINTF = @GNULIB_SNPRINTF@ GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@ 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@ @@ -915,9 +1300,11 @@ 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@ @@ -927,7 +1314,7 @@ GNULIB_TIME_R = @GNULIB_TIME_R@ GNULIB_TMPFILE = @GNULIB_TMPFILE@ GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@ +GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ GNULIB_UNLINK = @GNULIB_UNLINK@ GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ @@ -939,8 +1326,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@ @@ -989,6 +1378,7 @@ HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@ HAVE_CHOWN = @HAVE_CHOWN@ HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@ HAVE_DECL_FCHDIR = @HAVE_DECL_FCHDIR@ +HAVE_DECL_FDATASYNC = @HAVE_DECL_FDATASYNC@ HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@ HAVE_DECL_FSEEKO = @HAVE_DECL_FSEEKO@ HAVE_DECL_FTELLO = @HAVE_DECL_FTELLO@ @@ -999,18 +1389,23 @@ 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_LOCALTIME_R = @HAVE_DECL_LOCALTIME_R@ HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@ HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@ HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@ HAVE_DECL_SETENV = @HAVE_DECL_SETENV@ +HAVE_DECL_SETHOSTNAME = @HAVE_DECL_SETHOSTNAME@ HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@ HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@ HAVE_DECL_STRERROR_R = @HAVE_DECL_STRERROR_R@ 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_TTYNAME_R = @HAVE_DECL_TTYNAME_R@ HAVE_DECL_UNSETENV = @HAVE_DECL_UNSETENV@ HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@ @@ -1026,7 +1421,10 @@ HAVE_FCHDIR = @HAVE_FCHDIR@ HAVE_FCHMODAT = @HAVE_FCHMODAT@ HAVE_FCHOWNAT = @HAVE_FCHOWNAT@ HAVE_FCNTL = @HAVE_FCNTL@ +HAVE_FDATASYNC = @HAVE_FDATASYNC@ HAVE_FEATURES_H = @HAVE_FEATURES_H@ +HAVE_FFSL = @HAVE_FFSL@ +HAVE_FFSLL = @HAVE_FFSLL@ HAVE_FSEEKO = @HAVE_FSEEKO@ HAVE_FSTATAT = @HAVE_FSTATAT@ HAVE_FSYNC = @HAVE_FSYNC@ @@ -1040,7 +1438,9 @@ 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_INTTYPES_H = @HAVE_INTTYPES_H@ HAVE_ISBLANK = @HAVE_ISBLANK@ HAVE_ISWBLANK = @HAVE_ISWBLANK@ @@ -1074,15 +1474,21 @@ HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ HAVE_MKSTEMP = @HAVE_MKSTEMP@ HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ +HAVE_MSVC_INVALID_PARAMETER_HANDLER = @HAVE_MSVC_INVALID_PARAMETER_HANDLER@ HAVE_NANOSLEEP = @HAVE_NANOSLEEP@ HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@ HAVE_OPENAT = @HAVE_OPENAT@ 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_PREAD = @HAVE_PREAD@ HAVE_PTSNAME = @HAVE_PTSNAME@ +HAVE_PTSNAME_R = @HAVE_PTSNAME_R@ HAVE_PWRITE = @HAVE_PWRITE@ +HAVE_RANDOM = @HAVE_RANDOM@ HAVE_RANDOM_H = @HAVE_RANDOM_H@ HAVE_RANDOM_R = @HAVE_RANDOM_R@ HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@ @@ -1092,6 +1498,7 @@ HAVE_REALPATH = @HAVE_REALPATH@ HAVE_RENAMEAT = @HAVE_RENAMEAT@ HAVE_RPMATCH = @HAVE_RPMATCH@ HAVE_SETENV = @HAVE_SETENV@ +HAVE_SETHOSTNAME = @HAVE_SETHOSTNAME@ 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@ @@ -1108,6 +1515,7 @@ 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@ @@ -1115,6 +1523,7 @@ 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_TIMEGM = @HAVE_TIMEGM@ HAVE_UNISTD_H = @HAVE_UNISTD_H@ @@ -1156,6 +1565,7 @@ 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@ @@ -1172,6 +1582,8 @@ 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@ INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ @@ -1217,6 +1629,7 @@ 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_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ @@ -1226,6 +1639,8 @@ 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_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_TYPES_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_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@ @@ -1236,6 +1651,7 @@ 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_SELINUX_SELINUX_H = @NEXT_SELINUX_SELINUX_H@ @@ -1245,6 +1661,8 @@ NEXT_STDIO_H = @NEXT_STDIO_H@ NEXT_STDLIB_H = @NEXT_STDLIB_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_TYPES_H = @NEXT_SYS_TYPES_H@ NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@ NEXT_TIME_H = @NEXT_TIME_H@ NEXT_UNISTD_H = @NEXT_UNISTD_H@ @@ -1271,6 +1689,8 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ 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@ @@ -1287,6 +1707,7 @@ REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ REPLACE_FCLOSE = @REPLACE_FCLOSE@ REPLACE_FCNTL = @REPLACE_FCNTL@ +REPLACE_FDOPEN = @REPLACE_FDOPEN@ REPLACE_FFLUSH = @REPLACE_FFLUSH@ REPLACE_FOPEN = @REPLACE_FOPEN@ REPLACE_FPRINTF = @REPLACE_FPRINTF@ @@ -1298,6 +1719,7 @@ 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@ @@ -1306,11 +1728,15 @@ REPLACE_GETGROUPS = @REPLACE_GETGROUPS@ REPLACE_GETLINE = @REPLACE_GETLINE@ REPLACE_GETLOGIN_R = @REPLACE_GETLOGIN_R@ REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@ +REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@ +REPLACE_ISATTY = @REPLACE_ISATTY@ REPLACE_ISWBLANK = @REPLACE_ISWBLANK@ REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@ +REPLACE_ITOLD = @REPLACE_ITOLD@ REPLACE_LCHOWN = @REPLACE_LCHOWN@ REPLACE_LINK = @REPLACE_LINK@ REPLACE_LINKAT = @REPLACE_LINKAT@ +REPLACE_LOCALECONV = @REPLACE_LOCALECONV@ REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@ REPLACE_LSEEK = @REPLACE_LSEEK@ REPLACE_LSTAT = @REPLACE_LSTAT@ @@ -1339,8 +1765,11 @@ REPLACE_PERROR = @REPLACE_PERROR@ REPLACE_POPEN = @REPLACE_POPEN@ REPLACE_PREAD = @REPLACE_PREAD@ REPLACE_PRINTF = @REPLACE_PRINTF@ +REPLACE_PTSNAME_R = @REPLACE_PTSNAME_R@ REPLACE_PUTENV = @REPLACE_PUTENV@ REPLACE_PWRITE = @REPLACE_PWRITE@ +REPLACE_RANDOM_R = @REPLACE_RANDOM_R@ +REPLACE_READ = @REPLACE_READ@ REPLACE_READLINK = @REPLACE_READLINK@ REPLACE_REALLOC = @REPLACE_REALLOC@ REPLACE_REALPATH = @REPLACE_REALPATH@ @@ -1354,9 +1783,11 @@ REPLACE_SLEEP = @REPLACE_SLEEP@ REPLACE_SNPRINTF = @REPLACE_SNPRINTF@ REPLACE_SPRINTF = @REPLACE_SPRINTF@ 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@ @@ -1366,10 +1797,14 @@ 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_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_TTYNAME_R = @REPLACE_TTYNAME_R@ REPLACE_UNLINK = @REPLACE_UNLINK@ REPLACE_UNLINKAT = @REPLACE_UNLINKAT@ @@ -1402,6 +1837,8 @@ 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@ +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@ @@ -1409,6 +1846,8 @@ VERSION = @VERSION@ VERSION_SCRIPT_FLAGS = @VERSION_SCRIPT_FLAGS@ 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@ YACC = @YACC@ YFLAGS = @YFLAGS@ @@ -1489,54 +1928,71 @@ TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ noinst_HEADERS = noinst_LIBRARIES = check_LIBRARIES = libtests.a -EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build/aux/arg-nonnull.h \ - test-binary-io.sh test-binary-io.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-canonicalize-lgpl.c signature.h macros.h \ - test-ctype.c dup2.c test-dup2.c signature.h macros.h \ - test-environ.c test-errno.c fcntl.in.h test-fcntl-h.c \ - test-fnmatch.c signature.h macros.h test-getdelim.c \ +EXTRA_DIST = test-alloca-opt.c test-binary-io.sh test-binary-io.c \ + macros.h test-btowc1.sh test-btowc2.sh test-btowc.c \ + signature.h macros.h test-c-ctype.c macros.h test-c-strcase.sh \ + test-c-strcasecmp.c test-c-strncasecmp.c macros.h \ + test-canonicalize-lgpl.c signature.h macros.h close.c \ + test-close.c signature.h macros.h test-ctype.c dup2.c \ + test-dup2.c signature.h macros.h test-environ.c test-errno.c \ + test-fcntl-h.c fd-hook.h fdopen.c test-fdopen.c signature.h \ + macros.h test-fgetc.c signature.h macros.h test-float.c \ + macros.h test-fnmatch.c signature.h macros.h fpucw.h \ + test-fputc.c signature.h macros.h test-fread.c signature.h \ + macros.h fstat.c test-fstat.c signature.h macros.h \ + test-fwrite.c signature.h macros.h getcwd-lgpl.c \ + test-getcwd-lgpl.c signature.h macros.h test-getdelim.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 \ - $(top_srcdir)/build/aux/config.rpath test-ignore-value.c \ - intprops.h test-isblank.c signature.h macros.h test-langinfo.c \ - test-locale.c localename.h test-localename.c macros.h \ - test-lock.c test-lstat.h test-lstat.c signature.h macros.h \ - test-malloc-gnu.c test-malloca.c test-mbrtowc1.sh \ - test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ - test-mbrtowc.c test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ + test-getopt_long.h getpagesize.c signature.h \ + test-gettimeofday.c $(top_srcdir)/build/ac-aux/config.rpath \ + ignore-value.h test-ignore-value.c intprops.h test-intprops.c \ + macros.h inttypes.in.h test-inttypes.c test-isblank.c \ + signature.h macros.h test-langinfo.c test-locale.c \ + test-localeconv.c signature.h macros.h localename.h \ + test-localename.c macros.h test-lock.c test-lstat.h \ + test-lstat.c signature.h macros.h test-malloc-gnu.c \ + test-malloca.c test-mbrtowc1.sh test-mbrtowc2.sh \ + test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c \ + test-mbrtowc-w32-1.sh test-mbrtowc-w32-2.sh \ test-mbrtowc-w32-3.sh test-mbrtowc-w32-4.sh \ test-mbrtowc-w32-5.sh test-mbrtowc-w32.c signature.h macros.h \ test-mbsinit.sh test-mbsinit.c signature.h macros.h \ test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh \ test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h \ - test-memchr.c zerosize-ptr.h signature.h macros.h \ - test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h \ - open.c test-open.h test-open.c signature.h macros.h putenv.c \ + test-memchr.c zerosize-ptr.h signature.h macros.h msvc-inval.c \ + msvc-inval.h msvc-nothrow.c msvc-nothrow.h test-nl_langinfo.sh \ + test-nl_langinfo.c signature.h macros.h open.c test-open.h \ + test-open.c signature.h macros.h test-pathmax.c putenv.c \ + test-rawmemchr.c zerosize-ptr.h signature.h macros.h \ test-readlink.h test-readlink.c signature.h macros.h \ test-safe-alloc.c macros.h same-inode.h setenv.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 test-stat.h test-stat.c signature.h \ - macros.h test-stdbool.c test-stddef.c test-stdint.c \ - test-stdio.c test-stdlib.c test-sys_wait.h test-string.c \ + signature.h macros.h \ + $(top_srcdir)/build/ac-aux/snippet/_Noreturn.h \ + $(top_srcdir)/build/ac-aux/snippet/arg-nonnull.h \ + $(top_srcdir)/build/ac-aux/snippet/c++defs.h \ + $(top_srcdir)/build/ac-aux/snippet/unused-parameter.h \ + $(top_srcdir)/build/ac-aux/snippet/warn-on-use.h test-stat.h \ + test-stat.c signature.h macros.h test-stdbool.c test-stddef.c \ + test-stdint.c test-stdio.c test-stdlib.c test-sys_wait.h \ + test-strchrnul.c signature.h macros.h test-string.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 \ - test-sys_stat.c test-sys_wait.c test-sys_wait.h \ - $(top_srcdir)/build/aux/config.rpath test-time.c test-unistd.c \ - unsetenv.c test-unsetenv.c signature.h macros.h \ - $(top_srcdir)/build/aux/unused-parameter.h test-vasnprintf.c \ - macros.h test-vasprintf.c signature.h macros.h test-verify.c \ - test-verify.sh init.sh $(top_srcdir)/build/aux/warn-on-use.h \ - 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-sys_stat.c test-sys_time.c test-sys_types.c \ + test-sys_wait.c test-sys_wait.h init.sh test-init.sh \ + test-thread_self.c test-thread_create.c macros.h \ + $(top_srcdir)/build/ac-aux/config.rpath test-time.c \ + test-unistd.c unsetenv.c test-unsetenv.c signature.h macros.h \ + test-vasnprintf.c macros.h test-vasprintf.c signature.h \ + macros.h test-verify.c test-verify.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 # The BUILT_SOURCES created by this Makefile snippet are not used via #include # statements but through direct file reference. Therefore this snippet must be @@ -1552,12 +2008,12 @@ EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build/aux/arg-nonnull.h \ # 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 fcntl.h unused-parameter.h \ +BUILT_SOURCES = inttypes.h arg-nonnull.h c++defs.h unused-parameter.h \ warn-on-use.h SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \ - c++defs.h c++defs.h-t fcntl.h fcntl.h-t test-getdelim.txt \ - test-getline.txt unused-parameter.h unused-parameter.h-t \ +MOSTLYCLEANFILES = core *.stackdump test-getdelim.txt test-getline.txt \ + inttypes.h inttypes.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 MOSTLYCLEANDIRS = CLEANFILES = @@ -1571,26 +2027,37 @@ AM_CPPFLAGS = \ LDADD = libtests.a ../../gnulib/lib/libgnu.la libtests.a $(LIBTESTS_LIBDEPS) libtests_a_SOURCES = binary-io.h c-ctype.h c-ctype.c c-strcase.h \ - c-strcasecmp.c c-strncasecmp.c ignore-value.h localename.c \ + c-strcasecmp.c c-strncasecmp.c fd-hook.c localename.c \ glthread/lock.h glthread/lock.c glthread/thread.h \ glthread/thread.c glthread/threadlib.c glthread/yield.h libtests_a_LIBADD = $(gltests_LIBOBJS) libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) -EXTRA_libtests_a_SOURCES = dup2.c getpagesize.c open.c putenv.c \ - setenv.c setlocale.c symlink.c unsetenv.c wctob.c wctomb.c +EXTRA_libtests_a_SOURCES = close.c dup2.c fdopen.c fstat.c \ + getcwd-lgpl.c getpagesize.c msvc-inval.c msvc-nothrow.c open.c \ + putenv.c setenv.c setlocale.c symlink.c unsetenv.c wctob.c \ + wctomb.c AM_LIBTOOLFLAGS = --preserve-dup-deps -ARG_NONNULL_H = arg-nonnull.h -CXXDEFS_H = c++defs.h +test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) test_getopt_LDADD = $(LDADD) $(LIBINTL) -test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ +test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ + +# 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/ac-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_stat_LDADD = $(LDADD) $(LIBINTL) +test_thread_self_LDADD = $(LDADD) @LIBTHREAD@ +test_thread_create_LDADD = $(LDADD) @LIBMULTITHREAD@ all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -.SUFFIXES: .c .html .lo .log .o .obj .test .test$(EXEEXT) +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -1639,7 +2106,8 @@ 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) $(AM_V_at)-rm -f libtests.a $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD) $(AM_V_at)$(RANLIB) libtests.a @@ -1661,189 +2129,326 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) + +test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES) $(EXTRA_test_alloca_opt_DEPENDENCIES) @rm -f test-alloca-opt$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS) -test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) + +test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES) $(EXTRA_test_binary_io_DEPENDENCIES) @rm -f test-binary-io$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_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) $(AM_V_CCLD)$(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS) -test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) + +test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES) $(EXTRA_test_c_ctype_DEPENDENCIES) @rm -f test-c-ctype$(EXEEXT) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_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) $(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS) -test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES) + +test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES) $(EXTRA_test_canonicalize_lgpl_DEPENDENCIES) @rm -f test-canonicalize-lgpl$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_LDADD) $(LIBS) -test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) + +test-close$(EXEEXT): $(test_close_OBJECTS) $(test_close_DEPENDENCIES) $(EXTRA_test_close_DEPENDENCIES) + @rm -f test-close$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_close_OBJECTS) $(test_close_LDADD) $(LIBS) + +test-ctype$(EXEEXT): $(test_ctype_OBJECTS) $(test_ctype_DEPENDENCIES) $(EXTRA_test_ctype_DEPENDENCIES) @rm -f test-ctype$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ctype_OBJECTS) $(test_ctype_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_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) $(AM_V_CCLD)$(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS) -test-fnmatch$(EXEEXT): $(test_fnmatch_OBJECTS) $(test_fnmatch_DEPENDENCIES) + +test-fdopen$(EXEEXT): $(test_fdopen_OBJECTS) $(test_fdopen_DEPENDENCIES) $(EXTRA_test_fdopen_DEPENDENCIES) + @rm -f test-fdopen$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fdopen_OBJECTS) $(test_fdopen_LDADD) $(LIBS) + +test-fgetc$(EXEEXT): $(test_fgetc_OBJECTS) $(test_fgetc_DEPENDENCIES) $(EXTRA_test_fgetc_DEPENDENCIES) + @rm -f test-fgetc$(EXEEXT) + $(AM_V_CCLD)$(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) + $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_fnmatch_OBJECTS) $(test_fnmatch_LDADD) $(LIBS) -test-getdelim$(EXEEXT): $(test_getdelim_OBJECTS) $(test_getdelim_DEPENDENCIES) + +test-fputc$(EXEEXT): $(test_fputc_OBJECTS) $(test_fputc_DEPENDENCIES) $(EXTRA_test_fputc_DEPENDENCIES) + @rm -f test-fputc$(EXEEXT) + $(AM_V_CCLD)$(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) + $(AM_V_CCLD)$(LINK) $(test_fread_OBJECTS) $(test_fread_LDADD) $(LIBS) + +test-fstat$(EXEEXT): $(test_fstat_OBJECTS) $(test_fstat_DEPENDENCIES) $(EXTRA_test_fstat_DEPENDENCIES) + @rm -f test-fstat$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fstat_OBJECTS) $(test_fstat_LDADD) $(LIBS) + +test-fwrite$(EXEEXT): $(test_fwrite_OBJECTS) $(test_fwrite_DEPENDENCIES) $(EXTRA_test_fwrite_DEPENDENCIES) + @rm -f test-fwrite$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_fwrite_OBJECTS) $(test_fwrite_LDADD) $(LIBS) + +test-getcwd-lgpl$(EXEEXT): $(test_getcwd_lgpl_OBJECTS) $(test_getcwd_lgpl_DEPENDENCIES) $(EXTRA_test_getcwd_lgpl_DEPENDENCIES) + @rm -f test-getcwd-lgpl$(EXEEXT) + $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_getdelim_OBJECTS) $(test_getdelim_LDADD) $(LIBS) -test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) + +test-getline$(EXEEXT): $(test_getline_OBJECTS) $(test_getline_DEPENDENCIES) $(EXTRA_test_getline_DEPENDENCIES) @rm -f test-getline$(EXEEXT) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS) -test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) + +test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES) $(EXTRA_test_gettimeofday_DEPENDENCIES) + @rm -f test-gettimeofday$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS) + +test-ignore-value$(EXEEXT): $(test_ignore_value_OBJECTS) $(test_ignore_value_DEPENDENCIES) $(EXTRA_test_ignore_value_DEPENDENCIES) @rm -f test-ignore-value$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_ignore_value_OBJECTS) $(test_ignore_value_LDADD) $(LIBS) -test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) + +test-intprops$(EXEEXT): $(test_intprops_OBJECTS) $(test_intprops_DEPENDENCIES) $(EXTRA_test_intprops_DEPENDENCIES) + @rm -f test-intprops$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_intprops_OBJECTS) $(test_intprops_LDADD) $(LIBS) + +test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES) $(EXTRA_test_inttypes_DEPENDENCIES) + @rm -f test-inttypes$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS) + +test-isblank$(EXEEXT): $(test_isblank_OBJECTS) $(test_isblank_DEPENDENCIES) $(EXTRA_test_isblank_DEPENDENCIES) @rm -f test-isblank$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_isblank_OBJECTS) $(test_isblank_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) $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS) -test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) + +test-locale$(EXEEXT): $(test_locale_OBJECTS) $(test_locale_DEPENDENCIES) $(EXTRA_test_locale_DEPENDENCIES) @rm -f test-locale$(EXEEXT) $(AM_V_CCLD)$(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) + $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_lock_OBJECTS) $(test_lock_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_mbrtowc_w32_OBJECTS) $(test_mbrtowc_w32_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_mbsrtowcs_OBJECTS) $(test_mbsrtowcs_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) $(AM_V_CCLD)$(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS) -test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) + +test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES) $(EXTRA_test_nl_langinfo_DEPENDENCIES) @rm -f test-nl_langinfo$(EXEEXT) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS) -test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) + +test-pathmax$(EXEEXT): $(test_pathmax_OBJECTS) $(test_pathmax_DEPENDENCIES) $(EXTRA_test_pathmax_DEPENDENCIES) + @rm -f test-pathmax$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_pathmax_OBJECTS) $(test_pathmax_LDADD) $(LIBS) + +test-rawmemchr$(EXEEXT): $(test_rawmemchr_OBJECTS) $(test_rawmemchr_DEPENDENCIES) $(EXTRA_test_rawmemchr_DEPENDENCIES) + @rm -f test-rawmemchr$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_rawmemchr_OBJECTS) $(test_rawmemchr_LDADD) $(LIBS) + +test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES) $(EXTRA_test_readlink_DEPENDENCIES) @rm -f test-readlink$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS) -test-safe-alloc$(EXEEXT): $(test_safe_alloc_OBJECTS) $(test_safe_alloc_DEPENDENCIES) + +test-safe-alloc$(EXEEXT): $(test_safe_alloc_OBJECTS) $(test_safe_alloc_DEPENDENCIES) $(EXTRA_test_safe_alloc_DEPENDENCIES) @rm -f test-safe-alloc$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_safe_alloc_OBJECTS) $(test_safe_alloc_LDADD) $(LIBS) -test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) + +test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES) $(EXTRA_test_setenv_DEPENDENCIES) @rm -f test-setenv$(EXEEXT) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_setlocale2_OBJECTS) $(test_setlocale2_LDADD) $(LIBS) -test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) + +test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES) $(EXTRA_test_stat_DEPENDENCIES) @rm -f test-stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS) -test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) + +test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES) $(EXTRA_test_stdbool_DEPENDENCIES) @rm -f test-stdbool$(EXEEXT) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) -test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) + +test-strchrnul$(EXEEXT): $(test_strchrnul_OBJECTS) $(test_strchrnul_DEPENDENCIES) $(EXTRA_test_strchrnul_DEPENDENCIES) + @rm -f test-strchrnul$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_strchrnul_OBJECTS) $(test_strchrnul_LDADD) $(LIBS) + +test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES) $(EXTRA_test_string_DEPENDENCIES) @rm -f test-string$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_string_OBJECTS) $(test_string_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_strstr_OBJECTS) $(test_strstr_LDADD) $(LIBS) -test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) + +test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES) $(EXTRA_test_symlink_DEPENDENCIES) @rm -f test-symlink$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS) -test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) + +test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES) $(EXTRA_test_sys_stat_DEPENDENCIES) @rm -f test-sys_stat$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS) -test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES) + +test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES) $(EXTRA_test_sys_time_DEPENDENCIES) + @rm -f test-sys_time$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS) + +test-sys_types$(EXEEXT): $(test_sys_types_OBJECTS) $(test_sys_types_DEPENDENCIES) $(EXTRA_test_sys_types_DEPENDENCIES) + @rm -f test-sys_types$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(test_sys_types_OBJECTS) $(test_sys_types_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) $(AM_V_CCLD)$(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) + $(AM_V_CCLD)$(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) + $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS) -test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) + +test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES) $(EXTRA_test_unistd_DEPENDENCIES) @rm -f test-unistd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_unistd_OBJECTS) $(test_unistd_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) $(AM_V_CCLD)$(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_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) $(AM_V_CCLD)$(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS) -test-vasprintf$(EXEEXT): $(test_vasprintf_OBJECTS) $(test_vasprintf_DEPENDENCIES) + +test-vasprintf$(EXEEXT): $(test_vasprintf_OBJECTS) $(test_vasprintf_DEPENDENCIES) $(EXTRA_test_vasprintf_DEPENDENCIES) @rm -f test-vasprintf$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_vasprintf_OBJECTS) $(test_vasprintf_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) $(AM_V_CCLD)$(LINK) $(test_verify_OBJECTS) $(test_verify_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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(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) $(AM_V_CCLD)$(LINK) $(test_wctype_h_OBJECTS) $(test_wctype_h_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) - -rm -f glthread/lock.$(OBJEXT) - -rm -f glthread/thread.$(OBJEXT) - -rm -f glthread/threadlib.$(OBJEXT) + -rm -f glthread/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @@ -1851,9 +2456,16 @@ distclean-compile: @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-strncasecmp.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-hook.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fdopen.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fstat.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getcwd-lgpl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localename.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)/open.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Po@am__quote@ @@ -1866,19 +2478,32 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize-lgpl.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-close.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ctype.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-fcntl-h.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fdopen.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-fputc.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fread.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fstat.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-getdelim.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-ignore-value.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-intprops.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isblank.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.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-lstat.Po@am__quote@ @@ -1891,6 +2516,8 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.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-pathmax.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rawmemchr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-safe-alloc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@ @@ -1902,12 +2529,17 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strchrnul.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.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-symlink.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_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-unistd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@ @@ -1929,28 +2561,25 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_CC)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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)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 -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -1959,22 +2588,25 @@ clean-libtool: -rm -rf .libs _libs # 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; \ +# 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. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -1989,57 +2621,12 @@ $(RECURSIVE_TARGETS): $(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: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -2055,12 +2642,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -2072,15 +2654,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -2089,314 +2667,845 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -# 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 +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: $(TEST_SUITE_LOG): $(TEST_LOGS) - @$(am__sh_e_setup); \ - list='$(TEST_LOGS)'; \ - results=`for f in $$list; do \ - 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; \ + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ + fi; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ + else \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ + fi; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ + else \ + color_start= color_end=; \ + fi; \ + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ - echo "$$msg"; \ + create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ - for f in $$list; do \ - read line < $$f; \ - case $$line in \ - PASS:*|XFAIL:*);; \ - *) echo; cat $$f;; \ - esac; \ - done; \ - } >$(TEST_SUITE_LOG).tmp; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ - if test "$$failures" -ne 0; then \ - msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ - msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ + echo "$$col$$br$$std"; \ fi; \ - test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \ - $(am__tty_colors); \ - if $$exit; then \ - echo $(ECHO_N) "$$grn$(ECHO_C)"; \ - else \ - echo $(ECHO_N) "$$red$(ECHO_C)"; \ - fi; \ - echo "$$msg" | $(am__text_box); \ - echo $(ECHO_N) "$$std$(ECHO_C)"; \ - $$exit + $$success || exit 1 -# Run all the tests. check-TESTS: - @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - @list='$(TEST_LOGS)'; \ - list=`for f in $$list; do \ - test .log = $$f || echo $$f; \ - done | tr '\012\015' ' '`; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list" - -.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: - @if $(MAKE) $(AM_MAKEFLAGS) check; then \ - rv=0; else rv=$$?; \ - fi; \ - $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \ - exit $$rv -recheck recheck-html: - @target=`echo $@ | sed 's,^re,,'`; \ - list='$(TEST_LOGS)'; \ - list=`for f in $$list; do \ - test -f $$f || continue; \ - if read line < $$f; then \ - case $$line in FAIL*|XPASS*) echo $$f;; esac; \ - else echo $$f; fi; \ - done | tr '\012\015' ' '`; \ - $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"' + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_LIBRARIES) $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? test-alloca-opt.log: test-alloca-opt$(EXEEXT) - @p='test-alloca-opt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-alloca-opt$(EXEEXT)'; \ + b='test-alloca-opt'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-binary-io.sh.log: test-binary-io.sh - @p='test-binary-io.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-binary-io.sh'; \ + b='test-binary-io.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-btowc1.sh.log: test-btowc1.sh - @p='test-btowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-btowc1.sh'; \ + b='test-btowc1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-btowc2.sh.log: test-btowc2.sh - @p='test-btowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-btowc2.sh'; \ + b='test-btowc2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-c-ctype.log: test-c-ctype$(EXEEXT) - @p='test-c-ctype$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-c-ctype$(EXEEXT)'; \ + b='test-c-ctype'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-c-strcase.sh.log: test-c-strcase.sh - @p='test-c-strcase.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-c-strcase.sh'; \ + b='test-c-strcase.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-canonicalize-lgpl.log: test-canonicalize-lgpl$(EXEEXT) - @p='test-canonicalize-lgpl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-canonicalize-lgpl$(EXEEXT)'; \ + b='test-canonicalize-lgpl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-close.log: test-close$(EXEEXT) + @p='test-close$(EXEEXT)'; \ + b='test-close'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-ctype.log: test-ctype$(EXEEXT) - @p='test-ctype$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-ctype$(EXEEXT)'; \ + b='test-ctype'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-dup2.log: test-dup2$(EXEEXT) - @p='test-dup2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-dup2$(EXEEXT)'; \ + b='test-dup2'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-environ.log: test-environ$(EXEEXT) - @p='test-environ$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-environ$(EXEEXT)'; \ + b='test-environ'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-errno.log: test-errno$(EXEEXT) - @p='test-errno$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-errno$(EXEEXT)'; \ + b='test-errno'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-fcntl-h.log: test-fcntl-h$(EXEEXT) - @p='test-fcntl-h$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-fcntl-h$(EXEEXT)'; \ + b='test-fcntl-h'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fdopen.log: test-fdopen$(EXEEXT) + @p='test-fdopen$(EXEEXT)'; \ + b='test-fdopen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fgetc.log: test-fgetc$(EXEEXT) + @p='test-fgetc$(EXEEXT)'; \ + b='test-fgetc'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-float.log: test-float$(EXEEXT) + @p='test-float$(EXEEXT)'; \ + b='test-float'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-fnmatch.log: test-fnmatch$(EXEEXT) - @p='test-fnmatch$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-fnmatch$(EXEEXT)'; \ + b='test-fnmatch'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fputc.log: test-fputc$(EXEEXT) + @p='test-fputc$(EXEEXT)'; \ + b='test-fputc'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fread.log: test-fread$(EXEEXT) + @p='test-fread$(EXEEXT)'; \ + b='test-fread'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fstat.log: test-fstat$(EXEEXT) + @p='test-fstat$(EXEEXT)'; \ + b='test-fstat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-fwrite.log: test-fwrite$(EXEEXT) + @p='test-fwrite$(EXEEXT)'; \ + b='test-fwrite'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-getcwd-lgpl.log: test-getcwd-lgpl$(EXEEXT) + @p='test-getcwd-lgpl$(EXEEXT)'; \ + b='test-getcwd-lgpl'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-getdelim.log: test-getdelim$(EXEEXT) - @p='test-getdelim$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-getdelim$(EXEEXT)'; \ + b='test-getdelim'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-getline.log: test-getline$(EXEEXT) - @p='test-getline$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-getline$(EXEEXT)'; \ + b='test-getline'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-getopt.log: test-getopt$(EXEEXT) - @p='test-getopt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-getopt$(EXEEXT)'; \ + b='test-getopt'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-gettimeofday.log: test-gettimeofday$(EXEEXT) + @p='test-gettimeofday$(EXEEXT)'; \ + b='test-gettimeofday'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-ignore-value.log: test-ignore-value$(EXEEXT) - @p='test-ignore-value$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-ignore-value$(EXEEXT)'; \ + b='test-ignore-value'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-intprops.log: test-intprops$(EXEEXT) + @p='test-intprops$(EXEEXT)'; \ + b='test-intprops'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-inttypes.log: test-inttypes$(EXEEXT) + @p='test-inttypes$(EXEEXT)'; \ + b='test-inttypes'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-isblank.log: test-isblank$(EXEEXT) - @p='test-isblank$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-isblank$(EXEEXT)'; \ + b='test-isblank'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-langinfo.log: test-langinfo$(EXEEXT) - @p='test-langinfo$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-langinfo$(EXEEXT)'; \ + b='test-langinfo'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-locale.log: test-locale$(EXEEXT) - @p='test-locale$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-locale$(EXEEXT)'; \ + b='test-locale'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-localeconv.log: test-localeconv$(EXEEXT) + @p='test-localeconv$(EXEEXT)'; \ + b='test-localeconv'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-localename.log: test-localename$(EXEEXT) - @p='test-localename$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-localename$(EXEEXT)'; \ + b='test-localename'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-lock.log: test-lock$(EXEEXT) - @p='test-lock$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-lock$(EXEEXT)'; \ + b='test-lock'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-lstat.log: test-lstat$(EXEEXT) - @p='test-lstat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-lstat$(EXEEXT)'; \ + b='test-lstat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-malloc-gnu.log: test-malloc-gnu$(EXEEXT) - @p='test-malloc-gnu$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-malloc-gnu$(EXEEXT)'; \ + b='test-malloc-gnu'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-malloca.log: test-malloca$(EXEEXT) - @p='test-malloca$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-malloca$(EXEEXT)'; \ + b='test-malloca'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc1.sh.log: test-mbrtowc1.sh - @p='test-mbrtowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc1.sh'; \ + b='test-mbrtowc1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc2.sh.log: test-mbrtowc2.sh - @p='test-mbrtowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc2.sh'; \ + b='test-mbrtowc2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc3.sh.log: test-mbrtowc3.sh - @p='test-mbrtowc3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc3.sh'; \ + b='test-mbrtowc3.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc4.sh.log: test-mbrtowc4.sh - @p='test-mbrtowc4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc4.sh'; \ + b='test-mbrtowc4.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-1.sh.log: test-mbrtowc-w32-1.sh - @p='test-mbrtowc-w32-1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc-w32-1.sh'; \ + b='test-mbrtowc-w32-1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-2.sh.log: test-mbrtowc-w32-2.sh - @p='test-mbrtowc-w32-2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc-w32-2.sh'; \ + b='test-mbrtowc-w32-2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-3.sh.log: test-mbrtowc-w32-3.sh - @p='test-mbrtowc-w32-3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc-w32-3.sh'; \ + b='test-mbrtowc-w32-3.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-4.sh.log: test-mbrtowc-w32-4.sh - @p='test-mbrtowc-w32-4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc-w32-4.sh'; \ + b='test-mbrtowc-w32-4.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbrtowc-w32-5.sh.log: test-mbrtowc-w32-5.sh - @p='test-mbrtowc-w32-5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbrtowc-w32-5.sh'; \ + b='test-mbrtowc-w32-5.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsinit.sh.log: test-mbsinit.sh - @p='test-mbsinit.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbsinit.sh'; \ + b='test-mbsinit.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs1.sh.log: test-mbsrtowcs1.sh - @p='test-mbsrtowcs1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbsrtowcs1.sh'; \ + b='test-mbsrtowcs1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs2.sh.log: test-mbsrtowcs2.sh - @p='test-mbsrtowcs2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbsrtowcs2.sh'; \ + b='test-mbsrtowcs2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs3.sh.log: test-mbsrtowcs3.sh - @p='test-mbsrtowcs3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbsrtowcs3.sh'; \ + b='test-mbsrtowcs3.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-mbsrtowcs4.sh.log: test-mbsrtowcs4.sh - @p='test-mbsrtowcs4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-mbsrtowcs4.sh'; \ + b='test-mbsrtowcs4.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-memchr.log: test-memchr$(EXEEXT) - @p='test-memchr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-memchr$(EXEEXT)'; \ + b='test-memchr'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-nl_langinfo.sh.log: test-nl_langinfo.sh - @p='test-nl_langinfo.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-nl_langinfo.sh'; \ + b='test-nl_langinfo.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-open.log: test-open$(EXEEXT) - @p='test-open$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-open$(EXEEXT)'; \ + b='test-open'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-pathmax.log: test-pathmax$(EXEEXT) + @p='test-pathmax$(EXEEXT)'; \ + b='test-pathmax'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-rawmemchr.log: test-rawmemchr$(EXEEXT) + @p='test-rawmemchr$(EXEEXT)'; \ + b='test-rawmemchr'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-readlink.log: test-readlink$(EXEEXT) - @p='test-readlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-readlink$(EXEEXT)'; \ + b='test-readlink'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-safe-alloc.log: test-safe-alloc$(EXEEXT) - @p='test-safe-alloc$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-safe-alloc$(EXEEXT)'; \ + b='test-safe-alloc'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-setenv.log: test-setenv$(EXEEXT) - @p='test-setenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-setenv$(EXEEXT)'; \ + b='test-setenv'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-setlocale1.sh.log: test-setlocale1.sh - @p='test-setlocale1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-setlocale1.sh'; \ + b='test-setlocale1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-setlocale2.sh.log: test-setlocale2.sh - @p='test-setlocale2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-setlocale2.sh'; \ + b='test-setlocale2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stat.log: test-stat$(EXEEXT) - @p='test-stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stat$(EXEEXT)'; \ + b='test-stat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdbool.log: test-stdbool$(EXEEXT) - @p='test-stdbool$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stdbool$(EXEEXT)'; \ + b='test-stdbool'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stddef.log: test-stddef$(EXEEXT) - @p='test-stddef$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stddef$(EXEEXT)'; \ + b='test-stddef'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdint.log: test-stdint$(EXEEXT) - @p='test-stdint$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stdint$(EXEEXT)'; \ + b='test-stdint'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdio.log: test-stdio$(EXEEXT) - @p='test-stdio$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stdio$(EXEEXT)'; \ + b='test-stdio'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-stdlib.log: test-stdlib$(EXEEXT) - @p='test-stdlib$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-stdlib$(EXEEXT)'; \ + b='test-stdlib'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-strchrnul.log: test-strchrnul$(EXEEXT) + @p='test-strchrnul$(EXEEXT)'; \ + b='test-strchrnul'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-string.log: test-string$(EXEEXT) - @p='test-string$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-string$(EXEEXT)'; \ + b='test-string'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-strnlen.log: test-strnlen$(EXEEXT) - @p='test-strnlen$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-strnlen$(EXEEXT)'; \ + b='test-strnlen'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-strstr.log: test-strstr$(EXEEXT) - @p='test-strstr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-strstr$(EXEEXT)'; \ + b='test-strstr'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-symlink.log: test-symlink$(EXEEXT) - @p='test-symlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-symlink$(EXEEXT)'; \ + b='test-symlink'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_stat.log: test-sys_stat$(EXEEXT) - @p='test-sys_stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-sys_stat$(EXEEXT)'; \ + b='test-sys_stat'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_time.log: test-sys_time$(EXEEXT) + @p='test-sys_time$(EXEEXT)'; \ + b='test-sys_time'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-sys_types.log: test-sys_types$(EXEEXT) + @p='test-sys_types$(EXEEXT)'; \ + b='test-sys_types'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-sys_wait.log: test-sys_wait$(EXEEXT) - @p='test-sys_wait$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-sys_wait$(EXEEXT)'; \ + b='test-sys_wait'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-init.sh.log: test-init.sh + @p='test-init.sh'; \ + b='test-init.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-thread_self.log: test-thread_self$(EXEEXT) + @p='test-thread_self$(EXEEXT)'; \ + b='test-thread_self'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-thread_create.log: test-thread_create$(EXEEXT) + @p='test-thread_create$(EXEEXT)'; \ + b='test-thread_create'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-time.log: test-time$(EXEEXT) - @p='test-time$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-time$(EXEEXT)'; \ + b='test-time'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-unistd.log: test-unistd$(EXEEXT) - @p='test-unistd$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-unistd$(EXEEXT)'; \ + b='test-unistd'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-unsetenv.log: test-unsetenv$(EXEEXT) - @p='test-unsetenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-unsetenv$(EXEEXT)'; \ + b='test-unsetenv'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-vasnprintf.log: test-vasnprintf$(EXEEXT) - @p='test-vasnprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-vasnprintf$(EXEEXT)'; \ + b='test-vasnprintf'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-vasprintf.log: test-vasprintf$(EXEEXT) - @p='test-vasprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-vasprintf$(EXEEXT)'; \ + b='test-vasprintf'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-verify.log: test-verify$(EXEEXT) - @p='test-verify$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-verify$(EXEEXT)'; \ + b='test-verify'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-verify.sh.log: test-verify.sh - @p='test-verify.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-verify.sh'; \ + b='test-verify.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wchar.log: test-wchar$(EXEEXT) - @p='test-wchar$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wchar$(EXEEXT)'; \ + b='test-wchar'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb.sh.log: test-wcrtomb.sh - @p='test-wcrtomb.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb.sh'; \ + b='test-wcrtomb.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-1.sh.log: test-wcrtomb-w32-1.sh - @p='test-wcrtomb-w32-1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb-w32-1.sh'; \ + b='test-wcrtomb-w32-1.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-2.sh.log: test-wcrtomb-w32-2.sh - @p='test-wcrtomb-w32-2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb-w32-2.sh'; \ + b='test-wcrtomb-w32-2.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-3.sh.log: test-wcrtomb-w32-3.sh - @p='test-wcrtomb-w32-3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb-w32-3.sh'; \ + b='test-wcrtomb-w32-3.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-4.sh.log: test-wcrtomb-w32-4.sh - @p='test-wcrtomb-w32-4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb-w32-4.sh'; \ + b='test-wcrtomb-w32-4.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wcrtomb-w32-5.sh.log: test-wcrtomb-w32-5.sh - @p='test-wcrtomb-w32-5.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wcrtomb-w32-5.sh'; \ + b='test-wcrtomb-w32-5.sh'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) test-wctype-h.log: test-wctype-h$(EXEEXT) - @p='test-wctype-h$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post) + @p='test-wctype-h$(EXEEXT)'; \ + b='test-wctype-h'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: - @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: -@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post) +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -2430,13 +3539,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; \ @@ -2475,15 +3581,19 @@ 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) -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP) - -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -2573,83 +3683,93 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ - check-am check-html ctags-recursive install install-am \ - install-strip recheck recheck-html tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-TESTS check-am check-html clean \ - clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool clean-local clean-noinstLIBRARIES \ - clean-noinstPROGRAMS ctags ctags-recursive distclean \ - distclean-compile distclean-generic distclean-libtool \ - 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-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck recheck-html tags tags-recursive uninstall \ - uninstall-am - -# 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 $@ - -# We need the following in order to create when the system +.MAKE: $(am__recursive_targets) all check check-am install install-am \ + install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-TESTS check-am clean clean-checkLIBRARIES \ + clean-checkPROGRAMS clean-generic clean-libtool clean-local \ + clean-noinstLIBRARIES clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool 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-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am + + +# 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) +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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + 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_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 '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/@''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)/fcntl.in.h; \ + < $(srcdir)/inttypes.in.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 +# 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. -unused-parameter.h: $(top_srcdir)/build/aux/unused-parameter.h +arg-nonnull.h: $(top_srcdir)/build/ac-aux/snippet/arg-nonnull.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/GL_ARG_NONNULL/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-aux/snippet/c++defs.h + $(AM_V_GEN)rm -f $@-t $@ && \ + sed -n -e '/_GL_CXXDEFS/,$$p' \ + < $(top_srcdir)/build/ac-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/ac-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/ac-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/ac-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/ac-aux/snippet/warn-on-use.h \ > $@-t && \ mv $@-t $@ diff --git a/gnulib/tests/binary-io.h b/gnulib/tests/binary-io.h index c09dbf5..a33e32a 100644 --- a/gnulib/tests/binary-io.h +++ b/gnulib/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-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 @@ -25,28 +25,41 @@ so we include it here first. */ #include -/* SET_BINARY (fd); - changes the file descriptor fd to perform binary I/O. */ +/* 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 an inline function rather than a macro, to avoid gcc warnings + "warning: statement with no effect". */ +static 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 #endif /* _BINARY_H */ diff --git a/gnulib/tests/c-ctype.c b/gnulib/tests/c-ctype.c index 0fb4295..952d7a8 100644 --- a/gnulib/tests/c-ctype.c +++ b/gnulib/tests/c-ctype.c @@ -1,6 +1,6 @@ /* Character handling in C locale. - Copyright 2000-2003, 2006, 2009-2011 Free Software Foundation, Inc. + Copyright 2000-2003, 2006, 2009-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 @@ -13,8 +13,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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/gnulib/tests/c-ctype.h b/gnulib/tests/c-ctype.h index 57e71ee..0b31309 100644 --- a/gnulib/tests/c-ctype.h +++ b/gnulib/tests/c-ctype.h @@ -5,7 +5,7 @@ functions' behaviour depends on the current locale set via setlocale. - Copyright (C) 2000-2003, 2006, 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2000-2003, 2006, 2008-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 @@ -18,8 +18,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 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 . */ #ifndef C_CTYPE_H #define C_CTYPE_H @@ -118,23 +117,23 @@ extern "C" { 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); +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 __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS diff --git a/gnulib/tests/c-strcase.h b/gnulib/tests/c-strcase.h index 4148c34..fdef238 100644 --- a/gnulib/tests/c-strcase.h +++ b/gnulib/tests/c-strcase.h @@ -1,5 +1,5 @@ /* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2011 Free Software + Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-2012 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -13,8 +13,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 . */ #ifndef C_STRCASE_H #define C_STRCASE_H @@ -40,12 +39,13 @@ extern "C" { /* 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); +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); +extern int c_strncasecmp (const char *s1, const char *s2, size_t n) + _GL_ATTRIBUTE_PURE; #ifdef __cplusplus diff --git a/gnulib/tests/c-strcasecmp.c b/gnulib/tests/c-strcasecmp.c index 4c4e106..d8332ca 100644 --- a/gnulib/tests/c-strcasecmp.c +++ b/gnulib/tests/c-strcasecmp.c @@ -1,5 +1,5 @@ /* c-strcasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-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 @@ -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/gnulib/tests/c-strncasecmp.c b/gnulib/tests/c-strncasecmp.c index 0c433b9..47fb5fd 100644 --- a/gnulib/tests/c-strncasecmp.c +++ b/gnulib/tests/c-strncasecmp.c @@ -1,5 +1,5 @@ /* c-strncasecmp.c -- case insensitive string comparator in C locale - Copyright (C) 1998-1999, 2005-2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1998-1999, 2005-2006, 2009-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 @@ -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/gnulib/tests/close.c b/gnulib/tests/close.c new file mode 100644 index 0000000..4b7accb --- /dev/null +++ b/gnulib/tests/close.c @@ -0,0 +1,69 @@ +/* close replacement. + Copyright (C) 2008-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 . */ + +#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/gnulib/tests/dup2.c b/gnulib/tests/dup2.c index e00dc7b..f6d0f1c 100644 --- a/gnulib/tests/dup2.c +++ b/gnulib/tests/dup2.c @@ -1,6 +1,6 @@ /* Duplicate an open file descriptor to a specified file descriptor. - Copyright (C) 1999, 2004-2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 1999, 2004-2007, 2009-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 @@ -25,21 +25,26 @@ #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) +# 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 (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. */ @@ -52,6 +57,7 @@ rpl_dup2 (int fd, int desired_fd) } 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) @@ -59,26 +65,45 @@ rpl_dup2 (int fd, int desired_fd) 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) + + TRY_MSVC_INVAL + { + result = dup2 (fd, desired_fd); + } + CATCH_MSVC_INVAL { errno = EBADF; result = -1; } -# endif + DONE_MSVC_INVAL; + if (result == 0) result = desired_fd; - /* Correct a cygwin 1.5.x errno value. */ - else if (result == -1 && errno == EMFILE) + + 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 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); + + /* 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) diff --git a/gnulib/tests/fd-hook.c b/gnulib/tests/fd-hook.c new file mode 100644 index 0000000..8f4ffe2 --- /dev/null +++ b/gnulib/tests/fd-hook.c @@ -0,0 +1,116 @@ +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-2012 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/gnulib/tests/fd-hook.h b/gnulib/tests/fd-hook.h new file mode 100644 index 0000000..721e9ad --- /dev/null +++ b/gnulib/tests/fd-hook.h @@ -0,0 +1,119 @@ +/* Hook for making making file descriptor functions close(), ioctl() extensible. + Copyright (C) 2009-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 . */ + + +#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/gnulib/tests/fdopen.c b/gnulib/tests/fdopen.c new file mode 100644 index 0000000..6595b16 --- /dev/null +++ b/gnulib/tests/fdopen.c @@ -0,0 +1,69 @@ +/* Open a stream with a given file descriptor. + Copyright (C) 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 . */ + +#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/gnulib/tests/fpucw.h b/gnulib/tests/fpucw.h new file mode 100644 index 0000000..23e4c81 --- /dev/null +++ b/gnulib/tests/fpucw.h @@ -0,0 +1,108 @@ +/* Manipulating the FPU control word. + Copyright (C) 2007-2012 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/gnulib/tests/fstat.c b/gnulib/tests/fstat.c new file mode 100644 index 0000000..6d5f5c2 --- /dev/null +++ b/gnulib/tests/fstat.c @@ -0,0 +1,88 @@ +/* fstat() replacement. + Copyright (C) 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 . */ + +/* 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 inline 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 inline 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/gnulib/tests/getcwd-lgpl.c b/gnulib/tests/getcwd-lgpl.c new file mode 100644 index 0000000..f1e821b --- /dev/null +++ b/gnulib/tests/getcwd-lgpl.c @@ -0,0 +1,125 @@ +/* Copyright (C) 2011-2012 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 + +#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/gnulib/tests/getpagesize.c b/gnulib/tests/getpagesize.c index d7c1ba8..02c00fb 100644 --- a/gnulib/tests/getpagesize.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/glthread/lock.c b/gnulib/tests/glthread/lock.c index 64dbd3f..9a391ea 100644 --- a/gnulib/tests/glthread/lock.c +++ b/gnulib/tests/glthread/lock.c @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-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 @@ -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, @@ -630,7 +629,7 @@ glthread_once_singlethreaded (gl_once_t *once_control) /* ========================================================================= */ -#if USE_WIN32_THREADS +#if USE_WINDOWS_THREADS /* -------------------------- gl_lock_t datatype -------------------------- */ diff --git a/gnulib/tests/glthread/lock.h b/gnulib/tests/glthread/lock.h index 6267500..6782d49 100644 --- a/gnulib/tests/glthread/lock.h +++ b/gnulib/tests/glthread/lock.h @@ -1,5 +1,5 @@ /* Locking in multithreaded situations. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-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 @@ -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, @@ -614,16 +613,17 @@ extern int glthread_once_singlethreaded (gl_once_t *once_control); /* ========================================================================= */ -#if USE_WIN32_THREADS +#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 Win32 Event, Mutex, - Semaphore types, because +/* 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 @@ -709,9 +709,9 @@ 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. */ +/* 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 { @@ -763,7 +763,7 @@ extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (v /* ========================================================================= */ -#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/gnulib/tests/glthread/thread.c b/gnulib/tests/glthread/thread.c index bb40092..d55b4e2 100644 --- a/gnulib/tests/glthread/thread.c +++ b/gnulib/tests/glthread/thread.c @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-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 @@ -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, @@ -29,7 +28,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 diff --git a/gnulib/tests/glthread/thread.h b/gnulib/tests/glthread/thread.h index 370f09a..6653aa2 100644 --- a/gnulib/tests/glthread/thread.h +++ b/gnulib/tests/glthread/thread.h @@ -1,5 +1,5 @@ /* Creating and controlling threads. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-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 @@ -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): @@ -147,8 +150,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 +220,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 +274,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 +289,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 +318,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 +336,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 +344,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 diff --git a/gnulib/tests/glthread/threadlib.c b/gnulib/tests/glthread/threadlib.c index 646defa..946268e 100644 --- a/gnulib/tests/glthread/threadlib.c +++ b/gnulib/tests/glthread/threadlib.c @@ -1,5 +1,5 @@ /* Multithreading primitives. - Copyright (C) 2005-2011 Free Software Foundation, Inc. + Copyright (C) 2005-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 @@ -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. */ diff --git a/gnulib/tests/glthread/yield.h b/gnulib/tests/glthread/yield.h index 4eb1cb8..63c45be 100644 --- a/gnulib/tests/glthread/yield.h +++ b/gnulib/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-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 @@ -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/gnulib/tests/ignore-value.h b/gnulib/tests/ignore-value.h index f021a1a..2e34435 100644 --- a/gnulib/tests/ignore-value.h +++ b/gnulib/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-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 @@ -35,16 +35,6 @@ #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. */ @@ -54,9 +44,4 @@ # 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 */ - #endif diff --git a/gnulib/tests/init.sh b/gnulib/tests/init.sh index 71c6516..5f6e638 100644 --- a/gnulib/tests/init.sh +++ b/gnulib/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-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 @@ -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 @@ -190,6 +207,14 @@ else 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 +229,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 +411,7 @@ path_prepend_ () case $path_dir_ in '') fail_ "invalid path dir: '$1'";; /*) abs_path_dir_=$path_dir_;; - *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \ - || fail_ "invalid path dir: $path_dir_";; + *) abs_path_dir_=$initial_cwd_/$path_dir_;; esac case $abs_path_dir_ in *:*) fail_ "invalid path dir: '$abs_path_dir_'";; @@ -332,7 +447,7 @@ setup_ () pfx_=`testdir_prefix_` test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ || fail_ "failed to create temporary directory in $initial_cwd_" - cd "$test_dir_" + cd "$test_dir_" || fail_ "failed to cd to temporary directory" # As autoconf-generated configure scripts do, ensure that IFS # is defined initially, so that saving and restoring $IFS works. @@ -400,7 +515,7 @@ mktempd_ () { case $# in 2);; - *) fail_ "Usage: $ME DIR TEMPLATE";; + *) fail_ "Usage: mktempd_ DIR TEMPLATE";; esac destdir_=$1 @@ -422,7 +537,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/gnulib/tests/intprops.h b/gnulib/tests/intprops.h index 58b1b3f..2485c78 100644 --- a/gnulib/tests/intprops.h +++ b/gnulib/tests/intprops.h @@ -1,6 +1,6 @@ /* intprops.h -- properties of integer types - Copyright (C) 2001-2005, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2001-2005, 2009-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 @@ -17,70 +17,303 @@ /* Written by Paul Eggert. */ -#ifndef GL_INTPROPS_H -# define GL_INTPROPS_H +#ifndef _GL_INTPROPS_H +#define _GL_INTPROPS_H -# include +#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) +#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) +#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)) +#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) + -/* The maximum and minimum values for the integer type T. These +/* 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. */ -# define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ + +/* 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 \ +#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 +/* 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__ || 0x5110 <= __SUNPRO_C +# 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) +#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)) + 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) +#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 */ +#endif /* _GL_INTPROPS_H */ diff --git a/gnulib/tests/inttypes.in.h b/gnulib/tests/inttypes.in.h new file mode 100644 index 0000000..b9da2b5 --- /dev/null +++ b/gnulib/tests/inttypes.in.h @@ -0,0 +1,1130 @@ +/* Copyright (C) 2006-2012 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 !@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)); +_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/gnulib/tests/localename.c b/gnulib/tests/localename.c index a5bfea7..e921e76 100644 --- a/gnulib/tests/localename.c +++ b/gnulib/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-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, 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. */ @@ -2619,20 +2617,20 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname) name = thread_locale->__names[category]; return name; # endif -# if defined __APPLE__ && defined __MACH__ /* MacOS X */ +# if defined __APPLE__ && defined __MACH__ /* Mac OS 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 */ + struct _xlocale_part1_v0 /* used in Mac OS 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 */ + struct _xlocale_part1_v1 /* used in Mac OS X >= 10.6.0 */ { int32_t __refcount; void (*__free_extra)(void *); @@ -2704,18 +2702,18 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname) struct _xlocale_part2 *tlp; if (((struct _xlocale_part1_v0 *) thread_locale)->__magic == 0x786C6F63616C6530LL) - /* MacOS X 10.5 */ + /* Mac OS 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 */ + /* Mac OS 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' + /* Unsupported version of Mac OS X: The internals of 'struct _xlocale' have changed again. */ return ""; switch (category) @@ -2786,8 +2784,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 +2820,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 +2847,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 +2866,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 +2880,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 +2888,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 +2899,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 +2921,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/gnulib/tests/localename.h b/gnulib/tests/localename.h index e754853..330932d 100644 --- a/gnulib/tests/localename.h +++ b/gnulib/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-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, 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/gnulib/tests/macros.h b/gnulib/tests/macros.h index 8922675..478004c 100644 --- a/gnulib/tests/macros.h +++ b/gnulib/tests/macros.h @@ -1,5 +1,5 @@ /* Common macros used by gnulib tests. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-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 @@ -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/gnulib/tests/msvc-inval.c b/gnulib/tests/msvc-inval.c new file mode 100644 index 0000000..ba76a7e --- /dev/null +++ b/gnulib/tests/msvc-inval.c @@ -0,0 +1,129 @@ +/* Invalid parameter handler for MSVC runtime libraries. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/gnulib/tests/msvc-inval.h b/gnulib/tests/msvc-inval.h new file mode 100644 index 0000000..eb6930b --- /dev/null +++ b/gnulib/tests/msvc-inval.h @@ -0,0 +1,222 @@ +/* Invalid parameter handler for MSVC runtime libraries. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/gnulib/tests/msvc-nothrow.c b/gnulib/tests/msvc-nothrow.c new file mode 100644 index 0000000..e5cf181 --- /dev/null +++ b/gnulib/tests/msvc-nothrow.c @@ -0,0 +1,49 @@ +/* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/gnulib/tests/msvc-nothrow.h b/gnulib/tests/msvc-nothrow.h new file mode 100644 index 0000000..2b71945 --- /dev/null +++ b/gnulib/tests/msvc-nothrow.h @@ -0,0 +1,43 @@ +/* Wrappers that don't throw invalid parameter notifications + with MSVC runtime libraries. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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/gnulib/tests/open.c b/gnulib/tests/open.c index 2e2cc74..27801b9 100644 --- a/gnulib/tests/open.c +++ b/gnulib/tests/open.c @@ -1,5 +1,5 @@ /* Open a descriptor to a file. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -16,13 +16,16 @@ /* 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. */ -#define __need_system_fcntl_h #include -#undef __need_system_fcntl_h #include +#undef __need_system_fcntl_h static inline int orig_open (const char *filename, int flags, mode_t mode) @@ -31,7 +34,9 @@ orig_open (const char *filename, int flags, mode_t mode) } /* Specification. */ -#include +/* 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 @@ -63,6 +68,15 @@ open (const char *filename, int flags, ...) 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"; diff --git a/gnulib/tests/putenv.c b/gnulib/tests/putenv.c index 68e5fec..3c0f7ea 100644 --- a/gnulib/tests/putenv.c +++ b/gnulib/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-2012 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C @@ -34,14 +34,16 @@ #include #include -#if HAVE_GNU_LD -# define environ __environ -#else +#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) @@ -89,7 +91,7 @@ _unsetenv (const char *name) /* 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) { diff --git a/gnulib/tests/same-inode.h b/gnulib/tests/same-inode.h index d434b94..8c3900d 100644 --- a/gnulib/tests/same-inode.h +++ b/gnulib/tests/same-inode.h @@ -1,6 +1,6 @@ /* Determine whether two stat buffers refer to the same file. - Copyright (C) 2006, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2006, 2009-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 @@ -18,8 +18,16 @@ #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) +# 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/gnulib/tests/setenv.c b/gnulib/tests/setenv.c index 7c06192..8201be2 100644 --- a/gnulib/tests/setenv.c +++ b/gnulib/tests/setenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2003, 2005-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2003, 2005-2012 Free Software Foundation, Inc. This file is part of the GNU C Library. This program is free software: you can redistribute it and/or modify @@ -15,6 +15,7 @@ along with this program. If not, see . */ #if !_LIBC +# define _GL_USE_STDLIB_ALLOC 1 # include #endif @@ -48,7 +49,7 @@ #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) @@ -64,10 +65,6 @@ __libc_lock_define_initialized (static, envlock) # 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 @@ -106,11 +103,11 @@ static void *known_values; static char **last_environ; -/* This function is used by `setenv' and `putenv'. The difference between +/* 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' + 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 + 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, @@ -302,7 +299,7 @@ setenv (const char *name, const char *value, int replace) return __add_to_environ (name, value, NULL, replace); } -/* The `clearenv' was planned to be added to POSIX.1 but probably +/* 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 @@ -353,6 +350,9 @@ weak_alias (__clearenv, clearenv) #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 diff --git a/gnulib/tests/setlocale.c b/gnulib/tests/setlocale.c index 0cef00f..8a47cde 100644 --- a/gnulib/tests/setlocale.c +++ b/gnulib/tests/setlocale.c @@ -1,5 +1,5 @@ /* Set the current locale. - Copyright (C) 2009, 2011 Free Software Foundation, Inc. + Copyright (C) 2009, 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 @@ -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/gnulib/tests/signature.h b/gnulib/tests/signature.h index 8256989..d9d8b47 100644 --- a/gnulib/tests/signature.h +++ b/gnulib/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-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 diff --git a/gnulib/tests/symlink.c b/gnulib/tests/symlink.c index 2896cc9..642ca66 100644 --- a/gnulib/tests/symlink.c +++ b/gnulib/tests/symlink.c @@ -1,5 +1,5 @@ /* Stub for symlink(). - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-alloca-opt.c b/gnulib/tests/test-alloca-opt.c index 5aa1645..6b9a4d7 100644 --- a/gnulib/tests/test-alloca-opt.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-binary-io.c b/gnulib/tests/test-binary-io.c index 8e5d193..4f284e7 100644 --- a/gnulib/tests/test-binary-io.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-binary-io.sh b/gnulib/tests/test-binary-io.sh index 33e128c..c4dd6e9 100755 --- a/gnulib/tests/test-binary-io.sh +++ b/gnulib/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/gnulib/tests/test-btowc.c b/gnulib/tests/test-btowc.c index 7907cbe..845fe06 100644 --- a/gnulib/tests/test-btowc.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-c-ctype.c b/gnulib/tests/test-c-ctype.c index 9d748ff..a9cb655 100644 --- a/gnulib/tests/test-c-ctype.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-c-strcasecmp.c b/gnulib/tests/test-c-strcasecmp.c index faa3001..1eb5958 100644 --- a/gnulib/tests/test-c-strcasecmp.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-c-strncasecmp.c b/gnulib/tests/test-c-strncasecmp.c index 6a225c7..479528b 100644 --- a/gnulib/tests/test-c-strncasecmp.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-canonicalize-lgpl.c b/gnulib/tests/test-canonicalize-lgpl.c index 17cdff0..7497e24 100644 --- a/gnulib/tests/test-canonicalize-lgpl.c +++ b/gnulib/tests/test-canonicalize-lgpl.c @@ -1,5 +1,5 @@ /* Test of execution of program termination handlers. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/gnulib/tests/test-close.c b/gnulib/tests/test-close.c new file mode 100644 index 0000000..83f71c0 --- /dev/null +++ b/gnulib/tests/test-close.c @@ -0,0 +1,44 @@ +/* Test closing a file or socket. + Copyright (C) 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 . */ + +#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); + } + { + errno = 0; + ASSERT (close (99) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/gnulib/tests/test-ctype.c b/gnulib/tests/test-ctype.c index 0a5cb19..d6cdff9 100644 --- a/gnulib/tests/test-ctype.c +++ b/gnulib/tests/test-ctype.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-dup2.c b/gnulib/tests/test-dup2.c index e2ad88b..5043c0c 100644 --- a/gnulib/tests/test-dup2.c +++ b/gnulib/tests/test-dup2.c @@ -1,5 +1,5 @@ /* Test duplicating file descriptors. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 @@ -33,9 +33,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 +47,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 +65,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); @@ -121,6 +123,9 @@ main (void) ASSERT (dup2 (-1, fd) == -1); ASSERT (errno == EBADF); errno = 0; + ASSERT (dup2 (99, fd) == -1); + ASSERT (errno == EBADF); + errno = 0; ASSERT (dup2 (AT_FDCWD, fd) == -1); ASSERT (errno == EBADF); ASSERT (is_open (fd)); diff --git a/gnulib/tests/test-environ.c b/gnulib/tests/test-environ.c index 11df789..972ed06 100644 --- a/gnulib/tests/test-environ.c +++ b/gnulib/tests/test-environ.c @@ -1,5 +1,5 @@ /* Test of environ variable. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-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 diff --git a/gnulib/tests/test-errno.c b/gnulib/tests/test-errno.c index 7851c22..8d00717 100644 --- a/gnulib/tests/test-errno.c +++ b/gnulib/tests/test-errno.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-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 @@ -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/gnulib/tests/test-fcntl-h.c b/gnulib/tests/test-fcntl-h.c index dd20fbb..00c5468 100644 --- a/gnulib/tests/test-fcntl-h.c +++ b/gnulib/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-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 @@ -29,10 +29,93 @@ int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK 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_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_NOLINKS + case O_NOLINKS: +#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/gnulib/tests/test-fdopen.c b/gnulib/tests/test-fdopen.c new file mode 100644 index 0000000..8e2f7bf --- /dev/null +++ b/gnulib/tests/test-fdopen.c @@ -0,0 +1,54 @@ +/* Test opening a stream with a file descriptor. + Copyright (C) 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 . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fdopen, FILE *, (int, const char *)); + +#include + +#include "macros.h" + +int +main (void) +{ + /* Test behaviour for invalid file descriptors. */ + { + FILE *fp; + + errno = 0; + fp = fdopen (-1, "r"); + if (fp == NULL) + ASSERT (errno == EBADF); + else + fclose (fp); + } + { + FILE *fp; + + errno = 0; + fp = fdopen (99, "r"); + if (fp == NULL) + ASSERT (errno == EBADF); + else + fclose (fp); + } + + return 0; +} diff --git a/gnulib/tests/test-fgetc.c b/gnulib/tests/test-fgetc.c new file mode 100644 index 0000000..f7ebbc6 --- /dev/null +++ b/gnulib/tests/test-fgetc.c @@ -0,0 +1,95 @@ +/* Test of fgetc() function. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 = 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/gnulib/tests/test-float.c b/gnulib/tests/test-float.c new file mode 100644 index 0000000..f3691be --- /dev/null +++ b/gnulib/tests/test-float.c @@ -0,0 +1,384 @@ +/* Test of substitute. + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-fnmatch.c b/gnulib/tests/test-fnmatch.c index 66f9b1c..9dd0693 100644 --- a/gnulib/tests/test-fnmatch.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-fputc.c b/gnulib/tests/test-fputc.c new file mode 100644 index 0000000..fd92ae8 --- /dev/null +++ b/gnulib/tests/test-fputc.c @@ -0,0 +1,89 @@ +/* Test of fputc() function. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 = 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/gnulib/tests/test-fread.c b/gnulib/tests/test-fread.c new file mode 100644 index 0000000..792299b --- /dev/null +++ b/gnulib/tests/test-fread.c @@ -0,0 +1,98 @@ +/* Test of fread() function. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 = 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/gnulib/tests/test-fstat.c b/gnulib/tests/test-fstat.c new file mode 100644 index 0000000..7f3c3c4 --- /dev/null +++ b/gnulib/tests/test-fstat.c @@ -0,0 +1,48 @@ +/* Tests of fstat() function. + Copyright (C) 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 . */ + +#include + +#include + +#include "signature.h" +SIGNATURE_CHECK (fstat, int, (int, struct stat *)); + +#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; + + errno = 0; + ASSERT (fstat (99, &statbuf) == -1); + ASSERT (errno == EBADF); + } + + return 0; +} diff --git a/gnulib/tests/test-fwrite.c b/gnulib/tests/test-fwrite.c new file mode 100644 index 0000000..1f3a66d --- /dev/null +++ b/gnulib/tests/test-fwrite.c @@ -0,0 +1,92 @@ +/* Test of fwrite() function. + Copyright (C) 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, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General 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 = 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/gnulib/tests/test-getcwd-lgpl.c b/gnulib/tests/test-getcwd-lgpl.c new file mode 100644 index 0000000..3010760 --- /dev/null +++ b/gnulib/tests/test-getcwd-lgpl.c @@ -0,0 +1,102 @@ +/* Test of getcwd() function. + Copyright (C) 2009-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 . */ + +#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/gnulib/tests/test-getdelim.c b/gnulib/tests/test-getdelim.c index f4d1c9d..daea646 100644 --- a/gnulib/tests/test-getdelim.c +++ b/gnulib/tests/test-getdelim.c @@ -1,5 +1,5 @@ /* Test of getdelim() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -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/gnulib/tests/test-getline.c b/gnulib/tests/test-getline.c index bead4b6..ede1b85 100644 --- a/gnulib/tests/test-getline.c +++ b/gnulib/tests/test-getline.c @@ -1,5 +1,5 @@ /* Test of getline() function. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -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/gnulib/tests/test-getopt.c b/gnulib/tests/test-getopt.c index 69f2cfa..e08a834 100644 --- a/gnulib/tests/test-getopt.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-getopt.h b/gnulib/tests/test-getopt.h index 9c877b3..978b753 100644 --- a/gnulib/tests/test-getopt.h +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-getopt_long.h b/gnulib/tests/test-getopt_long.h index 7a74867..9d55c65 100644 --- a/gnulib/tests/test-getopt_long.h +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-gettimeofday.c b/gnulib/tests/test-gettimeofday.c new file mode 100644 index 0000000..4a9d264 --- /dev/null +++ b/gnulib/tests/test-gettimeofday.c @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2005, 2007, 2009-2012 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 + +#include + +#include "signature.h" +SIGNATURE_CHECK (gettimeofday, int, + (struct timeval *, GETTIMEOFDAY_TIMEZONE *)); + +#include + +#include +#include + +int +main (void) +{ + time_t t = 0; + struct tm *lt; + struct tm saved_lt; + struct timeval tv; + lt = localtime (&t); + saved_lt = *lt; + gettimeofday (&tv, NULL); + if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0) + { + fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n"); + return 1; + } + return 0; +} diff --git a/gnulib/tests/test-ignore-value.c b/gnulib/tests/test-ignore-value.c index 501f79c..f036134 100644 --- a/gnulib/tests/test-ignore-value.c +++ b/gnulib/tests/test-ignore-value.c @@ -1,6 +1,6 @@ /* Test the "ignore-value" module. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 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 @@ -24,7 +24,7 @@ #include #ifndef _GL_ATTRIBUTE_RETURN_CHECK -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 1) +# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) # define _GL_ATTRIBUTE_RETURN_CHECK # else # define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) diff --git a/gnulib/tests/test-init.sh b/gnulib/tests/test-init.sh new file mode 100755 index 0000000..a2825cc --- /dev/null +++ b/gnulib/tests/test-init.sh @@ -0,0 +1,73 @@ +#!/bin/sh +# Unit tests for init.sh +# Copyright (C) 2011-2012 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/gnulib/tests/test-intprops.c b/gnulib/tests/test-intprops.c new file mode 100644 index 0000000..aeb1168 --- /dev/null +++ b/gnulib/tests/test-intprops.c @@ -0,0 +1,275 @@ +/* Test intprops.h. + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-inttypes.c b/gnulib/tests/test-inttypes.c new file mode 100644 index 0000000..698d3dc --- /dev/null +++ b/gnulib/tests/test-inttypes.c @@ -0,0 +1,118 @@ +/* Test of substitute. + Copyright (C) 2006-2007, 2009-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 . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +#include + +/* 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 (void) +{ + return 0; +} diff --git a/gnulib/tests/test-isblank.c b/gnulib/tests/test-isblank.c index 229d8d6..878ee42 100644 --- a/gnulib/tests/test-isblank.c +++ b/gnulib/tests/test-isblank.c @@ -1,5 +1,5 @@ /* Test of isblank() function. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-langinfo.c b/gnulib/tests/test-langinfo.c index ade807c..02b4637 100644 --- a/gnulib/tests/test-langinfo.c +++ b/gnulib/tests/test-langinfo.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-locale.c b/gnulib/tests/test-locale.c index 9b55e37..e884ea1 100644 --- a/gnulib/tests/test-locale.c +++ b/gnulib/tests/test-locale.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 @@ -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/gnulib/tests/test-localeconv.c b/gnulib/tests/test-localeconv.c new file mode 100644 index 0000000..9125800 --- /dev/null +++ b/gnulib/tests/test-localeconv.c @@ -0,0 +1,72 @@ +/* Test of localeconv() function. + Copyright (C) 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 . */ + +/* 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__ + ASSERT (STREQ (l->grouping, "")); +#endif + + ASSERT (STREQ (l->mon_decimal_point, "")); + ASSERT (STREQ (l->mon_thousands_sep, "")); +#if !defined __FreeBSD__ + 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/gnulib/tests/test-localename.c b/gnulib/tests/test-localename.c index 09f002c..37b76a3 100644 --- a/gnulib/tests/test-localename.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-lock.c b/gnulib/tests/test-lock.c index 04ce076..5cada7d 100644 --- a/gnulib/tests/test-lock.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-lstat.c b/gnulib/tests/test-lstat.c index 372e056..459bf88 100644 --- a/gnulib/tests/test-lstat.c +++ b/gnulib/tests/test-lstat.c @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-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 diff --git a/gnulib/tests/test-lstat.h b/gnulib/tests/test-lstat.h index 883c4e8..4a81494 100644 --- a/gnulib/tests/test-lstat.h +++ b/gnulib/tests/test-lstat.h @@ -1,5 +1,5 @@ /* Test of lstat() function. - Copyright (C) 2008-2011 Free Software Foundation, Inc. + Copyright (C) 2008-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 diff --git a/gnulib/tests/test-malloc-gnu.c b/gnulib/tests/test-malloc-gnu.c index c2a3d6b..16b3a0a 100644 --- a/gnulib/tests/test-malloc-gnu.c +++ b/gnulib/tests/test-malloc-gnu.c @@ -1,5 +1,5 @@ /* Test of malloc function. - Copyright (C) 2010-2011 Free Software Foundation, Inc. + Copyright (C) 2010-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 diff --git a/gnulib/tests/test-malloca.c b/gnulib/tests/test-malloca.c index 92c86f2..9c7109c 100644 --- a/gnulib/tests/test-malloca.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-mbrtowc-w32.c b/gnulib/tests/test-mbrtowc-w32.c index ee8caf9..50006c0 100644 --- a/gnulib/tests/test-mbrtowc-w32.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-mbrtowc.c b/gnulib/tests/test-mbrtowc.c index 727016a..02b7841 100644 --- a/gnulib/tests/test-mbrtowc.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-mbsinit.c b/gnulib/tests/test-mbsinit.c index 2cc2924..dae7569 100644 --- a/gnulib/tests/test-mbsinit.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-mbsrtowcs.c b/gnulib/tests/test-mbsrtowcs.c index 9a63ed9..f93677e 100644 --- a/gnulib/tests/test-mbsrtowcs.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-memchr.c b/gnulib/tests/test-memchr.c index a11f6cd..1298c27 100644 --- a/gnulib/tests/test-memchr.c +++ b/gnulib/tests/test-memchr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2008-2011 Free Software Foundation, Inc. + * Copyright (C) 2008-2012 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/gnulib/tests/test-nl_langinfo.c b/gnulib/tests/test-nl_langinfo.c index 964ea8d..d3384f4 100644 --- a/gnulib/tests/test-nl_langinfo.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-open.c b/gnulib/tests/test-open.c index 3c5b2ab..b9ec9bf 100644 --- a/gnulib/tests/test-open.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-open.h b/gnulib/tests/test-open.h index 3e5c5e1..cab1d27 100644 --- a/gnulib/tests/test-open.h +++ b/gnulib/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-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 @@ -63,6 +63,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/gnulib/tests/test-pathmax.c b/gnulib/tests/test-pathmax.c new file mode 100644 index 0000000..c6d0ccc --- /dev/null +++ b/gnulib/tests/test-pathmax.c @@ -0,0 +1,32 @@ +/* Test of "pathmax.h". + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-rawmemchr.c b/gnulib/tests/test-rawmemchr.c new file mode 100644 index 0000000..9e31500 --- /dev/null +++ b/gnulib/tests/test-rawmemchr.c @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2008-2012 Free Software Foundation, Inc. + * Written by Eric Blake and Bruno Haible + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 (rawmemchr, void *, (void const *, int)); + +#include + +#include "zerosize-ptr.h" +#include "macros.h" + +/* Calculating void * + int is not portable, so this wrapper converts + to char * to make the tests easier to write. */ +#define RAWMEMCHR (char *) rawmemchr + +int +main (void) +{ + size_t n = 0x100000; + char *input = malloc (n + 1); + ASSERT (input); + + input[0] = 'a'; + input[1] = 'b'; + memset (input + 2, 'c', 1024); + memset (input + 1026, 'd', n - 1028); + input[n - 2] = 'e'; + input[n - 1] = 'a'; + input[n] = '\0'; + + /* Basic behavior tests. */ + ASSERT (RAWMEMCHR (input, 'a') == input); + ASSERT (RAWMEMCHR (input, 'b') == input + 1); + ASSERT (RAWMEMCHR (input, 'c') == input + 2); + ASSERT (RAWMEMCHR (input, 'd') == input + 1026); + + ASSERT (RAWMEMCHR (input + 1, 'a') == input + n - 1); + ASSERT (RAWMEMCHR (input + 1, 'e') == input + n - 2); + ASSERT (RAWMEMCHR (input + 1, 0x789abc00 | 'e') == input + n - 2); + + ASSERT (RAWMEMCHR (input, '\0') == input + n); + + /* Alignment tests. */ + { + int i, j; + for (i = 0; i < 32; i++) + { + for (j = 0; j < 256; j++) + input[i + j] = j; + for (j = 0; j < 256; j++) + { + ASSERT (RAWMEMCHR (input + i, j) == input + i + j); + } + } + } + + /* Ensure that no unaligned oversized reads occur. */ + { + char *page_boundary = (char *) zerosize_ptr (); + size_t i; + + if (!page_boundary) + page_boundary = input + 4096; + memset (page_boundary - 512, '1', 511); + page_boundary[-1] = '2'; + for (i = 1; i <= 512; i++) + ASSERT (RAWMEMCHR (page_boundary - i, (i * 0x01010100) | '2') + == page_boundary - 1); + } + + free (input); + + return 0; +} diff --git a/gnulib/tests/test-readlink.c b/gnulib/tests/test-readlink.c index 3da5fbf..d755182 100644 --- a/gnulib/tests/test-readlink.c +++ b/gnulib/tests/test-readlink.c @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-readlink.h b/gnulib/tests/test-readlink.h index 7247fc4..284152a 100644 --- a/gnulib/tests/test-readlink.h +++ b/gnulib/tests/test-readlink.h @@ -1,5 +1,5 @@ /* Tests of readlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-safe-alloc.c b/gnulib/tests/test-safe-alloc.c index 2cf61be..36a4be9 100644 --- a/gnulib/tests/test-safe-alloc.c +++ b/gnulib/tests/test-safe-alloc.c @@ -1,7 +1,7 @@ /* * Test the safe-alloc macros * - * Copyright (C) 2009-2011 Free Software Foundation, Inc. + * Copyright (C) 2009-2012 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -14,8 +14,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * License along with this library; if not, see . * * Author: David Lutterkort */ diff --git a/gnulib/tests/test-setenv.c b/gnulib/tests/test-setenv.c index 50eb71b..4752a11 100644 --- a/gnulib/tests/test-setenv.c +++ b/gnulib/tests/test-setenv.c @@ -1,5 +1,5 @@ /* Tests of setenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-setlocale1.c b/gnulib/tests/test-setlocale1.c index ea7945c..08f9224 100644 --- a/gnulib/tests/test-setlocale1.c +++ b/gnulib/tests/test-setlocale1.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 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 diff --git a/gnulib/tests/test-setlocale2.c b/gnulib/tests/test-setlocale2.c index 7bfc42a..7416647 100644 --- a/gnulib/tests/test-setlocale2.c +++ b/gnulib/tests/test-setlocale2.c @@ -1,5 +1,5 @@ /* Test of setting the current locale. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 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 diff --git a/gnulib/tests/test-setlocale2.sh b/gnulib/tests/test-setlocale2.sh index 723e74e..904e147 100755 --- a/gnulib/tests/test-setlocale2.sh +++ b/gnulib/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/gnulib/tests/test-stat.c b/gnulib/tests/test-stat.c index 4cda089..db9adf9 100644 --- a/gnulib/tests/test-stat.c +++ b/gnulib/tests/test-stat.c @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 @@ -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/gnulib/tests/test-stat.h b/gnulib/tests/test-stat.h index 22552dc..2c9afc0 100644 --- a/gnulib/tests/test-stat.h +++ b/gnulib/tests/test-stat.h @@ -1,5 +1,5 @@ /* Tests of stat. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 @@ -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/gnulib/tests/test-stdbool.c b/gnulib/tests/test-stdbool.c index e115ba2..c22ca1f 100644 --- a/gnulib/tests/test-stdbool.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-stddef.c b/gnulib/tests/test-stddef.c index c929af8..d7237b3 100644 --- a/gnulib/tests/test-stddef.c +++ b/gnulib/tests/test-stddef.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-stdint.c b/gnulib/tests/test-stdint.c index f606cc3..23b2b28 100644 --- a/gnulib/tests/test-stdint.c +++ b/gnulib/tests/test-stdint.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2006-2011 Free Software Foundation, Inc. + Copyright (C) 2006-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 @@ -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/gnulib/tests/test-stdio.c b/gnulib/tests/test-stdio.c index 7e7a206..7bd67c2 100644 --- a/gnulib/tests/test-stdio.c +++ b/gnulib/tests/test-stdio.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 diff --git a/gnulib/tests/test-stdlib.c b/gnulib/tests/test-stdlib.c index 210aab4..7eeb410 100644 --- a/gnulib/tests/test-stdlib.c +++ b/gnulib/tests/test-stdlib.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 diff --git a/gnulib/tests/test-strchrnul.c b/gnulib/tests/test-strchrnul.c new file mode 100644 index 0000000..f1d0928 --- /dev/null +++ b/gnulib/tests/test-strchrnul.c @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2008-2012 Free Software Foundation, Inc. + * Written by Eric Blake and Bruno Haible + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General 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 (strchrnul, char *, (char const *, int)); + +#include + +#include "macros.h" + +int +main (void) +{ + size_t n = 0x100000; + char *input = malloc (n + 1); + ASSERT (input); + + input[0] = 'a'; + input[1] = 'b'; + memset (input + 2, 'c', 1024); + memset (input + 1026, 'd', n - 1028); + input[n - 2] = 'e'; + input[n - 1] = 'a'; + input[n] = '\0'; + + /* Basic behavior tests. */ + ASSERT (strchrnul (input, 'a') == input); + ASSERT (strchrnul (input, 'b') == input + 1); + ASSERT (strchrnul (input, 'c') == input + 2); + ASSERT (strchrnul (input, 'd') == input + 1026); + + ASSERT (strchrnul (input + 1, 'a') == input + n - 1); + ASSERT (strchrnul (input + 1, 'e') == input + n - 2); + + ASSERT (strchrnul (input, 'f') == input + n); + ASSERT (strchrnul (input, '\0') == input + n); + + /* Check that a very long haystack is handled quickly if the byte is + found near the beginning. */ + { + size_t repeat = 10000; + for (; repeat > 0; repeat--) + { + ASSERT (strchrnul (input, 'c') == input + 2); + } + } + + /* Alignment tests. */ + { + int i, j; + for (i = 0; i < 32; i++) + { + for (j = 0; j < 256; j++) + input[i + j] = (j + 1) & 0xff; + for (j = 1; j < 256; j++) + { + ASSERT (strchrnul (input + i, j) == input + i + j - 1); + input[i + j - 1] = (j == 1 ? 2 : 1); + ASSERT (strchrnul (input + i, j) == input + i + 255); + input[i + j - 1] = j; + } + } + } + + free (input); + + return 0; +} diff --git a/gnulib/tests/test-string.c b/gnulib/tests/test-string.c index 54c49a9..56e5974 100644 --- a/gnulib/tests/test-string.c +++ b/gnulib/tests/test-string.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 diff --git a/gnulib/tests/test-strnlen.c b/gnulib/tests/test-strnlen.c index 18d6fcd..cbc1883 100644 --- a/gnulib/tests/test-strnlen.c +++ b/gnulib/tests/test-strnlen.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2010-2011 Free Software Foundation, Inc. + * Copyright (C) 2010-2012 Free Software Foundation, Inc. * Written by Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib/tests/test-strstr.c b/gnulib/tests/test-strstr.c index d6d6639..9d44dfb 100644 --- a/gnulib/tests/test-strstr.c +++ b/gnulib/tests/test-strstr.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2004, 2007-2011 Free Software Foundation, Inc. + * Copyright (C) 2004, 2007-2012 Free Software Foundation, Inc. * Written by Bruno Haible and Eric Blake * * This program is free software: you can redistribute it and/or modify diff --git a/gnulib/tests/test-symlink.c b/gnulib/tests/test-symlink.c index 367e045..b3caac9 100644 --- a/gnulib/tests/test-symlink.c +++ b/gnulib/tests/test-symlink.c @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-symlink.h b/gnulib/tests/test-symlink.h index 4d93929..a7c4079 100644 --- a/gnulib/tests/test-symlink.h +++ b/gnulib/tests/test-symlink.h @@ -1,5 +1,5 @@ /* Tests of symlink. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-sys_stat.c b/gnulib/tests/test-sys_stat.c index cd07d86..0702e04 100644 --- a/gnulib/tests/test-sys_stat.c +++ b/gnulib/tests/test-sys_stat.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 @@ -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, @@ -61,7 +64,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 +78,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 +92,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 +106,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 +120,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 +134,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 +148,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 +162,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 +176,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 +190,9 @@ verify (!S_ISMPB (S_IFLNK)); verify (!S_ISMPB (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 +204,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 +218,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 +232,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 +246,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 +260,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 +274,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 +313,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/gnulib/tests/test-sys_time.c b/gnulib/tests/test-sys_time.c new file mode 100644 index 0000000..44e21a2 --- /dev/null +++ b/gnulib/tests/test-sys_time.c @@ -0,0 +1,33 @@ +/* Test of substitute. + Copyright (C) 2007, 2009-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 . */ + +/* Written by Bruno Haible , 2007. */ + +#include + +#include + +/* Check that the 'struct timeval' type is defined. */ +struct timeval a; + +/* Check that &a.tv_sec is a 'time_t *', ignoring signedness issues. */ +typedef int verify_tv_sec_type[sizeof (a.tv_sec) == sizeof (time_t) ? 1 : -1]; + +int +main (void) +{ + return 0; +} diff --git a/gnulib/tests/test-sys_types.c b/gnulib/tests/test-sys_types.c new file mode 100644 index 0000000..c2af992 --- /dev/null +++ b/gnulib/tests/test-sys_types.c @@ -0,0 +1,34 @@ +/* Test of substitute. + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-sys_wait.c b/gnulib/tests/test-sys_wait.c index dce89c6..3ed2e2e 100644 --- a/gnulib/tests/test-sys_wait.c +++ b/gnulib/tests/test-sys_wait.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-sys_wait.h b/gnulib/tests/test-sys_wait.h index 3c9b322..d3726df 100644 --- a/gnulib/tests/test-sys_wait.h +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-thread_create.c b/gnulib/tests/test-thread_create.c new file mode 100644 index 0000000..0f86771 --- /dev/null +++ b/gnulib/tests/test-thread_create.c @@ -0,0 +1,78 @@ +/* Test of gl_thread_create () macro. + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-thread_self.c b/gnulib/tests/test-thread_self.c new file mode 100644 index 0000000..707f7fe --- /dev/null +++ b/gnulib/tests/test-thread_self.c @@ -0,0 +1,34 @@ +/* Test of gl_thread_self () macro. + Copyright (C) 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 . */ + +/* 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/gnulib/tests/test-time.c b/gnulib/tests/test-time.c index 0c78f36..11a4208 100644 --- a/gnulib/tests/test-time.c +++ b/gnulib/tests/test-time.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 @@ -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/gnulib/tests/test-unistd.c b/gnulib/tests/test-unistd.c index be1ae06..e53fd7a 100644 --- a/gnulib/tests/test-unistd.c +++ b/gnulib/tests/test-unistd.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007, 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2007, 2009-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 diff --git a/gnulib/tests/test-unsetenv.c b/gnulib/tests/test-unsetenv.c index 9c9443b..926526d 100644 --- a/gnulib/tests/test-unsetenv.c +++ b/gnulib/tests/test-unsetenv.c @@ -1,5 +1,5 @@ /* Tests of unsetenv. - Copyright (C) 2009-2011 Free Software Foundation, Inc. + Copyright (C) 2009-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 diff --git a/gnulib/tests/test-vasnprintf.c b/gnulib/tests/test-vasnprintf.c index 6b2a0ff..4e548b1 100644 --- a/gnulib/tests/test-vasnprintf.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-vasprintf.c b/gnulib/tests/test-vasprintf.c index 6882d18..4d7635b 100644 --- a/gnulib/tests/test-vasprintf.c +++ b/gnulib/tests/test-vasprintf.c @@ -1,5 +1,5 @@ /* Test of vasprintf() and asprintf() functions. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/gnulib/tests/test-verify.c b/gnulib/tests/test-verify.c index 512c021..5ab9c58 100644 --- a/gnulib/tests/test-verify.c +++ b/gnulib/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-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 @@ -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/gnulib/tests/test-wchar.c b/gnulib/tests/test-wchar.c index 2d3bad7..0d72005 100644 --- a/gnulib/tests/test-wchar.c +++ b/gnulib/tests/test-wchar.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/gnulib/tests/test-wcrtomb-w32.c b/gnulib/tests/test-wcrtomb-w32.c index 0b09498..9342f78 100644 --- a/gnulib/tests/test-wcrtomb-w32.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-wcrtomb.c b/gnulib/tests/test-wcrtomb.c index a50817f..99e427d 100644 --- a/gnulib/tests/test-wcrtomb.c +++ b/gnulib/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-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 diff --git a/gnulib/tests/test-wctype-h.c b/gnulib/tests/test-wctype-h.c index aed3b77..467f05b 100644 --- a/gnulib/tests/test-wctype-h.c +++ b/gnulib/tests/test-wctype-h.c @@ -1,5 +1,5 @@ /* Test of substitute. - Copyright (C) 2007-2011 Free Software Foundation, Inc. + Copyright (C) 2007-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 diff --git a/gnulib/tests/unsetenv.c b/gnulib/tests/unsetenv.c index 215bba0..ddbe9a4 100644 --- a/gnulib/tests/unsetenv.c +++ b/gnulib/tests/unsetenv.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995-2002, 2005-2011 Free Software Foundation, Inc. +/* Copyright (C) 1992, 1995-2002, 2005-2012 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 @@ -36,7 +36,7 @@ #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) @@ -97,6 +97,13 @@ weak_alias (__unsetenv, unsetenv) #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. */ diff --git a/gnulib/tests/wctob.c b/gnulib/tests/wctob.c index cc26afc..0885c1b 100644 --- a/gnulib/tests/wctob.c +++ b/gnulib/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-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2008. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/tests/wctomb-impl.h b/gnulib/tests/wctomb-impl.h index 4e95de6..68264cf 100644 --- a/gnulib/tests/wctomb-impl.h +++ b/gnulib/tests/wctomb-impl.h @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/tests/wctomb.c b/gnulib/tests/wctomb.c index 889a3c6..736a7c7 100644 --- a/gnulib/tests/wctomb.c +++ b/gnulib/tests/wctomb.c @@ -1,5 +1,5 @@ /* Convert wide character to multibyte character. - Copyright (C) 2011 Free Software Foundation, Inc. + Copyright (C) 2011-2012 Free Software Foundation, Inc. Written by Bruno Haible , 2011. This program is free software: you can redistribute it and/or modify diff --git a/gnulib/tests/zerosize-ptr.h b/gnulib/tests/zerosize-ptr.h index beeb3da..9c060e7 100644 --- a/gnulib/tests/zerosize-ptr.h +++ b/gnulib/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-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 diff --git a/lenses/access.aug b/lenses/access.aug index 4ea5e0c..39920d3 100644 --- a/lenses/access.aug +++ b/lenses/access.aug @@ -8,7 +8,7 @@ About: Reference Some examples of valid entries can be found in access.conf or "man access.conf" About: License - This file is licensed under the LGPLv2+, like the rest of Augeas. + This file is licensed under the LGPL v2+, like the rest of Augeas. About: Lens Usage Sample usage of this lens in augtool @@ -48,10 +48,14 @@ let colon = del (Rx.opt_space . ":" . Rx.opt_space) " : " *) let access = label "access" . store /[+-]/ +(* Variable: identifier_re + Regex for user/group identifiers *) +let identifier_re = /[A-Za-z0-9_.\\-]+/ + (* View: user_re * Regex for user/netgroup fields *) -let user_re = Rx.word - /[Ee][Xx][Cc][Ee][Pp][Tt]/ +let user_re = identifier_re - /[Ee][Xx][Cc][Ee][Pp][Tt]/ (* View: user * user can be a username, username@hostname or a group @@ -65,7 +69,7 @@ let user = [ label "user" * Format is (GROUP) *) let group = [ label "group" - . Util.del_str "(" . store Rx.word . Util.del_str ")" ] + . Util.del_str "(" . store identifier_re . Util.del_str ")" ] (* View: netgroup * Format is @NETGROUP[@@NISDOMAIN] diff --git a/lenses/activemq_conf.aug b/lenses/activemq_conf.aug new file mode 100644 index 0000000..191d811 --- /dev/null +++ b/lenses/activemq_conf.aug @@ -0,0 +1,61 @@ +(* +Module: ActiveMQ_Conf + ActiveMQ / FuseMQ conf module for Augeas + +Author: Brian Redbeard + +About: Reference + This lens ensures that conf files included in ActiveMQ /FuseMQ are properly + handled by Augeas. + +About: License + This file is licensed under the LGPL License. + +About: Lens Usage + Sample usage of this lens in augtool: + + * Get your current setup + > print /files/etc/activemq.conf + ... + + * Change ActiveMQ Home + > set /files/etc/activemq.conf/ACTIVEMQ_HOME /usr/share/activemq + + Saving your file: + + > save + +About: Configuration files + This lens applies to relevant conf files located in /etc/activemq/ and + the file /etc/activemq.conf . See . + +*) + +module ActiveMQ_Conf = + autoload xfm + +(* Variable: blank_val *) +let blank_val = del /^\z/ + +(* View: entry *) +let entry = + Build.key_value_line Rx.word Sep.space_equal Quote.any_opt + +(* View: empty_entry *) +let empty_entry = Build.key_value_line Rx.word Sep.equal Quote.dquote_opt_nil + +(* View: lns *) +let lns = (Util.empty | Util.comment | entry | empty_entry )* + +(* Variable: filter *) +let filter = incl "/etc/activemq.conf" + . incl "/etc/activemq/*" + . excl "/etc/activemq/*.xml" + . excl "/etc/activemq/jmx.*" + . excl "/etc/activemq/jetty-realm.properties" + . excl "/etc/activemq/*.ts" + . excl "/etc/activemq/*.ks" + . excl "/etc/activemq/*.cert" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/activemq_xml.aug b/lenses/activemq_xml.aug new file mode 100644 index 0000000..df2a222 --- /dev/null +++ b/lenses/activemq_xml.aug @@ -0,0 +1,41 @@ +(* +Module: ActiveMQ_XML + ActiveMQ / FuseMQ XML module for Augeas + +Author: Brian Redbeard + +About: Reference + This lens ensures that XML files included in ActiveMQ / FuseMQ are properly + handled by Augeas. + +About: License + This file is licensed under the LGPL License. + +About: Lens Usage + Sample usage of this lens in augtool: + + * Get your current setup + > print /files/etc/activemq/activemq.xml + ... + + * Change OpenShift domain + > set /files/etc/openshift/broker.conf/CLOUD_DOMAIN ose.example.com + + Saving your file: + + > save + +About: Configuration files + This lens applies to relevant XML files located in /etc/activemq/ . See . + +*) + +module ActiveMQ_XML = + autoload xfm + +let lns = Xml.lns + +let filter = (incl "/etc/activemq/*.xml") + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/aliases.aug b/lenses/aliases.aug index 89dec94..10c2d66 100644 --- a/lenses/aliases.aug +++ b/lenses/aliases.aug @@ -8,7 +8,7 @@ About: Reference This lens tries to keep as close as possible to `man 5 aliases` where possible. About: License - This file is licenced under the LGPLv2+, like the rest of Augeas. + This file is licenced under the LGPL v2+, like the rest of Augeas. About: Lens Usage See . @@ -38,7 +38,7 @@ module Aliases = * a command can contain spaces, if enclosed in double quotes, the case * without spaces is taken care with *) - let command = /\|([^", \t\n]+|"[^"\n]+")/ + let command = /(\|([^", \t\n]+|"[^"\n]+"))|("\|[^"\n]+")/ (* Group: Comments and empty lines *) @@ -53,7 +53,7 @@ module Aliases = (* View: colon * Separation between the alias and it's destinations *) - let colon = del /[ \t]*:[ \t]+/ ":\t" + let colon = del /[ \t]*:[ \t]*/ ":\t" (* View: comma * Separation between multiple destinations *) diff --git a/lenses/anacron.aug b/lenses/anacron.aug new file mode 100644 index 0000000..e7aa5ca --- /dev/null +++ b/lenses/anacron.aug @@ -0,0 +1,87 @@ +(* +Module: Anacron + Parses /etc/anacrontab + +Author: Raphael Pinson + +About: Reference + This lens tries to keep as close as possible to `man 5 anacrontab` where + possible. + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + +About: Configuration files + This lens applies to /etc/anacrontab. See . + +About: Examples + The file contains various examples and tests. +*) + +module Anacron = + autoload xfm + +(************************************************************************ + * Group: ENTRIES + *************************************************************************) + + +(************************************************************************ + * View: shellvar + * A shell variable in crontab + *************************************************************************) + +let shellvar = Cron.shellvar + + +(* View: period *) +let period = [ label "period" . store Rx.integer ] + +(* Variable: period_name_re + The valid values for . Currently only "monthly" *) +let period_name_re = "monthly" + +(************************************************************************ + * View: period_name + * In the format "@keyword" + *************************************************************************) +let period_name = [ label "period_name" . Util.del_str "@" + . store period_name_re ] + +(************************************************************************ + * View: delay + * The delay for an + *************************************************************************) +let delay = [ label "delay" . store Rx.integer ] + +(************************************************************************ + * View: job_identifier + * The job_identifier for an + *************************************************************************) +let job_identifier = [ label "job-identifier" . store Rx.word ] + +(************************************************************************ + * View: entry + * An anacrontab entry + *************************************************************************) + +let entry = [ label "entry" . Util.indent + . ( period | period_name ) + . Sep.space . delay + . Sep.space . job_identifier + . Sep.space . store Rx.space_in . Util.eol ] + + +(* + * View: lns + * The anacron lens + *) +let lns = ( Util.empty | Util.comment | shellvar | entry )* + + +(* Variable: filter *) +let filter = incl "/etc/anacrontab" + +let xfm = transform lns filter diff --git a/lenses/approx.aug b/lenses/approx.aug index 32b56d6..a482d1a 100644 --- a/lenses/approx.aug +++ b/lenses/approx.aug @@ -8,7 +8,7 @@ About: Reference This lens tries to keep as close as possible to `man 5 approx.conf` where possible. About: License - This file is licenced under the LGPLv2+, like the rest of Augeas. + This file is licenced under the LGPL v2+, like the rest of Augeas. About: Lens Usage See . diff --git a/lenses/apt_update_manager.aug b/lenses/apt_update_manager.aug new file mode 100644 index 0000000..f1c361d --- /dev/null +++ b/lenses/apt_update_manager.aug @@ -0,0 +1,47 @@ +(* +Module: Apt_Update_Manager + Parses files in /etc/update-manager + +Author: Raphael Pinson + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + To be documented + +About: Configuration files + This lens applies to files in /etc/update-manager. See . + +About: Examples + The file contains various examples and tests. +*) +module Apt_Update_Manager = + +autoload xfm + +(* View: comment *) +let comment = IniFile.comment IniFile.comment_re IniFile.comment_default + +(* View: sep *) +let sep = IniFile.sep IniFile.sep_re IniFile.sep_default + +(* View: title *) +let title = IniFile.title Rx.word + +(* View: entry *) +let entry = IniFile.entry Rx.word sep comment + +(* View: record *) +let record = IniFile.record title entry + +(* View: lns *) +let lns = IniFile.lns record comment + +(* Variable: filter *) +let filter = incl "/etc/update-manager/meta-release" + . incl "/etc/update-manager/release-upgrades" + . incl "/etc/update-manager/release-upgrades.d/*" + . Util.stdexcl + +let xfm = transform lns filter diff --git a/lenses/aptcacherngsecurity.aug b/lenses/aptcacherngsecurity.aug new file mode 100644 index 0000000..204ea5b --- /dev/null +++ b/lenses/aptcacherngsecurity.aug @@ -0,0 +1,25 @@ +(* Module: AptCacherNGSecurity + + Lens for config files like the one found in + /etc/apt-cacher-ng/security.conf + + + About: License + Copyright 2013 Erik B. Andersen; this file is licenced under the LGPL v2+. +*) +module AptCacherNGSecurity = + autoload xfm + + (* Define a Username/PW pair *) + let authpair = [ key /[^ \t:\/]*/ . del /:/ ":" . store /[^: \t\n]*/ ] + + (* Define a record. So far as I can tell, the only auth level supported is Admin *) + let record = [ key "AdminAuth". del /[ \t]*:[ \t]*/ ": ". authpair . Util.del_str "\n"] + + (* Define the basic lens *) + let lns = ( record | Util.empty | Util.comment )* + + let filter = incl "/etc/apt-cacher-ng/security.conf" + . Util.stdexcl + + let xfm = transform lns filter diff --git a/lenses/aptconf.aug b/lenses/aptconf.aug index 2338c39..8683c7a 100644 --- a/lenses/aptconf.aug +++ b/lenses/aptconf.aug @@ -9,7 +9,7 @@ About: Reference where possible. About: License - This file is licenced under the LGPLv2+, like the rest of Augeas. + This file is licenced under the LGPL v2+, like the rest of Augeas. About: Lens Usage To be documented diff --git a/lenses/aptpreferences.aug b/lenses/aptpreferences.aug index 3f57d0b..0c3c84c 100644 --- a/lenses/aptpreferences.aug +++ b/lenses/aptpreferences.aug @@ -1,49 +1,69 @@ -(* Apt/preferences module for Augeas *) -(* Author: Raphael Pinson *) +(* +Module: AptPreferences + Apt/preferences module for Augeas + +Author: Raphael Pinson +*) module AptPreferences = - autoload xfm +autoload xfm + +(************************************************************************ + * Group: Entries + ************************************************************************) + +(* View: colon *) +let colon = del /:[ \t]*/ ": " + +(* View: pin_gen + A generic pin - (* Define useful primitives *) - let colon = del /:[ \t]*/ ": " - let eol = del /[ \t]*\n/ "\n" - let value_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ - let value_to_spc = store /[^, \t\n]+/ - let comma = del /,[ \t]*/ ", " - let equal = Util.del_str "=" - let spc = Util.del_ws_spc + Parameters: + lbl:string - the label *) +let pin_gen (lbl:string) = store lbl + . [ label lbl . Sep.space . store Rx.no_spaces ] - (* Define empty *) - let empty = [ del /[ \t]*\n/ "\n" ] +(* View: pin_keys *) +let pin_keys = + let space_in = store /[^, \r\t\n][^,\n]*[^, \r\t\n]|[^, \t\n\r]/ + in Build.key_value /[aclnov]/ Sep.equal space_in - (* Define record *) +(* View: pin_options *) +let pin_options = + let comma = Util.delim "," + in store "release" . Sep.space + . Build.opt_list pin_keys comma - let simple_entry (kw:string) = [ key kw . colon . value_to_eol . eol ] +(* View: version_pin *) +let version_pin = pin_gen "version" - let key_value (kw:string) = [ key kw . equal . value_to_spc ] - let pin_keys = key_value "a" - | key_value "c" - | key_value "l" - | key_value "o" - | key_value "v" +(* View: origin_pin *) +let origin_pin = pin_gen "origin" - let pin_options = store "release" . spc . pin_keys . ( comma . pin_keys )* - let version_pin = store "version" . [ label "version" . spc . store /[^ \t\n]+/ ] - let origin_pin = store "origin" . [ label "origin" . spc . store /[^ \t\n]+/ ] +(* View: pin *) +let pin = + let pin_value = pin_options | version_pin | origin_pin + in Build.key_value_line "Pin" colon pin_value - let pin = [ key "Pin" . colon . (pin_options | version_pin | origin_pin) . eol ] +(* View: entries *) +let entries = Build.key_value_line ("Explanation"|"Package"|"Pin-Priority") + colon (store Rx.space_in) + | pin + | Util.comment - let entries = simple_entry "Explanation" - | simple_entry "Package" - | simple_entry "Pin-Priority" - | pin +(* View: record *) +let record = [ seq "record" . entries+ ] - let record = [ seq "record" . entries+ ] +(************************************************************************ + * Group: Lens + ************************************************************************) - (* Define lens *) - let lns = (eol* . ( record . eol+ )* . record . eol* ) | eol +(* View: lns *) +let lns = Util.empty* . (Build.opt_list record Util.eol+ . Util.empty*)? - let filter = incl "/etc/apt/preferences" - . Util.stdexcl +(* View: filter *) +let filter = incl "/etc/apt/preferences" + . incl "/etc/apt/preferences.d/*" + . Util.stdexcl - let xfm = transform lns filter +let xfm = transform lns filter diff --git a/lenses/aptsources.aug b/lenses/aptsources.aug index c3b03ef..10c8325 100644 --- a/lenses/aptsources.aug +++ b/lenses/aptsources.aug @@ -1,17 +1,32 @@ -(* Parsing /etc/apt/sources.list *) +(* +Module: Aptsources + Parsing /etc/apt/sources.list +*) module Aptsources = autoload xfm +(************************************************************************ + * Group: Utility variables/functions + ************************************************************************) + (* View: sep_ws *) let sep_ws = del /[ \t]+/ " " + (* View: eol *) let eol = Util.del_str "\n" + (* View: comment *) let comment = Util.comment + (* View: empty *) let empty = Util.empty + (* View: word *) let word = /[^# \n\t]+/ +(************************************************************************ + * Group: Keywords + ************************************************************************) + (* View: record *) let record = [ Util.indent . seq "source" . [ label "type" . store word ] . sep_ws . [ label "uri" . store word ] . sep_ws . [ label "distribution" . store word ] . @@ -19,8 +34,13 @@ module Aptsources = del /[ \t]*(#.*)?/ "" . eol ] +(************************************************************************ + * Group: Lens + ************************************************************************) + (* View: lns *) let lns = ( comment | empty | record ) * + (* View: filter *) let filter = (incl "/etc/apt/sources.list") . (incl "/etc/apt/sources.list.d/*") . Util.stdexcl diff --git a/lenses/authorized_keys.aug b/lenses/authorized_keys.aug new file mode 100644 index 0000000..97552c5 --- /dev/null +++ b/lenses/authorized_keys.aug @@ -0,0 +1,70 @@ +(* +Module: Authorized_Keys + Parses SSH authorized_keys + +Author: Raphael Pinson + +About: Reference + This lens tries to keep as close as possible to `man 5 authorized_keys` where possible. + +About: License + This file is licenced under the LGPL v2+, like the rest of Augeas. + +About: Lens Usage + To be documented + +About: Configuration files + This lens applies to SSH authorized_keys. See . + +About: Examples + The file contains various examples and tests. +*) + + +module Authorized_Keys = + +autoload xfm + +(* View: option + A key option *) +let option = + let kv_re = "command" | "environment" | "from" + | "permitopen" | "principals" | "tunnel" + in let flag_re = "cert-authority" | "no-agent-forwarding" + | "no-port-forwarding" | "no-pty" | "no-user-rc" + | "no-X11-forwarding" + in let option_value = Util.del_str "\"" . store /[^\n"]+/ . Util.del_str "\"" + in Build.key_value kv_re Sep.equal option_value + | Build.flag flag_re + +(* View: key_options + A list of key