From 8ea346fa30321d5a20a73f86d9d7c9d7a29025d2 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Mon, 25 Jan 2016 15:51:51 +0900 Subject: [PATCH] Imported Upstream version 1.4.0 Change-Id: I09444341afcfd4b048fab7a7a41c226a07c904cf Signed-off-by: DongHun Kwak --- .gitignore | 55 + .gitmodules | 3 + .travis.yml | 17 + AUTHORS | 6 + ChangeLog | 10485 -------- Makefile.in | 1775 -- Makefile.maint | 39 + NEWS | 79 +- README | 86 +- README.md | 85 + aclocal.m4 | 1416 -- augeas.spec | 181 - autogen.sh | 102 + bootstrap | 101 + build/ac-aux/compile | 347 - build/ac-aux/config.guess | 1420 -- build/ac-aux/config.rpath | 690 - build/ac-aux/config.sub | 1798 -- build/ac-aux/depcomp | 791 - build/ac-aux/gitlog-to-changelog | 407 - build/ac-aux/install-sh | 527 - build/ac-aux/ltmain.sh | 9655 ------- build/ac-aux/missing | 215 - build/ac-aux/snippet/_Noreturn.h | 10 - build/ac-aux/snippet/arg-nonnull.h | 26 - build/ac-aux/snippet/c++defs.h | 271 - build/ac-aux/snippet/unused-parameter.h | 36 - build/ac-aux/snippet/warn-on-use.h | 109 - build/ac-aux/test-driver | 127 - build/ac-aux/ylwrap | 249 - config.h.in | 1584 -- configure | 38914 ----------------------------- configure.ac | 6 +- doc/Makefile.in | 1523 -- doc/cutest-license.txt | 46 + doc/etc.txt | 262 + doc/examples.txt | 66 + doc/naturaldocs/Makefile.in | 1321 - doc/naturaldocs/conf/lenses/Menu.txt | 11 + examples/Makefile.in | 1466 -- examples/examples.sh | 21 + gnulib/lib/Makefile.am | 1941 -- gnulib/lib/Makefile.in | 2874 --- gnulib/lib/alloca.c | 478 - gnulib/lib/alloca.in.h | 63 - gnulib/lib/argz.c | 406 - gnulib/lib/argz.in.h | 160 - gnulib/lib/asnprintf.c | 34 - gnulib/lib/asprintf.c | 39 - gnulib/lib/btowc.c | 39 - gnulib/lib/canonicalize-lgpl.c | 387 - gnulib/lib/config.charset | 684 - gnulib/lib/ctype.in.h | 57 - gnulib/lib/dosname.h | 53 - gnulib/lib/errno.in.h | 274 - gnulib/lib/fcntl.in.h | 335 - gnulib/lib/float+.h | 147 - gnulib/lib/float.c | 33 - gnulib/lib/float.in.h | 188 - gnulib/lib/fnmatch.c | 350 - gnulib/lib/fnmatch.in.h | 67 - gnulib/lib/fnmatch_loop.c | 1219 - gnulib/lib/getdelim.c | 135 - gnulib/lib/getfilecon.c | 86 - gnulib/lib/getline.c | 27 - gnulib/lib/getopt.c | 1245 - gnulib/lib/getopt.in.h | 253 - gnulib/lib/getopt1.c | 170 - gnulib/lib/getopt_int.h | 135 - gnulib/lib/gettext.h | 288 - gnulib/lib/gettimeofday.c | 154 - gnulib/lib/isblank.c | 33 - gnulib/lib/itold.c | 28 - gnulib/lib/langinfo.in.h | 176 - gnulib/lib/localcharset.c | 546 - gnulib/lib/localcharset.h | 40 - gnulib/lib/locale.in.h | 201 - gnulib/lib/localeconv.c | 103 - gnulib/lib/lstat.c | 97 - gnulib/lib/malloc.c | 56 - gnulib/lib/malloca.c | 140 - gnulib/lib/malloca.h | 133 - gnulib/lib/malloca.valgrind | 7 - gnulib/lib/mbrtowc.c | 402 - gnulib/lib/mbsinit.c | 61 - gnulib/lib/mbsrtowcs-impl.h | 122 - gnulib/lib/mbsrtowcs-state.c | 37 - gnulib/lib/mbsrtowcs.c | 32 - gnulib/lib/mbtowc-impl.h | 44 - gnulib/lib/mbtowc.c | 26 - gnulib/lib/memchr.c | 172 - gnulib/lib/memchr.valgrind | 14 - gnulib/lib/mempcpy.c | 28 - gnulib/lib/mkstemp.c | 50 - gnulib/lib/nl_langinfo.c | 271 - gnulib/lib/pathmax.h | 83 - gnulib/lib/printf-args.c | 187 - gnulib/lib/printf-args.h | 158 - gnulib/lib/printf-parse.c | 638 - gnulib/lib/printf-parse.h | 193 - gnulib/lib/rawmemchr.c | 136 - gnulib/lib/rawmemchr.valgrind | 12 - gnulib/lib/readlink.c | 74 - gnulib/lib/realloc.c | 79 - gnulib/lib/ref-add.sin | 29 - gnulib/lib/ref-del.sin | 24 - gnulib/lib/regcomp.c | 3939 --- gnulib/lib/regex.c | 79 - gnulib/lib/regex.h | 666 - gnulib/lib/regex_internal.c | 1742 -- gnulib/lib/regex_internal.h | 869 - gnulib/lib/regexec.c | 4419 ---- gnulib/lib/safe-alloc.c | 121 - gnulib/lib/safe-alloc.h | 121 - gnulib/lib/se-context.in.h | 28 - gnulib/lib/se-selinux.in.h | 97 - gnulib/lib/size_max.h | 30 - gnulib/lib/stat.c | 138 - gnulib/lib/stdbool.in.h | 121 - gnulib/lib/stddef.in.h | 86 - gnulib/lib/stdint.in.h | 636 - gnulib/lib/stdio.in.h | 1339 - gnulib/lib/stdlib.in.h | 928 - gnulib/lib/stpcpy.c | 49 - gnulib/lib/stpncpy.c | 92 - gnulib/lib/str-two-way.h | 452 - gnulib/lib/strchrnul.c | 142 - gnulib/lib/strchrnul.valgrind | 12 - gnulib/lib/streq.h | 176 - gnulib/lib/string.in.h | 1029 - gnulib/lib/strndup.c | 36 - gnulib/lib/strnlen.c | 30 - gnulib/lib/strnlen1.c | 35 - gnulib/lib/strnlen1.h | 40 - gnulib/lib/strstr.c | 82 - gnulib/lib/sys_stat.in.h | 728 - gnulib/lib/sys_time.in.h | 205 - gnulib/lib/sys_types.in.h | 51 - gnulib/lib/sys_wait.in.h | 129 - gnulib/lib/tempname.c | 309 - gnulib/lib/tempname.h | 50 - gnulib/lib/time.in.h | 248 - gnulib/lib/unistd.in.h | 1535 -- gnulib/lib/vasnprintf.c | 5606 ----- gnulib/lib/vasnprintf.h | 79 - gnulib/lib/vasprintf.c | 50 - gnulib/lib/verify.h | 241 - gnulib/lib/wchar.in.h | 1028 - gnulib/lib/wcrtomb.c | 53 - gnulib/lib/wctype.in.h | 498 - gnulib/lib/xsize.h | 107 - gnulib/m4/00gnulib.m4 | 30 - gnulib/m4/alloca.m4 | 121 - gnulib/m4/argz.m4 | 80 - gnulib/m4/btowc.m4 | 116 - gnulib/m4/canonicalize.m4 | 124 - gnulib/m4/close.m4 | 33 - gnulib/m4/codeset.m4 | 23 - gnulib/m4/configmake.m4 | 50 - gnulib/m4/ctype.m4 | 32 - gnulib/m4/double-slash-root.m4 | 38 - gnulib/m4/dup2.m4 | 81 - gnulib/m4/eealloc.m4 | 32 - gnulib/m4/environ.m4 | 47 - gnulib/m4/errno_h.m4 | 134 - gnulib/m4/exponentd.m4 | 116 - gnulib/m4/extensions.m4 | 123 - gnulib/m4/fcntl-o.m4 | 123 - gnulib/m4/fcntl_h.m4 | 50 - gnulib/m4/fdopen.m4 | 47 - gnulib/m4/float_h.m4 | 98 - gnulib/m4/fnmatch.m4 | 156 - gnulib/m4/fpieee.m4 | 54 - gnulib/m4/fstat.m4 | 39 - gnulib/m4/getcwd.m4 | 155 - gnulib/m4/getdelim.m4 | 88 - gnulib/m4/getline.m4 | 96 - gnulib/m4/getopt.m4 | 368 - gnulib/m4/getpagesize.m4 | 32 - gnulib/m4/gettimeofday.m4 | 140 - gnulib/m4/glibc21.m4 | 34 - gnulib/m4/gnulib-common.m4 | 373 - gnulib/m4/gnulib-comp.m4 | 1204 - gnulib/m4/include_next.m4 | 270 - gnulib/m4/intlmacosx.m4 | 56 - gnulib/m4/intmax_t.m4 | 67 - gnulib/m4/inttypes-pri.m4 | 42 - gnulib/m4/inttypes.m4 | 157 - gnulib/m4/inttypes_h.m4 | 29 - gnulib/m4/isblank.m4 | 17 - gnulib/m4/langinfo_h.m4 | 105 - gnulib/m4/largefile.m4 | 149 - gnulib/m4/lcmessage.m4 | 35 - gnulib/m4/lib-ld.m4 | 109 - gnulib/m4/lib-link.m4 | 777 - gnulib/m4/lib-prefix.m4 | 224 - gnulib/m4/libtool.m4 | 7992 ------ gnulib/m4/localcharset.m4 | 17 - gnulib/m4/locale-fr.m4 | 250 - gnulib/m4/locale-ja.m4 | 136 - gnulib/m4/locale-tr.m4 | 127 - gnulib/m4/locale-zh.m4 | 130 - gnulib/m4/locale_h.m4 | 122 - gnulib/m4/localeconv.m4 | 22 - gnulib/m4/localename.m4 | 12 - gnulib/m4/lock.m4 | 41 - gnulib/m4/longlong.m4 | 113 - gnulib/m4/lstat.m4 | 77 - gnulib/m4/ltoptions.m4 | 384 - gnulib/m4/ltsugar.m4 | 123 - gnulib/m4/ltversion.m4 | 23 - gnulib/m4/lt~obsolete.m4 | 98 - gnulib/m4/malloc.m4 | 98 - gnulib/m4/malloca.m4 | 15 - gnulib/m4/mbrtowc.m4 | 572 - gnulib/m4/mbsinit.m4 | 51 - gnulib/m4/mbsrtowcs.m4 | 155 - gnulib/m4/mbstate_t.m4 | 41 - gnulib/m4/mbtowc.m4 | 19 - gnulib/m4/memchr.m4 | 88 - gnulib/m4/mempcpy.m4 | 26 - gnulib/m4/mkstemp.m4 | 82 - gnulib/m4/mmap-anon.m4 | 55 - gnulib/m4/mode_t.m4 | 26 - gnulib/m4/msvc-inval.m4 | 19 - gnulib/m4/msvc-nothrow.m4 | 10 - gnulib/m4/multiarch.m4 | 62 - gnulib/m4/nl_langinfo.m4 | 50 - gnulib/m4/nocrash.m4 | 130 - gnulib/m4/off_t.m4 | 18 - gnulib/m4/onceonly.m4 | 104 - gnulib/m4/open.m4 | 92 - gnulib/m4/pathmax.m4 | 42 - gnulib/m4/printf.m4 | 1570 -- gnulib/m4/putenv.m4 | 50 - gnulib/m4/rawmemchr.m4 | 20 - gnulib/m4/readlink.m4 | 71 - gnulib/m4/realloc.m4 | 76 - gnulib/m4/regex.m4 | 226 - gnulib/m4/safe-alloc.m4 | 10 - gnulib/m4/selinux-context-h.m4 | 22 - gnulib/m4/selinux-selinux-h.m4 | 69 - gnulib/m4/setenv.m4 | 160 - gnulib/m4/setlocale.m4 | 29 - gnulib/m4/size_max.m4 | 79 - gnulib/m4/ssize_t.m4 | 23 - gnulib/m4/stat.m4 | 75 - gnulib/m4/stdbool.m4 | 100 - gnulib/m4/stddef_h.m4 | 47 - gnulib/m4/stdint.m4 | 484 - gnulib/m4/stdint_h.m4 | 27 - gnulib/m4/stdio_h.m4 | 195 - gnulib/m4/stdlib_h.m4 | 114 - gnulib/m4/stpcpy.m4 | 25 - gnulib/m4/stpncpy.m4 | 97 - gnulib/m4/strchrnul.m4 | 50 - gnulib/m4/string_h.m4 | 120 - gnulib/m4/strndup.m4 | 55 - gnulib/m4/strnlen.m4 | 30 - gnulib/m4/strstr.m4 | 130 - gnulib/m4/symlink.m4 | 53 - gnulib/m4/sys_socket_h.m4 | 177 - gnulib/m4/sys_stat_h.m4 | 99 - gnulib/m4/sys_time_h.m4 | 110 - gnulib/m4/sys_types_h.m4 | 24 - gnulib/m4/sys_wait_h.m4 | 36 - gnulib/m4/tempname.m4 | 19 - gnulib/m4/thread.m4 | 18 - gnulib/m4/threadlib.m4 | 371 - gnulib/m4/time_h.m4 | 109 - gnulib/m4/unistd_h.m4 | 187 - gnulib/m4/vasnprintf.m4 | 292 - gnulib/m4/vasprintf.m4 | 46 - gnulib/m4/warn-on-use.m4 | 47 - gnulib/m4/wchar_h.m4 | 225 - gnulib/m4/wchar_t.m4 | 24 - gnulib/m4/wcrtomb.m4 | 112 - gnulib/m4/wctob.m4 | 127 - gnulib/m4/wctomb.m4 | 19 - gnulib/m4/wctype_h.m4 | 211 - gnulib/m4/wint_t.m4 | 32 - gnulib/m4/xsize.m4 | 13 - gnulib/m4/yield.m4 | 19 - gnulib/tests/Makefile.am | 1115 - gnulib/tests/Makefile.in | 3790 --- gnulib/tests/binary-io.h | 65 - gnulib/tests/c-ctype.c | 395 - gnulib/tests/c-ctype.h | 294 - gnulib/tests/c-strcase.h | 56 - gnulib/tests/c-strcasecmp.c | 56 - gnulib/tests/c-strncasecmp.c | 56 - gnulib/tests/close.c | 69 - gnulib/tests/dup2.c | 157 - 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 | 39 - gnulib/tests/glthread/lock.c | 1057 - gnulib/tests/glthread/lock.h | 927 - gnulib/tests/glthread/thread.c | 231 - gnulib/tests/glthread/thread.h | 400 - gnulib/tests/glthread/threadlib.c | 73 - gnulib/tests/glthread/yield.h | 121 - gnulib/tests/ignore-value.h | 47 - gnulib/tests/init.sh | 589 - gnulib/tests/intprops.h | 319 - gnulib/tests/inttypes.in.h | 1130 - gnulib/tests/localename.c | 2957 --- gnulib/tests/localename.h | 95 - gnulib/tests/macros.h | 73 - 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 | 181 - gnulib/tests/putenv.c | 134 - gnulib/tests/same-inode.h | 33 - gnulib/tests/setenv.c | 390 - gnulib/tests/setlocale.c | 938 - gnulib/tests/signature.h | 48 - gnulib/tests/symlink.c | 57 - gnulib/tests/test-alloca-opt.c | 62 - gnulib/tests/test-binary-io.c | 69 - gnulib/tests/test-binary-io.sh | 14 - gnulib/tests/test-btowc.c | 63 - gnulib/tests/test-btowc1.sh | 15 - gnulib/tests/test-btowc2.sh | 15 - gnulib/tests/test-c-ctype.c | 386 - gnulib/tests/test-c-strcase.sh | 21 - gnulib/tests/test-c-strcasecmp.c | 65 - gnulib/tests/test-c-strncasecmp.c | 79 - gnulib/tests/test-canonicalize-lgpl.c | 222 - gnulib/tests/test-close.c | 44 - gnulib/tests/test-ctype.c | 27 - gnulib/tests/test-dup2.c | 203 - gnulib/tests/test-environ.c | 44 - gnulib/tests/test-errno.c | 119 - gnulib/tests/test-fcntl-h.c | 121 - gnulib/tests/test-fdopen.c | 54 - gnulib/tests/test-fgetc.c | 95 - gnulib/tests/test-float.c | 384 - gnulib/tests/test-fnmatch.c | 56 - 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 | 94 - gnulib/tests/test-getline.c | 94 - gnulib/tests/test-getopt.c | 99 - gnulib/tests/test-getopt.h | 1391 -- gnulib/tests/test-getopt_long.h | 2144 -- gnulib/tests/test-gettimeofday.c | 47 - gnulib/tests/test-ignore-value.c | 84 - gnulib/tests/test-init.sh | 73 - gnulib/tests/test-intprops.c | 275 - gnulib/tests/test-inttypes.c | 118 - gnulib/tests/test-isblank.c | 50 - gnulib/tests/test-langinfo.c | 92 - gnulib/tests/test-locale.c | 79 - gnulib/tests/test-localeconv.c | 72 - gnulib/tests/test-localename.c | 747 - gnulib/tests/test-lock.c | 601 - gnulib/tests/test-lstat.c | 60 - gnulib/tests/test-lstat.h | 116 - gnulib/tests/test-malloc-gnu.c | 29 - gnulib/tests/test-malloca.c | 62 - gnulib/tests/test-mbrtowc-w32-1.sh | 4 - gnulib/tests/test-mbrtowc-w32-2.sh | 4 - gnulib/tests/test-mbrtowc-w32-3.sh | 4 - gnulib/tests/test-mbrtowc-w32-4.sh | 4 - gnulib/tests/test-mbrtowc-w32-5.sh | 4 - gnulib/tests/test-mbrtowc-w32.c | 735 - gnulib/tests/test-mbrtowc.c | 343 - gnulib/tests/test-mbrtowc1.sh | 15 - gnulib/tests/test-mbrtowc2.sh | 15 - gnulib/tests/test-mbrtowc3.sh | 15 - gnulib/tests/test-mbrtowc4.sh | 15 - gnulib/tests/test-mbsinit.c | 55 - gnulib/tests/test-mbsinit.sh | 15 - gnulib/tests/test-mbsrtowcs.c | 293 - gnulib/tests/test-mbsrtowcs1.sh | 15 - gnulib/tests/test-mbsrtowcs2.sh | 15 - gnulib/tests/test-mbsrtowcs3.sh | 15 - gnulib/tests/test-mbsrtowcs4.sh | 15 - gnulib/tests/test-memchr.c | 132 - gnulib/tests/test-nl_langinfo.c | 126 - gnulib/tests/test-nl_langinfo.sh | 17 - gnulib/tests/test-open.c | 41 - gnulib/tests/test-open.h | 93 - gnulib/tests/test-pathmax.c | 32 - gnulib/tests/test-rawmemchr.c | 92 - gnulib/tests/test-readlink.c | 48 - gnulib/tests/test-readlink.h | 119 - gnulib/tests/test-safe-alloc.c | 54 - gnulib/tests/test-setenv.c | 56 - gnulib/tests/test-setlocale1.c | 59 - gnulib/tests/test-setlocale1.sh | 34 - gnulib/tests/test-setlocale2.c | 55 - gnulib/tests/test-setlocale2.sh | 17 - gnulib/tests/test-stat.c | 55 - gnulib/tests/test-stat.h | 100 - gnulib/tests/test-stdbool.c | 118 - gnulib/tests/test-stddef.c | 52 - gnulib/tests/test-stdint.c | 359 - gnulib/tests/test-stdio.c | 43 - gnulib/tests/test-stdlib.c | 54 - gnulib/tests/test-strchrnul.c | 86 - gnulib/tests/test-string.c | 33 - gnulib/tests/test-strnlen.c | 68 - gnulib/tests/test-strstr.c | 277 - gnulib/tests/test-symlink.c | 47 - gnulib/tests/test-symlink.h | 95 - gnulib/tests/test-sys_stat.c | 325 - gnulib/tests/test-sys_time.c | 33 - gnulib/tests/test-sys_types.c | 34 - gnulib/tests/test-sys_wait.c | 47 - gnulib/tests/test-sys_wait.h | 53 - gnulib/tests/test-thread_create.c | 78 - gnulib/tests/test-thread_self.c | 34 - gnulib/tests/test-time.c | 41 - gnulib/tests/test-unistd.c | 56 - gnulib/tests/test-unsetenv.c | 61 - gnulib/tests/test-vasnprintf.c | 94 - gnulib/tests/test-vasprintf.c | 103 - gnulib/tests/test-verify.c | 69 - gnulib/tests/test-verify.sh | 24 - gnulib/tests/test-wchar.c | 37 - gnulib/tests/test-wcrtomb-w32-1.sh | 4 - gnulib/tests/test-wcrtomb-w32-2.sh | 4 - gnulib/tests/test-wcrtomb-w32-3.sh | 4 - gnulib/tests/test-wcrtomb-w32-4.sh | 4 - gnulib/tests/test-wcrtomb-w32-5.sh | 4 - gnulib/tests/test-wcrtomb-w32.c | 332 - gnulib/tests/test-wcrtomb.c | 162 - gnulib/tests/test-wcrtomb.sh | 35 - gnulib/tests/test-wctype-h.c | 74 - gnulib/tests/unsetenv.c | 127 - gnulib/tests/wctob.c | 38 - gnulib/tests/wctomb-impl.h | 34 - gnulib/tests/wctomb.c | 25 - gnulib/tests/zerosize-ptr.h | 68 - lenses/afs_cellalias.aug | 60 + lenses/authorized_keys.aug | 4 +- lenses/build.aug | 20 +- lenses/chrony.aug | 2 +- lenses/clamav.aug | 52 + lenses/dns_zone.aug | 113 + lenses/dnsmasq.aug | 34 +- lenses/dovecot.aug | 16 +- lenses/erlang.aug | 31 +- lenses/exports.aug | 4 +- lenses/grub.aug | 6 +- lenses/hosts.aug | 20 +- lenses/httpd.aug | 10 +- lenses/iscsid.aug | 28 + lenses/jaas.aug | 26 +- lenses/known_hosts.aug | 15 +- lenses/krb5.aug | 5 +- lenses/limits.aug | 3 +- lenses/logrotate.aug | 66 +- lenses/mailscanner.aug | 65 + lenses/mailscanner_rules.aug | 75 + lenses/mcollective.aug | 2 + lenses/nagioscfg.aug | 2 +- lenses/nginx.aug | 73 +- lenses/pagekite.aug | 15 +- lenses/passwd.aug | 40 +- lenses/pgbouncer.aug | 55 + lenses/postfix_sasl_smtpd.aug | 22 + lenses/postgresql.aug | 4 +- lenses/puppetfile.aug | 52 + lenses/pylonspaste.aug | 78 + lenses/pythonpaste.aug | 4 +- lenses/shadow.aug | 35 +- lenses/shellvars.aug | 12 +- lenses/shellvars_list.aug | 10 +- lenses/ssh.aug | 2 +- lenses/sudoers.aug | 2 +- lenses/sysconfig.aug | 6 +- lenses/sysctl.aug | 3 +- lenses/tests/test_afs_cellalias.aug | 42 + lenses/tests/test_authorized_keys.aug | 11 + lenses/tests/test_chrony.aug | 3 +- lenses/tests/test_clamav.aug | 299 + lenses/tests/test_dns_zone.aug | 384 + lenses/tests/test_dnsmasq.aug | 47 + lenses/tests/test_erlang.aug | 33 +- lenses/tests/test_exports.aug | 6 +- lenses/tests/test_grub.aug | 17 + lenses/tests/test_httpd.aug | 62 + lenses/tests/test_iscsid.aug | 69 + lenses/tests/test_jaas.aug | 36 +- lenses/tests/test_known_hosts.aug | 4 +- lenses/tests/test_krb5.aug | 18 + lenses/tests/test_limits.aug | 7 + lenses/tests/test_logrotate.aug | 19 + lenses/tests/test_mailscanner.aug | 745 + lenses/tests/test_mailscanner_rules.aug | 59 + lenses/tests/test_nginx.aug | 200 +- lenses/tests/test_pagekite.aug | 18 +- lenses/tests/test_passwd.aug | 45 + lenses/tests/test_pgbouncer.aug | 55 + lenses/tests/test_postfix_sasl_smtpd.aug | 19 + lenses/tests/test_puppetfile.aug | 58 + lenses/tests/test_pylonspaste.aug | 75 + lenses/tests/test_pythonpaste.aug | 17 + lenses/tests/test_shadow.aug | 36 + lenses/tests/test_shellvars.aug | 49 +- lenses/tests/test_shellvars_list.aug | 11 + lenses/tests/test_sudoers.aug | 11 + lenses/tests/test_sysconfig.aug | 9 + lenses/xinetd.aug | 2 +- man/Makefile.in | 1352 - man/augparse.1 | 211 - src/Makefile.in | 1749 -- src/augeas.c | 16 +- src/augeas.h | 17 + src/augeas_sym.version | 5 + src/augrun.c | 115 +- src/augtool.c | 35 +- src/builtin.c | 18 +- src/fa.c | 40 +- src/get.c | 91 +- src/internal.c | 12 + src/internal.h | 10 + src/lens.c | 98 +- src/lens.h | 2 + src/lexer.c | 2362 -- src/parser.c | 2694 -- src/parser.h | 146 - src/parser.y | 4 +- src/pathx.c | 39 +- src/syntax.c | 19 +- src/syntax.h | 2 +- src/transform.c | 76 +- src/try | 2 +- tests/Makefile.am | 10 + tests/Makefile.in | 3685 --- tests/lens-access.sh | 16 - tests/lens-activemq_conf.sh | 16 - tests/lens-activemq_xml.sh | 16 - tests/lens-aliases.sh | 16 - tests/lens-anacron.sh | 16 - tests/lens-approx.sh | 16 - tests/lens-apt_update_manager.sh | 16 - tests/lens-aptcacherngsecurity.sh | 16 - tests/lens-aptconf.sh | 16 - tests/lens-aptpreferences.sh | 16 - tests/lens-aptsource.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-backuppchosts.sh | 16 - tests/lens-bbhosts.sh | 16 - tests/lens-bootconf.sh | 16 - tests/lens-build.sh | 16 - tests/lens-cachefilesd.sh | 16 - tests/lens-carbon.sh | 16 - tests/lens-cgconfig.sh | 16 - tests/lens-cgrules.sh | 16 - tests/lens-channels.sh | 16 - tests/lens-chrony.sh | 16 - tests/lens-cobblermodules.sh | 16 - tests/lens-cobblersettings.sh | 16 - tests/lens-collectd.sh | 16 - tests/lens-cpanel.sh | 16 - tests/lens-cron.sh | 16 - tests/lens-crypttab.sh | 16 - tests/lens-cups.sh | 16 - tests/lens-cyrus_imapd.sh | 16 - tests/lens-darkice.sh | 16 - tests/lens-debctrl.sh | 16 - tests/lens-desktop.sh | 16 - tests/lens-device_map.sh | 16 - tests/lens-dhclient.sh | 16 - tests/lens-dhcpd.sh | 16 - tests/lens-dnsmasq.sh | 16 - tests/lens-dovecot.sh | 16 - tests/lens-dpkg.sh | 16 - tests/lens-dput.sh | 16 - tests/lens-erlang.sh | 16 - tests/lens-ethers.sh | 16 - tests/lens-exports.sh | 16 - tests/lens-fai_diskconfig.sh | 16 - tests/lens-fonts.sh | 16 - tests/lens-fstab.sh | 16 - tests/lens-fuse.sh | 16 - tests/lens-gdm.sh | 16 - tests/lens-group.sh | 16 - tests/lens-grub.sh | 16 - tests/lens-gshadow.sh | 16 - tests/lens-gtkbookmarks.sh | 16 - tests/lens-host_conf.sh | 16 - tests/lens-hostname.sh | 16 - tests/lens-hosts.sh | 16 - tests/lens-hosts_access.sh | 16 - tests/lens-htpasswd.sh | 16 - tests/lens-httpd.sh | 16 - tests/lens-inetd.sh | 16 - tests/lens-inifile.sh | 16 - tests/lens-inittab.sh | 16 - tests/lens-inputrc.sh | 16 - tests/lens-interfaces.sh | 16 - tests/lens-iproute2.sh | 16 - tests/lens-iptables.sh | 16 - tests/lens-jaas.sh | 16 - tests/lens-jettyrealm.sh | 16 - tests/lens-jmxaccess.sh | 16 - tests/lens-jmxpassword.sh | 16 - tests/lens-json.sh | 16 - tests/lens-kdump.sh | 16 - tests/lens-keepalived.sh | 16 - tests/lens-known_hosts.sh | 16 - tests/lens-koji.sh | 16 - tests/lens-krb5.sh | 16 - tests/lens-ldap.sh | 16 - tests/lens-ldif.sh | 16 - tests/lens-ldso.sh | 16 - tests/lens-lightdm.sh | 16 - tests/lens-limits.sh | 16 - tests/lens-login_defs.sh | 16 - tests/lens-logrotate.sh | 16 - tests/lens-logwatch.sh | 16 - tests/lens-lokkit.sh | 16 - tests/lens-lvm.sh | 16 - tests/lens-mcollective.sh | 16 - tests/lens-mdadm_conf.sh | 16 - tests/lens-memcached.sh | 16 - tests/lens-mke2fs.sh | 16 - tests/lens-modprobe.sh | 16 - tests/lens-modules.sh | 16 - tests/lens-modules_conf.sh | 16 - tests/lens-mongodbserver.sh | 16 - tests/lens-monit.sh | 16 - tests/lens-multipath.sh | 16 - tests/lens-mysql.sh | 16 - tests/lens-nagioscfg.sh | 16 - tests/lens-nagiosobjects.sh | 16 - tests/lens-netmasks.sh | 16 - tests/lens-networkmanager.sh | 16 - tests/lens-networks.sh | 16 - tests/lens-nginx.sh | 16 - tests/lens-nrpe.sh | 16 - tests/lens-nsswitch.sh | 16 - tests/lens-ntp.sh | 16 - tests/lens-ntpd.sh | 16 - tests/lens-odbc.sh | 16 - tests/lens-openshift_config.sh | 16 - tests/lens-openshift_http.sh | 16 - tests/lens-openshift_quickstarts.sh | 16 - tests/lens-openvpn.sh | 16 - tests/lens-pagekite.sh | 16 - tests/lens-pam.sh | 16 - tests/lens-pamconf.sh | 16 - tests/lens-passwd.sh | 16 - tests/lens-pbuilder.sh | 16 - tests/lens-pg_hba.sh | 16 - tests/lens-php.sh | 16 - tests/lens-phpvars.sh | 16 - tests/lens-postfix_access.sh | 16 - tests/lens-postfix_main.sh | 16 - tests/lens-postfix_master.sh | 16 - tests/lens-postfix_transport.sh | 16 - tests/lens-postfix_virtual.sh | 16 - tests/lens-postgresql.sh | 16 - tests/lens-properties.sh | 16 - tests/lens-protocols.sh | 16 - tests/lens-puppet.sh | 16 - tests/lens-puppet_auth.sh | 16 - tests/lens-puppetfileserver.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-reprepro_uploaders.sh | 16 - tests/lens-resolv.sh | 16 - tests/lens-rmt.sh | 16 - tests/lens-rsyncd.sh | 16 - tests/lens-rsyslog.sh | 16 - tests/lens-rx.sh | 16 - tests/lens-samba.sh | 16 - tests/lens-schroot.sh | 16 - tests/lens-securetty.sh | 16 - tests/lens-services.sh | 16 - tests/lens-shadow.sh | 16 - tests/lens-shells.sh | 16 - tests/lens-shellvars.sh | 16 - tests/lens-shellvars_list.sh | 16 - tests/lens-simplelines.sh | 16 - tests/lens-simplevars.sh | 16 - tests/lens-sip_conf.sh | 16 - tests/lens-slapd.sh | 16 - tests/lens-smbusers.sh | 16 - tests/lens-solaris_system.sh | 16 - tests/lens-soma.sh | 16 - tests/lens-spacevars.sh | 16 - tests/lens-splunk.sh | 16 - tests/lens-squid.sh | 16 - tests/lens-ssh.sh | 16 - tests/lens-sshd.sh | 16 - tests/lens-sssd.sh | 16 - tests/lens-stunnel.sh | 16 - tests/lens-subversion.sh | 16 - tests/lens-sudoers.sh | 16 - tests/lens-sysconfig.sh | 16 - tests/lens-sysconfig_route.sh | 16 - tests/lens-sysctl.sh | 16 - tests/lens-syslog.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-util.sh | 16 - tests/lens-vfstab.sh | 16 - tests/lens-vmware_config.sh | 16 - tests/lens-vsftpd.sh | 16 - tests/lens-webmin.sh | 16 - tests/lens-wine.sh | 16 - tests/lens-xendconfsxp.sh | 16 - tests/lens-xinetd.sh | 16 - tests/lens-xml.sh | 16 - tests/lens-xorg.sh | 16 - tests/lens-xymon.sh | 16 - tests/lens-xymon_alerting.sh | 16 - tests/lens-yum.sh | 16 - tests/modules/README | 4 + tests/root/boot/grub/menu.lst | 32 +- tests/root/etc/grub.conf | 32 +- tests/root/etc/httpd/conf.d/ssl.conf | 222 + tests/root/etc/nginx/nginx.conf | 117 + tests/root/lvm.conf~ | 59 - tests/run.tests | 4 +- tests/test-api.c | 18 + tests/test-put-symlink-augsave.sh | 4 +- tests/test-save.c | 82 + tests/test-valgrind.sh | 20 + tests/xpath.tests | 22 +- 744 files changed, 5238 insertions(+), 192139 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 .travis.yml delete mode 100644 ChangeLog delete mode 100644 Makefile.in create mode 100644 Makefile.maint mode change 100644 => 120000 README create mode 100644 README.md delete mode 100644 aclocal.m4 delete mode 100644 augeas.spec create mode 100755 autogen.sh create mode 100755 bootstrap delete mode 100755 build/ac-aux/compile delete mode 100755 build/ac-aux/config.guess delete mode 100755 build/ac-aux/config.rpath delete mode 100755 build/ac-aux/config.sub delete mode 100755 build/ac-aux/depcomp delete mode 100755 build/ac-aux/gitlog-to-changelog delete mode 100755 build/ac-aux/install-sh delete mode 100644 build/ac-aux/ltmain.sh delete mode 100755 build/ac-aux/missing delete mode 100644 build/ac-aux/snippet/_Noreturn.h delete mode 100644 build/ac-aux/snippet/arg-nonnull.h delete mode 100644 build/ac-aux/snippet/c++defs.h delete mode 100644 build/ac-aux/snippet/unused-parameter.h delete mode 100644 build/ac-aux/snippet/warn-on-use.h delete mode 100755 build/ac-aux/test-driver delete mode 100755 build/ac-aux/ylwrap delete mode 100644 config.h.in delete mode 100755 configure delete mode 100644 doc/Makefile.in create mode 100644 doc/cutest-license.txt create mode 100644 doc/etc.txt create mode 100644 doc/examples.txt delete mode 100644 doc/naturaldocs/Makefile.in delete mode 100644 examples/Makefile.in create mode 100755 examples/examples.sh delete mode 100644 gnulib/lib/Makefile.am delete mode 100644 gnulib/lib/Makefile.in delete mode 100644 gnulib/lib/alloca.c delete mode 100644 gnulib/lib/alloca.in.h delete mode 100644 gnulib/lib/argz.c delete mode 100644 gnulib/lib/argz.in.h delete mode 100644 gnulib/lib/asnprintf.c delete mode 100644 gnulib/lib/asprintf.c delete mode 100644 gnulib/lib/btowc.c delete mode 100644 gnulib/lib/canonicalize-lgpl.c delete mode 100644 gnulib/lib/config.charset delete mode 100644 gnulib/lib/ctype.in.h delete mode 100644 gnulib/lib/dosname.h delete mode 100644 gnulib/lib/errno.in.h delete mode 100644 gnulib/lib/fcntl.in.h delete mode 100644 gnulib/lib/float+.h delete mode 100644 gnulib/lib/float.c delete mode 100644 gnulib/lib/float.in.h delete mode 100644 gnulib/lib/fnmatch.c delete mode 100644 gnulib/lib/fnmatch.in.h delete mode 100644 gnulib/lib/fnmatch_loop.c delete mode 100644 gnulib/lib/getdelim.c delete mode 100644 gnulib/lib/getfilecon.c delete mode 100644 gnulib/lib/getline.c delete mode 100644 gnulib/lib/getopt.c delete mode 100644 gnulib/lib/getopt.in.h delete mode 100644 gnulib/lib/getopt1.c delete mode 100644 gnulib/lib/getopt_int.h delete mode 100644 gnulib/lib/gettext.h delete mode 100644 gnulib/lib/gettimeofday.c delete mode 100644 gnulib/lib/isblank.c delete mode 100644 gnulib/lib/itold.c delete mode 100644 gnulib/lib/langinfo.in.h delete mode 100644 gnulib/lib/localcharset.c delete mode 100644 gnulib/lib/localcharset.h delete mode 100644 gnulib/lib/locale.in.h delete mode 100644 gnulib/lib/localeconv.c delete mode 100644 gnulib/lib/lstat.c delete mode 100644 gnulib/lib/malloc.c delete mode 100644 gnulib/lib/malloca.c delete mode 100644 gnulib/lib/malloca.h delete mode 100644 gnulib/lib/malloca.valgrind delete mode 100644 gnulib/lib/mbrtowc.c delete mode 100644 gnulib/lib/mbsinit.c delete mode 100644 gnulib/lib/mbsrtowcs-impl.h delete mode 100644 gnulib/lib/mbsrtowcs-state.c delete mode 100644 gnulib/lib/mbsrtowcs.c delete mode 100644 gnulib/lib/mbtowc-impl.h delete mode 100644 gnulib/lib/mbtowc.c delete mode 100644 gnulib/lib/memchr.c delete mode 100644 gnulib/lib/memchr.valgrind delete mode 100644 gnulib/lib/mempcpy.c delete mode 100644 gnulib/lib/mkstemp.c delete mode 100644 gnulib/lib/nl_langinfo.c delete mode 100644 gnulib/lib/pathmax.h delete mode 100644 gnulib/lib/printf-args.c delete mode 100644 gnulib/lib/printf-args.h delete mode 100644 gnulib/lib/printf-parse.c delete mode 100644 gnulib/lib/printf-parse.h delete mode 100644 gnulib/lib/rawmemchr.c delete mode 100644 gnulib/lib/rawmemchr.valgrind delete mode 100644 gnulib/lib/readlink.c delete mode 100644 gnulib/lib/realloc.c delete mode 100644 gnulib/lib/ref-add.sin delete mode 100644 gnulib/lib/ref-del.sin delete mode 100644 gnulib/lib/regcomp.c delete mode 100644 gnulib/lib/regex.c delete mode 100644 gnulib/lib/regex.h delete mode 100644 gnulib/lib/regex_internal.c delete mode 100644 gnulib/lib/regex_internal.h delete mode 100644 gnulib/lib/regexec.c delete mode 100644 gnulib/lib/safe-alloc.c delete mode 100644 gnulib/lib/safe-alloc.h delete mode 100644 gnulib/lib/se-context.in.h delete mode 100644 gnulib/lib/se-selinux.in.h delete mode 100644 gnulib/lib/size_max.h delete mode 100644 gnulib/lib/stat.c delete mode 100644 gnulib/lib/stdbool.in.h delete mode 100644 gnulib/lib/stddef.in.h delete mode 100644 gnulib/lib/stdint.in.h delete mode 100644 gnulib/lib/stdio.in.h delete mode 100644 gnulib/lib/stdlib.in.h delete mode 100644 gnulib/lib/stpcpy.c delete mode 100644 gnulib/lib/stpncpy.c delete mode 100644 gnulib/lib/str-two-way.h delete mode 100644 gnulib/lib/strchrnul.c delete mode 100644 gnulib/lib/strchrnul.valgrind delete mode 100644 gnulib/lib/streq.h delete mode 100644 gnulib/lib/string.in.h delete mode 100644 gnulib/lib/strndup.c delete mode 100644 gnulib/lib/strnlen.c delete mode 100644 gnulib/lib/strnlen1.c delete mode 100644 gnulib/lib/strnlen1.h delete mode 100644 gnulib/lib/strstr.c delete mode 100644 gnulib/lib/sys_stat.in.h delete mode 100644 gnulib/lib/sys_time.in.h delete mode 100644 gnulib/lib/sys_types.in.h delete mode 100644 gnulib/lib/sys_wait.in.h delete mode 100644 gnulib/lib/tempname.c delete mode 100644 gnulib/lib/tempname.h delete mode 100644 gnulib/lib/time.in.h delete mode 100644 gnulib/lib/unistd.in.h delete mode 100644 gnulib/lib/vasnprintf.c delete mode 100644 gnulib/lib/vasnprintf.h delete mode 100644 gnulib/lib/vasprintf.c delete mode 100644 gnulib/lib/verify.h delete mode 100644 gnulib/lib/wchar.in.h delete mode 100644 gnulib/lib/wcrtomb.c delete mode 100644 gnulib/lib/wctype.in.h delete mode 100644 gnulib/lib/xsize.h delete mode 100644 gnulib/m4/00gnulib.m4 delete mode 100644 gnulib/m4/alloca.m4 delete mode 100644 gnulib/m4/argz.m4 delete mode 100644 gnulib/m4/btowc.m4 delete mode 100644 gnulib/m4/canonicalize.m4 delete mode 100644 gnulib/m4/close.m4 delete mode 100644 gnulib/m4/codeset.m4 delete mode 100644 gnulib/m4/configmake.m4 delete mode 100644 gnulib/m4/ctype.m4 delete mode 100644 gnulib/m4/double-slash-root.m4 delete mode 100644 gnulib/m4/dup2.m4 delete mode 100644 gnulib/m4/eealloc.m4 delete mode 100644 gnulib/m4/environ.m4 delete mode 100644 gnulib/m4/errno_h.m4 delete mode 100644 gnulib/m4/exponentd.m4 delete mode 100644 gnulib/m4/extensions.m4 delete mode 100644 gnulib/m4/fcntl-o.m4 delete mode 100644 gnulib/m4/fcntl_h.m4 delete mode 100644 gnulib/m4/fdopen.m4 delete mode 100644 gnulib/m4/float_h.m4 delete mode 100644 gnulib/m4/fnmatch.m4 delete mode 100644 gnulib/m4/fpieee.m4 delete mode 100644 gnulib/m4/fstat.m4 delete mode 100644 gnulib/m4/getcwd.m4 delete mode 100644 gnulib/m4/getdelim.m4 delete mode 100644 gnulib/m4/getline.m4 delete mode 100644 gnulib/m4/getopt.m4 delete mode 100644 gnulib/m4/getpagesize.m4 delete mode 100644 gnulib/m4/gettimeofday.m4 delete mode 100644 gnulib/m4/glibc21.m4 delete mode 100644 gnulib/m4/gnulib-common.m4 delete mode 100644 gnulib/m4/gnulib-comp.m4 delete mode 100644 gnulib/m4/include_next.m4 delete mode 100644 gnulib/m4/intlmacosx.m4 delete mode 100644 gnulib/m4/intmax_t.m4 delete mode 100644 gnulib/m4/inttypes-pri.m4 delete mode 100644 gnulib/m4/inttypes.m4 delete mode 100644 gnulib/m4/inttypes_h.m4 delete mode 100644 gnulib/m4/isblank.m4 delete mode 100644 gnulib/m4/langinfo_h.m4 delete mode 100644 gnulib/m4/largefile.m4 delete mode 100644 gnulib/m4/lcmessage.m4 delete mode 100644 gnulib/m4/lib-ld.m4 delete mode 100644 gnulib/m4/lib-link.m4 delete mode 100644 gnulib/m4/lib-prefix.m4 delete mode 100644 gnulib/m4/libtool.m4 delete mode 100644 gnulib/m4/localcharset.m4 delete mode 100644 gnulib/m4/locale-fr.m4 delete mode 100644 gnulib/m4/locale-ja.m4 delete mode 100644 gnulib/m4/locale-tr.m4 delete mode 100644 gnulib/m4/locale-zh.m4 delete mode 100644 gnulib/m4/locale_h.m4 delete mode 100644 gnulib/m4/localeconv.m4 delete mode 100644 gnulib/m4/localename.m4 delete mode 100644 gnulib/m4/lock.m4 delete mode 100644 gnulib/m4/longlong.m4 delete mode 100644 gnulib/m4/lstat.m4 delete mode 100644 gnulib/m4/ltoptions.m4 delete mode 100644 gnulib/m4/ltsugar.m4 delete mode 100644 gnulib/m4/ltversion.m4 delete mode 100644 gnulib/m4/lt~obsolete.m4 delete mode 100644 gnulib/m4/malloc.m4 delete mode 100644 gnulib/m4/malloca.m4 delete mode 100644 gnulib/m4/mbrtowc.m4 delete mode 100644 gnulib/m4/mbsinit.m4 delete mode 100644 gnulib/m4/mbsrtowcs.m4 delete mode 100644 gnulib/m4/mbstate_t.m4 delete mode 100644 gnulib/m4/mbtowc.m4 delete mode 100644 gnulib/m4/memchr.m4 delete mode 100644 gnulib/m4/mempcpy.m4 delete mode 100644 gnulib/m4/mkstemp.m4 delete mode 100644 gnulib/m4/mmap-anon.m4 delete mode 100644 gnulib/m4/mode_t.m4 delete mode 100644 gnulib/m4/msvc-inval.m4 delete mode 100644 gnulib/m4/msvc-nothrow.m4 delete mode 100644 gnulib/m4/multiarch.m4 delete mode 100644 gnulib/m4/nl_langinfo.m4 delete mode 100644 gnulib/m4/nocrash.m4 delete mode 100644 gnulib/m4/off_t.m4 delete mode 100644 gnulib/m4/onceonly.m4 delete mode 100644 gnulib/m4/open.m4 delete mode 100644 gnulib/m4/pathmax.m4 delete mode 100644 gnulib/m4/printf.m4 delete mode 100644 gnulib/m4/putenv.m4 delete mode 100644 gnulib/m4/rawmemchr.m4 delete mode 100644 gnulib/m4/readlink.m4 delete mode 100644 gnulib/m4/realloc.m4 delete mode 100644 gnulib/m4/regex.m4 delete mode 100644 gnulib/m4/safe-alloc.m4 delete mode 100644 gnulib/m4/selinux-context-h.m4 delete mode 100644 gnulib/m4/selinux-selinux-h.m4 delete mode 100644 gnulib/m4/setenv.m4 delete mode 100644 gnulib/m4/setlocale.m4 delete mode 100644 gnulib/m4/size_max.m4 delete mode 100644 gnulib/m4/ssize_t.m4 delete mode 100644 gnulib/m4/stat.m4 delete mode 100644 gnulib/m4/stdbool.m4 delete mode 100644 gnulib/m4/stddef_h.m4 delete mode 100644 gnulib/m4/stdint.m4 delete mode 100644 gnulib/m4/stdint_h.m4 delete mode 100644 gnulib/m4/stdio_h.m4 delete mode 100644 gnulib/m4/stdlib_h.m4 delete mode 100644 gnulib/m4/stpcpy.m4 delete mode 100644 gnulib/m4/stpncpy.m4 delete mode 100644 gnulib/m4/strchrnul.m4 delete mode 100644 gnulib/m4/string_h.m4 delete mode 100644 gnulib/m4/strndup.m4 delete mode 100644 gnulib/m4/strnlen.m4 delete mode 100644 gnulib/m4/strstr.m4 delete mode 100644 gnulib/m4/symlink.m4 delete mode 100644 gnulib/m4/sys_socket_h.m4 delete mode 100644 gnulib/m4/sys_stat_h.m4 delete mode 100644 gnulib/m4/sys_time_h.m4 delete mode 100644 gnulib/m4/sys_types_h.m4 delete mode 100644 gnulib/m4/sys_wait_h.m4 delete mode 100644 gnulib/m4/tempname.m4 delete mode 100644 gnulib/m4/thread.m4 delete mode 100644 gnulib/m4/threadlib.m4 delete mode 100644 gnulib/m4/time_h.m4 delete mode 100644 gnulib/m4/unistd_h.m4 delete mode 100644 gnulib/m4/vasnprintf.m4 delete mode 100644 gnulib/m4/vasprintf.m4 delete mode 100644 gnulib/m4/warn-on-use.m4 delete mode 100644 gnulib/m4/wchar_h.m4 delete mode 100644 gnulib/m4/wchar_t.m4 delete mode 100644 gnulib/m4/wcrtomb.m4 delete mode 100644 gnulib/m4/wctob.m4 delete mode 100644 gnulib/m4/wctomb.m4 delete mode 100644 gnulib/m4/wctype_h.m4 delete mode 100644 gnulib/m4/wint_t.m4 delete mode 100644 gnulib/m4/xsize.m4 delete mode 100644 gnulib/m4/yield.m4 delete mode 100644 gnulib/tests/Makefile.am delete mode 100644 gnulib/tests/Makefile.in delete mode 100644 gnulib/tests/binary-io.h delete mode 100644 gnulib/tests/c-ctype.c delete mode 100644 gnulib/tests/c-ctype.h delete mode 100644 gnulib/tests/c-strcase.h delete mode 100644 gnulib/tests/c-strcasecmp.c delete mode 100644 gnulib/tests/c-strncasecmp.c delete mode 100644 gnulib/tests/close.c delete mode 100644 gnulib/tests/dup2.c delete mode 100644 gnulib/tests/fd-hook.c delete mode 100644 gnulib/tests/fd-hook.h delete mode 100644 gnulib/tests/fdopen.c delete mode 100644 gnulib/tests/fpucw.h delete mode 100644 gnulib/tests/fstat.c delete mode 100644 gnulib/tests/getcwd-lgpl.c delete mode 100644 gnulib/tests/getpagesize.c delete mode 100644 gnulib/tests/glthread/lock.c delete mode 100644 gnulib/tests/glthread/lock.h delete mode 100644 gnulib/tests/glthread/thread.c delete mode 100644 gnulib/tests/glthread/thread.h delete mode 100644 gnulib/tests/glthread/threadlib.c delete mode 100644 gnulib/tests/glthread/yield.h delete mode 100644 gnulib/tests/ignore-value.h delete mode 100644 gnulib/tests/init.sh delete mode 100644 gnulib/tests/intprops.h delete mode 100644 gnulib/tests/inttypes.in.h delete mode 100644 gnulib/tests/localename.c delete mode 100644 gnulib/tests/localename.h delete mode 100644 gnulib/tests/macros.h delete mode 100644 gnulib/tests/msvc-inval.c delete mode 100644 gnulib/tests/msvc-inval.h delete mode 100644 gnulib/tests/msvc-nothrow.c delete mode 100644 gnulib/tests/msvc-nothrow.h delete mode 100644 gnulib/tests/open.c delete mode 100644 gnulib/tests/putenv.c delete mode 100644 gnulib/tests/same-inode.h delete mode 100644 gnulib/tests/setenv.c delete mode 100644 gnulib/tests/setlocale.c delete mode 100644 gnulib/tests/signature.h delete mode 100644 gnulib/tests/symlink.c delete mode 100644 gnulib/tests/test-alloca-opt.c delete mode 100644 gnulib/tests/test-binary-io.c delete mode 100755 gnulib/tests/test-binary-io.sh delete mode 100644 gnulib/tests/test-btowc.c delete mode 100755 gnulib/tests/test-btowc1.sh delete mode 100755 gnulib/tests/test-btowc2.sh delete mode 100644 gnulib/tests/test-c-ctype.c delete mode 100755 gnulib/tests/test-c-strcase.sh delete mode 100644 gnulib/tests/test-c-strcasecmp.c delete mode 100644 gnulib/tests/test-c-strncasecmp.c delete mode 100644 gnulib/tests/test-canonicalize-lgpl.c delete mode 100644 gnulib/tests/test-close.c delete mode 100644 gnulib/tests/test-ctype.c delete mode 100644 gnulib/tests/test-dup2.c delete mode 100644 gnulib/tests/test-environ.c delete mode 100644 gnulib/tests/test-errno.c delete mode 100644 gnulib/tests/test-fcntl-h.c delete mode 100644 gnulib/tests/test-fdopen.c delete mode 100644 gnulib/tests/test-fgetc.c delete mode 100644 gnulib/tests/test-float.c delete mode 100644 gnulib/tests/test-fnmatch.c delete mode 100644 gnulib/tests/test-fputc.c delete mode 100644 gnulib/tests/test-fread.c delete mode 100644 gnulib/tests/test-fstat.c delete mode 100644 gnulib/tests/test-fwrite.c delete mode 100644 gnulib/tests/test-getcwd-lgpl.c delete mode 100644 gnulib/tests/test-getdelim.c delete mode 100644 gnulib/tests/test-getline.c delete mode 100644 gnulib/tests/test-getopt.c delete mode 100644 gnulib/tests/test-getopt.h delete mode 100644 gnulib/tests/test-getopt_long.h delete mode 100644 gnulib/tests/test-gettimeofday.c delete mode 100644 gnulib/tests/test-ignore-value.c delete mode 100755 gnulib/tests/test-init.sh delete mode 100644 gnulib/tests/test-intprops.c delete mode 100644 gnulib/tests/test-inttypes.c delete mode 100644 gnulib/tests/test-isblank.c delete mode 100644 gnulib/tests/test-langinfo.c delete mode 100644 gnulib/tests/test-locale.c delete mode 100644 gnulib/tests/test-localeconv.c delete mode 100644 gnulib/tests/test-localename.c delete mode 100644 gnulib/tests/test-lock.c delete mode 100644 gnulib/tests/test-lstat.c delete mode 100644 gnulib/tests/test-lstat.h delete mode 100644 gnulib/tests/test-malloc-gnu.c delete mode 100644 gnulib/tests/test-malloca.c delete mode 100755 gnulib/tests/test-mbrtowc-w32-1.sh delete mode 100755 gnulib/tests/test-mbrtowc-w32-2.sh delete mode 100755 gnulib/tests/test-mbrtowc-w32-3.sh delete mode 100755 gnulib/tests/test-mbrtowc-w32-4.sh delete mode 100755 gnulib/tests/test-mbrtowc-w32-5.sh delete mode 100644 gnulib/tests/test-mbrtowc-w32.c delete mode 100644 gnulib/tests/test-mbrtowc.c delete mode 100755 gnulib/tests/test-mbrtowc1.sh delete mode 100755 gnulib/tests/test-mbrtowc2.sh delete mode 100755 gnulib/tests/test-mbrtowc3.sh delete mode 100755 gnulib/tests/test-mbrtowc4.sh delete mode 100644 gnulib/tests/test-mbsinit.c delete mode 100755 gnulib/tests/test-mbsinit.sh delete mode 100644 gnulib/tests/test-mbsrtowcs.c delete mode 100755 gnulib/tests/test-mbsrtowcs1.sh delete mode 100755 gnulib/tests/test-mbsrtowcs2.sh delete mode 100755 gnulib/tests/test-mbsrtowcs3.sh delete mode 100755 gnulib/tests/test-mbsrtowcs4.sh delete mode 100644 gnulib/tests/test-memchr.c delete mode 100644 gnulib/tests/test-nl_langinfo.c delete mode 100755 gnulib/tests/test-nl_langinfo.sh delete mode 100644 gnulib/tests/test-open.c delete mode 100644 gnulib/tests/test-open.h delete mode 100644 gnulib/tests/test-pathmax.c delete mode 100644 gnulib/tests/test-rawmemchr.c delete mode 100644 gnulib/tests/test-readlink.c delete mode 100644 gnulib/tests/test-readlink.h delete mode 100644 gnulib/tests/test-safe-alloc.c delete mode 100644 gnulib/tests/test-setenv.c delete mode 100644 gnulib/tests/test-setlocale1.c delete mode 100755 gnulib/tests/test-setlocale1.sh delete mode 100644 gnulib/tests/test-setlocale2.c delete mode 100755 gnulib/tests/test-setlocale2.sh delete mode 100644 gnulib/tests/test-stat.c delete mode 100644 gnulib/tests/test-stat.h delete mode 100644 gnulib/tests/test-stdbool.c delete mode 100644 gnulib/tests/test-stddef.c delete mode 100644 gnulib/tests/test-stdint.c delete mode 100644 gnulib/tests/test-stdio.c delete mode 100644 gnulib/tests/test-stdlib.c delete mode 100644 gnulib/tests/test-strchrnul.c delete mode 100644 gnulib/tests/test-string.c delete mode 100644 gnulib/tests/test-strnlen.c delete mode 100644 gnulib/tests/test-strstr.c delete mode 100644 gnulib/tests/test-symlink.c delete mode 100644 gnulib/tests/test-symlink.h delete mode 100644 gnulib/tests/test-sys_stat.c delete mode 100644 gnulib/tests/test-sys_time.c delete mode 100644 gnulib/tests/test-sys_types.c delete mode 100644 gnulib/tests/test-sys_wait.c delete mode 100644 gnulib/tests/test-sys_wait.h delete mode 100644 gnulib/tests/test-thread_create.c delete mode 100644 gnulib/tests/test-thread_self.c delete mode 100644 gnulib/tests/test-time.c delete mode 100644 gnulib/tests/test-unistd.c delete mode 100644 gnulib/tests/test-unsetenv.c delete mode 100644 gnulib/tests/test-vasnprintf.c delete mode 100644 gnulib/tests/test-vasprintf.c delete mode 100644 gnulib/tests/test-verify.c delete mode 100755 gnulib/tests/test-verify.sh delete mode 100644 gnulib/tests/test-wchar.c delete mode 100755 gnulib/tests/test-wcrtomb-w32-1.sh delete mode 100755 gnulib/tests/test-wcrtomb-w32-2.sh delete mode 100755 gnulib/tests/test-wcrtomb-w32-3.sh delete mode 100755 gnulib/tests/test-wcrtomb-w32-4.sh delete mode 100755 gnulib/tests/test-wcrtomb-w32-5.sh delete mode 100644 gnulib/tests/test-wcrtomb-w32.c delete mode 100644 gnulib/tests/test-wcrtomb.c delete mode 100755 gnulib/tests/test-wcrtomb.sh delete mode 100644 gnulib/tests/test-wctype-h.c delete mode 100644 gnulib/tests/unsetenv.c delete mode 100644 gnulib/tests/wctob.c delete mode 100644 gnulib/tests/wctomb-impl.h delete mode 100644 gnulib/tests/wctomb.c delete mode 100644 gnulib/tests/zerosize-ptr.h create mode 100644 lenses/afs_cellalias.aug create mode 100644 lenses/clamav.aug create mode 100644 lenses/dns_zone.aug create mode 100644 lenses/iscsid.aug create mode 100644 lenses/mailscanner.aug create mode 100644 lenses/mailscanner_rules.aug create mode 100644 lenses/pgbouncer.aug create mode 100644 lenses/postfix_sasl_smtpd.aug create mode 100644 lenses/puppetfile.aug create mode 100644 lenses/pylonspaste.aug create mode 100644 lenses/tests/test_afs_cellalias.aug create mode 100644 lenses/tests/test_clamav.aug create mode 100644 lenses/tests/test_dns_zone.aug create mode 100644 lenses/tests/test_iscsid.aug create mode 100644 lenses/tests/test_mailscanner.aug create mode 100644 lenses/tests/test_mailscanner_rules.aug create mode 100644 lenses/tests/test_pgbouncer.aug create mode 100644 lenses/tests/test_postfix_sasl_smtpd.aug create mode 100644 lenses/tests/test_puppetfile.aug create mode 100644 lenses/tests/test_pylonspaste.aug delete mode 100644 man/Makefile.in delete mode 100644 man/augparse.1 delete mode 100644 src/Makefile.in delete mode 100644 src/lexer.c delete mode 100644 src/parser.c delete mode 100644 src/parser.h delete mode 100644 tests/Makefile.in delete mode 100755 tests/lens-access.sh delete mode 100755 tests/lens-activemq_conf.sh delete mode 100755 tests/lens-activemq_xml.sh delete mode 100755 tests/lens-aliases.sh delete mode 100755 tests/lens-anacron.sh delete mode 100755 tests/lens-approx.sh delete mode 100755 tests/lens-apt_update_manager.sh delete mode 100755 tests/lens-aptcacherngsecurity.sh delete mode 100755 tests/lens-aptconf.sh delete mode 100755 tests/lens-aptpreferences.sh delete mode 100755 tests/lens-aptsource.sh delete mode 100755 tests/lens-authorized_keys.sh delete mode 100755 tests/lens-automaster.sh delete mode 100755 tests/lens-automounter.sh delete mode 100755 tests/lens-avahi.sh delete mode 100755 tests/lens-backuppchosts.sh delete mode 100755 tests/lens-bbhosts.sh delete mode 100755 tests/lens-bootconf.sh delete mode 100755 tests/lens-build.sh delete mode 100755 tests/lens-cachefilesd.sh delete mode 100755 tests/lens-carbon.sh delete mode 100755 tests/lens-cgconfig.sh delete mode 100755 tests/lens-cgrules.sh delete mode 100755 tests/lens-channels.sh delete mode 100755 tests/lens-chrony.sh delete mode 100755 tests/lens-cobblermodules.sh delete mode 100755 tests/lens-cobblersettings.sh delete mode 100755 tests/lens-collectd.sh delete mode 100755 tests/lens-cpanel.sh delete mode 100755 tests/lens-cron.sh delete mode 100755 tests/lens-crypttab.sh delete mode 100755 tests/lens-cups.sh delete mode 100755 tests/lens-cyrus_imapd.sh delete mode 100755 tests/lens-darkice.sh delete mode 100755 tests/lens-debctrl.sh delete mode 100755 tests/lens-desktop.sh delete mode 100755 tests/lens-device_map.sh delete mode 100755 tests/lens-dhclient.sh delete mode 100755 tests/lens-dhcpd.sh delete mode 100755 tests/lens-dnsmasq.sh delete mode 100755 tests/lens-dovecot.sh delete mode 100755 tests/lens-dpkg.sh delete mode 100755 tests/lens-dput.sh delete mode 100755 tests/lens-erlang.sh delete mode 100755 tests/lens-ethers.sh delete mode 100755 tests/lens-exports.sh delete mode 100755 tests/lens-fai_diskconfig.sh delete mode 100755 tests/lens-fonts.sh delete mode 100755 tests/lens-fstab.sh delete mode 100755 tests/lens-fuse.sh delete mode 100755 tests/lens-gdm.sh delete mode 100755 tests/lens-group.sh delete mode 100755 tests/lens-grub.sh delete mode 100755 tests/lens-gshadow.sh delete mode 100755 tests/lens-gtkbookmarks.sh delete mode 100755 tests/lens-host_conf.sh delete mode 100755 tests/lens-hostname.sh delete mode 100755 tests/lens-hosts.sh delete mode 100755 tests/lens-hosts_access.sh delete mode 100755 tests/lens-htpasswd.sh delete mode 100755 tests/lens-httpd.sh delete mode 100755 tests/lens-inetd.sh delete mode 100755 tests/lens-inifile.sh delete mode 100755 tests/lens-inittab.sh delete mode 100755 tests/lens-inputrc.sh delete mode 100755 tests/lens-interfaces.sh delete mode 100755 tests/lens-iproute2.sh delete mode 100755 tests/lens-iptables.sh delete mode 100755 tests/lens-jaas.sh delete mode 100755 tests/lens-jettyrealm.sh delete mode 100755 tests/lens-jmxaccess.sh delete mode 100755 tests/lens-jmxpassword.sh delete mode 100755 tests/lens-json.sh delete mode 100755 tests/lens-kdump.sh delete mode 100755 tests/lens-keepalived.sh delete mode 100755 tests/lens-known_hosts.sh delete mode 100755 tests/lens-koji.sh delete mode 100755 tests/lens-krb5.sh delete mode 100755 tests/lens-ldap.sh delete mode 100755 tests/lens-ldif.sh delete mode 100755 tests/lens-ldso.sh delete mode 100755 tests/lens-lightdm.sh delete mode 100755 tests/lens-limits.sh delete mode 100755 tests/lens-login_defs.sh delete mode 100755 tests/lens-logrotate.sh delete mode 100755 tests/lens-logwatch.sh delete mode 100755 tests/lens-lokkit.sh delete mode 100755 tests/lens-lvm.sh delete mode 100755 tests/lens-mcollective.sh delete mode 100755 tests/lens-mdadm_conf.sh delete mode 100755 tests/lens-memcached.sh delete mode 100755 tests/lens-mke2fs.sh delete mode 100755 tests/lens-modprobe.sh delete mode 100755 tests/lens-modules.sh delete mode 100755 tests/lens-modules_conf.sh delete mode 100755 tests/lens-mongodbserver.sh delete mode 100755 tests/lens-monit.sh delete mode 100755 tests/lens-multipath.sh delete mode 100755 tests/lens-mysql.sh delete mode 100755 tests/lens-nagioscfg.sh delete mode 100755 tests/lens-nagiosobjects.sh delete mode 100755 tests/lens-netmasks.sh delete mode 100755 tests/lens-networkmanager.sh delete mode 100755 tests/lens-networks.sh delete mode 100755 tests/lens-nginx.sh delete mode 100755 tests/lens-nrpe.sh delete mode 100755 tests/lens-nsswitch.sh delete mode 100755 tests/lens-ntp.sh delete mode 100755 tests/lens-ntpd.sh delete mode 100755 tests/lens-odbc.sh delete mode 100755 tests/lens-openshift_config.sh delete mode 100755 tests/lens-openshift_http.sh delete mode 100755 tests/lens-openshift_quickstarts.sh delete mode 100755 tests/lens-openvpn.sh delete mode 100755 tests/lens-pagekite.sh delete mode 100755 tests/lens-pam.sh delete mode 100755 tests/lens-pamconf.sh delete mode 100755 tests/lens-passwd.sh delete mode 100755 tests/lens-pbuilder.sh delete mode 100755 tests/lens-pg_hba.sh delete mode 100755 tests/lens-php.sh delete mode 100755 tests/lens-phpvars.sh delete mode 100755 tests/lens-postfix_access.sh delete mode 100755 tests/lens-postfix_main.sh delete mode 100755 tests/lens-postfix_master.sh delete mode 100755 tests/lens-postfix_transport.sh delete mode 100755 tests/lens-postfix_virtual.sh delete mode 100755 tests/lens-postgresql.sh delete mode 100755 tests/lens-properties.sh delete mode 100755 tests/lens-protocols.sh delete mode 100755 tests/lens-puppet.sh delete mode 100755 tests/lens-puppet_auth.sh delete mode 100755 tests/lens-puppetfileserver.sh delete mode 100755 tests/lens-pythonpaste.sh delete mode 100755 tests/lens-qpid.sh delete mode 100755 tests/lens-quote.sh delete mode 100755 tests/lens-rabbitmq.sh delete mode 100755 tests/lens-redis.sh delete mode 100755 tests/lens-reprepro_uploaders.sh delete mode 100755 tests/lens-resolv.sh delete mode 100755 tests/lens-rmt.sh delete mode 100755 tests/lens-rsyncd.sh delete mode 100755 tests/lens-rsyslog.sh delete mode 100755 tests/lens-rx.sh delete mode 100755 tests/lens-samba.sh delete mode 100755 tests/lens-schroot.sh delete mode 100755 tests/lens-securetty.sh delete mode 100755 tests/lens-services.sh delete mode 100755 tests/lens-shadow.sh delete mode 100755 tests/lens-shells.sh delete mode 100755 tests/lens-shellvars.sh delete mode 100755 tests/lens-shellvars_list.sh delete mode 100755 tests/lens-simplelines.sh delete mode 100755 tests/lens-simplevars.sh delete mode 100755 tests/lens-sip_conf.sh delete mode 100755 tests/lens-slapd.sh delete mode 100755 tests/lens-smbusers.sh delete mode 100755 tests/lens-solaris_system.sh delete mode 100755 tests/lens-soma.sh delete mode 100755 tests/lens-spacevars.sh delete mode 100755 tests/lens-splunk.sh delete mode 100755 tests/lens-squid.sh delete mode 100755 tests/lens-ssh.sh delete mode 100755 tests/lens-sshd.sh delete mode 100755 tests/lens-sssd.sh delete mode 100755 tests/lens-stunnel.sh delete mode 100755 tests/lens-subversion.sh delete mode 100755 tests/lens-sudoers.sh delete mode 100755 tests/lens-sysconfig.sh delete mode 100755 tests/lens-sysconfig_route.sh delete mode 100755 tests/lens-sysctl.sh delete mode 100755 tests/lens-syslog.sh delete mode 100755 tests/lens-systemd.sh delete mode 100755 tests/lens-thttpd.sh delete mode 100755 tests/lens-tuned.sh delete mode 100755 tests/lens-up2date.sh delete mode 100755 tests/lens-updatedb.sh delete mode 100755 tests/lens-util.sh delete mode 100755 tests/lens-vfstab.sh delete mode 100755 tests/lens-vmware_config.sh delete mode 100755 tests/lens-vsftpd.sh delete mode 100755 tests/lens-webmin.sh delete mode 100755 tests/lens-wine.sh delete mode 100755 tests/lens-xendconfsxp.sh delete mode 100755 tests/lens-xinetd.sh delete mode 100755 tests/lens-xml.sh delete mode 100755 tests/lens-xorg.sh delete mode 100755 tests/lens-xymon.sh delete mode 100755 tests/lens-xymon_alerting.sh delete mode 100755 tests/lens-yum.sh create mode 100644 tests/modules/README mode change 100644 => 120000 tests/root/boot/grub/menu.lst mode change 100644 => 120000 tests/root/etc/grub.conf create mode 100644 tests/root/etc/httpd/conf.d/ssl.conf create mode 100644 tests/root/etc/nginx/nginx.conf delete mode 100644 tests/root/lvm.conf~ create mode 100755 tests/test-valgrind.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72adb8d --- /dev/null +++ b/.gitignore @@ -0,0 +1,55 @@ +*~ +.cproject +.project +augeas.pc +augeas.spec +build/ +gnulib/ +config.h +config.h.in +stamp-h1 +aclocal.m4 +autom4te.cache/ +Makefile +Makefile.in +config.sub +config.log +config.guess +config.status +configure +depcomp +install-sh +ltmain.sh +missing +ChangeLog +.deps/ +.libs/ +*.l[oa] +*.[oa] +*.loT +TAGS +libtool +ylwrap +src/datadir.h +src/parser.[ch] +src/lexer.[ch] +src/augtool +src/augparse +tests/fatest +tests/leak +tests/lens-*.sh +tests/test-api +tests/test-xpath +tests/test-load +tests/test-run +tests/test-save +tests/*.trs +*.aux +*.dvi +*.log +*.pdf +man/*.1 +doc/naturaldocs/output +doc/naturaldocs/conf/*/Data/*.nd +examples/fadot +.settings diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..7acb1ea --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "gnulib"] + path = .gnulib + url = git://git.sv.gnu.org/gnulib.git diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..3df9693 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,17 @@ +sudo: false +addons: + apt: + packages: + - libxml2-dev + - libreadline-dev + - valgrind +install: + - ./autogen.sh + - sed -i '41s/ENOENT/ENOENT || errno == EINVAL/' gnulib/tests/test-readlink.h +language: c +notifications: + email: false + irc: + channels: + - "irc.freenode.org#augeas" +script: ./configure && make && make check && ./src/try valgrind diff --git a/AUTHORS b/AUTHORS index 28c68e3..ed24a3c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -24,7 +24,9 @@ Contributions by: Oliver Beattie Tim Bishop Anders F Björklund + Jurjen Bokma Aurelien Bompard + Joey Boggs Lorenzo Dalrio Francois Deppierraz Luc Didry @@ -44,6 +46,7 @@ Contributions by: Simon Josi Bryan Kearney Jason Kincl + Andrew Colin Kissa Francois Lebel Frédéric Lespez Jasper Lievisse Adriaanse @@ -53,6 +56,7 @@ Contributions by: Jeroen van Meeuwen Jim Meyering Sean Millichamp + Michael Moll Tim Mooney Joel Nimety Matthaus Owens @@ -74,6 +78,7 @@ Contributions by: Nicolas Valcárcel Scerpella Gonzalo Servat Nahum Shalman + Borislav Stoichkov Tim Stoop Laine Stump Jiri Suchomel @@ -117,3 +122,4 @@ Contributions by: Joel Loudermilk Frank Grötzner Pino Toscano + Geoffrey Gardella diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index f0685aa..0000000 --- a/ChangeLog +++ /dev/null @@ -1,10485 +0,0 @@ -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. - * \ or \ will be escaped if not in quotes, else literal - * \' or \" will be escaped if in the same type of quotes, else literal - * \\ will be escaped - * \[ or \] will be passed through so they're escaped in path expressions - - * src/augrun.c: implement escape sequences - * tests/run.tests: add covering tests - -2011-12-02 Raphaël Pinson - - Add approx.aug and test to Menu.txt - - Document approx.aug - - Fix nocommand as nocomma in test_aliases.aug - - Add documentation to test_aliases.aug - -2011-12-01 David Lutterkort - - * src/augtool.c (print_aug_error): print newline after error details - - augtool: rename 'print-xml' to 'dump-xml' - That way, 'p' tab-completes to print as before. - - * src/augeas.c (tree_from_transform): handle alloc failure better - - * src/augeas.c (aug_init): make more robust - - propagate errors from aug_set and similar - - only call api_exit if we called api_enter before - - * src/augeas.c (aug_init): pull logic to set up loadpath into separate function - - * src/augeas.c (init_root): properly report out-of-memory - - * tests/test-api.c (testToXml): swap expected/actual values in assertions - - * 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 - these errors, because they always got a NULL augeas handle back. - - The new flag AUG_NO_ERR_CLOSE causes aug_init to return a handle even if - initialization fails, so that callers can use the aug_error* functions to - extract error details before calling aug_close. - - * src/augeas.c (aug_init): return a partially initialized struct augeas - if AUG_NO_ERR_CLOSE is set - * src/augeas.h (aug_flags): add AUG_NO_ERR_CLOSE - * 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 - - Fstab: allow ',' in file names - Fixes BZ https://bugzilla.redhat.com/show_bug.cgi?id=751342 - - * man/augtool.pod: update copyright years, regenerate - -2011-12-01 Raphaël Pinson - - Sub::Install is not necessary to override functions in Augeas.pm - - Fix white_spaces into with_spaces in test_faidiskconfig.aug - - Add documentation to test_fai_diskconfig.aug - - Extend copyright to 2011 in src/* - - Add test_xml.aug to the lens Menu.txt - - Improve documentation in test_xml.aug - - Add test_keepalived.aug doc to lens Menu.txt and keepaved.aug - - Add documentation to test_keepalived.aug - - Improve documentation for sep.aug - - Improve documentation for rx.aug - -2011-12-01 Dominic Cleal - - src/augrun.c: fix parsing of commands with trailing whitespace tests/test-run.c: use : to write tests with trailing whitespace - -2011-12-01 Raphaël Pinson - - Improve documentation for access.aug and test_access.aug - - Fix examples note in inifile.aug - - Add examples note to reprepro_uploaders.aug - - Finalize doc for test_reprepro_uploaders.aug - -2011-12-01 Dominic Cleal - - Fix path context with trailing slash or whitespace - - Add tests from Puppet's Augeas provider, some commented out until fixed. - -2011-12-01 Raphaël Pinson - - Fix test_inifile.aug's typo - - Add documentation to test_inifile.aug - - Better integration of tests in NaturalDocs, verbatim code display in doc. - -2011-11-30 Raphaël Pinson - - Add unit tests for aug_to_xml - - libaugeas must now be linked to libxml, too. - -2011-11-30 Dominic Cleal - - * augeas.spec.in: add build req on libxml2-devel - -2011-11-29 Raphaël Pinson - - Add an Examples section to reprepro_uploaders.aug's header - - ARG_CHECK errors when condition is met. Invert conditions in aug_to_xml. - -2011-11-29 Francis Giraldeau - - Sudoers: add more parameter flags/options - Fixes bug #143 - -2011-11-29 Raphaël Pinson - - Add aug_to_xml to public API - -2011-11-29 David Lutterkort - - New error code AUG_EBADARG and ARG_CHECK macro - Use ARG_CHECK to check arguments passed through the public API for - validity; invalid paramters lead to an error of AUG_EBADARG. - - * src/augeas.h (aug_errcode_t): new error code AUG_EBADARG - * src/augeas.c (errcodes): human-readable text for AUG_EBADARG - * src/errcode.h (ARG_CHECK): new macro - -2011-11-29 Raphaël Pinson - - Improve doc in test_reprepro_uploaders.aug and update Menu.txt for lenses. - - Fix parsing of tests in Augeas.pm, add a test doc to test_reprepro.aug - - Fix parsing of 'in[ \t\r\n]+let' in Augeas.pm - -2011-11-29 David Lutterkort - - Normalize lens filters to absolute paths - It doesn't really make sense to specify relative paths in lens filters; we - treat them as absolute to avoid unpleasant surprises for users who think - relative paths are relative to AUGEAS_ROOT. With this change, they are. - - 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 - - Add support for 'not' in reprepro_uploaders.aug - - Improve CSS for NaturalDocs - -2011-11-28 Dominic Cleal - - augtool: change readline tab completion to be context-aware - - path expressions: prepend context from /augeas/context to all relative paths - A path context is prepended to all paths that do not begin at the root, - changing relative paths into absolute paths. The context is stored in - /augeas/context and defaults to the value "/files". - -2011-11-28 David Lutterkort - - * src/transform.c (load_file): fix segfault when storing span in NULL tree - - * src/syntax.c (print_tree): print something for a NULL tree - -2011-11-28 Raphaël Pinson - - Add header to shellvars.aug - - Add Kdump and Ssh to Menu.txt - - Fix NaturalDocs CSS a bit - - Add a Tests and Examples group in naturaldocs - - Improve documentation for reprepro_uploaders.aug - - Add 'contain' subnodes to reprepro_uploaders.aug and improve documentation. - - Simplify logical tree in reprepro_uploaders.aug - - Improve parameter parsing in reprepro_uploaders.aug - - Add reprepro.aug and associated test. - - Fix small type in comment - -2011-11-23 Raphaël Pinson - - Add support for until and select loops in shellvars.aug - - Add elif support to shellvars.aug - -2011-11-22 Raphaël Pinson - - Add big WARNING to aptconf.aug - - Register modules.aug with naturaldocs - -2011-11-22 Tom Limoncelli - - Xendconfsxp: new lens and tests for Xen configuration - -2011-11-22 David Lutterkort - - * tests/Makefile.am (lens_tests): add missing tests - -2011-11-22 Raphaël Pinson - - Add modules.aug and associated test file (Fix ticket #236) - - Add backuppchosts.aug and test (Fix ticket #233) - - mdadm.aug: dev_device cannot match dev_partitions_re - - Fix test_phpvars.aug as per using Util.empty_c_style - - Clean wrong lines in modprobe.aug's header - - Update tests and documentation for new lenses - - Add desktop.aug and associated test. - - Add aptconf.aug and associated test. - - Use Util.empty_c_style in phpvars.aug and don't map empty comments in Util.comment_multiline - - Add support for case in shellvars.aug - - Add for and while loops to shellvars.aug - - Adapt modules_conf.aug and test file to refect the changes in modprobe.aug - - Refactor modprobe.aug: * Parse commands in install/remove stanzas; * Drop support for include as it is not documented in manpages and no unit tests are shipped. - -2011-11-21 Raphaël Pinson - - Fix unpriviliged into unpriviliged in test_postfix_master.aug, too. - - Add one-liner unit test for shellvars.aug - - shellvars.aug: Refactor lens, add end-of-line comment support, if/then/else/fi conditionals, one-liners support - - phpvars.aug: Add test for bash-style comment, improve eol comments, use generic_function in simple_function definition - - Parse /etc/mailname with hostname.aug - - Add hosts_access.aug to parse /etc/hosts.{allow,deny} and associated test. - -2011-11-18 Raphaël Pinson - - Double quotes are allowed in variable names in phpvars.aug - - Refactor entries in phpvars.aug - - PHP tags are case-insensitive in phpvars.aug - - Add include_once() to phpvars.aug - - Fix typo in postfix_master.aug (Fix ticket 234) - - Allow empty lines at end of files in phpvars.aug - - Better define() support in phpvars.aug - - Support bash-style comments and define() functions in phpvars.aug - - Implement end-of-line comments in phpvars.aug and add tests. In order to add this, I had to forbig the use of /.*;[ \t]*\/\/.*/ in values. There might be a way to make this regexp more strict to be less intrusive, but I believe this pattern is not very common anyway, so I think it's safe to keep it this way for now. - - Cleanup phpvars.aug, rebase it on sep.aug and util.aug and prepare the way to support end-of-line comments - - Fix comment_multiline and add a test file for util.aug - - Spaces are not mandatory around = in phpvars.aug - - Fix open_php and close_php tags in phpvars.aug (Fix ticket 232) - -2011-11-17 Jim Meyering - - avoid double-free upon fclose failure - * src/transform.c (transform_save): Upon initial fclose failure, set "fp - = NULL;" so that we don't attempt to free/close "fp" while cleaning up - upon "goto done". - -2011-11-17 David Lutterkort - - * lenses/util.aug: do not set caml mode for Emacs - - * lenses/rx.aug: delete trailing whitespace - -2011-11-17 Raphaël Pinson - - Parse pam.conf in pam.aug - - Add hostname.aug - - Add networks.aug lens - - Add host_conf.aug lens - - Add flag_line to build.aug - - Add blkid.conf to shellvars.aug - -2011-11-16 Raphaël Pinson - - Add doc to grub.aug (ticket 33) - - Support debug flag in keepalived.aug - - Fix origin entries in aptpreferences.aug - -2011-11-15 Dominic Cleal - - Resolv: Permit end-of-line comments - Fixes ticket #223 - - Krb5: Allow a [pam] section for pam_krb5 (possibly deprecated) - Fixes ticket #225 - -2011-11-15 Roman Rakus - - Kdump: new lens and tests - -2011-11-15 Dominic Cleal - - aug_srun: add 'insert' and 'move' command aliases to 'ins' and 'mv' - -2011-11-15 Michael Chapman - - Dhcpd: slashes must be double-quoted - In dhcpd.conf, tokens containing slashes must be double-quoted. - - Fixes the following dhcpd error: - - /etc/dhcpd.conf line 4: filename string expected. - include / - ^ - 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 - multiple machines yet still contain per-server rules. - - 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. - - Dhcpd: add Red Hat's dhcpd.conf locations - RHEL 5 uses /etc/dhcpd.conf. - RHEL 6 uses /etc/dhcp/dhcpd.conf. - -2011-11-15 David Lutterkort - - 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 - alphabet. - - totalize used to create transitions into the crash state that did - transition on upper case letters, violating the convention. - -2011-11-13 David Lutterkort - - * src/builtin.c (regexp_match): new helper to test a regexp - -2011-11-13 Matthew Booth - - Mdadm_conf: new lens for /etc/mdadm.conf - -2011-11-13 David Lutterkort - - * lenses/tests/test_iptables.aug: fix syntax error - -2011-10-31 Raphaël Pinson - - Allow digits in ipt_match keys (bug #224) - -2011-10-18 David Lutterkort - - * src/syntax.c: fix composition of unit and function - For a composition with types 'unit ; a -> b' we tricked ourselves into - doing function composition, when we should do unit composition. - - * src/syntax.c (type_names): fix order of names - -2011-10-17 Michael Chapman - - Fix regular expression escaping - This patch fixes: - - /[\/]/ - - Previously, this matched either a backslash or a slash, since \/ was not - an escape sequence known to unescape(). Now this matches only a slash. - - We pass an extra argument to escape() and unescape() listing the extra - characters that should be handled. STR_ESCAPES and RX_ESCAPES provide - the extra characters for strings and regexps respectively, and NULL may - be passed if no extra characters should be handled. - -2011-10-17 David Lutterkort - - Json: fix handling of whitespace - We just gobble up whitespace after various expressions as part of the lens - processing that expression. - -2011-10-14 Raphaël Pinson - - Spaces are allowed before colons in aliases.aug - - Empty options are allowed in exports.aug - - Entries outside Host statements are allowed (though not documented) in ssh.aug - - Allow indentations in array_entry in ssh.aug - - Small improvements to squid.aug. This lens is inconsistent and should probably be deeply reviewed, although that might break compatibility. - - Not really shellvar entries in cron.aug, semi-colons are allowed for email addresses - - Add schroot to tests and doc - - Add schroot.aug lens - -2011-10-13 Raphaël Pinson - - Simplify rsyncd.aug and support indented anon entries and records. - -2011-10-10 Raphaël Pinson - - Small adjustments in postfix_master.aug - -2011-10-10 Michael Chapman - - Fix escape sequences in bracket expressions - With POSIX extended regexps, escape sequences are not recognised within - bracket expressions. Any escape sequences passed through by the - unescape() function would be misinterpreted. For instance, the regular - expression: - - /[\.-]/ - - matches any of the three characters backslash, dot or hyphen, when the - lens author most likely wanted dot or hyphen only. - - This patch cleans up the bracket expressions in all lenses, with the - 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: - - let num = /[0-9\*][0-9\/,-\*]*/ - - the hyphen was treated as a range, not a literal character. This - 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: - - let id = /[a-zA-Z0-9_\-\/\.]+/ - - the hyphen was treated as a range, not a literal character. - -2011-10-10 Raphaël Pinson - - Revert badly applied series or patches. - This reverts commit dc9ef16bc7a4cc45e4d66ea69b4bdf0038e816bb. - -2011-10-10 Michael Chapman - - Cgconfig: Fix parsing of group names - In: - - let id = /[a-zA-Z0-9_\-\/\.]+/ - - the hyphen was treated as a range, not a literal character. - -2011-10-06 David Lutterkort - - path expressions: add a function 'int' - This makes it possible to do numerical comparisons of node values, for - example, 'match /files/etc/group/*[int(gid) < 3]' - -2011-10-06 Raphaël Pinson - - Fix cmd_span (ticket #220): - - Retrieve option from tree before using it; - - Invert conditions since we now use streqv. - -2011-10-05 Raphaël Pinson - - Replace sep_spc? with sep_opt_spc in bbhosts.aug - -2011-10-05 Michael Chapman - - Postfix_master: allow commas in commands - Postfix daemons accept "-o name=value" to override main.cf configuration - parameters, and the value can be a comma-separated value list. - -2011-10-05 Raphaël Pinson - - Support \!include in mysql.aug - -2011-10-04 Raphaël Pinson - - Various changes to keepalived.aug: - Implement vrrp_script; - Make spaces optional before lbracket; - Support track_interface, track_script and garp_master_delay; - Add ha_suspend and notify_*; - Add relinteger to rx.aug and use it in keepalived.aug. - -2011-10-03 Raphaël Pinson - - Spaces are mandatory after # in bbhosts.aug - -2011-10-01 Marc Fournier - - nrpe: fixed #218 - error caused by unused '=' in lens - -2011-10-01 Dominic Cleal - - Multipath: add support for six options in the defaults section: dev_loss_tmo, max_polling_interval, verbosity, reassign_maps, fast_io_fail_tmo, async_timeout - Fixes ticket #207 - -2011-09-12 Raphaël Pinson - - Support more ranges in cron.aug - - Flags also can be indented in mysql.aug - -2011-09-09 Raphaël Pinson - - Allow indented entries in php.aug - - { can be followed by spaces in xinetd.aug - - Allow indented entries in mysql.aug - - Allow empty lines after includedir - - includedir statements are not part of sections in mysql.aug - -2011-09-07 Raphaël Pinson - - Hooks without any lines are valid in logrotate.aug - - Allow spaces after 'endscript' in logrotate.aug - -2011-09-06 Raphaël Pinson - - Various fixes in bbhosts.aug - - Fix empty lines support in fai_diskconfig.aug - -2011-09-05 Raphaël Pinson - - Add functionalities, refactor volume by type of disk_config entry and add tests to fai_diskconfig.aug - -2011-09-01 David Lutterkort - - * src/pathx.c (nodeset_as_regexp): match nothing if nodeset is empty - This makes sure that constructs like 'glob(no_such_node)' or - 'regexp(no_such_node)' in path expressions never match anything, which is a - better default than the empty regexp that was produced before. - -2011-09-01 Francis Giraldeau - - Fix run single command with autosave - This patch fixes autosave in the case only one command is provided as - arguments and adds a test that checks proper handling of this case. - -2011-08-31 Francis Giraldeau - - Disable autoload transform for the fai_diskconfig - Autoload transform with only standard exclude makes failing the glob_for_lens - 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. - - Thanks to Jiri Suchomel for this contribution. - -2011-08-30 Raphaël Pinson - - Add fai_diskconfig.aug and test - - Allow semicolons in shellvars.aug, add non regression test - -2011-08-21 Francis Giraldeau - - New stunnel lens - Stunnel provides SSL tunnel for daemons. The configuration is based on the ini - file syntax. - - Thanks to Oliver Beattie that contributed this lens. - -2011-08-16 David Lutterkort - - Fix uses of Spacevars as a utility module - - add Build.key_ws_value to do the same as Spacevars.entry - - expand uses of (Spacevars.lns l) into the more explicit (comment|empty|l)* - - This fixes test breakage introduced by commit 4840c7ab - -2011-08-11 Francis Giraldeau - - Proper test for eolwhite space handling - 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. - - remote: lenses/tests/test_puppetfileserver.aug:20: trailing whitespace. - remote: +allow * - remote: error: hook declined to update refs/heads/master - ! [remote rejected] master -> master (hook declined) - - Removing white space for now. - -2011-08-11 Dominic Cleal - - PuppetFileserver: support same-line comments and trailing whitespace (2.7.3rc1) - Fixes ticket #214 - -2011-08-10 David Lutterkort - - Spacevars: rename toplevel lens to lns - Leave simple_lns as an alias for backwards compatibility - -2011-08-08 David Lutterkort - - * examples/fadot.c: accept -h option to print usage - -2011-07-25 David Lutterkort - - .gitignore: ignore tests/test-run - - Version 0.9.0 - - Minor fixes to make distcheck pass - -2011-07-22 David Lutterkort - - path expressions: parse [expr1 or expr2] correctly - Since commit ea010d85, we would interpret the predicate [e1 or e2] as - matching any node with a child labelled 'e1 or e2'; this patch restores the - semantics that the predicate is true if either e1 or e2 are true. It does - the same for [e1 and e2] - - 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 - - aug_mv: report EMVDESC if move would move a node into its descendant - - path expressions: produce straight augeas errors when it makes sense - Some errors, especially matching no nodes or multiple nodes in - pathx_expand_tree can be directly translated to AUG_ENOMATCH and - AUG_EMMATCH, and there's no need to give pathx details about the error - - Fix some of the errors reported by coverity - These are some of the errors by running coverity on augeas 0.8.0 - -2011-07-18 Mathieu Arnold - - Aliases: allow spaces and commas in aliases; add docs - -2011-07-11 Dominic Cleal - - Sudoers: support users:groups format in a Runas_Spec line for sudo -g - Fixes ticket #211 - -2011-07-11 David Lutterkort - - * tests/test-bug-1.sh: fix test - The test caused an augtool failure for all the wrong reasons - -2011-07-06 David Lutterkort - - Php: include files from Zend community edition - Fixes ticket #210 - -2011-07-06 Craig Dunn - - Properties: new lens for Java properties files - Fixes ticket #194 - -2011-07-01 Dominic Cleal - - Grub: allow "bootfs" Solaris/ZFS extension for dataset name - Fixes ticket #201 - -2011-07-01 John Morrissey - - Spacevars: add two more filse to parse by default - Fixes ticket #202 - -2011-07-01 David Lutterkort - - Interpret escape sequences in function regexp() in path expressions - The wildcard character '.' in regular expressions, just as in the rest of - Augeas, does not match an end of line. It is therefore crucial to be able - to write '(.|\n)' to match any character, including newlines. - - * src/regexp.h: (make_regexp_unescape): new function; (make_regexp_dup) - removed - * src/regexp.c: (make_regexp_unescape): new function; (make_regexp_dup) - removed - * src/pathx.c: (nodeset_as_regexp, func_regexp_or_glob): use - make_regexp_unescape - -2011-06-29 Dominic Cleal - - Sudoers: add CSW paths, /opt/csw/etc and /etc/opt/csw/sudoers - - 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 - - Fixes ticket #205 - -2011-06-29 David Lutterkort - - * tests/test-bug-1.sh: fix broken logrotate file - -2011-06-08 Raphaël Pinson - - Implement multiline values in inifile.aug - -2011-05-14 David Lutterkort - - * src/augeas.c (static_nodes): add list of pathx functions to /augeas/version - -2011-05-12 David Lutterkort - - Grub: allow kernel path to start with a device like (hd0,0) - Fixes ticket #199 - - * examples/fadot.c: include , link against GNULIB - -2011-05-10 David Lutterkort - - tests: expand what the valgrind target runs - - * src/pathx.c: rename CHECK_ERROR{,_RET0} to RET{,0}_ON_ERROR - This should make it harder to misuse them and cause memory leaks - - * src/pathx.c (ns_from_locpath, parse_relative_location_path): free memory on error - - * tests/test-xpath.c: allow running individual tests from the command line - - * src/pathx.c: fix leaking of function arguments - - path expressions: allow concatenating strings and regexps with '+' - - path expressions: add operator '!~' - - path expressions: add 'glob' function that constructs regexps from globs - - regexp: add make_regexp_from_glob to convert globs to regexps - - regexp: add convenience function make_regexp_dup - - path expressions: allow passing a nodeset to function regexp - - * src/pathx.c (check_app): allow overloaded functions - Make it possible to have multiple functions with the same name, but - different signatures. All variants of a function must have the same arity, - they can only differ in their return type and the types of the arguments. - - Keep a dummy struct info in struct error for convenience - * src/errcode.h (struct error): at a info member - * src/augeas.c (aug_init): set up the struct info in struct error; - (aug_close): free the struct info in struct error - - * src/augtool: store history in ~/.augeas/history - -2011-05-04 David Lutterkort - - Xorg: accept InputClass section - -2011-05-03 David Lutterkort - - Xorg: autoload from /etc/X11/xorg.conf.d/*.conf - Based on patch by manugupta - - Fixes bug #197 - -2011-04-29 David Lutterkort - - 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. - - Fixes BZ 700608 - -2011-04-15 David Lutterkort - - Version 0.8.1 - - Iptables: handle --tcp-flags - Fixes bug #157 - -2011-04-14 David Lutterkort - - * src/augtool.c: respect autosave flag when executing a single command - Fixes bug #193 - -2011-04-13 Erinn Looney-Triggs - - Grub: support the 'device' directive for UEFI boot - Fixes bug #189 - -2011-04-13 David Lutterkort - - Access: support the format @netgroup@@nisdomain - Fixes bug #190 - - * lenses/tests/test_fstab.aug: test that we parse SELinux context correctly - -2011-03-25 David Lutterkort - - Httpd: remove duplicate inclusion of /etc/httpd/conf/httpd.conf - -2011-03-25 Bill Pemberton - - Deal with continuation lines in httpd.aug - Apache allows config lines to be continued with a backslash, but the - lens couldn't deal with it. Change the value sep_spc to deal with - continuation lines as found in interfaces.aug - - 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 - - Exclude /etc/yum/pluginconf.d/versionlock.list from yum.aug - The versionlock plugin puts a file in /etc/yum/pluginconf.d that is - not a yum config file so yum.aug shouldn't try to parse it. - -2011-03-23 David Lutterkort - - Mysql: include /etc/my.cnf used on Fedora/RHEL - Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688053 - - Httpd: include /etc/httpd/conf/httpd.conf used on Fedora/RHEL - Fixes https://bugzilla.redhat.com/show_bug.cgi?id=688149 - -2011-03-22 David Lutterkort - - * src/lexer.l: fix a few compilation warnings - - Eliminate global variable 'comment_depth' in lexer - -2011-03-19 Francis Giraldeau - - Add support for configfile and background in grub - Test for the new configuration directives are also provided. - - Thanks to Onur Küçük for the patch. - -2011-03-18 Raphaël Pinson - - #include is also valid in sudoers.aug - - Add support for #includedir in sudoers.aug and test (ticket #188) - -2011-03-17 Francis Giraldeau - - Support sudoers in nsswitch.aug - nsswitch.conf support a configuration item to specify database backend, this - commit adds the support for it. - - Fix bug #187 - - 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 - follows was not handling the NULL case, leading to a segmentation fault. By - checking for NULL value, the error is thrown adequately. - - Fix bug #186 - - Thanks to spamaps for the help to resolve this issue. - -2011-03-16 David Lutterkort - - * src/lexer.l (augl_init_lexer): really close the input file on error - -2011-03-16 Richard W.M. Jones - - Add FreeBSD /etc/rc.conf file to Shellvars lens. - -2011-03-15 David Lutterkort - - Replace erroneous assert(0) with proper error report - * src/put.c (create_union): report an error to the user if none of the - alternatives match - * lenses/tests/test_shellvars.aug: add a test to trigger that code path - in create_union - - Fixes bug #183 - -2011-03-10 David Lutterkort - - * src/augeas.c (aug_init): check return value of argz_* for ENOMEM - -2011-03-10 Matthew Booth - - Fix parsing of fstab entries containing fscontext SELinux option - Systems using SELinux can contain an fstab option like: - fscontext=system_u:object_r:removable_t - - The fstab lens is currently too strict, and doesn't allow colons in the value. - This patch relaxes the parsing to make it as lax as possible within the - constraints of the syntax. - -2011-03-08 David Lutterkort - - Be more defensive about closing input files for the lexer - -2011-03-04 David Lutterkort - - Explain using ./src/try - * HACKING: document the various modes of using ./src/try - * src/try: read commands from build/augcmds.txt rather than /tmp; use a - more sensible default if augcmds.txt does not exist - -2011-03-03 Matthew Booth - - Use getopt-gnu from gnulib for AIX support - - Update to gnulib commit c2090a8 - Required for updated getopt-gnu license. - -2011-03-03 Raphaël Pinson - - Remove trailing spaces in lenses/tests/test_nagiosobjects.aug - - Add nagiosobjects.aug based on Sebastien Aperghis' work. - - Remove trailing spaces in nagioscfg.aug - - Improve nagioscfg.aug as per Sebastien Aperghis' work. - -2011-03-02 Raphaël Pinson - - Fix single quotes support in httpd.aug. - - Support single quotes in httpd.aug. Add unit test for it in test_httpd.aug. - -2011-03-02 David Lutterkort - - * tests/fatest.c (testManualAmbig): don't use '$' in variable names - Breaks on, at least, AIX - -2011-03-02 Raphaël Pinson - - Add Sep.equal, used in nrpe.aug - - Changes in nrpe.aug Remove wrong ^ in comment regex Use Util.comment_generic Use generic modules Improve NaturalDocs documentation - -2011-02-23 David Lutterkort - - 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. - - 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/ - -2011-02-23 Dominic Cleal - - Split Solaris multiboot argument for the kernel path into @path node (ticket #158) - -2011-02-22 Francis Giraldeau - - Add aug_span API function V2 - aug_span API function provides information about the node of the specified - path. It sets the absolute path of the file name and spans of label, value - and span inside the node. The span includes all matching chars of the actual - lens and it's descendant. Hence, the top level node will span the entire file. - It returns 0 in case of success and -1 if the node is not associated to a file - or if the path is invalid. The main use case is to make possible to display - the related file with the node elements hightlighted in a UI. - - The API option AUG_NO_NODE_SPAN provided to aug_init disable the allocation - structures to keep node spans. It saves about 5% of memory for a typical - tree. - - * src/augeas.c : add aug_span implementation and option handling to aug_in - according to the option /augeas/span in the tree - * src/augeas.h : add declaration of aug_span and constants for option - * src/augeas_sym.version : make the new function visible in libaugeas - * src/augtool.c : add the "nodepos" command to augtool - * src/get.c : gather filename, label, value and span spans if any - * src/info.c : create and release functions for struct node_span - * src/info.h : add definition of struct node_info - * src/internal.h : add node_info to struct tree - * src/transform.c : duplicate filename string - * tests/test-load.c : 3 basic unit tests for general correct behavior - -2011-02-22 Raphaël Pinson - - Add short options for --nostdinc, --noload and --noautoload Update manpage and pod accordingly - - Distribute bcprules.sty and xpath.txt - -2011-02-19 Raphaël Pinson - - Add indented_title_label in inifile.aug Use indented_title_label in mysql.aug Adjust test for mysql.aug accordingly - -2011-02-18 Raphaël Pinson - - Allow indentation for "iface" entries in interfaces.aug (Fix ticket #182) Add unit test for "iface" indentation - -2011-02-16 Francis Giraldeau - - Minor code format cleanup - * Cut long lines to 80 chars - * Indentation fix - - Fix memory leak with recursive square lens - -2011-02-16 Raphaël Pinson - - Remove trailing whitespaces in util.aug - - Add comment_c_style and comment_multiline Add empty_generic and make empty a call to it Add empty_c_style to complement comment_c_style - -2011-02-15 Francis Giraldeau - - Fix segfault in get.c with L_MAYBE lens (bug#180) - When a L_MAYBE lens was the last child of a L_CONCAT inside a L_SUBTREE, then - the match in visit_exit top_frame(rec_state)->lens == lens->child was true, - causing combine of a frame when it shouldn't. This test is true because there - is no other lens following in the concat in this special case, hence the top - frame matched the child of the L_MAYBE. - - To avoid this special case, we propose to push L_MAYBE lens on the frames - stack. If L_MAYBE is encountered in visit_exit, we pop at least one frame and - two if the child match. This way, the stack is always valid. - - Closes trac ticket #180. - -2011-02-15 Raphaël Pinson - - Improve vim syntax file - -2011-02-14 David Lutterkort - - man pages: update man page for augtool - -2011-02-14 Raphaël Pinson - - augtool: add --interactive option - This option runs an interactive shell after evaluating STDIN or an explicit - inputfile - -2011-02-14 David Lutterkort - - Mysql: change default comment delimiter from ';' to '#' - Fixes bug #181 reported by devzero - -2011-02-06 Francis Giraldeau - - Add Dhcpd lens - * Support unquoting for allow/deny statements - * Append new line to block statement braces by default - * Add missing string and integer statements according to man dhcpd.conf - * Remove trailing white space from the lens file - - Replace seq by label in option list - - The counter/seq doesn't garantee that node label "1" will get at the first - position. Positional arguments are ordered, hence the sequence may be - misleading. This is why a fixed label for sequence nodes are better. - -2011-01-28 Raphaël Pinson - - Support directives without arg in httpd.aug - * Use sep.aug in httpd.aug Modify Sep.opt_space to make it fit the - definition in httpd.aug (it's only used here) - * Allow directives without arguments in httpd.aug - * Adjust test_httpd.aug to test argument-less directives - -2011-01-25 Francis Giraldeau - - Fix httpd.aug doc, filter and add to checks - * Added other contributors to authors - * Changed the licence to LGPLv2+ - * 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. - - * Generic sections with square lens - * Generic directives - * Arguments of sections and directives are handled as list - - The lens doesn't support automatic quoting of string values, because arguments - are separated by spaces and it raises ambiguity when using unquoting. The lens - doesn't support either long lines splitted by backslash. - -2011-01-25 David Lutterkort - - * src/pathx.c (store_error): make sure pos_str is always NUL terminated - Fixes bug #178 - -2011-01-19 Fred - - PuppetFileserver: new lens for Puppet's fileserver.conf - -2011-01-19 David Lutterkort - - * man/augtool.pod: fix typos - Fixes https://bugzilla.redhat.com/show_bug.cgi?id=628502 - -2011-01-14 David Lutterkort - - Allow compiling with NDEBUG defined - * src/errcode.h (ensure0): do not mention 'error' label when NDEBUG is - defined - * src/pathx.c (coerce_to_bool, eval_pred): make sure we return something - when assert(0) is compiled away - -2011-01-13 Francis Giraldeau - - Fix a small bashism from test script - -2011-01-13 David Lutterkort - - Xorg: "position" in "screen" section is optional; allow "Extensions" section - Patch by omzzk - - Fixes bug #175 - -2011-01-11 David Lutterkort - - Replace augtest by test-augtool.sh - This removes the silly dependency on Ruby, since augtest was the only - Ruby script in the whole source tree. - - The test files for test-augtool.sh live in tests/test-augtool, and are - functionally identical to the Ruby test files tests/*.rb. The only - exception is that test-root.rb has been removed - it tested something that - is better tested in test-xpath.c - - The new test-augtool.sh test is also a little more efficient in that it - only copies the file needed by a test into the root, and only sets the lens - 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 - - * src/pathx.c (store_error): never append to an uninitialized string - - * src/augtool.c: be a little more quiet - Some of the commands used to print unconditionally; we now only print if we - should be echoing (i.e., if --echo is given on the command line or if stdin - is a tty) - -2011-01-11 Fred - - Crypttab: new lens for /etc/crypttab - -2011-01-11 Raphaël Pinson - - In autosave mode, print "save" when in echo or interactive mode. Remove comma at the end of enum list. - -2011-01-10 Raphaël Pinson - - 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 - * Do not print (null) lines when using --echo - * Add test for --autosave in test-save-mode.sh - - Fixes ticket #172 - -2011-01-07 David Lutterkort - - bootstrap: add sys_wait module - Fixes bug #164 - -2011-01-07 Dominic Cleal - - Add support for Solaris multiboot kernels with slashes in the first kernel argument (Fix ticket #158) - - Allow kernel$ and module$ extensions to GRUB for Solaris (Fix ticket #158) - -2011-01-07 David Lutterkort - - Shellvars: read various snmpd config files - Patch by erinn - - Fixes ticket #170 - -2011-01-07 Dominic Cleal - - Solaris_system: new lens for /etc/system (Solaris) - File is used to configure the kernel, module loading and parameters. The - system(4) man page gives a good overview of the commands and a sample file: - http://docs.sun.com/app/docs/doc/816-5174/system-4?l=en&n=1&a=view - - It supports moddir, rootdev, rootfs, exclude, include, forceload and set. - The set tree is broken down quite a lot as the operator can vary (equals, - bitwise AND and OR). - -2011-01-07 David Lutterkort - - Resolv: allow comments starting with semicolon - Patch by erinn - - Fixes bug #173 - -2011-01-03 Raphaël Pinson - - Add automount, netmasks and sendmailvars keywords for databases in nsswitch.aug - - Add bootparams as database keyword (Fix ticket #171) Update test file accordingly - -2010-12-29 Raphaël Pinson - - Rename "host" nodes as "origin" (breaks compatibility) Implement "except" keyword as a subtree Make origin_re less strict to fix comment #6 in ticket #166 Implement multiple users and netgroups Improve test file - -2010-12-28 Francis Giraldeau - - Add xml lens - The XML lens parse arbitrary XML documents. Most, but not all features of XML - standard are implemented, partially because the nature of augeas. Tests comes - from OASIS test suite. - - Supported: - * Document type declaration: elements, attlist, entity - * XML Prolog - * XML comments - * XML processing instructions - * Neested elements, including empty elements - * Element attributes - * Mixed content, text and elements - * CDATA sections - - Not supported: - * Single quotes attributes: double quotes is mandatory - * External entity reference, because augeas can't load a related file within a lens - * Document validation: augeas don't enforce DTD - - This lens doesn't respect the PutGet law, becuse of an ambiguity in union.put - with text nodes. If a text node is created as a sibling of another text node, a - put and a get will merge those two nodes. In practice, no error occur and this - is a desirable behavior. - -2010-12-22 Raphaël Pinson - - Fix ticket #169 and add unit tests by Sergio Ballestrero. - -2010-12-20 David Lutterkort - - * src/pathx.c (func_regexp): do not SEGV on error; provide better error msg - Fixes bug 168 - - * when the passed in regexp had a syntax error, we would leave the - interpreter variable at VIND uninitialised, but tagged as a regexp. As - a result, we'd SEGV when that slot in the variable table is - freed. Properly initialize slots in the variable table to NULL, and - store the regexp as soon as it has been built (before compilation) - there to address that. - * when a regexp had a syntax error, we would just drop the details of the - syntax error on the floor. We now include that in the error details so - that the user has some hint to how the regexp is foobared - - # Please enter the commit message for your changes. Lines starting - # with '#' will be ignored, and an empty message aborts the commit. - # On branch master - # Changes to be committed: - # (use "git reset HEAD ..." to unstage) - # - # modified: src/pathx.c - # - # Untracked files: - # (use "git add ..." to include in what will be committed) - # - # doc/cfg.txt - # doc/naturaldocs/conf/lenses/Menu_Backup.txt - # doc/naturaldocs/conf/lenses/Menu_Backup_2.txt - # p/ - # site.orig/ - # tests/root-small/ - # tests/root/etc/network/ - # tests/root/etc/samba/ - # tests/root/etc/sysconfig/system-config-firewall - -2010-12-10 Francis Giraldeau - - 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 - square lens verify that open and close tags are matched in the get direction, - and put direction handles the close tag by copying the key. - - * src/builtin.c: add "square" keyword to language - * src/lens.c: lns_make_square to compile the lens from actual simpler - lenses - * src/lens.h: append L_SQUARE to lens_tag enum to identify the square lens - type object - * src/jmt.c: handle square lens in parser - * src/get.c: add char* square to state struct to hold the last L_DEL in - square to perform syntax check, and add all get handling functions for - L_SQUARE - * src/put.c: modify create_del to render current key when default string is - NULL and add all put handling functions - * tests/modules/pass_square.aug: unit tests to validate the square lens, - regular and recursives - -2010-12-09 Francis Giraldeau - - Add test for lens-access.sh in Makefile - -2010-12-02 Raphaël Pinson - - Relicense pg_hba.aug as LGPLv2+ as the rest of Augeas. - -2010-12-02 Lorenzo Dalrio - - Add access.aug and associated test file - -2010-12-02 Raphaël Pinson - - Fix GPL into LGPLv2+ for a series of lenses. - -2010-11-24 Francis Giraldeau - - Ignore eclipse project files - -2010-11-22 Raphael Pinson - - Add support for "map" entries in grub.aug and adapt test accordingly (Fix ticket #148) - -2010-11-19 David Lutterkort - - Version 0.7.4 - -2010-11-19 Raphaël Pinson - - * lenses/util.aug: improve management of eol comments - - add comment_generic - - use comment_generic in comment - - add comment_eol - - add comment_or_eol - - Use comment_eol and comment_or_eol in some lenses to fix default eol - 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). - -2010-11-18 Raphael Pinson - - Make filter a View in sudoers.aug to make it appear properly in doc - - Improve doc on services.aug - - Add some doc to pg_hba.aug - - Add a bit of doc to pbuilder.aug - - Add all missing lenses to Menu.txt - -2010-11-18 Mathieu Arnold - - Add syslog.aug and associated test file - -2010-11-18 Raphaël Pinson - - resolve refresh_pattern into fields Parse "extension_methods" into a list break entries upgrade_http0.9 and broken_vary_encoding down similar to what http_access does - Fix ticket #46 - -2010-11-18 Mathieu Arnold - - On FreeBSD (at least) the sudoers file is in /usr/local/etc/. - -2010-11-18 Francis Giraldeau - - Parse ulimit builtin in shellvars.aug (fix ticket #73). - - Accept double quotes in arguments in postfix_master.aug, fix bug# 69 - -2010-11-18 David Lutterkort - - * 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 - over the current restrictions. - - Fixes bug https://fedorahosted.org/augeas/ticket/139 - -2010-11-18 Matthew Booth - - Fix crasher in ast.c:dict_pos on i686 with gcc 4.5 and -O2 - This patch works around what appears to be an optimization bug in gcc 4.5. The - symptom of the bug is that dict_pos, called from dict_lookup, receives an - invalid value when accessing dict->used. The following ticket describes the bug, - and includes a simple test case: - - https://fedorahosted.org/augeas/ticket/149 - - Adding a printf to dict_lookup immediately before the dict_pos call reveals that - dict->used has a value of 30 in the crashing case on my F14 system. A printf - added to the first line of dict_pos shows dict->used has an apparent value of - 16777246. This causes an invalid array lookup shortly afterwards, which causes - the crash. 16777246, interestingly, is 2^24 + 30, where 24 is the size of the - dict->used bitfield. This should obviously not be possible, suggesting either a - compiler bug or undefined behaviour due in incorrect use of the language. Having - re-read the relevant section of K&R, I can't see anything about this use of - bitfields which might be a problem, except that: 'Fields may be declared only as - ints; for portability, specify signed or unsigned explicitly.' uint32_t resolves - to 'unsigned int' on i686, and in any case, replacing it with 'unsigned int' - does not solve the problem. As it stands, I believe this is a bug in the - optimizer. - - The above ticket contains an alternate patch which copies dict in dict_pos, - which also prevents the crash. However, adding anything to dict_pos which - prevents the compiler from optimising dict away achieves the same result. For - example: - - printf("%p", dict); - - This patch instead removes the bitfields in struct dict. While this is a - workaround, these bitfields save at most 1 word of memory per struct, but at the - cost of mis-aligned access. The patch does not increase the size of - dict_max_size to UINT32_MAX, as the lower maximum serves as a better guard - against runaway memory allocation. - -2010-11-17 Raphael Pinson - - Allow underscore in chain_name for iptables.aug and adjust test accordingly. - -2010-11-17 Erinn Looney-Triggs - - Add login_defs.aug and associated test file. - -2010-11-14 Marc Fournier - - pg_hba: added debian systems path to filter - fixes #154. - - util.aug: exclude unneeded files on debian systems (fix ticket #153) - -2010-11-05 Raphael Pinson - - Map comments and use Util.comment and Util.empty in order to full fix ticket #151. Adapt test accordingly. - - Allow indented lines in aptsources.aug (Fix ticket #151) and add associated test - - Allow "=" as a separator for title in grub.aug (Fix ticket #150) and adapt test accordingly. - -2010-11-04 Raphael Pinson - - Fix example in lens - -2010-11-02 Raphael Pinson - - Add a few lenses to Menu.txt - - Add shells.aug and associated test - -2010-11-01 Raphael Pinson - - Add mke2fs.aug and associated test - -2010-10-31 Raphael Pinson - - Add support for rpc services in inetd.aug, rework lens to allow it and add tests accordingly. - - Parse option values in fstab.aug, adapt test file accordingly. - - Map service names in node values instead of node names to prevent variable node names. - -2010-10-29 Raphael Pinson - - Add /etc/mtab to known files - -2010-10-28 Raphael Pinson - - Fix paramater into parameter in ND comment - -2010-10-27 Raphael Pinson - - Use generic modules in bbhosts.aug - -2010-10-26 Francis Giraldeau - - Fixes bug #144: wrong behavior of iter concat - This patch fix the list_tail_cons macro to fastforward the tail list when - the first item is added to the list, otherwise if the first item added when - the list is NULL has two item, the tail points the the first item. - -2010-10-26 Raphael Pinson - - Fix filter to use proper file - - Remove trailing whitespace - - Add nsswitch.aug and associated test - -2010-10-26 Francis Giraldeau - - Add debugging information about lens hierarchy - When compiled with --enable-debug, will compile a function to output the lens - hierarchy in dot files. Enable this specific debug info with - AUGEAS_DEBUG=lenses - -2010-10-26 David Lutterkort - - Sudoers: allow 'visiblepw' parameter flag - Fix provided by christj. Fixes bug #143 - -2010-10-26 Francis Giraldeau - - Add clearm command to augtool - The clearm command is the same as setm, but sets the node value to - NULL in place of a string, suitable in some use case. - - Fix ticket #146 - -2010-10-26 Raphael Pinson - - /etc/sudoers.d is now supported (at least in Debian and Ubuntu) - - Add resolv.aug and test - -2010-10-14 Aurelien Bompard - - Pg_hba: new lens and test - Fixes bug #140 - -2010-09-30 Raphaël Pinson - - Add a few lenses to Menu.txt - - Use Rx.ipv4 and Rx.integer in openvpn.aug - - Use generic modules Rx, Sep and Build in keepalived.aug - - Add email_addr to rx.aug - - Improve build.aug - - Improve documentation of build.aug - -2010-09-29 Raphaël Pinson - - Move Build, Rx and Sep into Generic Modules, add Keepalived - -2010-09-24 Raphaël Pinson - - Improve keepalived.aug - -2010-09-23 Raphaël Pinson - - Add a lens for keepalived.conf and associated test - -2010-09-23 David Lutterkort - - Preserve parse errors under /augeas//error - With the changes in commit 5ee81630, a subtree in /augeas/files that is - dirty after trying to load all files indicates a file that was loaded - before, but is not loaded anymore (e.g., because the set of lenses changed - since the last time we loaded) In that situation, both the subtree in - /augeas/files as well as the corresponding subtree in /files is deleted. - - The code in store_error, which is called by load_file when a parse error - happens, would leave that subtree in /augeas/files dirty. This commit fixes - that by making sure we mark the error entries as clean. It also revamps - store_error to use the lighter-weight tree_xxx functions instead of the - aug_xxx functions. - - Fixes bug #138 - -2010-09-21 Raphaël Pinson - - * src/augtool.c: add -f|--file option to get commands from an input file - -2010-09-21 Marc Fournier - - Nrpe: new lens and tests. - - Odbc: new lens and tests. - -2010-09-15 David Lutterkort - - When setting a tree node to the value it already has, do not modify the tree - -2010-09-09 David Lutterkort - - * 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 - files. That in turn causes freshly saved files to be unnecessarily reloaded - on the next aug_load. - - * src/transform.c (mtime_as_string): tolerate a NULL filename, and return - an mtime of 0; (transform_save): pass the full file name, including the - root to add_file_info - * tests/test-load.c (testReloadDeletedMeta): the test is now - time-sensitive; to work around that, set the mtime of the changed tree - to the original mtime of the file - * tests/test-save.c (testMtime): verify that we record the actual mtime - and not just 0 in the tree after a save. - - Thanks to Laine Stump for spotting this - -2010-08-27 Francis Giraldeau - - Fix yum tests - * Modify separator for list values to accept simple spaces - * Add all alternatives for baseurl and gpgkey - * Add tests to verify the correct behavior - -2010-08-27 David Lutterkort - - * bootstrap: add locale module from gnulib - Fixes bug #137 - -2010-08-16 David Lutterkort - - Yum: accept continuation lines for gpgkey - Fixes bug #132 - -2010-08-16 Francis Giraldeau - - * src/get.c (visit_exit): fix segfault from empty stack for L_MAYBE - Fixes bug #136 - -2010-08-06 David Lutterkort - - 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 - (2) Do not report an error if the expression evaluates to a non-empty - nodeset - - * src/augeas.c (aug_defvar): split creating metadata under - /augeas/variables into record_var_meta; (aug_defnode): do not return an - error when expr evaluates to nonempty node set; record variable - definition - * tests/test-api.c: add tests for defvar and defnode behavior - -2010-08-05 David Lutterkort - - Use pathx_aug_parse rather than pathx_parse in various places - Since pathx_aug_parse makes sure the symbol table stays updated, use - pathx_aug_parse whereever that makes sense. - - Rename parse_user_pathx to pathx_aug_parse - * internal.h (pathx_aug_parse): new protoype - * 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 - nodesets in variables, since we did not pass the global symtab into - tree_replace. - - * src/internal.h (tree_replace): pass in struct augeas, so that we have - access to the global symtab - * src/augeas.c (tree_replace): make sure we create the pathx with the - global symtab - * src/transform.c (load_file): adapt to new prototype for tree_replace - * 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 - * root/boot/grub/menu.lst: symlink to grub.conf - -2010-08-03 Raphael Pinson - - Sudoers: allow escaped spaces in user/group names - Fixes bug #124 - -2010-07-26 David Lutterkort - - Limits: also look for files in /etc/security/limits.d - Suggested by David Timms - -2010-07-23 Tim Stoop - - Mysql: lens for MySQL's *.cnf files - -2010-07-23 David Lutterkort - - Sysconfig: new lens for a subdialect of shell - Using shell files with simple variable assignments is a very popular config - file format. The Shellvars lens doesn't serve those files perfectly well, - since it tries to preserve details important for general shell scripts that - are ignored by sysconfig files. - - This lens is a variation on Shellvars that changes a few important aspects - of it: - - * Strip quotes from values when reading a file, and restore quotes as - needed upon writing - * Pretend there's no difference between single and double quotes (this - assumption makes it possible to add quotes as needed solely based on - syntax) - * Do not support shell arrays or backticks; support for these could be - restored by somebody sufficiently motivated, though neither of them - should be used in a sysconfig file - - 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. - -2010-07-21 David Lutterkort - - * 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 - node, since tree_insert tried to report the error into a struct error that - was NULL. - - 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 '= *') - - * src/errcode.h (reset_error): new function - * src/augeas.c (api_entry): use reset_error - * src/errcode.c (reset_error): new function, with code from api_entry - * src/errcode.h (reset_error): add prototype - -2010-07-20 Francis Giraldeau - - * src/put.c (split_concat): fix memory leak when split doesn't match - -2010-07-19 David Lutterkort - - Use gnulib from a submodule - This allows us to record the exact changeset from gnulib that everybody - should be using. - -2010-07-19 Frederik Wagner - - Added /etc/sysconfig/suseconfig to shellvars lens. - -2010-07-08 Francis Giraldeau - - Adding is_scan in the condition to accept an item - -2010-06-30 Matthew Booth - - Device_map: new lens for grub's device.map - -2010-06-29 David Lutterkort - - Avoid unnecessary file parsing when reloading the tree - We used to reparse every file we knew about upon aug_load. Now, we only - reparse files if the file has changed on disk. - - We test a few scenarios to make sure aug_load retains its behavior of - 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 - tree_store_value - - Make tree_clean available outside of augeas.c - * 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 - - Move 'run' test utility to cutest.[ch] - * tests/cutest.h (run): add prototype - * 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 - evaluating the expression with which they were defined initially again. - - 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 - -2010-06-22 David Lutterkort - - Version 0.7.2 - - * augeas.spec.in: fix ownership of /usr/share/augeas - fixes BZ 569393 - -2010-06-17 David Lutterkort - - Test behavior of aug_setm - * src/augeas.c (aug_setm): return number of modified nodes - * tests/test-api.c (testSetM): compliance tests for aug_setm - - * src/augeas.c (aug_setm): do not segfault when sub is NULL - -2010-06-17 Frederik Wagner - - Tests for new aug_setm function - Test through augtool calls. - - Exposed aug_setm to augtool. - -2010-06-17 David Lutterkort - - Add aug_setm to API - * src/augeas.h (aug_setm): new public API call - * src/augeas.c (aug_setm): implement setting multiple nodes - * src/augeas_sym.version: export symbol aug_setm - -2010-05-24 Frederik Wagner - - Shellvars: added SuSE sysconfig puppet files - For SuSE systems, added /etc/sysconfig/{puppet,puppetmaster} to lens. - -2010-05-18 Frederik Wagner - - List handling shellvars_list lens added. - Lens shellvars_list has been added to treat variables in specific files - as lists of words, e.g. in /etc/sysconfig/ 'kernel' and 'bootloader'. - - * lenses/shellvars.aug: removed include for /etc/sysconfig/kernel - * lenses/shellvars_array.aug: new lens - * lenses/tests/test_shellvars_array.aug: test for new lens - -2010-05-13 David Lutterkort - - Add modules_conf to naturaldocs Menu - - Add /etc/modules.conf from hell - Actually, from http://www.janerob.com/rob/ts5100/modules.conf - -2010-05-13 Matthew Booth - - Modules_conf: new lens for modules.conf and conf.modules - - Modprobe: Refactor to make re-use easier - -2010-05-11 David Lutterkort - - * src/augeas.c: record expression for defvar in /augeas/variables - -2010-05-07 David Lutterkort - - * Grub: handle comments within a boot stanza - Fixes RH BZ 590067 - - Adjust copyright notices - - copyright is from creation of file through 2010 - - adjust copyright owner according to Red Hat's policy - -2010-05-04 Raphael Pinson - - Group: add test for disabled account ('!' in password field) - -2010-04-27 seph - - Shellvars: process /etc/environment - -2010-04-26 Nicolas Valcárcel Scerpella - - Iptables: also look for /etc/iptables-save - This is where Debian keeps iptables rules - -2010-04-26 Frederik Wagner - - securetty: added handling of emtpy lines/comments - * lenses/securetty.aug: - added handling of comments and empty lines - * lenses/tests/test_securetty.aug: - added test for enhanced lens - -2010-04-21 David Lutterkort - - Version 0.7.1 - -2010-04-21 Simon Josi - - Securetty: new lens and test for /etc/securetty - -2010-04-21 David Lutterkort - - Sudoers: use example file from Fedora 13 - This is causing trouble with release-0.7.0, but not this revision. - - 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 - will need to be addressed. - - 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 - -2010-04-20 David Lutterkort - - Debctrl (multi_line_entry): fix bad regexp - The lens 'del /^ / " "' is not valid, since we do not allow '^' as a meta - character. Changing that to 'del / / " "' exposed a typecheck problem in - lns: both multi_line_entry and eol match blank lines. Fixed this by - requiring that a multi_line_entry has to have at least one non-blank - character. - - 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 '\|' - - * tests/fatest.c (testExpandCharRanges): test escaping of literal '|' - -2010-04-19 David Lutterkort - - * tests/fatest.c (print_regerror): do not use alloca - - * bootstrap: pull in isblank explicitly - Fixes bug #111 - - * src/lens.c (lns_check_rec): fix refcounting mistake on error path - Fixes bug #120 - - * 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. - - Fixes bug #121 - -2010-04-16 David Lutterkort - - jmt: distinguish between successful parse and syntax error at end of input - If a syntax error happened after the last character of the input string - (e.g., becuase the input was incomplete), rec_process would think the parse - was successful, and then notice that there was no parse result. That would - lead to an incorrect error message hinting at an internal error, when it - was really a syntax error. - - By changing the return value for jmt_visit, it's now possible to - 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 - - * lenses/tests/test_logrotate.aug: add test for files separated by newlines - This test the fix for bug #104, commit fe0453ce. - -2010-03-11 David Lutterkort - - * lenses/group.aug (password): remove backslashes - Backslashes in char classes are taken literally, they do not escape a - character. - -2010-03-11 root - - Group: Added disabled password support - * lenses/group.aug: '*' and '!' are allowed chars for disabled password - * lenses/tests/test_group.aug: added test for lens change - -2010-03-11 David Lutterkort - - * src/lens.c (lns_check_rec): avoid use of uninitialized 'result' - The ensures can fail, and we check whether result is NULL in the error - path. - -2010-03-05 David Lutterkort - - * src/lens.c (lns_format_atype): format L_REC lenses - - * src/lens.c: remove asserts; better error for missed tag in switch - - Shellvars: handle a bare 'export VAR' - - Inittab: allow ':' in the process field - Fixes part of bug #109 - -2010-03-05 Tim Stoop - - Approx: allow keywords starting with '$' - -2010-03-04 David Lutterkort - - Approx: lens and test for the approx proxy server - - Produce a better error when iteration stops prematurely during put/create - We now try to include the name of the child node that caused us to stop in - the error message. - -2010-03-03 David Lutterkort - - * src/fa.c: allow the strange regexp syntax '(a|)' - POSIX allows it, and so do we now - - Fixes bug #113 - -2010-03-02 David Lutterkort - - Passwd: parse NIS entries on Solaris - Based on a fix by Stuart Sears - -2010-02-26 David Lutterkort - - * src/fa.c: clean up error macros - The error macros _E, _F, and _N use names reserved for system libraries; - this leads to compile errors at least on Solaris (as reported by lanky). - - Rename _E and _F to E and F, and eliminate _N. - -2010-02-26 Frederik Wagner - - Modprobe: Suse includes - * lenses/modprobe.aug: included /etc/modprobe.conf.local - - Shellvars: Suse includes - * lenses/shellvars.aug: - added include for /etc/sysconfig/network/ifcfg- - - Grub: support empty kernel parameters, Suse incl.s - * lenses/grub.aug: - - added support for kernel parameters of the form "parameter=" - w/o given value - - included /boot/grub/menu.lst - - changed default for delimiter in kw_menu_arg to " " - * lenses/tests/test_grub.aug: changes corresponding to lens change - -2010-02-26 Dominique Dumont - - Debctrl: new lens and test - -2010-02-23 David Lutterkort - - Ntp: add 'tinker' directive - Fixes bug #103 - - Logrotate: tolerate whitespace at the end of a line - Fixes bug #101 - -2010-02-23 Raphael Pinson - - Dhclient: add rfc code parsing - Fixes bug #107 - - Sudoers: allow del_negate even if no negate_node is found - Fixes bug #106 - - Logrotate: files can be separated by newlines - Fixes bug #104 - - Dput: add 'allow_dcut' parameter - Fixes bug #105 - -2010-02-22 David Lutterkort - - * src/augtool.c: ignore empty lines from stdin - We still complain about the nonsensical 'augtool ""'. - - Fixes BZ 566844 reported by Mike Burns - -2010-02-22 Stuart Sears - - Sudoers (parameter_string_nobool_kw): accept "secure_path " - Fixes BX 566134 - -2010-02-19 Tim Stoop - - Nagisocfg: lens and test for /etc/nagios3/nagios.cfg - -2010-02-12 Ivana Hutarova Varekova - - Cgrules: new lens and test - See cgrules.conf for http://libcg.sourceforge.net/ - -2010-02-11 Ivana Hutarova Varekova - - Cgconfig: lens and tests for libcgroup config - See http://libcg.sourceforge.net/ - -2010-02-11 Laine Stump - - * src/transform.c (file_info): fix memory leak - -2010-02-09 David Lutterkort - - * lens.c (ambig_check): pretty print tree type errors - Instead of dumping raw regular expressions for the tree encoding, print out - something resembling our tree notation. - -2010-02-08 David Lutterkort - - libfa: handle the syntax r{min,} properly - * src/fa.c (parse_repeated_regexp): set max = -1 when we see r{min,}; - (re_iter_as_string): when max == -1, print r{min,} - * tests/fatext.c (testExample): add a few tests for this syntax - - * 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) - - 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 - -2010-02-08 Shannon Hughes - - Cobblermodules: lens + tests for cobbler's modules.conf - -2010-02-02 David Lutterkort - - Shellvars: allow spaces after/before opening/closing parens for array - Bug reported by Doug Warner - -2010-02-01 Matthew Palmer - - Sshd: allow optional arguments in subsystem commands - -2010-01-27 David Lutterkort - - * src/augeas.c (tree_replace): don't bother marking the new parent as dirty - We call tree_rm on it earlier, which already marks it as dirty. - - This line also triggered a SEGV when sub == NULL; this happened, for - example, when /etc/apt/preferences was an empty file. - - 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 - -2010-01-25 David Lutterkort - - 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 - - rec_process will also build the jmt if it does not exist yet - - 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 - when we see an L_REC that is marked as rec_internal, since that's the - struct lens that points back to the top of the lens from within it. - - jmt_build now expects to be handed a properly set up recursive lens, which - means that for an L_REC both the internal and external instances have to - exist and be connected - - * src/lens.c (lns_check_rec): defer building the jmt until the end - * 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 - parse tree has only one child. Consequently, we need to start - reconstruction with listing all the children of the root node. - - Split build_tree into build_children (collects a list of child nodes) and - build_tree which creates the tree for a nonterminal. - - To start reconstruction, we now start with collecting the list of children - 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 - The typecheck helpers are all smart enough to not run checks when one of - the types is NULL, as is the case for recursive lenses. - - * src/lens.h (struct lens): explain better how we handle recursive lenses - - * src/jmt.c (build_trace): allow passing in a NULL item - - * src/lens.c (tags): add name for value primitive - - * src/get.c: replace assert's by ensure's - assert aborts, which a library shouldn't do - - * src/errcode.h (ensure0): convenience version of ensure - - * src/get.c (find_seq): properly report OOM, do not call abort - - Remove assert_error_at - This function was dangerous, since it does not jump, and therefore users - will continue doing what they were doing, even if an assertion failed. Use - BUG_ON instead. - - * src/get.c (struct state): make info a pointer - -2010-01-23 David Lutterkort - - * src/lens.c (restrict_regexp): properly report OOM - -2010-01-20 David Lutterkort - - Document the basics of building from git - -2010-01-15 David Lutterkort - - * src/builtin.c: builtins for printing and inspecting lenses - - Add a unit type - The literal '()' is the only member of the unit type. Composition is now - 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 - will evaluate something and then immediately forget it - - * 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 - -2010-01-14 David Lutterkort - - Version 0.7.0 - - Json: lens and tests for generic Json files - - 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. - - With recursive lenses, we can't do the bottom-up typechecking that we do - for regular lenses; we need to consider the whole lens at once. This is - achieved by inserting a callback to lns_check_rec when we parse 'let rec - ident = exp'. - - * src/builtin.c (lns_check_rec_glue): new function - * src/lexer.l: new token LETREC - * src/parser.y: add syntax rule for LETREC and desugar it into a call to - lns_check_rec - * src/syntax.h: make free_term available, constant for name - 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 - - Remember the jmt in the lens and free it when it is no loner needed - - Earley parser based on Jim/Mandelbaum's transducers - - Calculate if a lens's ctype is nullable - - Add a typechecker and constructor for recursive lenses - * src/lens.h (lns_make_rec, lns_check_rec): new functions - * src/lens.c (lns_make_rec, lns_check_rec): new functions - - Suppress buildtime typechecks for L_REC; propagate recursive flag - - * src/lens.c (free_lens): free recursive lenses - - * 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 - should contain a colon-separated list of categories. Besides printing - various thigs on stdout, some debug output is also left in files in the - directory set by the environment variable AUGEAS_DEBUG_DIR, e.g., dot - graphs of various internal data structures. - - * configure.ac: add --enable-debug option - * 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 - - * src/lens.c (ambig_check): report OOM from fa_ambig_example - - * src/fa.c (fa_ambig_example): getting a NULL example is not an error - - * src/syntax.c (compile): give up after the first error - We have no error recovery to speak off; if we keep going, we most of the - time carpet-bomb the user with error messages that are simple follow-ons to - the first error. - - * TODO: deleted, that list is in Trac now - - * src/fa.c (fa_intersect): initialize vars that could be used on error - - * src/fa.c (fa_as_regexp): convert strings more efficiently - Since we are building the transitive closure of the FA, cut down the size - of the FA by first extracting strings and removing their internal states. - - * src/fa.c (fa_as_regexp): fin only accepting state, no trans fin->fin - - Indicate whether an FA uses character ranges or regexps on transitions - * src/fa.c (struct fa): new field trans_re; (fa_as_regexp): set trans_re; - (fa_dot): print regexp rather than char range if trans_re is set - -2010-01-13 David Lutterkort - - Add syntax for case-insensitive regexps - A regexp literal /regexp/i will be converted to a case-insensitive regexp. - - * src/regexp.c (regexp_minus): respect nocase flags - - * src/lens.c (str_to_fa): compile nocase fa when needed - - * 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 - case-insensitive regexps when they are mixed with case-sensitive regexps. - - Adjust all uses of make_regexp. - -2010-01-13 David Lutterkort - - Add fa_expand_nocase to libfa - - Support for case-insensitive operations in libfa - * src/fa.h (fa_nocase, fa_is_nocase): new functions - * src/fa.c (struct fa): new field nocase; (fa_is_basic): a total FA has - two transitions under nocase; (fa_clone): preserve nocase flag; - (union_in_place, concat_in_place, fa_intersect): if one operand is - nocase, and the other isn't, expand the nocase FA to a case-sensitive - one; (totalize): do not add transitions on [A-Z]; (fa_nocase, - fa_is_nocase): new functions; (case_expand): new function - * tests/fatest.c (assertExample): also test against a nocase FA; - (testNoCase): test concat etc. on nocase FA's - - * src/lens.c (subtree_atype): new function - -2010-01-07 David Lutterkort - - Facelift for augtool - This makes augtool somewhat friendlier, mostly because - - - help is organized better: typing 'help' produces a list of commands and - a brief synopsis for each, typing 'help command' prints detailed help - about a command - - augtool now knows about path expressions, so that they do not need to - 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 - /augeas/files/PATH/error - - Pull computing a path underneath /files from a filename into a function - * 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 - lens/info - - * src/transform.c (add_file_info): change what we keep underneath the - 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. - - Produce better error message for multiple matching transforms in save - * src/augeas.h (aug_errcode_t): new error code AUG_EMXFM - * src/augeas.c (errcodes): new error string for AUG_EMXFM; (tree_save): - report multiple transforms as proper error - * tests/test-save.c (testMultipleXfm): new test - - New function transform_file_error - * src/transfrom.h (transform_file_error): add prototype - * src/transform.c (transform_file_error): new function - - New function xfm_lens_name - * 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 - - Xinetd (name): fix bad '-' in character class - -2010-01-05 David Lutterkort - - Do not choke on non-existing lens during save - * src/transform.c (add_file_info): check that lens is non-NULL; - (lens_from_name): provide detailed error message when lens lookup - failed; (transform_validate): copy error from lens_from_name into tree - * tests/test-save.c (testNonExistentLens): new test - - 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 - - Cobblersettings: new lens and test - -2010-01-04 David Lutterkort - - Rename read_file to xread_file - -2009-12-23 David Lutterkort - - * src/lens.c (lns_make_union, lns_make_concat): do not access free'd memory - make_lens_binop may free one of the lenses it gets passed. We can therefore - not reference them after a call to make_lens_binop. - - * src/lens.c (format_lens): minimalistic pretty-printing of a lens - - * src/regexp.c (print_regexp): clean the regexp with fa_restrict_alphabet - -2009-12-18 David Lutterkort - - * 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 - - * src/errcode.h (BUG_ON, ERR_RET, HAS_ERR): new macros - * src/errcode.c (bug_on): implementation for BUG_ON - -2009-12-17 David Lutterkort - - Lokkit: allow '-' in arguments - - Iptables: handle both negation syntaxes - Options can be negated either with '! --option arg' or with '--option ! - arg'. We now handle both, though they lead to slightly different trees - -2009-12-14 David Lutterkort - - * doc/ftdetect/augeas.vim: fix syntax - -2009-12-09 Partha Aji - - Made samba aug accept entry keys with ':' in them - -2009-12-09 David Lutterkort - - Shellvars: allow arrays that span multiple lines - -2009-12-07 David Lutterkort - - Iptables: allow quoted strings as arguments - -2009-11-30 David Lutterkort - - Version 0.6.0 - - Distribute and install vim syntax files - Fixes ticket #97 - - * Makefile.maint: sign tags - - Krb5: allow v4_name_convert in libdefaults section - Fixes part of ticket #95 - - Fstab: allow # in the spec - Fixes part of ticket #95 - - Group: allow empty password field - Fixes part of ticket #95 - - * src/parser.y: properly initialize yylloc - Fixes ticket #96 - -2009-11-25 David Lutterkort - - Properly check regexp literals for syntax errors - * src/regexp.h (regexp_check): new function - * src/regexp.c (regexp_compile_internal): new function to base both - regexp_compile and regexp_check off - * src/syntax.c (check_value): produce a syntax error if regexp does not - pass regexp_check; (check_exp): make sure we do check values - - 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. - - Fixes ticket #94 - -2009-11-25 Matt Palmer - - AptPreferences: add a put test - Make sure we handle an empty file properly, and cleanup the resulting - hassle - -2009-11-24 Matt Palmer - - Normalise records so that empty lines (which are a required part of the syntax) don't creep into the tree - - Support version pins in apt_preferences - -2009-11-23 David Lutterkort - - * tests/Makefile.am (lens_tests): run postfix_access tests - -2009-11-16 Partha Aji - - Added a Post Fix Access lens along with the unit tests - -2009-11-13 David Lutterkort - - * src/lens.c (ambig_check): distinguish error between concat and iteration - - * src/regexp.c (regexp_escape): treat NULL regexps as the empty regexp - - * src/regexp.c (regexp_escape): fix stripping of enclosing parens - Only strip them if they belong together, and not for something like /(a)(b)/ - - * src/syntax.c: spew exceptions less often - print_value: only print exceptions that haven't been seen - compile_test: only print the exception for a test when it hasn't - been seen - - * src/get.c: never try to process a string that doesn't match - When a string during init_regs doesn't match at all, there's nothing useful - we can do. Immediately return an error from lns_get. - - * src/syntax.h (exn_error): produce an exception to indicate an error - exn_error returns a special exception that indicates that an error has - happened (e.g., out-of-memory) that has already been reported in the - central augeas->error instance. - -2009-11-12 David Lutterkort - - * src/info.c (print_info): do not choke on NULL info - - * src/internal.h: new macros MEMCMP and MEMMOVE - - * src/lens.c (lns_make_subtype): explain type derivation - - * examples/fadot.c: by default, print minimized regexp - - * examples/fadot.c: fix formatting, no functional changes - -2009-11-10 David Lutterkort - - Make augparse and augtool use user's locale - - * 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 - the C locale. - - * configure.ac: check for uselocale - * src/internal.[ch] (regexp_c_locale): new function - * src/lens.c (digits_string): spell out the digits - * src/lens.c (restrict_regexp): expand char ranges in restricted regexp - * src/lexer.l (regexp_literal): run regexp literals through - regexp_c_locale - * src/regexp.c (regexp_escape): compress character ranges for printing - * src/regexp.c (regexp_minus): expand charcter ranges - - 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 - locale on API exit. - - That also makes it necessary that aug_init wraps the bulk of its work - inside an api_entry/api_exit. - - Fixes ticket #35 for systems that have uselocale - -2009-10-26 David Lutterkort - - Inittab: parse end-of-line comments into a #comment - -2009-10-23 David Lutterkort - - * src/lens.c (lns_make_subtree): parenthesize key and value patterns - These patterns may be a union not enclosed in parens - - * src/regexp.c (regexp_escape): don't clobber last character - - * src/lens.c: use regexp_escape to print regexps in error messages - - * src/fa.c (fa_restrict_alphabet): initialize parse - - * src/fa.c (special_chars): treat $ and ^ as special - They are special when they are at the beginning resp. the end of a regular - expression. Making them special (i.e., escaping them with '\') everywhere - doesn't hurt. - - * src/fa.c (re_needs_parens_in_concat): ITER doesn't need parens in concat - - * src/fa.c (re_cset_as_string): work properly with negated cset - We did not take re->negate into account, and always acted as if the cset - was not negated. Introduce helper function cset_contains to both fix that - and make the code a little clearer. - -2009-10-22 David Lutterkort - - bootstrap: use stpcpy and stpncpy from gnulib - - Makefiles: gnulib now requires linking against libselinux - * src/Makefile.am (libfa_la_LIBADD): add LIB_SELINUX - * examples/Makefile.am (fadot_LDADD): remove GNULIB - -2009-10-21 David Lutterkort - - Path expressions: add union operator - Nodesets can now be unioned with the '|' operator - - 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. - - * src/regexp.c (regexp_union_n): insert '|' after the first non-NULL regexp - We can not blindly insert a '|' after the first passed-in regexp since that - (and any number of regexps at the beginning) might be NULL. We only insert - '|' after actually copying a regexp into the result. - -2009-10-20 David Lutterkort - - 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 - the tree as a separate node 'optional' - - 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 - Without that, there's no guarantee that the char will be printed as three - octal digits and not more - - Report line/column number when get/put test fails - * src/builtin.c (make_exn_lns_error): add line/column number in error - message - * src/internal.c (calc_line_ofs): moved here from transform.c - * src/internal.h (calc_line_ofs): declare prototype - * src/transform.c (calc_line_ofs): moved to internal.c - - * src/get.c (get_error): use end of last match as error position - - * man/augtool.1: regenerate - -2009-10-19 David Lutterkort - - Krb5: support a [kdc] section - The only entry it can have so far is 'profile' - no idea what else can go - there since it's not documented in krb5.conf(5), but used, e.g. on Fedora - 11 - -2009-10-12 David Lutterkort - - Rx (device_name): allow '!' in device name - -2009-10-09 David Lutterkort - - Lokkit: make argument for --trust more permissive - The --trust option takes an interface name, whcih can be more than what - token accepts. - - * lenses/lokkit.aug (trust): new lens; (entry): use trust - * 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 - -2009-10-06 Satoru SATOH - - /etc/ethers: new lens and test - The followings adds a new lens for /etc/ethers and associated test. - -2009-09-30 David Lutterkort - - * src/augparse.c: get error details from error API - - interpreter: do not abort() on fatal errors or print on stderr - Use the error reporting infrastructure for most errors. Fatal errors (bugs) - in the interpreter now lead to an error code AUG_EINTERNAL, and not an - abort() - - * src/parser.y: do not print to stderr - - * src/lexer.l: print into struct error instead of stderr - - New error code AUG_ESYNTAX - - * src/info.c (format_info): minor fixes - - append a ':' after the location - - produce a result even when line numbers are invalid - - use xasprintf, not asprintf - - * src/lexer.l (to_int): unused, remove - - Make struct error available in struct info - This makes it much easier to report errors into the central struct error - instance hanging off the Augeas instance. - - Put struct error and report_error into its own file - Also, make the struct error in struct augeas a pointer - - * src/info.h: optimize layout of struct info - - *src/syntax.c: catch some allocation errors - - * src/ref.h (make_ref_err): convenience macro - - * tests/fatest.c (print_regerror): only print first 40 chars of regexp - - libfa: handle allocation failures gracefully - - parser: report some allocation failures - - * src/fatest.c: make testable with failmalloc - - when FAILMALLOC_INTERVAL is set, report success, no matter - how many tests failed (presumably because of memory starvation) - - abort with die_oom() if crucial internal checks can't be performed - because of allocation failures - - cutest: fortify against allocation failures - - new function die_oom which sets exit status to 2 when - we die from an oom condition - - use the safe-alloc macros for allocations - - abort the test when internal allocations fail - - * src/hash.c (hash_alloc_insert): return 0/-1 for success/error - - Use a proper function for make_ref - That allows us to require that callers check the return value - - Handle allocation failures from define_native_intl - - build: support for running with libfailmalloc preloaded - Add --with-failmalloc=LIB configure option and failmalloc targets to run - select programs with failing allocations. - -2009-09-24 David Lutterkort - - * src/transform.c: do not include canonicalize.h anymore - The canonicalize-lgpl gnulib module doesn't require that anymore - -2009-09-21 David Lutterkort - - Path expressions: add regexp matching - Add a function regexp : string -> regexp and an operator - =~ : string|nodeset -> regexp -> boolean to the language for - path expressions. - - * 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 - - 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 - aug_mv and aug_insert expect that exactly one node matches the path - expressions they are given. Report new errors if none or more than one node - match. - - * src/augtool.c: use new error API - Call into the error API after each aug_* call and print error details - - Propagate pathx errors during evalutaion - We did not report errors from pathx evaluation functions, only from the - parser/typechecker. Now functions like pathx_first etc. report errors - properly. - - Store pathx parse errors in internal error struct - The pathx_parse function will now store error information in a struct - error; we pass the one from struct augeas in and save it in the pathx. - - Reset old error messages on each entry through the API from the outside - - * src/syntax.c (interpreter_init): report errors - - Error reporting API and infrastructure - Only reporting errors in the tree makes the API much harder to use; the - aug_error* functions make it easier to inquire about errors - programmatically. - - * src/pathx.c (pathx_symtab_init): unused, remove - -2009-09-18 David Lutterkort - - * src/syntax.c (interpreter_init): fix potential leak - If globbuf has entries in it when we encounter an error, we need to - globfree it. - -2009-09-17 Matt Palmer - - Sudoers: allow certain backslash-quoted characters in a command - Commands may contain backslashes by themselves and the two-char sequences - \\[=:,\\] - -2009-09-14 David Lutterkort - - Version 0.5.3 - -2009-09-11 David Lutterkort - - Man pages: update to match current augtool and augparse - - Add --version option to augtool and augparse - Fixes bug #88 - - A couple more files for the test root - - Add preceding-sibling and following-sibling axes to path expressions - -2009-09-10 David Lutterkort - - Better error message for too many args in a path expression - -2009-09-09 David Lutterkort - - Slapd: include /etc/openldap/slapd.conf - This is the default location in Fedora. - - Fixes bug #85 - -2009-09-04 David Lutterkort - - Multipath: new lens for /etc/multipath.conf - - * src/try: fix 'set annotate' for gdb - -2009-09-03 David Lutterkort - - Transparent save of cross-device links - When saving to a file, we first write to a file with extension .augnew and - then rename that file to the actual file. This fails when the original is a - symlink to a file on another device. - - We now write the .augnew file next to the canonicalized original file to - avoid that headache. There are still situations where the rename fails, - 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 - - * lenses/rx.aug (fspath): simplistic regex for filesystem paths - - * src/lens.c (disjoint_check): print example as tree for put - When the typechecker finds lens overlap in a union's put direction, format - the generated example as a tree to make it more readable. - - * src/lens.c(enc_format): remove extraneous quote - - Make fa_example work for strings with embedded NUL's - -2009-09-01 Matt Palmer - - Inetd: new lens and test - -2009-08-31 David Lutterkort - - Pretty-print lens atypes and use that for errors during put - * src/lens.c (lns_format_atype): new function - * src/lens.h (lns_format_atype): new prototype - * src/put.c (regexp_match_error): use lns_format_atype for errors - - * tests/modules/pass_strip_quotes.aug: test quote stripping - 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. - - 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 - - Carry the key type explicitly in lenses - Instead of computing the key type recursively, store it in lens->ktype. The - key type becomes the new abstract type (atype) when a lens is used inside a - subtree combinator. - - Allow NULLS in regexp_(union|concat)_n - It's sometimes useful to union/concat N regexps even if some of them are - NULL. regexp_(union|concat)_n will ignore them. - - libfa: handle regexps with embedded NUL characters - So far, the API promised that we could do that, but that wasn't implemented. - - fa_compile: accept regexps with embedded NUL's - - Make regexp_escape strip enclosing parens; make API const correct - * src/syntax.h (regexp_escape): make const correct - * src/regexp.h (regexp_escape): strip '(...)' enclosing entire regexp - - * 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 - -2009-08-14 David Lutterkort - - Only read regular files - * src/transform.c (is_regular_file): new function - * src/transform.c (filter_generate): do not include non-regular files - - Fixes bug #68 - -2009-08-12 David Lutterkort - - Do not assume how glob allocates gl_pathv - We assumed that the gl_pathv in a glob_t was allocated in a particular - manner. - - * src/transform.c (filter_generate): make a copy of gl_pathv - -2009-08-10 David Lutterkort - - aug_load: cleanup variables when deleting /files - The first thing aug_load does is delete /augeas/files and /files. We need - to make sure that any variables that contain references to nodes in those - subtrees are cleaned up properly, i.e. that we remove such nodes from - nodesets in the variables. - - * src/augeas.c (tree_unlink_children): remove descendants of the tree we - are deleting from variables. - * tests/test-load.c (testLoadDefined): verify fix - - Fixes bug #79 - -2009-08-10 David Lutterkort - - Pass symtab explicitly into pathx_symtab_remove_descendants - -2009-08-06 David Lutterkort - - Record new files under /augeas/files when they are saved - * src/transform.c (transform_save): add file info with add_file_info - * tests/test-save.c: test that file info is added for a new file - * tests/Makefile.am: build and run test-save - * .gitignore: ignore tests/test-save - - 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 - - /augeas/files/FILE/path = /files/FILE - /augeas/files/FILE/lens/info = ... - /augeas/files/FILE/lens/id = 0x... - - we only record - - /augeas/files/FILE/path = /files/FILE - /augeas/files/FILE/lens = ... - - 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 - created node, even though the initial path expression would never match any - nodes. - - * src/augeas.c (aug_defnode): call pathx_symtab_assign_tree after - creating a node - * src/pathx.c (pathx_symtab_assign_tree): new function to assign a single - tree node to a variable - * src/internal.h: declare pathx_symtab_assign_tree - * tests/test-xpath.c (test_defnode_nonexistent): test new behavior - -2009-08-05 David Lutterkort - - * src/lexer.l: allow DOS line endings - Accept \r\n as a line ending in addition to \n - - Fixes RH Bugzilla 514712 - -2009-08-04 Matthew Booth - - Require quotes around strings in xorg.conf - man xorg.conf appears to support this: - String a string enclosed in double quote marks (") - - This change means that explicitly parsed values will remove quotes in the - get directory and insert them in the put direction. - - Currently, only the following entries are explicitly parsed: - * Option - * Screen - * InputDevice - * Driver - * SubSection - * Identifier - * VideoRam - * DefaultDepth - * Device - * All entries in the Display Subsection - - The lens will also accept any other entry name not in this list. However, - 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 - * Identifier - * VideoRam - * DefaultDepth - - This covers all entries in the default configuration. - - The advantage of having a specific handler is that it knows more about what - 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 - understand: - - * Screen, in ServerLayout - * InputDevice, in ServerLayout - * SubSection "Display" ..., in Screen - - This patch adds support for those values, so that the default xorg.conf on - Red Hat/Fedora systems now parses. - - It should also add support for all directives in the Display subsection, - however they are not covered by the test. - -2009-07-31 Marc Fournier - - vim: extra carriage return caused a parse error - -2009-07-23 Jim Meyering - - tests: extract SELinux context more portably - * test-preserve.sh: Use stat --format=%C $hosts ... rather than - ls -lZ $hosts | cut -d ' ' -f 5. The latter fails with some - combinations of ls and SELinux. - -2009-07-16 David Lutterkort - - * src/Makefile.am: link libfa with gnulib, needed on AIX - -2009-07-14 Bruno Cornec - - * doc/augeas.vim: vi syntax highlighting for .aug files - -2009-07-13 David Lutterkort - - Version 0.5.2 - -2009-07-09 David Lutterkort - - tree handling: propagate dirty flag into root - We had an off-by-one error in tree_mark_dirty that lead to the root of the - tree not being marked as dirty. As a consequence, performing a tree_clean - on such a tree would not mark the tree as clean; that caused an aug_load - directly followed by aug_save to write to disk, even though the tree was - unchanged. - - * src/augeas.c (tree_mark_dirty): propagate dirty flag to the root - * tests/test-load.c (testLoadSave): test that simple load + save - does not touch the filesystem - - This bug was introduced in commit 7278965b - -2009-07-08 David Lutterkort - - Ntp: allow additional options for server etc. - Allow options listed on http://doc.ntp.org/4.2.4/confopt.html - - 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 - - Fixes bug #74 reported by Micah - -2009-07-08 Jim Meyering - - build: ignore generated test files - * tests/.gitignore: Remove file. - * .gitignore: ignore tests/lens-*.sh - -2009-07-08 David Lutterkort - - Logrotate: allow filenames to be indented - * lenses/logrotate.aug (rule): allow indentation at start of rule - * lenses/tests/test_logrotate.aug: add tests - - 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. - - Reported and fix suggested by Jeff Johnson - -2009-06-26 Jim Meyering - - tests: divide test-lenses.sh into its 54 independent tests - This permits these tests to be run in parallel. - * tests/lens-test-1: New file. - * tests/Makefile.am (lens_tests): Define. - (check-lens-tests): New rule, to ensure that the above stays in - sync with reality. - (check): Depend on check-lens-tests. - ($(lens_tests)): New rule. Generate these files. - (check_SCRIPTS): Remove test-lenses.sh. Add $(lens_tests). - (EXTRA_DIST): Add lens-test-1. - * tests/test-lenses.sh: Remove file. - * tests/.gitignore: suppress lens-*.sh files - - enable automake-1.11 features: colorized and parallel tests, etc. - Also enable automake's new "silent-rules" feature. - Use "make V=1" to see the usual, verbose-mode commands. - * configure.ac: Require automake-1.11. - Enable color-tests parallel-tests. Use AM_SILENT_RULES([yes]) - -2009-06-26 Marc Fournier - - Yum: also read files in /etc/yum/pluginconf.d - -2009-06-16 David Lutterkort - - Inittab: clean up formatting some - -2009-06-16 Matt Palmer - - Inittab: simplified schema, map comments - Change the structure of the inittab lens so that the 'id' field is used - as the name of the subtree for that line in /etc/inittab. - - Map comments as '#comment' nodes - -2009-06-16 David Lutterkort - - augtool: add --echo option - * src/augtool.c: add --echo option to print commands when reading - from a file via stdin - * man/augtool.pod: document --echo option - * man/augtool.1: regenerated - -2009-06-15 Jim Meyering - - build: fix "make distcheck" failure - * src/Makefile.am (EXTRA_DIST): Add fa_sym.version. - -2009-06-12 Anders F Bjorklund - - * tests/augtest: convert darwin's double slashes to single slash - - * test-test-preserve.sh: work with BSD ls, as well as GNU ls - Needed to make the test pass on OS/X - -2009-06-11 David Lutterkort - - libfa: use linker script to only export public symbols - libfa was exporting all kinds of symbols that were meant to be internal; - now it only exports what's in fa.h - -2009-06-11 Anders F Björklund - - configure: do not use version script if the linker doesn't support it - That is the case on OS X - - 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 - -2009-06-09 David Lutterkort - - Version 0.5.1 - - * tests/test-put-symlink.sh: fix broken test - - use lenses in ../lenses - - fix typo: HOSTS_AUGSAVE, not HOSTS_AGSAVE - - * bootstrap: use getline module from gnulib - - * src/augtool.c: initialize 'line' to NULL - -2009-06-05 David Lutterkort - - Logrotate (hooks): simplify to speed up typechecker - - Logrotate: make newline at end of script optional - - * src/put.c (put_store): escape regexp before printing - - * src/pathx.c: coerce the operands of 'and'/'or' to boolean - Fixes bug #44 - - * src/lexer.l: allow empty regexps - Fixes bug #34 - - Dnsmasq: process files in /etc/dnsmasq.d/* - Fixes bug #65 reported by abnormaliti - -2009-06-01 David Lutterkort - - * src/augtool.c: allow comments starting with '#' - -2009-05-29 David Lutterkort - - Whitespace cleanup (no functional change) - Remove trailing whitespace - -2009-05-29 David Lutterkort - - Ntp: support more commands - * process 'broadcastdelay' - * process enable/disable flags - * process leapfile - - Minor amount of code cleanup - - 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 - -2009-05-28 Matt Palmer - - Interfaces: various bug fixes - * disallow end-of-line comments - * support generic allow-* stanzas - - Interfaces: accept options containing '_' - Bug reported by Jonas Eriksson - -2009-05-28 David Lutterkort - - * tests/grub-rm-entry.rb: 'savedefault' indented by '\t', not '' - -2009-05-14 David Lutterkort - - Modprobe: handle comments at the end of a line - -2009-04-13 David Lutterkort - - Grub: allow optional argument for savedefault command - - Grub: parse arguments to chainloader command - - Grub: parse arguments for terminal command - - Grub: parse individual arguments for serial command - - Grub: parse kernel and module arguments - - Grub: simplify comment_re to speed up typecheck - -2009-04-13 Raphael Pinson - - Cron: add a "time" node - -2009-04-13 David Lutterkort - - * src/augeas.h: improve some comments - -2009-04-09 David Lutterkort - - * src/augparse.c: add --notypecheck option - -2009-04-08 Raphael Pinson - - Pbuilder: lens and tests for Debian's personal builder - - Shellvars: map comments with Util.comment and Util.empty - - Shellvars: parse 'export' and 'unset' commands - -2009-04-08 David Lutterkort - - Add Cron to the dosumentation menu - -2009-04-08 Raphael Pinson - - 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). - - Backslashes are now allowed only in the middle of sto_to_com and - sto_to_com_cmnd. - - 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 - -2009-04-07 Raphael Pinson - - Logrotate: allow = as a separator for value_to_eol - Fix ticket #61 by allowing "=" as a valid separator in value_to_eol. - "word" may not contain "=" anymore in this case. Note that this is not - documented in "man logrotate" but is shipped by default in CentOS (cf - ticket #61). - -2009-04-07 David Lutterkort - - Ntp: fixes to make the default Fedora config work - Now enough of ntp.conf is understood so that the config from Fedora 10 with - all directives uncommented can be processed. - -2009-04-07 Raphael Pinson - - Ntp: add fudge directive - Fixes ticket #59 - -2009-04-07 David Lutterkort - - * src/transform.c (transform_save): append newline to old text - If we appended a newline to initially load the file, we also need to do - that when we parse the file again during save. - - Bug reported by Michael Conigliaro - -2009-04-03 David Lutterkort - - * src/augtool.c: new option --noautoload - - * src/augeas.h: expose flag to suppress module autoload - With AUG_NO_MODL_AUTOLOAD, modules are only loaded when they are needed. - - * src/transform.c (filter_generate): avoid segfault if we never call glob - - Php: some more tests, sample php.ini in test root - - Rx: remove \b and \d escapes - -2009-04-03 Raphael Pinson - - Modify some existing lenses to use new utility modules - Changes Aliases, Exports, Fstab, Group, and Monit - - 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 - - Php: added default path on redhat - -2009-04-02 Raphael Pinson - - Use readline only when stdin is a tty, use getline otherwise - -2009-04-01 Marc Fournier - - Vsftpd: several fixes - * map comments as #comment - * handle empty lines - * find vsftpd.conf on Fedora/RHEL - -2009-03-27 David Lutterkort - - Iptables: fix ticket #51 - * allow more characters in chain names - * allow comments mixed in with chains and rules - - * augeas.spec.in: fadot is not installed yet - - Version 0.5.0 - - Fix build problems uncovered by distcheck - - * src/get.c (get_quant_star): do not leak registers - - Some more test files - - Fix uninitialized variables found by optimizer - - * src/hash.c (hash_free_nodes): simplify and accelerate - Reduces time to typecheck grub.aug from 9.8s to 8.5s on my machine. - - * src/hash.c: mark some asserts as expensive - - * tests/root/etc/krb5.conf: simple example file - - Krb5: lens and tests for /etc/krb5.conf - -2009-03-25 Raphael Pinson - - Grub: add support for Debian's update-grub (ticket #50) - Bug reported by Micah Anderson - -2009-03-25 David Lutterkort - - * src/fa.c (fa_ambig_example): use heuristic for fast checking - This avoids a lot of intersections in the Augeas typechecker, and speeds - typechecking up by between 5% and 20%, depending on the lens. - - 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. - -2009-03-25 Raphael Pinson - - Sudoers: fix ticket #48 - * make a difference between boolean and non boolean values for integers and - strings - * allow multiple negate flags (odd/even numbers change the behaviour) - * add optional double quotes to integer and string field - - Bug reported by Frank Sweetser - -2009-03-25 David Lutterkort - - * src/augtool.c: make second argument for 'set' optional - This makes it possible to set a tree node's value to the empty string - with - set /foo "" - and - set /foo - -2009-03-24 David Lutterkort - - * src/augeas.c (aug_init): make it easier to override distributed lenses - Make the default load path - - $(datadir)/augeas/lenses:$(datadir)/augeas/lenses/dist - - and instal the lenses we distribute into the dist/ subdir. That makes it - easy for other packages to override lenses we ship: when they are installed - 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 - together into one convenient call. - - * src/pathx.c (eval_filter): correctly hande realloc of value_pool - - * src/pathx.c (expand_tree): ensure we start with a nonempty lp_trace - - * src/augtool.c: new 'defvar' command - - Add variables for path expressions - The new API call aug_defvar allows defining variables that can later be - used in path expressions. - -2009-03-22 David Lutterkort - - Add FilterExpr to path expression grammar - This allows using constructs like $foo/some/path and $foo[2] - - * src/augeas.c (parse_user_pathx): new parameter need_nodeset - - * src/pathx.c (pathx_parse): new parameter need_nodeset - - * src/pathx.c (ns_filter): new function - - * src/pathx.c: rename E_LOCPATH to E_FILTER - - * src/pathx.c (clone_value): new function - -2009-03-21 David Lutterkort - - * src/pathx.c (release_value): factor logic into separate function - - * src/pathx.c: remove assumption that toplevel expression is a locpath - We can't assume that anymore when we have variables. That requires some - headache for pathx_expand_tree, since that needs a full trace of evaluating - a locpath against the tree. - - * src/pathx.c (pathx_eval): factor eval into a function - - * examples/fadot: remove, checked in by mistake - -2009-03-20 David Lutterkort - - * .gitignore: ignore examples/fadot - - * src/get.c: rename 'Short iteration' to a more helpful message - - * src/transform.c (store_error): report which lens failed - - * src/transform.c (store_error): ignore errors from err_set - - * src/transform.c (store_error): calculate line number/ofs for error - - * src/transform.c (err_set): new function - -2009-03-20 Francis Giraldeau - - * examples/fadot.c: tool to generate dot graphs of FA's - The fadot tool produces dot graphs of finite automata, and allows certain - operations on FA's from the command line, like intersection and complement - of FA's. - -2009-03-19 David Lutterkort - - * src/pathx.c: call make_value before pop_value - Since make_value might realloc, pointers retrieved with pop_value may - become invalid across make_value calls. - - * src/augeas.c: remove some internal uses of pathx_parse - - * src/augeas.c: create various /augeas nodes when they go missing - - * src/put.c (create_concat): fix goofy error message - - Update and refresh man pages - - * src/augtool.c: add --noload option - - Validate trees representing a transform before using them - - * tests/test-load.c: new test for aug_load - - * src/augeas.h (aug_init): make loading the tree optional - The new flag AUG_NO_LOAD can be used to keep aug_init from loading any - files. This gives the user a chance to modify /augeas/load and then call - aug_load. - - * src/augtool.c: new 'load' command - - * src/augeas.h (aug_load): new public function - - * src/transform.h: use tree encoded transforms - - * src/lens.c (lens_release): allow NULL lens to be passed in - - * src/syntax.h (lens_lookup): new function - - * src/augeas.c: report transforms under /augeas/load - - Rename AUG_NO_DEFAULT_LOAD to AUG_NO_MODL_AUTOLOAD - - Limits (filter): no need to exclude anything - -2009-03-19 Raphael Pinson - - Limits: map domain into the value of domain node (schema change) - Mapping the domain as the label of a node leads to difficulties since '*' - is a valid domain name. - - Problem reported by Mark Drayton (ticket #47) - -2009-03-19 David Lutterkort - - Lokkit: new lens and test - -2009-03-17 David Lutterkort - - Iptables: new lens and test - A fairly basic parse of the iptables config file. It should accept any - legal iptables config file; what makes it basic is that it doesn't break - some of the values down as fine-grained as I would like to have them - -2009-03-13 David Lutterkort - - * configure.ac: bump major version of libfa - - * src/fa.h (fa_as_regexp): cleaner prototype - - * src/fa.h (fa_ambig_example): cleaner prototype - - * src/fa.h (fa_example): cleaner prototype - - * src/fa.h (fa_compile): pass in size of regexp - - * 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 - been. - - 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 - - * src/transform.c (transform_save): properly sync data to disk - Make sure the data we write into the .augnew file hits the disk before - renaming to the proper name - - Modprobe: lens and tests for modprobe.conf - - * src/fa.c (re_cset_as_string): turn '[^\n]' into '.' - - Place Sudoers and Util under LGPLv2+ - Raphael Pinson agreed to changing the license for these to LGPLv2+ like the - rest of Augeas. - -2009-03-09 David Lutterkort - - Version 0.4.2 - - Logrotate: process 'minsize 1M' rule - logrotate allows unit suffixes 'k', 'M' and 'G' for 'size' and 'minsize' - - Squid: add squid.conf from Fedora 11 rawhide - - * src/builtin.c: new builtins Sys.getenv and Sys.read_file - - * src/syntax.h (dup_string): duplicate a string - - * src/internal.h (xstrerror): new function - -2009-03-09 Francois Deppierraz - - 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: - - fgrep TAG squid-2.7.STABLE6/src/squid.conf.default | awk '{ print " | \""$3"\"" }' | sort > /tmp/squid2.7 - - fgrep TAG squid-3.HEAD-20090308/src/squid.conf.documented | awk '{ print " | \""$3"\"" }' | sort > /tmp/squid3-HEAD - - cat /tmp/squid2.7 /tmp/squid3-HEAD | sort | uniq - -2009-03-08 David Lutterkort - - * tests/xpath.tests: Hosts lens puts comments into #comment nodes - - * augeas.spec.in: BR for libselinux-devel (bug #26) - Without the BR, the Fedora and EPEL builds are done without SELinux - support, resulting in a binary that does not preserve SELinux contexts - -2009-03-06 David Lutterkort - - Sshd: map comments as '#comment' nodes - - Change the label for comment nodes to '#comment' - - Do not delete files that had an error upon parsing - When we can't read a file, we create an entry for it under /augeas, but - there won't be anything for it under /files. That looks a lot like a file - whose entire subtree was deleted; but since we failed reading the file, we - should not delete it either. - - * src/augeas.c (aug_init): always create /files - - Sshd: add test showing how to add a Subsystem - -2009-03-03 David Lutterkort - - * Makefile.maint: add autogen target - - * src/pathx.c (eval_rel): for numbers, '<' and '<=' were reversed - - Postfix_main: handle continuation lines - - * src/pathx.c: fix some comments - -2009-03-02 David Lutterkort - - Version 0.4.1 - - * configure.ac: make default warning level 'maximum' - Using 'error' here is too unfriendly on weird platforms, since builds can - fail, e.g. because of broken system headers. When doing actual development, - set this to 'error'. - - * src/pathx.c: function label() returning the label of the ctx node - - * 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 - garbage. - - 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 - - * tests/test-event-saved.sh: make sure fuiles are writable by owner - -2009-02-25 David Lutterkort - - Plug a few memory leaks - - Remove files whose tree under /files was deleted - When doing rm /files/etc/hosts, we now delete the file /etc/hosts - on save - - Move path formatting functions around - Move path_expand and format_path to internal.c - Rename format_path to path_of_tree - - * src/augeas.c (tree_find): helper for getting a tree node - -2009-02-24 David Lutterkort - - * src/augeas.c: erase /augeas/events/saved only once - tree_save is called recursively; /augeas/events/saved must be reset - in aug_save, not tree_save - - Record saved files in transform_save, not tree_save - - * src/augeas.c (tree_unlink): remove and free a subtree - - * src/transform.h: move transform decls out of syntax.h - - Util.stdexcl: exclude .augsave and .augnew files - -2009-02-20 David Lutterkort - - * src/lexer.l: correct location info for strings and regexps - - * src/get.c: check for valid match before calling token() - -2009-02-19 David Lutterkort - - * src/parser.y: do not allow epsilon as a tree constant - This grammar mistake made epsilon a valid expression - - * src/fa.c: cache hash values in the state - This gives about a 15% performance improvement in typechecking - the logrotate lens - -2009-02-18 David Lutterkort - - * src/pathx.c: allow '(' Expr ')' - - * src/pathx.c: add 'and' and 'or' operators - - * src/pathx.c: add relational expressions '>', '<', '>=', '<=' - - * src/pathx.c: add count() function - - * src/pathx.c (parse_name): do not allow ')' in names - Names can not contain ')', otherwise we will run beyond the end of - arguments in a function call like 'f(name)' - - * src/pathx.c: add position() function - - * 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 } - -2009-02-17 David Lutterkort - - * src/get.c: speed up initial match - Avoid matching the entire input string, since it can be _very_ slow. - Since it is very common that the toplevel lens is (l)*, optimize for - that. - - * src/get.c: reduce the number of calls to regexp_match - Only call the regexp matcher at the very beginning of get/parse, and once - for every match inside an iteration. Use re_registers to keep track of the - substrings being worked on in favor of 'struct split' - - Always do REGS_REALLOCATE for regexp match registers - - * src/regexp.c: clean up syntax options - - * src/put.c: remove outdated debug msgs and comments - - * src/internal.h: Remove bogus DEBUG define - - Ntp: enhance lens - These enhancements are needed to make the Ntp.lns process the default - /etc/ntp.conf on Fedora - -2009-02-16 David Lutterkort - - * src/syntax.c: print tests results in the same form we read them - -2009-02-13 David Lutterkort - - Allow passing NULL regexps in some regexp routines - -2009-02-13 Raphael Pinson - - Xorg: new lens and tests - -2009-02-11 David Lutterkort - - Test that an invalid regexp makes module loading fail - - Services: various small fixes to process Fedora's /etc/services - - * tests/test-get.sh: print all error info on failure - - Better error mesages when re match fails during get/put - - * src/lens.c: throw exception on regexp syntax errors - - * src/fa.c: test for invalid ranges like [z-a] - -2009-02-11 Raphael Pinson - - Lens and test for /etc/services - -2009-02-11 David Lutterkort - - * src/augtool.c (cmd_match): check return from aug_match more defensively - -2009-02-06 David Lutterkort - - Version 0.4.0 - - Use printf instead of 'echo -e' in tests - Printf is more portable - - Fix compilation on OpenSolaris - * src/pathx.c (position): assert not marked as noreturn - - * tests/test-xpath.c (run_one_test): allow results in arbitrary order. Files on Fedora and Debian are enumerated in different order, leading to spurious test failures - - * src/pathx.c: remove the value() function, it's redundant with '.' - - * pathx.c: when comparing strings consider NULL == "" - - Change how names are parsed in path expressions - Names can not contain any of the characters [][=/ \t\n] - to include - them in a name, they need to be escaped with a '\', so that 'foo\=bar' - matches a node with literal label 'foo=bar'. - - * tests/grub-rm-entry.rb: fix test failure - - * tests/augtest: do not typecheck everything - 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 - - Lens and tests for DarkIce - See http://darkice.tyrell.hu/ - -2009-02-01 David Lutterkort - - * src/augeas.c: use ALLOC instead of CALLOC - - * augeas.c (aug_init): check an allocation failure - - * src/internal.c (escape, unescape): check allocation failures - - * src/pathx.c (free_state): allow NULL state - - * src/augeas.c (init_root): check for failure of strdup - -2009-01-30 David Lutterkort - - * src/pathx.c: factor test if a step matches into step_matches - This also fixes a problem matching, test also included - - * src/pathx.c: use bool for boolean values - - Build changes so that 'make' on Opensolaris 5.11 works - The tests ('make check') still fail, because of trouble with - some of the shell scripts - - * src/transform.c: use POSIX conform FNM_PATHNAME, nut GNU alias - - * src/get.c: remove braindead use of alloca - - * tests/test-get.sh: use new descendant syntax to find errors - - Remove unneeded call to pathx_parse in aug_match - - Introduce parse_user_pathx to report errors - If user-supplied path expressions have errors, report them in - /augeas/pathx/error - - Move parsing of path expressions into public API methods - For path expressions that are passed through the API, we need to report - errors. This change lays the groundwork, so that we can distinguish between - parsing user-supplied path expressions and internally generated path - expressions. - - Rename aug_tree_replace to tree_replace - We reserve the aug_ prefix for public functions. There is also no need to - pass struct augeas here, a tree root is enough. - - More xpath tests; allow ... in tests - - Simplify internal API's - * pass origin, not root to pathx_parse - * 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"]' - * add explicit axes and some abbreviations thereof - - This requires a rewrite of the interpreter of path expressions; the - interpreter is now based on a more explicit representation of the abstract - syntax of the path expression and is statically type checked. - - 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 - they are paths, and not just a number, use absolute paths. - - Notes on new XPath grammar - - Rename struct path to struct pathx - Also rename path_* functions to pathx_*; rename make_pathx to pathx_parse - and change its signature to allow cleaner error reporting - -2009-01-29 David Lutterkort - - Grub: support color directive - -2009-01-26 David Lutterkort - - Version 0.3.6 - -2009-01-26 Dominique Dumont - - Sshd: add documentation on usage - -2009-01-25 David Lutterkort - - Add indented puppet.conf to test root - -2009-01-22 David Lutterkort - - Fix bug #25 - allow indented entries in puppet.conf - * lenses/inifile.aug: add new indented_entry and indented_title - lenses - * lenses/puppet.aug: use the indented_* lenses - * lenses/tests/test_puppet.aug: test with indented entries - -2009-01-19 David Lutterkort - - Report version and legal save modes in /augeas/version - -2009-01-17 David Lutterkort - - * ref.h: include limits.h, since we use UINT_MAX - -2009-01-16 David Lutterkort - - Mark up code in documentation comments for Dpkg and Exports - -2009-01-16 Robin Lee Powell - - Documentation for Exports and Dpkg - -2009-01-13 David Lutterkort - - Minor changes to handling of save flag - * complain if /augeas/save is missing or has an invalid value - * do not clobber non-save flags when updating from /augeas/save - * add a test - -2009-01-13 Bryan Kearney - - Dynamically change behavior of aug_save; add noop save mode - * control behavior of aug_save through changing /augeas/save - * noop mode allows checking if changes will be written, without - changing file system - -2009-01-08 Jim Meyering - - comment typos - - plug a leak - 24 bytes in 1 blocks are definitely lost in loss record 1 of 1 - at 0x4021BDE: calloc (vg_replace_malloc.c:397) - by 0x4029379: make_tree (augeas.c:316) - by 0x403AC70: get_lens (get.c:592) - by 0x403ACB6: get_lens (get.c:523) - by 0x403AB4F: get_lens (get.c:474) - by 0x403ACDE: get_lens (get.c:523) - by 0x403AB4F: get_lens (get.c:474) - by 0x403AF20: lns_get (get.c:684) - by 0x4034E81: lens_get (builtin.c:124) - by 0x402CDC7: native_call (syntax.c:967) - by 0x402F4C9: compile_exp (syntax.c:1574) - by 0x402EF17: compile_exp (syntax.c:1487) - by 0x402FEEC: __aug_load_module_file (syntax.c:1600) - by 0x80489AE: main (augparse.c:86) - - test ls output more portably in face of SELinux differences - * test-preserve.sh: Use cut -b1-10 to get mode from ls -l output. - Use ls -lZ (not ls -Z, which is not portable) to get SELinux context. - -2009-01-04 Arnaud Gomes-do-Vale - - * src/Makefile.am: fix bz #478619 - do not use abspath - -2009-01-03 Robin Lee Powell - - Dpkg: new lens and test - -2009-01-03 David Lutterkort - - Php: expand filter slightly - Suggested by Robin Lee Powell - -2008-12-29 David Lutterkort - - Fix segfault when branch in a union does not have a ktype - * src/lens.c (lns_key_regexp): check for NULL ktype of branch - * tests/modules/pass_union_nokey.aug: test the fix - - Bug reported by Robin Lee Powell - -2008-12-27 Free Ekanayaka - - Add soma lens and test - - Add limits lens and test - -2008-12-24 David Lutterkort - - * autogen.sh: remove bogus argument to configure - -2008-12-24 Marc Fournier - - Php, Gdm: exclude literal ".anon" from title, not regexp /.anon/ - -2008-12-24 Free Ekanayaka - - Phpvars: allow whitespaces before the \n in the - - Version 0.3.5 - - * transform.c (transfer_file_attrs): ignore SELinux failures if filesystem does not support extended attributes - - * transform.c (clone_file): fix #32; only copy if /augeas/save/copy_if_rename_fails exists - - Group: split list of users, make it optional - The list of users in a group is now split into individual 'user/' - nodes. If a group has no members, no user/ nodes are produced. - -2008-12-23 Free Ekanayaka - - Add lens and test for /etc/group - -2008-12-23 David Lutterkort - - Simpler interface and implementation for path_find_one - - Add path_expand_tree - Instead of calling path_find_one/tree_create - - Move implementation dealing with path expressions into separate file - - Simplify searching in the tree by using parent pointers - 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 - tree->parent->children for any node. - - All 'standalone' trees now have a fake root, called 'origin' whose - 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 - -2008-12-23 Free Ekanayaka - - Lens and test for config files using PHP-style variables - Process /etc/squirrelmail/config.php - -2008-12-23 Marc Fournier - - New lens and tests for /etc/rsyncd.conf - rsyncd.conf is an ini file which allows indented - parameters (like smb.conf) as well as entries outside - any section (like php.ini). - -2008-12-23 David Lutterkort - - * fa.c: mark '.' as a special character that needs to be escaped - -2008-12-22 David Lutterkort - - Notes on the expanded XPath notation - -2008-12-22 Free Ekanayaka - - Add lens and test for /etc/passwd - - Shellvars: process two more files on Debian - Add /etc/arno-iptables-firewall/debconf.cfg and /etc/cron-apt/config - - Add lenses and tests for postfix's main.cf and master.cf - - Squid: new lens for squid.conf - - Webmin: new lens - -2008-12-16 David Lutterkort - - Shellvars: load /etc/sysconfig/sendmail - -2008-12-03 David Lutterkort - - Xinetd: make sure equal sign is surrounded by spaces - Fix ticket #30 - - * lenses/xinetd.aug: make sure new equal signs have a space before - and after them; indent attributes with a tab by default - * lenses/tests/test_xinetd.aug: add test - -2008-11-20 David Lutterkort - - Sshd: change the structure of Condition subtrees - The conditions for a match block are now a single subtree, instead of - one subtree per condition. - -2008-11-19 David Lutterkort - - Only try to save backup file if original exists - * transform.c (transform_save): check that original exists before - creating backup - - Fix saving of files where backup/new and target are on different devices - * transform.c (clone_file): new function - * transform.c (transform_save): if rename fails because new/backup file - and target file are on different devices, copy the files - -2008-11-05 David Lutterkort - - * Makefile.maint: add target tag-release - - Version 0.3.4 - - * test-preserve.sh: check that augtool -b produces a backup - -2008-10-30 David Lutterkort - - Fix problem with transferring file attributes during save - * src/transform.c(transform_save): transfer attributes from the original to - the new file as soon as the new file is created; create a .augsave file - as a hardlink, not by renaming - * src/transform.c(file_replace): pull out the code to transfer attributes - into new function transfer_file_attrs; rename of new file to original is - now done in transform_save - -2008-10-24 David Lutterkort - - Version 0.3.3 - - * Makefile.maint: add upload target - - Modest beginnings of a maiintainer Makefile - * Makefile.maint: new file - - Undo API breakage introduced in commit 48c285c - * src/augeas.c (aug_save): return 0 on success, instead of the number of - files changed - * src/augtool.c (cmd_save): get the number of files changed from aug_match - - build: use LIB_SELINUX as set by gnulib - * configure.ac: do not set up LIB_SELINUX, gnulib does that - -2008-10-22 Sylvain Baubeau - - Grub: support "rootnoverify" and "chainloader" directives - -2008-10-21 David Lutterkort - - Version 0.3.2 - - test-preserve.sh: do not check SELinux context on non-SELinux systems - - test-events-saved.sh: sort the list of saved files - - aug_save: report saved files in /augeas/events/saved - aug_save now reports which files were changed on disk underneath - /augeas/events/saved; if multiple files are changed in one save operation, - there will be multiple /augeas/events/saved entries in the tree. The value - of each is the path to the file prefixed with /files. - - Generate ChangeLog from git history - - file_replace: preserve SELinux context - Copy the SELinux context from the existing file. - - transform_save: preserve file owner/group and mode when saving - Take the file owner/group and mode from the existing file and set it on the - newly created file during save. When a file is created from scratch, we - still create the file with whatever default user/group/mode the current - user has set. - -2008-10-20 David Lutterkort - - aug_save: report the number of files that were changed - When the tree is saved, keep track of the number of files that were - actually changed and return that number. - - transform_save: make saving idempotent - When a file needs to be saved, its contents are first generated in a temp - file which is then moved over the original file. Between generating the - temp file and moving it in its final place, read its contents back in and - compare with the contents of the original file. Only move the tempfile over - the original if the contents do indeed differ. This avoids spurious changes - in mtime. - - Formatting changes - -2008-10-16 Jim Meyering - - Include early, so its _GNU_SOURCE definition takes effect. - * src/lexer.l (%top{...}): Include here, not in %{...}. - Otherwise, the flex-emitted inclusion of would - precede the definition of _GNU_SOURCE, rendering it useless. - This also avoids warnings about strndup being undeclared. - Don't include explicitly, since flex already does that. - -2008-10-13 Joel Nimety - - Grub: add support for password directive - -2008-10-06 Free Ekanayaka - - Samba: Change default indentation and separation - Match indentation of the example configuration file shipped by the upstream - authors - - Add gdm lens and associated test - -2008-10-02 David Lutterkort - - Ignore files based on .hgignore - -2008-10-01 David Lutterkort - - Complain when nodes in the tree can not be put - When nodes are added to the tree that do not match the appropriate - key/label lens, we used to silently drop them if the key/label was inside a - repetition inside a concat. - - Now, we check when we split the tree for a concat that we have used all the - nodes in the tree that we were supposed to, and complain otherwise. - - This also uncovered that the test rec-hosts-add.rb was broken, but still - passed. - -2008-10-01 David Lutterkort - - Pass --nostdinc properly when running under gdb - - Logrotate: parse tabooext into list; add processing of a number of options - Patch by Sean E. Millichamp - -2008-09-22 David Lutterkort - - Grub: add support for 'serial' and 'terminal' - Patch by Sean E. Millichamp - - Add backlinks to main site - - Remove some italics - - 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: - - - There is no explicit --with-naturaldocs option anymore; instead, - configure.ac looks for a program that's either called 'naturaldocs' or - 'NaturalDocs' and enables support for doc generation depending on whether - that program is found or not. - - This works in any of the following situations: - (1) NaturalDocs is installed from an RPM, and therefore on the default - PATH, with its Perl modules installed on the standard Perl library - path - (2) NaturalDocs is installed in a random directory, and both PATH and - PERL5LIB are set accordingly - (3) A wrapper script that sets the path is on PATH - - - Various fixes to make 'make distcheck' work - -2008-09-12 David Lutterkort - - Properly include test modules - -2008-09-11 Raphael Pinson - - Add naturaldocs support Build pdf docs - -2008-09-09 Raphael Pinson - - Adapt comments for NaturalDocs parsing - - Add comments for NaturalDocs parsing - - Add comments for NaturalDocs parsing - - Add comments for NaturalDocs parsing Reorganize a bit - - Adapt sudoers.aug for NaturalDocs parsing - - Adapt augeas.h for NaturalDocs parsing - -2008-09-08 David Lutterkort - - Sshd: better handling of match blocks - Split match conditions into individual 'Condition' entries. Store the - settings for a match block inside 'Settings' entries. - -2008-09-08 Free Ekanayaka - - Add monit lens and test - -2008-09-06 Free Ekanayaka - - Ldap: merge with Spacevars. Spacevars: process havp.config - Adapt Test_ldap, since there is no Ldap.lns anymore - -2008-09-08 David Lutterkort - - Use --nostdinc in tests - We never want to use installed lenses in the tests; they should only be - read from the directories that are specified explicitly - - augtool, augparse: add --nostdinc option - - augtool, augparse: allow long options - -2008-09-06 Free Ekanayaka - - Shellvars: merge Sysconfig, Ifcfg; support /etc/default - Merge Sysconfig and Ifcfg into Shellvars - - Add /etc/default/* to the list of supported configuration files - -2008-09-05 David Lutterkort - - transform: append missing newlines - If a file does not end with a newline, append one automatically. Most - lenses require that a file ends with a newline, and files that are missing - them are quite common. - - Shellvars: use Util.eol for eol - - test/modules: only distribute .aug files - - Shellvars: handle space at the end of a line - -2008-09-04 David Lutterkort - - Added tag release-0.3.1 for changeset 803c17b1833a - - Release 0.3.1 - - Sysctl: lens for sysctl.conf - Contributed by Sean Millichamp - -2008-09-04 Free Ekanayaka - - Add lens and test for dnsmasq.conf - -2008-09-02 Free Ekanayaka - - Add slapd.aug and test modules - - Spacevars: Allow passing the entry keyword as a parameter - Modify Ldap.lns and Test_spacevars accordingly - -2008-08-30 Free Ekanayaka - - Add samba.aug and associated test - -2008-08-27 Free Ekanayaka - - Inifile: support empty comments - Empty comments are lines beginning with ";" or "#" but without any more text - -2008-08-29 Raphael Pinson - - Map entries outside of sections inside a ".anon" section - Clean regexp for entry key - Remove /.anon/ from record key regexp - Modify test_php.aug according to new mapping policy - entry_re is standard in php.aug - -2008-09-03 David Lutterkort - - typecheck_maybe: less convoluted check for empty match - 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 - word. - - To allow constructs like (store re)?, we allow the atype to match the empty - word, as long as the lens inside the '?' consumes the value of the current - node, since that also tells as whether to use the inner lens or not. - - Various existing lenses failed to typecheck after this change and have been - adapted; this also fixes a bug in the Fstab.lns where existing whitespace - was being replaced with a default tab. The Interfaces.lns needed a fairly - invasive change, and as a consequence produces way more (too many?) - anonymous tree nodes. - - Added tests to verify the typechecking of '?' - -2008-09-02 David Lutterkort - - Minor error message improvements - - Include information about the lens that produced the error if it's - available - - When a union during 'put' does not match, produce an error instead of - aborting - -2008-08-28 David Lutterkort - - Fix a bug with transferring skeletons - It is possible for a skeleton to move from one subtree lens to another, if - both use the same key; since the lenses might have different skeleton - types, we need to detect this and discard the skeleton if its type does not - match the lens that is used during put. - - skel_instance_of: fix bad check for regexp match - The return value of regexp_match was interpreted incorrectly, making it - seem that the skel_instance_of test should fail if we ever tried to match - an empty string. - -2008-08-27 David Lutterkort - - Some files for the test root - - A test for the del typecheck - - 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. - - The lexer bug is https://fedorahosted.org/augeas/ticket/12 - -2008-08-27 Free Ekanayaka - - Dhclient lens - -2008-08-26 Raphael Pinson - - Add OpenVPN lens and associated test - -2008-08-27 Free Ekanayaka - - Dput: add allowed_distributions entry - See man dput.cf(5) from a recent dput version (Ubuntu/hardy or - Debian/lenny) - -2008-08-26 David Lutterkort - - Typecheck del lens - The builtin lens 'del RE STR' was missing a typecheck: the default string - STR must match the regular expression RE, otherwise we might produce text - that we cant parse back in. - - This patch fixes that, adds a test that the check is performed, and fixes - all the places in existing lenses where a use of 'del' failed the - typecheck. - -2008-08-18 Nahum Shalman - - Shellvars: fix arrays so that saving works properly * based on an IRC conversation with raphink - -2008-08-25 David Lutterkort - - Acknowledge Free Ekanayaka - -2008-08-25 Free Ekanayaka - - Ldap lens - - Spacevars lens - -2008-08-24 Free Ekanayaka - - Interfaces: new lens to process Debian's /etc/network/interfaces - -2008-08-25 David Lutterkort - - Util.comment: produce #comment nodes - -2008-08-14 Raphael Pinson - - Inifile: complete rewrite. Also rewrite lenses using Inifile - Adapt Php, Dput, Puppet and the corresponding tests to use the new Inifile - module. - - Php: allow entries outside of sections - Adapt php.aug to support entries outside of sections and still map sections - as labels (Fix #9) - -2008-08-15 David Lutterkort - - 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. - - Fix syntax error in test - - augl_error: Initialize info - -2008-08-14 David Lutterkort - - aug_mv: fix bug when moving at the root level - When moving from the root level, the source node needs to be removed from - aug->tree, not aug->tree->children. In addition, the list_remove macro must - be passed aug->tree and not a local variable holding that value, since we - might have to remove the list entry that aug->tree is pointing to. - - 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 - loop where it kept loading 'mod.aug', but never found 'MoD.var' because the - comparison of module names 'MoD' and 'Mod' was case sensitive. - -2008-08-13 Raphael Pinson - - Add puppet.aug and associated test - - test_php.aug: make a nice test for PHP - - Php: simplified and based on Inifile - "Slightly" simplify php.aug now that the comment issue is fixed in - inifile.aug - - Inifile: use #comment for comment fields - Adapt test_dput.aug and test_inifile.aug - - Inifile: no space around seps by default - - Inifile: reformat inifile.aug, ignore empty comments - Reformat inifile.aug : - - improve readability - - limit line width to 80 chars - - change a few var names - Ignore empty comments - Adapt test_dput.aug to ignore empty comments - - Fstab: map comments and support empty lines - - Sudoers: clean up comment definition - -2008-08-12 David Lutterkort - - Hosts: handle comments at the end of a host entry - Comments are put into the tree as part of that host node, i.e. will live as - long as the host entry. - - Based on an initial patch by Kjetil Torgrim Homme - -2008-08-12 Raphael Pinson - - Pam: Use eol, indent, comment and empty from Util - - Util: add eol, indent, comment and empty - - Pam: allow comments at the end of lines and leading spaces - - Xinetd: better handling of whitespace - - allow indented comments - - allow spaces around "}" to close a service - -2008-08-12 David Lutterkort - - Exports: fix failing test - Exports.lns uses Hosts.comment .. since that changed, we also need to - change Exports.lns - -2008-08-12 Raphael Pinson - - Hosts: put comments into tree and better whitespace handling - - allow spaces at the end of the line - - allow indentation at the beginning of entries - - allow indented comments - - show comments as fields and ignore empty lines and empty comments - - Handle indentation for Sudoers - Allow indentation for every field - cmnd_spec: use sto_to_com_cmnd (allows spaces) - Add a test with new tricky commands in spec - - Various small fixes for Sudoers - Deal with empty comments in empty. - Add "!" as a valid parameter delimiter in Defaults. - Make tests a bit more interesting in test_sudoers.aug. - - Sudoers: fix Runas_Spec - sep_cont is not mandatory after runas_spec. - Remove a space after a runas_spec in the test. - - Sudoers: various fixes for Defaults - Do not allow "Defaults.*" as user name for spec (instead of "Defaults"). - Simplify Defaults type from (@|:|>) into [@:>]. - Make a specific regexp for Defaults value to allow spaces. - Add a test line in test_sudoers.aug to test a more complex Defaults line. - - Add sudoers lens and associated test - -2008-08-11 David Lutterkort - - 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' - being identical to 'x', even if 'x' is a special char like '['. - - Inside character classes, the backslash does not escape anything, and is - treated as an ordianry character. - - See regex(7) or - http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_04 - -2008-08-09 David Lutterkort - - Revamp the dict data structure - Dicts were simple linked lists of key/value pairs, and appending and - searching on those lists caused serious slowdown when the dicts became - large, for example when writing an /etc/hosts file with > 2000 lines. - - Dicts are now organized as arrays that are kept sorted by the key, and - lookup is done through binary search. Though this is still quadratic in - theory, it behaves linearly in practice even for a very large /etc/hosts - file (~ 60k lines); when keys appear in order (e.g. when they are generated - 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. - -2008-08-08 David Lutterkort - - Eliminate unneeded calls to regexp_match in split_iter - - Don't call regexp_match when we know that there is no match - It is common in the put direction that we try and split when we're already - 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 - new element. Now, we remember the last element on the list and append in - constant time. - - The same was true in a few other places: the building of a tree and of - skeletons suffered from the same problem. - - 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. - -2008-08-07 David Lutterkort - - Added tag release-0.3.0 for changeset 60f2a13c2528 - - Release 0.3.0 - - Mention the exit status - - Version libfa and libaugeas - Use libtool's version support to properly version these two libraries. For - 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 - transformed. This lead to parts of the tree getting ignored during 'put' if - the tree contained invalid nodes, and ultimately to files getting - truncated. - - This is now checked and causes a 'Short iteration' error, avoiding file - truncation. The fix also uncovered an error in the test for Aptsources.lns, - where an invalid tree node was put into the tree, but did not lead to a - test failure. - - 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 - that they all succeeded. - -2008-07-29 David Lutterkort - - Fix failures on FreeBSD - (1) Point augtool at the lenses in the source dir (not FreeBSD problem, - happens whenever Augeas is not installed yet) - (2) Remove bashism 'echo $"..."' with 'echo -e "..."' - - Quiet the test - -2008-07-29 Raphael Pinson - - Use regexp union instead of lens union in php.aug - Using a union of regexps is much faster than a union of lenses, since the - regular expressions that are constructed internally are much simpler. - -2008-07-25 Raphael Pinson - - Fix php.aug now that inifile.aug supports spaces in values - - Add PHP module and associated (basic) test file - -2008-07-29 Raphael Pinson - - Use regexp union instead of lens union in dput.aug - Using a union of regexps is much faster than a union of lenses, since the - regular expressions that are constructed internally are much simpler. - -2008-07-25 Raphael Pinson - - Rewrite dput.aug using inifile.aug Add a few keywords from man dput.cf Fix test file after rewrite - - Allow spaces in entry values - - Allow spaces in titles - - Fix empty comments in INI file - -2008-07-29 David Lutterkort - - Include canonicalize.h - On non-glibc systems, we need to make sure canonicalize_file_name is - declared from gnulib. - - Fail the whole test if one of the lens tests fails - -2008-07-28 David Lutterkort - - Add a call to move a subtree to the public API - -2008-07-26 David Lutterkort - - Refactor tree_create - - Don't run the typechecker by default from try - -2008-07-24 David Lutterkort - - Flatten the tree of lenses - For union and concat, we used to store multiple unions/concats in a binary - tree. Now, the tree is flattened and a string of concats is stored as one - lens. - - Allow a key and store in each branch of a union - - lns_key_regexp: store does not do anything about the key - We used to generate tree nodes with a NULL label for a STORE, but that is - no longer the case, and therefore the STORE lens should not produce any key - regexp. - - Correctly handle saving to nonexistant files - - Store system errors - When encountering system errors while reading or writing a file, extract - the full error message corresponding to errno and store it in error/message - -2008-07-23 Raphael Pinson - - Add AptPreferences module and associated test - - Add bbhosts module and associated test - - Add ntp module and associated test - - Add logrotate and associated test - - Add support for end of line comments in entry* Add new entry* lenses for comments_nosharp Make more generic entry and comment lenses Update test_inifile.aug to test end of line comments - - Add inifile generic module and associated test module - -2008-07-22 David Lutterkort - - Fix segfault when running 'augtool print' - -2008-07-21 David Lutterkort - - Canonicalize file names before writing - We used to clobber symlinks because writing a file consists of writing to - an intermediate .augnew file, and then moving that over the target file. To - keep target files that are symlinks intact, we now canonicalize the target - filename and then move the intermediate file to the canonicalized target - file. - - Avoid picking '\0' in examples. - Now, we only pick '\0' as the example character for a transition if it is - the only char for that transition. - -2008-07-18 David Lutterkort - - Added tag release-0.2.2 for changeset e7f6d16e75df - - Release 0.2.2 - - Rename rule because FreeBSD's make chokes on it - Rename the rule .FORCE-datadir.h to FORCE-datadir.h - - Sample dput.cf for dput lens - - Lens for Debian's dput files - Contributed by Raphael Pinson - -2008-07-17 David Lutterkort - - augtool: Print '(none)' when getting a path with no value - The output used to be mangled. Now it is 'path = value' if hte path has a - non-NULL value, 'path (none)' if the path exists but has a NULL value, and - 'path (o)' if an error occurred. - - 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' - - Bug reported by Greg Swift - -2008-07-16 David Lutterkort - - Fix insertion before the first child - Inserting a node as the new first child was completely broken. - - 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 - - test lns put str after - insa label path = str2 - - It would be nice to kill insert with one primitive, but that would have - either required special syntax (like 'ins STR before/after STR') or some - addition to the type system to make it syntactically reasonable. - -2008-07-09 David Lutterkort - - Test that putting into an empty string works - - Initialize state->pos in lns_parse and lns_get - Otherwise, get and parse on an empty string will produce a 'short - iteration' error, even if the empty string is acceptable for that lens. - -2008-07-07 David Lutterkort - - Put the default dir for lenses into DATADIR (the real fix) - Reworks 527:14602e2757dd in a way that actually works and conforms to the - GNU coding standards. - - 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. - -2008-07-03 David Lutterkort - - Lens for /etc/exports - -2008-07-01 David Lutterkort - - Release 0.2.1 - - distclean-local: Do not clobber build/aux - - Suppress generated manpages - -2008-06-30 David Lutterkort - - Put the default dir for lenses into DATADIR - Instead of hardcoding the default dir for lenses to somewhere in '/usr', - look in DATADIR - that's after all where the default lenses are installed - if DATADIR (or PREFIX) is changed. - - Man page for augparse - - Put Augeas version into footer - -2008-06-23 David Lutterkort - - Auto-generate the ChangeLog file from mercurial logs - Reviewed-by: David Lutterkort - -2008-06-13 David Lutterkort - - Fix two problems in the grub lens - (1) The grub lens did not handle blank lines - (2) Ubuntu uses 'quiet' in its boot stanzas, which we didn't know about - - 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 - input", pointing to the start of the string, even if the problem was much - farther down the line. - - With this change, error messages contain an indication to where the error - happened that is a little closer to the actual trouble spot. - -2008-06-12 David Lutterkort - - Check that we take the right branch in a union - - 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, - ever. - - Reported by Harald Hoyer - -2008-06-06 David Lutterkort - - 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 - fields. - - I would really appreciate if somebody could look over these and make sure I - don't throw away constness in too many places. It seems strange to declare a - field as non-const, even if the string referenced by it is never modified, - and only ever free'd when the enclosing struct is free'd. - -2008-06-05 David Lutterkort - - Added tag release-0.2.0 for changeset d23f95cd13f3 - - Release 0.2.0 - -2008-06-03 David Lutterkort - - Remove bashisms from test scripts - Make tests scripts work with plain old sh; also, don't hardcode location of - Ruby interpreter to /usr/bin/ruby. - - Work around a problem with Bison on FreeBSD - Bison looks for _STDLIB_H to see if stdlib.h has been included, but the - system includes use _STDLIB_H_; that makes Bison think malloc/free have not - 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. - - The bootstrap script was copied from libvirt. - -2008-06-02 David Lutterkort - - Use a build aux dir (in build/aux) - - Use autoheader and generate config.h - - Work around lack of open_memstream on non-GNU systems - Since open_memstream is only available with glibc, wrap its use and fall - back to writing to a tempfile on other platforms. - - Remove src/config.h - It was a bad idea to begin with; fold the contents into internal.h and make - room for a generated config.h - - Support the @include syntax - Debian uses lines of the form '@include module' to reference other pam - configs. The official PAM docs don't mention it, but obviously it works. - - Handle trailing whitespace in pam.d; split module-arguments - - Allow multiple comma-separated fs types in fstab - On Debian Etch, the CDROM has fs type 'udf,iso9660' - - Handle blank lines in /etc/hosts - - Fix missing ref on an info struct in syntax.c(compile_minus) - -2008-05-30 Jim Meyering - - * tests/test-lenses.sh: more quotes, protect against space in abs_srcdir - - don't conflate top_srcdir and abs_top_srcdir - * tests/Makefile.am: Use $(var), rather than obsolete @var@ notation. - (TESTS_ENVIRONMENT): Rename LHS to match RHS to help avoid (my) confusion: - s/top_builddir/abs_top_builddir/ and s/top_srcdir/abs_top_srcdir/. - * tests/augtest: Reflect renamings. - * tests/test-interpreter.sh: Likewise. - * tests/test-get.sh: Likewise, and remove unused top_builddir= assignment. - * tests/test-lenses.sh: Likewise; remove unnecessary braces, add quotes - to protect against pathological $TMPDIR. - -2008-05-29 David Lutterkort - - Make distcheck work again - Restore top_builddir and top_srcdir so that augtest passes during make - distcheck. - - Fix memory leak in make_exn_lns_error - -2008-05-29 Jim Meyering - - Remove some absolute paths for binaries. - * tests/Makefile.am [TESTS_ENVIRONMENT]: Add a PATH definition that - lets tests invoke "augtool" and "augparse" without any absolute prefix. - Remove top_builddir and top_srcdir definitions; no longer needed. - * tests/augtest: Remove definition of AUGTOOL. Update use. - * tests/test-lenses.sh: Likewise for AUGPARSE. - * tests/test-interpreter.sh: Likewise. - * tests/rec-initdefault.rb: Use 'augtool -n' in place of #{AUGTOOL}. - -2008-05-23 David Lutterkort - - Fix use of possibly uninitialized variable - * get.c(lns_parse): initialize skel; gcc complains about possible - uninitialized use - -2008-05-28 David Lutterkort - - Check that augtool reads all of tests/root/ without error - -2008-05-23 David Lutterkort - - Add a test to check we take the right branch - This does essentially the same as the test Pass_prefix_union introduced - with cset 489:3f4414038a30, but in a real world lens. - - Escape | when turning a string into a regexp - - Add source statements in shell scripts as '.source' nodes - - Escape label strings when creating the key regexp for them - - Allow lower case characters in shell vars - -2008-05-23 Jim Meyering - - "echo get /|augtool -n" would read one past end of malloc'd buffer * src/augeas.c (make_path): Avoid buffer overrun. - -2008-05-23 David Lutterkort - - Fix a major bug in the get implementation of lenses - We used to process the input from left to right, matching the regular - expressions of lenses with the input successively. That is very wrong, in - particular, it leads to lens union choosing the wrong branch: in the union - l1|l2, union would always choose l1 if l1 matched a prefix of l2. - - We now process the input in a top-down fashion, splitting the string into - parts as we descend in the tree of lenses. As evidenced by the test - pass_prefix_union, that fixes the bad behavior. - - Incidentally, it also uncovered another bug in the test_hosts.aug, where a - test passed, even though the string we were using did not end with the - newline that is mandatory for Hosts.record. - - This change also does away with pasing flags and a FILE* for logging - details about hte parse process; they don't really make sense anymore, nor - is that behavior very useful in a library. - -2008-05-22 David Lutterkort - - Fix use of uninitialized pointer - ERR must be initialized, since it is later passed to free_lns_error - - Lens for vsftpd.conf - The lens is very tight, in that it only allows actual options, and knows - what kind of value each option accepts. - -2008-05-21 James Antill - - Fix for the joy that is the glibc asprintf API. - -2008-05-21 James Antill - - Minor fix to not use bad memory. - - Remove strcat's for stpcpy's - - Fix escaping strings that end in \ Fix escaping of unprintable bytes - - Fix buffer overflow on strings ending in \ - -2008-05-21 David Lutterkort - - Use glibtoolize on OSX - Patch provided by Rizwan Kassim - -2008-05-21 Jim Meyering - - Make a file-scoped static array "const". - -2008-05-18 Jim Meyering - - * src/augtool.c (cleanpath): Don't access path[-1]. - - * src/transform.c (transform_save): Detect pre-fclose write failure. - - * src/internal.c (read_file): Rewrite, plugging a file descriptor leak. - -2008-05-16 David Lutterkort - - Added tag release-0.1.1 for changeset fae07193655a - - Release 0.1.1 - - 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 - Augeas' memory needs. - - Before this patch, augtool run against the files in tests/root/ used more - than 10MB of memory; with this patch, that is done to 250 kB after the - initial load, with a spike of about 6MB during loading. - -2008-05-15 David Lutterkort - - Misc leak fixes in the interpreter - * Do not ref the old binding in bind_type, ownership is transferred from - the caller to the new list head - * Unref the argument of an apply and the func computed in compile_compose - * Unref the value after it is bound in the context in compile_decl - * Unref various things in define_native_intl - - Don't leak the key when appending dict entries - - Free the actual struct exn when freeing an exn value - Factor freeing a struct exn into free_exn; previously, the code did not - free the storage for the struct exn itself. - - Don't leak key/value in parse on error - - Do not leak the split on error - put_subtree has to free the split it computes; previously, it leaked that - if an error inside the subtree occurred. - - Free loadpath - Although not strictly necessary, it makes it easier to run augparse through - valgrind and get meaningful results. - - Free path - - Don't leak SNAME - - Free the lns_error in lens_put - - Cleanly free regexp patterns; put empty_pattern into ro storage - - Ref the returned tree - The tree that tree_set_glue and tree_rm_glue return needs to have its ref - increased, as the calling conventions for builtin functions stipulate that - the returned value is owned by the caller - -2008-05-14 David Lutterkort - - Report errors more clearly in the tree - When an error happens during get/put, store additional info in the tree: - for get errors, store the position in the file where the error occured, for - put errors, the path of the node. In both cases, also store the - human-readable message. - - For a file F, all this information is stored underneath /augeas/F/error, - with the value associated with /augeas/F/error giving some indication about - the kind of error encountered. - -2008-05-13 David Lutterkort - - Report errors during put - - Check that values match the regexp for the corresponding store during put - - Lens and transform for /etc/fstab - The lens could be further refined by distinguishing between the legal - values in the first field (LABEL=xxx vs special file system vs device) and - by trying to model more of the vfs/option dependencies, but that's more of - a v2 feature. - - Remove bad assertions - It is perfectly legal for create_* functions to be called with a non-NULL - skeleton; that happens for example when the union combinator puts a tree - that "jumped branches", i.e. whose get used one branch of the union, and - the put uses the other branch because of changes to the tree. - - Reduce the number of calls to collect - We were calling collect way too often, which was slowing things down. Also - 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. - - Weaken the check for key, label, seq, and counter a tiny bit. - -2008-05-12 David Lutterkort - - Proper typecheck for lens unions - Check that lenses have disjoint ctypes and atypes in a union. - - Fix up the existing lenses that violate that. - -2008-05-09 David Lutterkort - - Keep re_cset_as_string from including an explicit '\0' - We use NUL delimited strings; that means we can not use a CSET - representation that mentions '\0' explicitly. - - 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 - - let re = /[a-z]+/ - "baseurl" - - 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 - The typechecking for union and concat is incredibly similar, but was - implemented with too much code duplication. - - Store character sets as bitsets - 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 - intervals, but with regular expressions. - - There are lots of gyrations to keep the generated regexp reasonably short - (and syntactically correct) - -2008-05-08 David Lutterkort - - Check for (some) allocation failures - - Reference count 'struct re' instances - - Split ref counting macros into separate header - - Remove use of bad REALLOC macro. - The old REALLOC macro caused an automatic memory leak when REALLOC - failed. Use of REALLOC_N instead also forces checking of more allocation - failures. - - 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 - chars to is* functions - by using unsigned char, we avoid possible silent - conversion problems when going from char -> int. - - 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 - -2008-05-06 David Lutterkort - - Cleaner way of turning off expensive asserts - Avoid littering everything with #ifdef's, define an 'expensive_assert' - instead that expands to nothing unless HASH_DEBUG_VERIFY is defined. - - Patch by Jim Meyering - -2008-05-06 David Lutterkort - - Small fixes to the specfile - Suggested by Michael Schwendt - -2008-05-05 David Lutterkort - - Lens and transform for xinetd.conf - - Enclose the regexp for a key in (..) before adding a / - - Properly determine if segment needs qualifier - For segments with label NULL, we didn't qualify the first sibling with the - NULL label since we were comparing NULL to the result of seg_label, which - was "(none)" - - 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 - on. - - 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. - - 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. - -2008-05-02 David Lutterkort - - Spec file fixes - -2008-05-01 David Lutterkort - - Added tag release-0.1.0 for changeset c032a957c316 - - Version 0.1.0 - - Rename parameter 'glob' to 'glb' - gcc on RHEL4 gets confused and thinks that that shadows the global 'glob' - function. - -2008-04-30 David Lutterkort - - Process lots of files in /etc/sysconfig - Load all those shell-script style config files from /etc/sysconfig using - the generic Shellvars lens. - - Ultimately, it would be better if we definedfor each of them which - 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. - - Refactor ifcfg.aug - This puts the bits that are generally useful for processing /etc/sysconfig - files into shell.aug - -2008-04-30 Jim Meyering - - check for a few failed memory allocations - * src/augtool.c: check for a few failed memory allocations - -2008-04-30 Harald Hoyer - - do ldconfig in post/postun of the libs subpackage - -2008-04-28 David Lutterkort - - Free the value when freeing a tree node - - Plug another memory leak - -2008-04-25 David Lutterkort - - Fix segfault when aug_get was passed a "/" - In that case, make_path returns NULL, which must be checked. - - The bigger question, why "/" is not a valid path is a little more subtle: - the tree is really edge-labeled, not node-labeled, i.e. a label applies to - 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" - ... other key/value pairs ... - { "baseurl" = "url1" } - { "baseurl" = "url2" } - ... - { "baseurl" = "urlN" } - ... other key/value pairs ... - } - - Note that the baseurl nodes have to be consecutive; otherwise, put will - fail. - -2008-04-24 David Lutterkort - - Fix lens selection in union - The logic in put to select the appropriate branch in unions got it wrong if - the first branch matched the empty word, because applies only checked that - the atype for the sublens matched some of the tree. It has to check for a - complete match of its tree. - - 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 - constructing the concat of L and STAR->LENS - - * src/fa.c (string_extend): Handle realloc failure. - Patch by Jim Meyering - - Update AUTHORS/NEWS - - 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. - -2008-04-23 David Lutterkort - - Remove aug_exists - it does not exist anymore - - Delete old, outdated notes - - Some repo files for yum - - 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 - can be NULL. - - 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. - - Properly handle lines with spaces - The lines read in through readline can now have spaces in their arguments, - if those arguments are enclosed in single or double quotes. - - Revised help texts - - Man page - Provided by Dean Wilson - -2008-04-22 David Lutterkort - - Fix two memory leaks in the interpreter - - Plug more memory leaks - - Fix memory leak from not freeing hash table entries - - 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 - Patch provided by Jim Meyering - - File needed for running the tests - - Stick more closely to what the shell accepts as assignments - - Properly escape/unescape quotes in strings - Patch provided by Alan Pevec - -2008-04-21 David Lutterkort - - Updated for 0.0.8 and upcoming 0.1.0 release - - Remove aug_exists from public API - aug_get now combines the functionality of the old aug_exists and aug_get - calls, so that callers can retrieve a value and check whether a path - expression matches exactly one node in a single call. - - Make creation of new files work - When a subtree is created that corresponds to a brandnew file, create the - underlying file properly. - - 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-* - Patch provided by Alan Pevec - - Don't mark ROOT for MAKE_PATH as const - it's not always true - - Cap file reads (arbitrarily) at 32MB - - Don't ever try to read a directory - Suggested by Jim Meyering. - - Return int from aug_print to indicate errors - 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. - - Mark the places where the passed-in struct augeas is readonly in the API. - - 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 - - Remove dependency on glib and use kazlib's hash table instead - The dependency on glib was only there for the hash tables used by - libfa. Rather than requiring all of glib just for that, use the hash table - implementation in hash.[ch] taken from kazlib. - -2008-04-18 David Lutterkort - - Hashtable from Kazlib 1.20 - Available from http://users.footprints.net/~kaz/kazlib.html - - Abort if failing assertions are not used - -2008-04-19 David Lutterkort - - Remove pathsplit symbol - -2008-04-16 David Lutterkort - - Added tag release-0.0.8 for changeset cb00aa18e518 - - Release 0.0.8 - - Remove unused function - - Install lens tests in lenses/tests/ not lenses/ - - Use the right path expression to print the whole tree - - Don't segfault when a test fails without producing any tree - -2008-04-15 David Lutterkort - - Call the node for a boot entry 'title' - -2008-04-14 David Lutterkort - - Remove the use in sequences in some places - Where indentation isn't important, we can flatten and simplify the tree by - not using seqs. Instead of something like aliases/1, aliases/2, ... we now - have alias[1], alias[2] etc. - - Start sequences at 1, in symmetry with the element[N] counting - - Consolidate tree allocation into one make_tree function - - Change the ins syntax to support insert before/after - This reflects the change to the aug_insert API - - Handle searching for the last() element properly - path_first didn't find anything when looking for 'element[last()]' - - 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 - label[3] would ssuccessively refer to its later siblings as label[3] was - deleted) - - 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 - -2008-04-11 David Lutterkort - - Add path expressions allowing XPath-like path matching - Path expressions passed in through the public API can now contain indices - to denote a specific sibling (including [last()]) amongst siblings with - multiple labels, and use '*' to match nodes with any label. - - 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 - - Escape values and enclose them in quotes when printing - - Typecheck only on the first test - It's enough to pass -c to augtool on the first test we run; doing it again - in later tests is completely redundant and just slows the test run down. - -2008-04-09 David Lutterkort - - Complain if a transform is built from a lens orphaning a key/value - Such a transform would lose information when applied and can't be - 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. - - During lens building, there is now a check to make sure the key and value - are set in at most one place in each subtree. Ideally, this check would - 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. - - Update README - - Remove 'spec' files and tests that don't make sense any longer - - Fail test scripts on _any_ unexpected error - - Distribute lens tests - - Suppress .rpmnew/save files - - Obey AUG_TYPE_CHECK flag - 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. - - augtest allows marking tests to skip (by putting 'skip=true' into the - 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 - - Reread the original file from the same root on save - - Pass the children of the right tree - - Fix some errors that made aug_save fail - - Mark a freshly loaded tree as clean - - Check the return value of asprintf - Handling of asprintf failures (and allocation failures in general) needs a - lot more work. - - Small touchup - needs much more work - - Fix segfault if a qualified name references the module it is in - Now explicitly referencing the enclosing module works properly: if the name - is already defined locally, everything works, and if it is not, an error is - produced. - -2008-04-08 David Lutterkort - - Typecheck the atype of concat and iter - - Typecheck the atype of union - - Change the typecheck on union - Typecheck unions l1|l2 less strictly (and less annoyingly) by requiring - that l2 has a chance of ever being used, and not the stricter criterion of - disjoint ctypes for l1 and l2 - - Port of the lenses for inittab and sshd_config tothe new syntax - - Curb the repeated printing of exceptions - - Clearer error message - - Processing of pam.d - - Pull some useful space deleters into Util - - Check that let expressions work - - Fix problem in concating filters - The check whether we fully own a filter in compile_concat, and therefore - can modify it destructively, was wrong. Besides holding the only reference - to the filter, we also need to be holding the only reference to the value - wrapping the filter. - - Mark hosts and aliases for autoloading - - Load from the new ../lenses dir - - Obey setting of an explicit root directory - - Don't segfault when there is no filter arg for a match - Before, running "augtool match '/augeas/files/*/error'" would result in a - segfault. Now it prints all matching entries, regardless of their value. - - Handle continuation lines; more thorough tests - - Check that labels and keys do not contain a '/' - We rely on that fact in various places when handling paths; '/' is the - separator of path components and can never appear in a path component. - - Print a newline on EOF - - Autoloading of files for augtool - Autoload is indicated by putting a 'autoload ...' statement as the first - expression in a module. Currently, there can only be one autoload; the - identifier mentioned in the autoload must be defined in the enclosing - module. - -2008-04-07 David Lutterkort - - Builtins for filters and transforms - Three simple builtins to construct transforms: - - - incl : string -> filter includes all files matching a glob - - excl : string -> filter -> filter excludes all files matching a glob - - transform: lens -> filter -> transform - -2008-04-08 David Lutterkort - - Implement free_lens - -2008-04-07 David Lutterkort - - A lens for yum - - Fix bad free - - Add Util.split - - Local let expressions - Add syntax for - let a = - let b = exp in - exp - - Plug two more memory leaks - - require_exp_type is sometimes called with a term that already has - a type. Don't typecheck such terms again - - compile_compose should not run the full typechecker on the closure it is - building, since parts of it have been typechecked already. Instead, - manually create types for the new terms. Also, don't evaluate the - subexpressions since their values are not used at all - - Add a 'gensym' builtin - - More ref ocunting fixes - - aug_close now releases the list of modules - - compile_bracket cleans up the arg - - augparse closes the augeas connection, mostly so that we can see leaks - in valgrind better - -2008-04-04 David Lutterkort - - Fix major brainfart in ref counting lists - The way lists were reference counted (and particularly unref'd) was just - plain stupid wrong. A list 'next' pointer is no different from any other - pointer when it comes to ref counting. - - Initialize *err properly, even if there is no tree - - Fix bug with nested subtrees - There was no clear indication if a subtree was a leaf (and should therefore - not grow any tree returned by its child) or was an interior subtree (so - that any returned tree needs to become a child of a new tree) - - Kludge around an inconsistency with print_tree - - Beginnings of tests for the interpreter - - Exceptions during compilation countas failure - - Fix how the key regexp for unions is calculated - Union would produce spurious empty keys, for example in the expression - [ key /a/ . ([ l1 ] | [ l2 ]) ] - the union would get an atype of '//' which is wrong, since the subtree [] - does not contribute to an atype. - - Start a util module with some common functions - - Run lens tests during 'make check' - - Fix bug introduced in 292:5123e63e004b - Don't compare with the whole path if there is a parent, only the last - component of that path. - - Handle trailing slashes on loadpath components cleanly - - /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 - the parent, which we don't have. - - This is really only an issue if (a) we delete the whole tree (b) the next - sibling of the node we delete is semantically different from the deleted - node (e.g. because it goes into a different file) - - Either way, this only happens during tests; in the 'real' tree, toplevel - 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 - - Update yylloc for string/regexp constants - -2008-04-03 David Lutterkort - - When compile_exp produces an exn, bind it anyway - This avoids lots of trouble with NULL values - - Desugar (lens)+ - The construct (lens)+ is now processed as lens . lens* - - Fix segv on repetition of regexps - - Clearer error messages from typechecking lenses - - Fix key regexp for union; throw exception on subtrees with multiple keys - - Have lens constructors return exns on failure - Also refactor exception generation. - - Add a test that produces an exception - - Allow '*' as a test result indicating an expected exception - - Error propagation from lns_put - Record a lns_error if things don't work out during put. Generate an - exception on error. - - A very first lens in the new syntax, with tests - - Use the default string for a del lens, really. - - Module names must be consistent with the name of the file they are in - 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 - path. - - Rename struct env to struct module - - Separate function composition from concatenation - Function composition is now written as 'f ; g' instead of 'f . g' - - Allow tree constants with NULL labels - - Clean up printing of empty trees - - Clarify the reference counting terminology - - Free the skel that lns_put creates initially - - Make sure free_dict frees the whole dict - - Fix reference problem - The wrong type was being unref'd - -2008-04-02 David Lutterkort - - Free the whole dictionary - While entries are looked up, dict->entry changes; dict->mark is the head of - the list of all entries that were ever in the dict. - - Clear skel and dict in state so assertions in create_ don't trip - - Always split the full tree - There's no need to support splitting a partial tree for now. This means - that lns_put will put TREE and all its siblings. - - Fix incorrect usage of size parameter for re_match - - Add missing break in get/parse_union - Without it, it acts like a concat that drops trees on the floor - - Allow printing of hidden tree nodes - When printing test results, we want to see the full tree - - 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. - - 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 "/" - - Print \n after test result - - Allocate enough bytes for string in unescape - - Free regexps cleanly - - Fill in subtree->atype with empty regexp - -2008-04-01 David Lutterkort - - Interpreter for the new file description syntax - This is by no means done, but done enough to allow incremental fixes from - now on. This checkin still contains lots of FIXME's and bugs. Very simple - unit tests do work though. - - The syntax for describing files is now a very simple OCaml-like functional - language; the file syntax.c implements an interpreter for that language. - -2008-03-25 David Lutterkort - - Revamp the language - -2008-03-14 David Lutterkort - - Remove comment about fa_overlap/fa_ambig_example - I don't really have the data to support preferring one over the other that. - - Rename parse_* functions to get_* - - Rename parser.c to get.c - - Add bcprules (by Benjamin Pierce); needed by lenses.tex - - Added tag release-0.0.7 for changeset 93563112907c - - Release 0.0.7 - - Expose typechecking in augtool - Run 'augtool -c' to get typechecking. Very useful during - development. (Though augparse is even more useful when writing new lenses) - - Be a little more restrictive on when to dump the whole grammar - - Fix lenses so that they pass type checking. - There were several subtle amibuities in the lenses previously, which the - typechecker nicely discovers now. - - When splitting the tree, check that we are atthe right subtree - Without the check, spliting at a subtree just gobbles up trees without any - regard for what that tree is. This becmoes a problem in a sequence like - [ COMMENT ] * . [ key FOO . store BAR ] * - when there is no comment, and therefore no subtree witha NULL label. A tree - with a single node matching FOO is wrongly split as if there was a COMMENT - (which, if it were there would have to have a NULL label) - -2008-03-13 David Lutterkort - - Defer allocating storage for a state_set as long as possible - - Rename constants state_set_* to array_* - We use state_set_initial_size and state_set_max_stride for both state_set - and transitions arrays. Rename them to array_initial_size and - array_max_expansion - - Speed up FA_MINUS by checking for some simple cases with fixed results - - Speed up fa_contains by not determinizing FA1 - - Speed up intersection - (1) Do not determinize before intersecting - (2) Check if one of the automata is the empty language, and return the - empty language if so - - Store transitions in an array - Brings about a 10% performance gain since we don't allocate each transition - individually, and since traversing and accessing transitions is a wee bit - faster. - - Remove unused macro - - Clean up fa_iter some - Now both cases (max == -1 for unbounded iteration) and max >=0 use the same - code to generate the automaton (fa){min} - - Compute union and concat in place internally - Reduces the number of times we clone an fa for internal purposes, and - therefore the memory management overhead. - - Rejigger the weights assigned by chr_score to make fa_example more predictable - - Minor optimization for fa_example - - Keep the list of states for clone in a sorted set - This speeds up things enormously (for cmfm.aug, augparse goes from 17s to 6s) - - Store that pairs of states for intersection in a hash table - - Sorted state sets - When order of states in a set doesn't matter, allow the set to be kept - sorted so that search can use binary search. - -2008-03-12 David Lutterkort - - Fix two memory leaks - - Remove the last uses of FA_MAP - Use STATE_SET instead, since it's faster and lighterweight - - Rename structs fa_state and fa_trans to state and trans - - [mq]: min_hopcroft.patch - - Sort transitions before generating examples - Otherwise, examples depend on the order in which transitions appear for - each state. - - Add state sets at head of state_set_list - - Use state_set in fa_clone - To speed up fa_clone, keep the correspondence between old and new states in - a state_set to reduce allocation overhead. - - Reverse transitions in place in fa_reverse - - Improve the performance of fa_intersect with better data structures - 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. - - Store sets of states in an array rather than in a linked list. This greatly - reducs the overhead from memory allocations, since the array is expanded by - doubling its size (up to some threshold) - -2008-03-11 David Lutterkort - - fa_star added a spurious epstrans loop on new initial - - Mark live and reachable states - Performance improvement. Instead of allocating temporary lists for live and - 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 - it's mostly a harmless problem, and fixing it requires writing nasty - regexps in the spec files. - - Fix existing specs to pass typeckecking. Typechecking is extremely slow - right now, some of that will be addressed shortly. For now, augtool does - not do typechecking, but augparse does by default. - -2008-03-10 David Lutterkort - - Fix subtle bug in determinize - Fix a bug that would only hit if '\0' is ever in points. - -2008-03-06 David Lutterkort - - Add fa_ambig_example to generate ambiguous words - Generate an ambiguous string upv given two languages and directions on how - 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. - - fa_example now generates a relatively short word, subject to certain - 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 - - Add generators and tests for some basic languages - Basic languages are the empty language, the language containing only the - empty word, and the total language \Sigma^* - - Fix tyops - - Added tag release-0.0.6 for changeset 9a4f846673ac - - 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 - overwrite files in palce, save originals with extension .augsave, or put - changes into files with extension .augnew. - - 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 - - Release 0.0.5 - - Make aug_close public - - Public API change: include a reference to an augeas_t in all calls - To make Augeas threadsafe, we need to move away from keeping stuff in - global variables. - -2008-03-04 David Lutterkort - - Add fa_example which produces an example string from a regular language - - 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 - several intervals on t1 - - 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 - per character) - - Fix order in which libraries are installed - libaugeas must be installed after libfa, since it depends on it. - - Remove old sketch of interface; not needed anymore - - 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 - - Automatically free all automata allocated during a test - - Cleanup the returned FA in fa_intersect - - Add a target to run fatest through valgrind - - Add fa_intersect: intersection of regular languages - - Comment the uses of FA_MAP better and rename some internal helper functions - - Clean up management of state lists - Centralise allocating new states for a fa in add_state; that makes sure - that all states appear on the list of states in fa->initial. - - Do not rely on gcc >= 4.0 for restricting symbol exports - Use a linker script instead. The visibility pragma is only available in gcc - >= 4.0, and thus imposes a pretty high burden to build Augeas. - -2008-02-29 David Lutterkort - - Reign in the number of symbols exported from libaugeas - Use visibility=hidden to keep most local symbols to ourselves. Still needs - some work for augparse/augtool - - Performance improvements - (1) Don't minimize the automaton quite so often. Now, only fa_compile minimizes - by default. - (2) Instead of full-on minimization, clean up the automaton before - returning to the user by removing dead transitions/states. - - Remove gratuitous list traversals - Replace list_append with list_cons (adds at the head of a list) where order - of the list does not matter. - - 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/) - - 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 - - Minimal docs for aug_save and aug_print - -2008-02-26 David Lutterkort - - Ignore more stuff - - Fix segfault in aug_ls - When skipping nodes with NULL label, don't segfault if the whole tail of - the list has NULL labels - -2008-02-25 David Lutterkort - - Added tag release-0.0.4 for changeset d8e750d82f97 - - Version 0.0.4 - - Some NEWS - - Package as RPM - - Turn off warnings-as-errors when building spec-lex.l - We need -Wno-error, otherwise the CFLAGS passed during mock builds turn - checking for unused parameters back on; flex doesn't provide an easy way to - generate code that passes those checks (that's the reason for building the - liblexer.la convenience lib) - - Only define print_dict when it is used - - Added tag release-0.0.3 for changeset 56cb08f222a3 - - Version 0.0.3 - - Test for readline in a way that works on RHEL5 - - Some build/install tweaks - (1) Rename spec in $(datadir)/augeas/spec to lenses - (2) Add pkgconfig info for libaugeas - (3) Install augeas.h as a header - - Rename AUGEAS_SPECLIB to AUGEAS_LENS_LIB - - Added tag release-0.0.2 for changeset f981ccccb0ab - - Include the try script in the distribution - - Bump version to 0.0.2 - - Fix things up so that 'make distcheck' works - (1) make test runs work when when top_builddir != top_srcdir - (2) Include spec/ files in distribution - (3) disable test-grammars.sh since the test grammars are busted right now - - Fix warnings about uninitialized variables - - Add config.h to libaugeas.la - - Stricter types for some combinators. List needed reg lang operations - -2008-02-21 David Lutterkort - - Some changes to the yum description - (1) Use a yum.conf that is actually shipping - (2) Make COMMENT match blank lines - (3) Fix tests to work with updated yum.conf - - Only create /tmp/augcmds.txt if it doesn't exist - Nothing deep; just trying to keep Mercurial from marking the file as - modified as I change the commands that try runs - - Make aug_ls return all the children for a given path - aug_ls did not handle entries that were split across several nodes - properly. Now, we find all the nodes for the given path and list their - children. - - Fix splitting of AcceptEnv - The list of env vars for AcceptEnv was not being split into individual - pieces - -2008-02-20 David Lutterkort - - A (pretty kludgy) description for cmfm.conf - - Make printing of skel/dict optional - - 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 - implementation. - - The syntax for regular expressions is now RE_SYNTAX_POSIX_MINIMAL_EXTENDED, - 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. - - 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. - - Don't segfault when parsing fails - -2008-02-19 David Lutterkort - - Drop CF-oriented check for ambiguity through looking at first sets - - Allow escaping of a slash in tegular expressions - -2008-02-18 David Lutterkort - - Base parsing completely off regexp matching. - Parsing now uses regexp matching, and not the CFG-style parsing based on - first sets previously used. This actually makes it easier to write specs, - since parsing decisions are made based on the complete string, not just the - first 'token'. - - The downside is that rules can not be recursive anymore, as that would - make the matched language non-regular. - - The main motivator for this change is that it makes it possible to do - stricter checking of the input spec using type checking similar to - boomerang's string lenses based on operations on regular languages. - - 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 - The field was named initially to avoid a clash with another 'action' field, - but that field is gone now. - - Add Match blocks - - 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 - to produce a split with exactly two entries: [a; b] (where b stands as the - first entry in the tree that '*' will act on. - - split_tree_car cleans up recursively computed splits in this manner; those - 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 - 'AcceptEnv' for sshd_config. Such lines lead to multiple nodes - /system/config/sshd/AcceptEnv (all siblings of each other) - - When a call to aug_set creates a new entry underneath such a split node, - make sure that that the new node is put under the last such node. This - helps maintain the illusion for users that the split node is really just - one node. - -2008-02-15 David Lutterkort - - Report some information underneath /augeas - The root directory and information about how files were loaded into the - tree are kept in the /augeas hierarchy now - - Fix very bad use of realloc - - Adjust expected diff - Do not allow comments to disappear - - Fix test - The old diff was bogus (it expected a comment to be removed that has to - stay there) - - Cleanly handle comments - - Default COLON to ':' plus tab. Simple tests for aliases - - Informal survey of files in /etc - - Ignore intermediate Latex files - - Store comments in subtrees so they are restored properly - - Turn into a test on a legal tree and make it pass - - Fix split of QUANT_MAYBE. Add create_quant_maybe - - Make aliases work - - Free the results of split_tree - - Properly split an empty * as an empty list - - Try to make putting QUANT_MAYBE work - This is still kinda suspect - - parse_subtree must always generates a tree - We have to have a subtree, no matter what, even if it is completely - empty. If the subtree doesn't contain any key and store instructions, we - still need to have a tree [ NULL -> NULL ] - - Modified yum spec that seems to work - - Script to ease testing of augtool - - Enable parsing of pam - - Remove bogus reset of 'record' counter - - Fix print problem - Print did not generate paths right; it would print children of a node with - a path that did not contain the label of that node. - - Add clear command - - Properly handle a NULL value in aug_set. Make aug_insert deal with NULL labels. - -2008-02-14 David Lutterkort - - Fixed, nicely working tests - -2008-02-14 David Lutterkort - - Readline completion - Complete command names and tree paths. - - Also cleans up the path entered by the user so that it doesn't have - 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. - - The reworked code is based fairly closely of boomerang and - lenses. doc/lenses.tex describes some of the background. - -2008-02-13 David Lutterkort - - Cleaner syntax - The spec language now contains instructions on how to build the tree inline - with the grammar. - - This change is majorly broken. - -2008-02-12 David Lutterkort - - Better description of lenses - - Different representation of the tree - The tree is now represented as a tree data structure, where each node in - the tree stores only a path component (label). - -2008-02-08 David Lutterkort - - Beginnings of a formal writeup - -2008-01-30 David Lutterkort - - Remove field references as a match - It used to be possible to have a rule like - rule: RE '=' $1 - with the meaning that $1 would match the same thing as RE. That hasn't been - used yet; unclear if it ever will. - - When deleting, only mark AST changed when leaf was deleted - This is really a kludge to work around the fact that we might construct - incomplete AST's. - - Slightly mroe helpful error message during parsing - - Don't segfault when the parse matches nothing - -2008-01-29 David Lutterkort - - Another yum test - - Remove more unneeded cruft - - Remove unneeded safe_free, TRUE and FALSE - - Remove unneeded ROOT_DIR and update augtool help - - Remove dead code and misleading comment - - Remove files not needed any longer - - Update NEWS - - Run all the augtest tests by default and from make check - - Test key/value parsing with yum - The test file also nicely illustrates some shortcomings of the way comments - are associated with tree entries. There's not enough flexibility to let the - 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 - is only needed when new parts of the AST are created. - - The code assumes that the leaf for the path component is in the subtree - 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 - now reordered in such a way that their ordering reflects the ordering in - the config tree. - - Iterator nodes with a $seq action need to be treated special: they do not - 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 - entering a child in the config tree corresponds to entering an AST node - (possibly followed by entering some more AST nodes labelled with the same - path) - - To this end, split actions with multiple enters into fake SEQUENCE matches - (followed by the match that held the initial action). The fake SEQUENCE - matches all have exactly one child in their matches field, and one of the - enter instructions from the action for them. - - Actions are also lifted up in the grammar as far as possible; in - particular, this pulls constants (but not $seq) out of iterators. This - 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 - simplifies both getting and putting the tree. - - As a byproduct, a number of questionable constructs are spotted and - rejected: - (1) Assignments that move the value out of the current tree - (2) Storing the same value in more than one place in the tree (which - would make it possible to change one copy, but not both) - (3) Useless enter instructions; they don't cause harm but probably - indicate some other problem in the grammar. They are only spotted - 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 - (3) Use numbers matching [0-9]+ where the grammar uses $seq, otherwise - augtool will (rightly) report an impossible path - - 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 - - Docs - -2008-01-24 David Lutterkort - - Rough thoughts about emit - -2008-01-21 David Lutterkort - - For quantified groups, count the quantifier as the group - Previously, for a match like '(A)*' A was counted as a group, which meant - that if an action was attached to the group, all the children of the '*' - node in the AST had the same path. By counting the '*' as the group, not - 'A', the children will have different name if different subtrees are - produced in the group. - - This ensures that in the AST, the children of '*' and '+' have different - 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 - - Global filename does not exist. Use basename - - Only increment $seq when it has been used - With this change, $seq goes structly sequential in the generated tree - nodes. Before, things like comments that don't lead to changes in the tree - increased the counter, too. - - Spec files needed by the tests - - 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 - if they made any changes to the tree so that the provider can decide - whether to save the file or not. - - 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 - -2008-01-17 David Lutterkort - - Make augtest set AUGEAS_ROOT and AUGEAS_SPECLIB before running augtool. - augtest now copies test files into a separate subdirectory and points - augtool to that as its root. It also points augtool to ../spec for the spec - files. - - Add the spec provider. - The provider should have been committed in 57:9e439a136787, but - wasn't. Unfortunately, versions of prov_spec.c that would compile with that - 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 - written to disk. - - 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 - actions in the grammar and propagated. - - 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 - directly the parse tree from parsing a file with a certain grammar. - - Split parsing and evaluating into to passes; references to fields - are too hard to resolve with a partially constructed AST. - - Also adds a routine (ast_dot) to output the AST as a dot file; this eases - debugging tremendously. augparse will now produce dot files when given '-P - ast' - - 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 - field pointing to the quantified expression. - - 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 - Factor printing of a literal_set into print_literal_set and use it for - printing both first and follow sets. - - Remove debug printing in augparse about loaded maps - -2008-01-07 David Lutterkort - - Free tokens entirely when freeing file - - Set action in all path components - -2008-01-03 David Lutterkort - - Provider that uses specs - The spec provider is hooked into libaugeas and loaded. It reads spec files - from /usr/share/augeas/spec and paths mentioned on AUGEAS_SPECLIB. Files - are parsed according to the specs loaded, and values are written into the - tree after parsing those files. - - 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 - Without that, it's too easy to pass an invalid pointer in from random - nonsense on the stack. And since we do not append to anything the user may - pass in, setting to NULL is safe. - - Compile regexps for multiline matching - -2008-01-02 David Lutterkort - - Fix syntax error; we want to test that missing defaults are noticed - - Add filemappings to the language - The map construct specifies a grammar and a list of glob patterns that this - grammar should be applied to. - - Print the filename in errors about tokens (abbrevs) - - Add name to grammars - - Add -v switch for printing errors - - Two more test grammars - - Execute actions (not writing to tree yet) - Actions are executed at the right points during the parse, and a stack of - paths is maintained. References to values work with the exception of - references to rules. - -2007-12-21 David Lutterkort - - Check grammar acceptance/rejection - - More precise syntax for where actions attach in a rule - Previously, it was not clear how far into a rule the current path would be - modified during parsing. This syntax defines some clear rules for that: - - if the rule applies to a parenthesized group (@n), the - path is in effect until the end of the group - - if the rule applies to a field (@$n), the new path is used during - parsing of that field - - the assignment part of the action is done after the field/group - has been parsed - - Snapshot before changing the syntax of rule actions - -2007-12-20 David Lutterkort - - Remove unused keyword and token 'default' - - Fix field number computation - - Two more rejection tests - - Add a simple test for rejecting bad grammars - - Don't try to dump a NULL grammar - - Introduce SUBMATCH_P macro; cleanup unnecessary switch statements. - - Statically number all matches in a rule. Check for illegal field refs. - - Collect unprocessed tokens in the parser state. - - Print quantifier after rule reference - - Remove unneeded debug print - - 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 - struct literal or if the contain entries where the literals have the same - patterns (as strings) - - This still misses the case where literals have equivalent regular - 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. - - Add options to control grammar printing - - Set match->owner for _all_ matches - - Two more sample/test grammars - - First step towards a specification for config files - Definition of a simple language for describing the syntax of config files - and how they are to be mapped to a tree. Lexer/parser for the language and - data structures to hold the specification. Parses files defined by the - grammar - processing of the parse is missing though. - -2007-12-14 David Lutterkort - - Factor aug_make_file into internal.c - -2007-12-01 David Lutterkort - - Be more verbose about which tests were run - - Do not include unused util.h - - Mention language bindings - - Added tag release-0.0.1 for changeset 69688020bb1b - - Some news - - Disribute tests and doc/examples.txt - - Some pseudo-code examples - - Explain yourself - -2007-11-30 David Lutterkort - - Add a test that shows how to change the initdefault - - Add help texts and a help command - - Add aug_match as a simple query facility - - Handle /etc/inittab - - Make the ROOT_DIR a constant instead of hardcoding it everywhere - - Test deleting everything from /etc/hosts - - Describe what a test description looks like - - Add a provider for /etc/hosts and reorganize how providers are loaded/saved a little - - 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 - - Translate changes in the tree into changes in files (change/insert/delete - 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 - -2007-11-26 David Lutterkort - - Trim trailing slashes from paths - - Keep /system and /system/config around at all times - - Access aug_insert from the command line; do better error checking for aug_insert - - 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 - files - - augtool gives a basic mean to inspect the keystore from the command line - -2007-11-26 David Lutterkort - - Ignore some files diff --git a/Makefile.in b/Makefile.in deleted file mode 100644 index 4d3212e..0000000 --- a/Makefile.in +++ /dev/null @@ -1,1775 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = . -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = augeas.pc augeas.spec -CONFIG_CLEAN_VPATH_FILES = -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 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/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -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_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 = \ - 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,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -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@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = gnulib/lib src gnulib/tests tests man doc examples -ACLOCAL_AMFLAGS = -I gnulib/m4 -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/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: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -config.h: stamp-h1 - @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 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -augeas.pc: $(top_builddir)/config.status $(srcdir)/augeas.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -augeas.spec: $(top_builddir)/config.status $(srcdir)/augeas.spec.in - cd $(top_builddir) && $(SHELL) ./config.status $@ - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool config.lt -install-dist_lensDATA: $(dist_lens_DATA) - @$(NORMAL_INSTALL) - @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"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lensdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(lensdir)" || exit $$?; \ - done - -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|^.*/||'`; \ - dir='$(DESTDIR)$(lensdir)'; $(am__uninstall_files_from_dir) -install-dist_lenstestDATA: $(dist_lenstest_DATA) - @$(NORMAL_INSTALL) - @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"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(lenstestdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(lenstestdir)" || exit $$?; \ - done - -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|^.*/||'`; \ - dir='$(DESTDIR)$(lenstestdir)'; $(am__uninstall_files_from_dir) -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - @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"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__post_remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__post_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_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__post_remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__post_remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__post_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 -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - 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,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && 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 \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(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: - @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)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) config.h -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(lensdir)" "$(DESTDIR)$(lenstestdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-hdr \ - distclean-libtool distclean-local distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-dist_lensDATA install-dist_lenstestDATA \ - install-pkgconfigDATA - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-dist_lensDATA uninstall-dist_lenstestDATA \ - uninstall-pkgconfigDATA - -.MAKE: $(am__recursive_targets) all install-am install-strip - -.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 \ - install-dist_lenstestDATA 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-pkgconfigDATA 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-dist_lensDATA uninstall-dist_lenstestDATA \ - uninstall-pkgconfigDATA - - -distclean-local: - -find $(top_builddir)/build/* -maxdepth 0 -not -name ac-aux | xargs rm -rf - -ChangeLog: - if test -d $(top_srcdir)/.git; then \ - $(top_srcdir)/build/ac-aux/gitlog-to-changelog > $@; \ - fi - -dist: ChangeLog - -.PHONY: ChangeLog - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/Makefile.maint b/Makefile.maint new file mode 100644 index 0000000..b126be9 --- /dev/null +++ b/Makefile.maint @@ -0,0 +1,39 @@ +# -*- makefile -*- + +# Targets useful for maintenance/making releases etc. Some of them depend +# on very specific local setups + +include Makefile + +rpmbuild_dir=/data/rpmbuild/$(PACKAGE_NAME)-$(PACKAGE_VERSION) +rpb_spec=$(rpmbuild_dir)/augeas.spec +release_dir=weave:/var/www/sites/download.augeas.net/ + +tarball=$(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz + +# This only works with the way I have set up my .rpmmacros +build-rpm: + test -d $(rpmbuild_dir) || mkdir $(rpmbuild_dir) + rm -f $(rpmbuild_dir)/$(tarball) $(rpb_spec) + ln -sf $(abs_top_srcdir)/$(tarball) $(rpmbuild_dir) + ln -sf $(abs_top_srcdir)/augeas.spec $(rpmbuild_dir) + rpmbuild -ba $(rpmbuild_dir)/augeas.spec + +upload: + @gpg -q --batch --verify $(tarball).sig > /dev/null 2>&1 || \ + gpg --output $(tarball).sig --detach-sig $(tarball); \ + rsync -v $(tarball) $(tarball).sig $(release_dir); \ + git push --tags + +tag-release: + @git tag -s release-$(VERSION) + +# Print all the debug categories in use +debug-categories: + @fgrep 'debugging("' src/*.c | sed -r -e 's/^.*debugging\("([^"]+)"\).*$$/\1/' | sort -u + +# This is how I run autogen.sh locally +autogen: + ./autogen.sh CFLAGS=-g --prefix=/data/share/ --gnulib-srcdir=${HOME}/code/gnulib/ --enable-compile-warnings=error --enable-debug=yes + +.PHONY: build-rpm diff --git a/NEWS b/NEWS index 13dc9a1..a748343 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,80 @@ +1.4.0 - 2015-05-22 + - General changes/additions + * add a aug_escape_name call to sanitize strings for use in path + expressions. There are a few characters that are special in path + expressions. This function makes it possible to have them all escaped + so that the resulting string can be used in a path expression and is + guaranteed to only match a node with exactly that name + * paths generated by Augeas are now properly escaped so that, e.g., the + strings returned by aug_match can always be fed to aug_get, even if + they contain special characters + * augtool: correctly record history when reading commands from a file + and then switching to interactive mode (Robert Drake) + * augtool: new command 'errors' that pretty-prints /augeas//error + messages; improve the information provided with 'short iteration' + errors + * fix segfault when saving to a file that was not writable (Issue #178) + * augtool: on interrupt (Ctrl-C), cancel current line instead of + exiting (jeremy Lin) + * updated parser.y to work with Bison 3.0.2 + * fix put-symlink-augsave test to run on Solaris (Geoffrey Gardella, + issue #242) + - Lens changes/additions + * AFS_Cellalias: new lens (Pat Riehecky) + * Authorized_keys: allow double quotes in option values (Issue #135) + * Chrony: fix typo in log flag 'measurements' (Pat Riehecky) + * Clamav: new lens (Andrew Colin Kissa) + * Dns_Zone: New lens to parse DNS zone files (Kaarle Ritvanen) + * Dnsmasq: Parse the structure of the 'address' and 'server' options + (incompatible change) (Kaarle Ritvanen) + * Erlang: parse kernel app config, handle empty lists (RHBZ#1175546) + * Exports: support brackets in machine names (Vincent Desjardins) + * Grub: support password stanza inside boot/title section (Issue #229) + * Httpd: handle eol after opening tag (Issue #220); fix type checking + issue (Issue #223) + * Iscsid: new lens (Joey Boggs and Pat Riehecky) (Issue #174) + * Jaas: several improvements to cover more valid syntax (Steve Shipway) + * Known_Hosts: handle aliases for the host name + * Krb5: support keyword krb524_server; allow realm names starting + with lower-case characters (Jurjen Bokma) + * Limits: allow comments at end of line (timdeluxe) + * Logrotate: support 'dateformat' directive (Issue #217) + support 'maxsize' directive (RHBZ#1213292) + do not require a space before an opening '{' (Issue #123) + * Mailscanner: new lens (Andrew Colin Kissa) + * Mailscanner_Rules: new lens for MailScanner rules (Andrew Colin Kissa) + * NagiosCfg: default to no spaces around equal (Issue #177) + * Nginx: significantly reworked, now parses entire Nginx stock + config successfully (Issue #179) + * Pagekite: more fine-grained control of service_on entries; instead of + 'source' and 'destination', parse into protocol, kitename, + backend_host, backend_port, and secret (Michael Pimmer) + (incompatible change) + * Passwd: support nis [+-]username syntax (Borislav Stoichkov); fix + @nisdefault on OpenBSD (Matt Dainty) + * Pgbouncer: new lense for the pgbouncer connection pooler (Andrew + Colin Kissa) + * Postfix_sasl_smtpd: new lens contributed by larsen0815 (Issue #182) + * Postgresql: look for postgresql.conf in paths used on Red Hat based + distros (Haotian Liu) + * Puppetfile: new lens to parse librarian-puppet's Puppetfile + * Pylonspaste: new lense for Pylon's paste init configuration files + (Andrew Colin Kissa) + * PythonPaste: parse "set" keyword for default overrides (RHBZ#1175545) + * Shadow: allow NIS entries (Borislav Stoichkov) + * Shellvars: case: support ;; on same line with multiple commands + (Kaarle Ritvanen); make insertion at the beginning of a + file that starts with blank lines work; the new lens will + remove blank lines from the beginning of a file as soon as + lines are added to or removed from it (GH issue #202); + handle associative arrays; add /etc/periodic.conf for + FreeBSD (Michael Moll) + * Shellvars_list: support double-quoted continued lines + * Sudoers: allow '+' in user/groupnames (Andreas Grüninger) + * Sysctl: add /boot/loader.conf for FreeBSD (Michael Moll) + * Sysconfig: handle leading whitespace at beginning of a line, + RHBZ#761246 + 1.3.0 - 2014-11-07 - General changes/additions * Add missing cp entry in manpage (GH issue #78) @@ -107,7 +184,7 @@ fix for block's brackets upon write, fixes broken tests for mailbox, fixes indention, - test case for block_args with ", + test case for block_args with "" fixes broken indention Use Quote module * Exports: Permit colons for IPv6 client addresses, bug #366 diff --git a/README b/README deleted file mode 100644 index 8ea1c36..0000000 --- a/README +++ /dev/null @@ -1,85 +0,0 @@ -Introduction ------------- - - Augeas is a library and command line tool that focuses on the most basic - problem in handling Linux configurations programmatically: editing actual - configuration files in a controlled manner. - - To that end, Augeas exposes a tree of all configuration settings (well, - all the ones it knows about) and a simple local API for manipulating the - tree. Augeas then modifies underlying configuration files according to - the changes that have been made to the tree; it does as little modeling - of configurations as possible, and focuses exclusivley on transforming - the tree-oriented syntax of its public API to the myriad syntaxes of - individual configuration files. - - This focus on editing sets Augeas apart from any other configuration tool - I know of. Hopefully, Augeas will form a more solid foundation on which - these tools can be built; with a clean, simple API these tools should - be able to focus more on their core concerns and less on the mechanics - of running sed, grep, awk, etc. to tweak a config file. - - If all you need is a tool to edit configuration files, you only need to - concern yourself with the handful of public API calls that Augeas exposes - (or their equivalent language bindings). However, to teach Augeas about a - new file format, you need to describe that file format in Augeas's domain - specific language (a very small subset of ML) Documentation for that - language can be found on the Augeas website at http://augeas.net/ If you - do that, please contribute the description if at all possible, or include - it in the distribution of your software - all you need to do for that is - add a couple of text files, there is no need to change existing - code. Ultimately, Augeas should describe all config files commonly found - on a Linux system. - -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. - -Building --------- - -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, - - ./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. - -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/README b/README new file mode 120000 index 0000000..42061c0 --- /dev/null +++ b/README @@ -0,0 +1 @@ +README.md \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..8ea1c36 --- /dev/null +++ b/README.md @@ -0,0 +1,85 @@ +Introduction +------------ + + Augeas is a library and command line tool that focuses on the most basic + problem in handling Linux configurations programmatically: editing actual + configuration files in a controlled manner. + + To that end, Augeas exposes a tree of all configuration settings (well, + all the ones it knows about) and a simple local API for manipulating the + tree. Augeas then modifies underlying configuration files according to + the changes that have been made to the tree; it does as little modeling + of configurations as possible, and focuses exclusivley on transforming + the tree-oriented syntax of its public API to the myriad syntaxes of + individual configuration files. + + This focus on editing sets Augeas apart from any other configuration tool + I know of. Hopefully, Augeas will form a more solid foundation on which + these tools can be built; with a clean, simple API these tools should + be able to focus more on their core concerns and less on the mechanics + of running sed, grep, awk, etc. to tweak a config file. + + If all you need is a tool to edit configuration files, you only need to + concern yourself with the handful of public API calls that Augeas exposes + (or their equivalent language bindings). However, to teach Augeas about a + new file format, you need to describe that file format in Augeas's domain + specific language (a very small subset of ML) Documentation for that + language can be found on the Augeas website at http://augeas.net/ If you + do that, please contribute the description if at all possible, or include + it in the distribution of your software - all you need to do for that is + add a couple of text files, there is no need to change existing + code. Ultimately, Augeas should describe all config files commonly found + on a Linux system. + +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. + +Building +-------- + +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, + + ./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. + +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/aclocal.m4 b/aclocal.m4 deleted file mode 100644 index 162cf2b..0000000 --- a/aclocal.m4 +++ /dev/null @@ -1,1416 +0,0 @@ -# generated automatically by aclocal 1.13.4 -*- Autoconf -*- - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -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.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'.])]) - -# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- -# serial 1 (pkg-config-0.24) -# -# Copyright © 2004 Scott James Remnant . -# -# This program is free software; you can 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 -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# 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. -# -# 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. - -# PKG_PROG_PKG_CONFIG([MIN-VERSION]) -# ---------------------------------- -AC_DEFUN([PKG_PROG_PKG_CONFIG], -[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) -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]) - -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=m4_default([$1], [0.9.0]) - AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - PKG_CONFIG="" - fi -fi[]dnl -])# PKG_PROG_PKG_CONFIG - -# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) -# -# Check to see whether a particular set of modules exists. Similar -# to PKG_CHECK_MODULES(), but does not set variables or print errors. -# -# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -# only at the first occurence in configure.ac, so if the first place -# it's called might be skipped (such as if it is within an "if", you -# have to call PKG_CHECK_EXISTS manually -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_EXISTS], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -if test -n "$PKG_CONFIG" && \ - AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then - m4_default([$2], [:]) -m4_ifvaln([$3], [else - $3])dnl -fi]) - -# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) -# --------------------------------------------- -m4_define([_PKG_CONFIG], -[if test -n "$$1"; then - pkg_cv_[]$1="$$1" - elif test -n "$PKG_CONFIG"; then - PKG_CHECK_EXISTS([$3], - [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes ], - [pkg_failed=yes]) - else - pkg_failed=untried -fi[]dnl -])# _PKG_CONFIG - -# _PKG_SHORT_ERRORS_SUPPORTED -# ----------------------------- -AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi[]dnl -])# _PKG_SHORT_ERRORS_SUPPORTED - - -# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], -# [ACTION-IF-NOT-FOUND]) -# -# -# Note that if there is a possibility the first call to -# PKG_CHECK_MODULES might not happen, you should be sure to include an -# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac -# -# -# -------------------------------------------------------------- -AC_DEFUN([PKG_CHECK_MODULES], -[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl -AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl -AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl - -pkg_failed=no -AC_MSG_CHECKING([for $1]) - -_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) -_PKG_CONFIG([$1][_LIBS], [libs], [$2]) - -m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS -and $1[]_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details.]) - -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 --cflags --libs "$2" 2>&1` - else - $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 - - m4_default([$4], [AC_MSG_ERROR( -[Package requirements ($2) were not met: - -$$1_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -installed software in a non-standard prefix. - -_PKG_TEXT])[]dnl - ]) -elif test $pkg_failed = untried; then - AC_MSG_RESULT([no]) - m4_default([$4], [AC_MSG_FAILURE( -[The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -_PKG_TEXT - -To get pkg-config, see .])[]dnl - ]) -else - $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS - $1[]_LIBS=$pkg_cv_[]$1[]_LIBS - AC_MSG_RESULT([yes]) - $3 -fi[]dnl -])# PKG_CHECK_MODULES - - -# PKG_INSTALLDIR(DIRECTORY) -# ------------------------- -# Substitutes the variable pkgconfigdir as the location where a module -# should install pkg-config .pc files. By default the directory is -# $libdir/pkgconfig, but the default can be changed by passing -# DIRECTORY. The user can override through the --with-pkgconfigdir -# parameter. -AC_DEFUN([PKG_INSTALLDIR], -[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) -m4_pushdef([pkg_description], - [pkg-config installation directory @<:@]pkg_default[@:>@]) -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 - -_PKG_CONFIG([$1], [variable="][$3]["], [$2]) -AS_VAR_COPY([$1], [pkg_cv_][$1]) - -AS_VAR_IF([$1], [""], [$5], [$4])dnl -])# PKG_CHECK_VAR - -# 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, -# with or without modifications, as long as this notice is preserved. - -# AM_AUTOMAKE_VERSION(VERSION) -# ---------------------------- -# Automake X.Y traces this macro to ensure aclocal.m4 has been -# 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.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.13.4], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_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.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-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/../..'. -# -# Of course, Automake must honor this variable whenever it calls a -# tool from the auxiliary directory. The problem is that $srcdir (and -# therefore $ac_aux_dir as well) can be either absolute or relative, -# depending on how configure is run. This is pretty annoying, since -# it makes $ac_aux_dir quite unusable in subdirectories: in the top -# source directory, any form will work fine, but in subdirectories a -# relative path needs to be adjusted first. -# -# $ac_aux_dir/missing -# fails when called from a subdirectory if $ac_aux_dir is relative -# $top_srcdir/$ac_aux_dir/missing -# fails if $ac_aux_dir is absolute, -# fails when called from a subdirectory in a VPATH build with -# a relative $ac_aux_dir -# -# 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 -# start a VPATH build or use an absolute $srcdir. -# -# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, -# iff we strip the leading $srcdir from $ac_aux_dir. That would be: -# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` -# and then we would define $MISSING as -# MISSING="\${SHELL} $am_aux_dir/missing" -# This will work as long as MISSING is not called from configure, because -# unfortunately $(top_srcdir) has no meaning in configure. -# However there are other variables, like CC, which are often used in -# configure, and could therefore not use this "fixed" $ac_aux_dir. -# -# Another solution, used here, is to always expand $ac_aux_dir to an -# absolute PATH. The drawback is that using absolute paths prevent a -# configured tree to be moved without reconfiguration. - -AC_DEFUN([AM_AUX_DIR_EXPAND], -[dnl Rely on autoconf to set up CDPATH properly. -AC_PREREQ([2.50])dnl -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` -]) - -# AM_CONDITIONAL -*- Autoconf -*- - -# 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. - -# AM_CONDITIONAL(NAME, SHELL-CONDITION) -# ------------------------------------- -# Define a conditional. -AC_DEFUN([AM_CONDITIONAL], -[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 -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -m4_define([_AM_COND_VALUE_$1], [$2])dnl -if $2; then - $1_TRUE= - $1_FALSE='#' -else - $1_TRUE='#' - $1_FALSE= -fi -AC_CONFIG_COMMANDS_PRE( -[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then - AC_MSG_ERROR([[conditional "$1" was never defined. -Usually this means the macro was only invoked conditionally.]]) -fi])]) - -# 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. - - -# 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 -# CC etc. in the Makefile, will ask for an AC_PROG_CC use... - - -# _AM_DEPENDENCIES(NAME) -# ---------------------- -# See how the compiler implements dependency checking. -# 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 -# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular -# dependency, and given that the user is not expected to run this macro, -# just rely on AC_PROG_CC. -AC_DEFUN([_AM_DEPENDENCIES], -[AC_REQUIRE([AM_SET_DEPDIR])dnl -AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl -AC_REQUIRE([AM_MAKE_INCLUDE])dnl -AC_REQUIRE([AM_DEP_TRACK])dnl - -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], -[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_$1_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` - fi - am__universal=false - m4_case([$1], [CC], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac], - [CXX], - [case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac]) - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_$1_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_$1_dependencies_compiler_type=none -fi -]) -AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) -AM_CONDITIONAL([am__fastdep$1], [ - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) -]) - - -# AM_SET_DEPDIR -# ------------- -# Choose a directory name for dependency files. -# 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 -]) - - -# AM_DEP_TRACK -# ------------ -AC_DEFUN([AM_DEP_TRACK], -[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-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_OUTPUT_DEPENDENCY_COMMANDS -# ------------------------------ -AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], -[{ - # 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 - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # 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 - # 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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # 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 - am__quote=`sed -n 's/^am__quote = //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'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`AS_DIRNAME(["$file"])` - AS_MKDIR_P([$dirpart/$fdir]) - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} -])# _AM_OUTPUT_DEPENDENCY_COMMANDS - - -# 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 -# need in order to bootstrap the dependency handling code. -AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], -[AC_CONFIG_COMMANDS([depfiles], - [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], - [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) -]) - -# Do all the work for Automake. -*- Autoconf -*- - -# 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. - -# 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. - -# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) -# AM_INIT_AUTOMAKE([OPTIONS]) -# ----------------------------------------------- -# The call with PACKAGE and VERSION arguments is the old style -# call (pre autoconf-2.50), which is being phased out. PACKAGE -# and VERSION should now be passed to AC_INIT and removed from -# the call to AM_INIT_AUTOMAKE. -# We support both call styles for the transition. After -# the next Automake release, Autoconf can make the AC_INIT -# 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.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 -AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl -AC_REQUIRE([AC_PROG_INSTALL])dnl -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi -AC_SUBST([CYGPATH_W]) - -# Define the identity of the package. -dnl Distinguish between old-style and new-style calls. -m4_ifval([$2], -[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], [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 - -# 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]) -AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -AC_REQUIRE([AM_PROG_INSTALL_STRIP])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 -AC_REQUIRE([AC_PROG_MAKE_SET])dnl -AC_REQUIRE([AM_SET_LEADING_DOT])dnl -_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_AM_IF_OPTION([no-dependencies],, -[AC_PROVIDE_IFELSE([AC_PROG_CC], - [_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])], - [m4_define([AC_PROG_CXX], - m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_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 -]) -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 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], -m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - - -# When config.status generates a header, we must update the stamp-h file. -# This file resides in the same directory as the config header -# that is generated. The stamp files are numbered to have different names. - -# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the -# loop where config.status creates the headers, so we can generate -# our stamp files there. -AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], -[# Compute $1's index in $config_headers. -_am_arg=$1 -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) - -# 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi -AC_SUBST([install_sh])]) - -# 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. - -# Check whether the underlying file-system supports filenames -# with a leading dot. For instance MS-DOS doesn't. -AC_DEFUN([AM_SET_LEADING_DOT], -[rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -fi -rmdir .tst 2>/dev/null -AC_SUBST([am__leading_dot])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# 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. - -# AM_MAKE_INCLUDE() -# ----------------- -# Check to see how make treats includes. -AC_DEFUN([AM_MAKE_INCLUDE], -[am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -AC_MSG_CHECKING([for style of include used by $am_make]) -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi -AC_SUBST([am__include]) -AC_SUBST([am__quote]) -AC_MSG_RESULT([$_am_result]) -rm -f confinc confmf -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# 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. - -# AM_MISSING_PROG(NAME, PROGRAM) -# ------------------------------ -AC_DEFUN([AM_MISSING_PROG], -[AC_REQUIRE([AM_MISSING_HAS_RUN]) -$1=${$1-"${am_missing_run}$2"} -AC_SUBST($1)]) - -# AM_MISSING_HAS_RUN -# ------------------ -# 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 -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -if eval "$MISSING --is-lightweight"; then - am_missing_run="$MISSING " -else - am_missing_run= - AC_MSG_WARN(['missing' script is too old or missing]) -fi -]) - -# -*- 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. - -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-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_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])]) - -# _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)])]) - -# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) -# ------------------------------------------- -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -AC_DEFUN([_AM_IF_OPTION], -[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) - -# Check to make sure that the build environment is sane. -*- Autoconf -*- - -# 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_SANITY_CHECK -# --------------- -AC_DEFUN([AM_SANITY_CHECK], -[AC_MSG_CHECKING([whether build environment is sane]) -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[[\\\"\#\$\&\'\`$am_lf]]*) - AC_MSG_ERROR([unsafe absolute working directory name]);; -esac -case $srcdir in - *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; -esac - -# 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 ( - 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 - # Ok. - : -else - AC_MSG_ERROR([newly created file is older than distributed files! -Check your system clock]) -fi -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-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_SILENT_RULES([DEFAULT]) -# -------------------------- -# Enable less verbose build rules; with the default set to DEFAULT -# ("yes" being less verbose, "no" or empty being verbose). -AC_DEFUN([AM_SILENT_RULES], -[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-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_INSTALL_STRIP -# --------------------- -# 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 -# 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 -# 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'. -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-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_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -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-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_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# 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 -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# 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. 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' - -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], - [], - - [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 - - 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 - -m4_include([gnulib/m4/00gnulib.m4]) -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]) -m4_include([gnulib/m4/double-slash-root.m4]) -m4_include([gnulib/m4/dup2.m4]) -m4_include([gnulib/m4/eealloc.m4]) -m4_include([gnulib/m4/environ.m4]) -m4_include([gnulib/m4/errno_h.m4]) -m4_include([gnulib/m4/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]) -m4_include([gnulib/m4/lib-prefix.m4]) -m4_include([gnulib/m4/libtool.m4]) -m4_include([gnulib/m4/localcharset.m4]) -m4_include([gnulib/m4/locale-fr.m4]) -m4_include([gnulib/m4/locale-ja.m4]) -m4_include([gnulib/m4/locale-tr.m4]) -m4_include([gnulib/m4/locale-zh.m4]) -m4_include([gnulib/m4/locale_h.m4]) -m4_include([gnulib/m4/localeconv.m4]) -m4_include([gnulib/m4/localename.m4]) -m4_include([gnulib/m4/lock.m4]) -m4_include([gnulib/m4/longlong.m4]) -m4_include([gnulib/m4/lstat.m4]) -m4_include([gnulib/m4/ltoptions.m4]) -m4_include([gnulib/m4/ltsugar.m4]) -m4_include([gnulib/m4/ltversion.m4]) -m4_include([gnulib/m4/lt~obsolete.m4]) -m4_include([gnulib/m4/malloc.m4]) -m4_include([gnulib/m4/malloca.m4]) -m4_include([gnulib/m4/mbrtowc.m4]) -m4_include([gnulib/m4/mbsinit.m4]) -m4_include([gnulib/m4/mbsrtowcs.m4]) -m4_include([gnulib/m4/mbstate_t.m4]) -m4_include([gnulib/m4/mbtowc.m4]) -m4_include([gnulib/m4/memchr.m4]) -m4_include([gnulib/m4/mempcpy.m4]) -m4_include([gnulib/m4/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]) -m4_include([gnulib/m4/safe-alloc.m4]) -m4_include([gnulib/m4/selinux-context-h.m4]) -m4_include([gnulib/m4/selinux-selinux-h.m4]) -m4_include([gnulib/m4/setenv.m4]) -m4_include([gnulib/m4/setlocale.m4]) -m4_include([gnulib/m4/size_max.m4]) -m4_include([gnulib/m4/ssize_t.m4]) -m4_include([gnulib/m4/stat.m4]) -m4_include([gnulib/m4/stdbool.m4]) -m4_include([gnulib/m4/stddef_h.m4]) -m4_include([gnulib/m4/stdint.m4]) -m4_include([gnulib/m4/stdint_h.m4]) -m4_include([gnulib/m4/stdio_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]) -m4_include([gnulib/m4/unistd_h.m4]) -m4_include([gnulib/m4/vasnprintf.m4]) -m4_include([gnulib/m4/vasprintf.m4]) -m4_include([gnulib/m4/warn-on-use.m4]) -m4_include([gnulib/m4/wchar_h.m4]) -m4_include([gnulib/m4/wchar_t.m4]) -m4_include([gnulib/m4/wcrtomb.m4]) -m4_include([gnulib/m4/wctob.m4]) -m4_include([gnulib/m4/wctomb.m4]) -m4_include([gnulib/m4/wctype_h.m4]) -m4_include([gnulib/m4/wint_t.m4]) -m4_include([gnulib/m4/xsize.m4]) -m4_include([gnulib/m4/yield.m4]) -m4_include([acinclude.m4]) diff --git a/augeas.spec b/augeas.spec deleted file mode 100644 index f23f4c0..0000000 --- a/augeas.spec +++ /dev/null @@ -1,181 +0,0 @@ -Name: augeas -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://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 -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. - -The transformation works very hard to preserve comments and formatting -details. It is controlled by ``lens'' definitions that describe the file -format and the transformation into a tree. - -%package devel -Summary: Development files for %{name} -Group: Development/Libraries -Requires: %{name}-libs = %{version}-%{release} -Requires: pkgconfig - -%description devel -The %{name}-devel package contains libraries and header files for -developing applications that use %{name}. - - -%package libs -Summary: Libraries for %{name} -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 - -%build -%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 - -%post libs -p /sbin/ldconfig - -%postun libs -p /sbin/ldconfig - -%files -%defattr(-,root,root,-) -%{_bindir}/augtool -%{_bindir}/augparse -%{_bindir}/fadot -%doc %{_mandir}/man1/* -%{_datadir}/vim/vimfiles/syntax/augeas.vim -%{_datadir}/vim/vimfiles/ftdetect/augeas.vim - -%files libs -%defattr(-,root,root,-) -# %{_datadir}/augeas and %{_datadir}/augeas/lenses are owned -# by filesystem. -%{_datadir}/augeas/lenses/dist -%{_libdir}/*.so.* -%doc AUTHORS COPYING NEWS - -%files devel -%defattr(-,root,root,-) -%doc -%{_includedir}/* -%{_libdir}/*.so -%{_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 - -* Mon Jul 25 2011 David Lutterkort - 0.9.0-1 -- New version - -* Fri Apr 15 2011 David Lutterkort - 0.8.1-1 -- New version - -* Tue Feb 22 2011 David Lutterkort - 0.8.0-1 -- New version - -* Fri Nov 19 2010 David Lutterkort - 0.7.4-1 -- New version - -* Fri Aug 6 2010 David Lutterkort - 0.7.3-1 -- New version - -* Tue Jun 22 2010 David Lutterkort - 0.7.2-1 -- Fix ownership of /usr/share/augeas. BZ 569393 - -* Wed Apr 21 2010 David Lutterkort - 0.7.1-1 -- New version - -* Thu Jan 14 2010 David Lutterkort - 0.7.0-1 -- New version - -* Mon Nov 30 2009 David Lutterkort - 0.6.0-1 -- Install vim syntax files - -* Mon Sep 14 2009 David Lutterkort - 0.5.3-1 -- New version - -* Mon Jul 13 2009 David Lutterkort - 0.5.2-1 -- New version - -* Fri Jun 5 2009 David Lutterkort - 0.5.1-1 -- Install fadot - -* Fri Mar 27 2009 David Lutterkort - 0.5.0-2 -- fadot isn't being installed just yet - -* Tue Mar 24 2009 David Lutterkort - 0.5.0-1 -- New program /usr/bin/fadot - -* Mon Mar 9 2009 David Lutterkort - 0.4.2-1 -- New version - -* Fri Feb 27 2009 David Lutterkort - 0.4.1-1 -- New version - -* Fri Feb 6 2009 David Lutterkort - 0.4.0-1 -- New version - -* Mon Jan 26 2009 David Lutterkort - 0.3.6-1 -- New version - -* Tue Dec 23 2008 David Lutterkort - 0.3.5-1 -- New version - -* Mon Feb 25 2008 David Lutterkort - 0.0.4-1 -- Initial specfile diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..8170ea3 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,102 @@ +#!/bin/bash +# Run this to generate all the initial makefiles, etc. + +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Generate makefiles and other infrastructure needed for building + + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. + --help Print this message + any other option Pass to the 'configure' script verbatim + +Running without arguments will suffice in most cases. +" +} + +BUILD_AUX=build/ac-aux +GNULIB_DIR=gnulib + +set -e +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +THEDIR=`pwd` +cd $srcdir + +# Split out options for bootstrap and for configure +declare -a CF_ARGS +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=$option;; + *) + CF_ARGS[${#CF_ARGS[@]}]=$option;; + esac +done + +#Check for OSX +case `uname -s` in +Darwin) LIBTOOLIZE=glibtoolize;; +*) LIBTOOLIZE=libtoolize;; +esac + + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to compile augeas." + echo "Download the appropriate package for your distribution," + echo "or see http://www.gnu.org/software/autoconf" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + DIE=1 + echo "You must have automake installed to compile augeas." + echo "Download the appropriate package for your distribution," + echo "or see http://www.gnu.org/software/automake" +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "${CF_ARGS[*]}"; then + echo "I am going to run ./configure with --enable-warnings - if you " + echo "wish to pass any extra arguments to it, please specify them on " + echo "the $0 command line." +fi + +mkdir -p $BUILD_AUX + +$LIBTOOLIZE --copy --force +./bootstrap $GNULIB_SRCDIR +aclocal -I gnulib/m4 +autoheader +automake --add-missing +autoconf + +cd $THEDIR + +if test x$OBJ_DIR != x; then + mkdir -p "$OBJ_DIR" + cd "$OBJ_DIR" +fi + +$srcdir/configure "${CF_ARGS[@]}" && { + echo + echo "Now type 'make' to compile augeas." +} diff --git a/bootstrap b/bootstrap new file mode 100755 index 0000000..a84eb39 --- /dev/null +++ b/bootstrap @@ -0,0 +1,101 @@ +#!/bin/sh + +usage() { + echo >&2 "\ +Usage: $0 [OPTION]... +Bootstrap this package from the checked-out sources. + +Options: + --gnulib-srcdir=DIRNAME Specify the local directory where gnulib + sources reside. Use this if you already + have gnulib sources on your machine, and + do not want to waste your bandwidth downloading + them again. + +If the file bootstrap.conf exists in the current working directory, its +contents are read as shell variables to configure the bootstrap. + +Running without arguments will suffice in most cases. +" +} + +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=${option#--gnulib-srcdir=};; + *) + echo >&2 "$0: $option: unknown option" + exit 1;; + esac +done + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + echo "$0: getting gnulib files..." + git submodule init || exit $? + git submodule update || exit $? + GNULIB_SRCDIR=.gnulib + ;; +*) + # Redirect the gnulib submodule to the directory on the command line + # if possible. + if test -d "$GNULIB_SRCDIR"/.git && \ + git config --file .gitmodules submodule.gnulib.url >/dev/null; then + git submodule init + GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd` + git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR + echo "$0: getting gnulib files..." + git submodule update || exit $? + GNULIB_SRCDIR=.gnulib + else + echo >&2 "$0: invalid gnulib srcdir: $GNULIB_SRCDIR" + exit 1 + fi + ;; +esac + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit + +modules=' +argz +fnmatch +getline +getopt-gnu +gitlog-to-changelog +canonicalize-lgpl +isblank +locale +mkstemp +regex +safe-alloc +selinux-h +stpcpy +stpncpy +strchrnul +strndup +sys_wait +vasprintf +' + +# Tell gnulib to: +# require LGPLv2+ +# put *.m4 files in new gnulib/m4/ dir +# put *.[ch] files in new gnulib/lib/ dir. + +$gnulib_tool \ + --lgpl=2 \ + --with-tests \ + --m4-base=gnulib/m4 \ + --source-base=gnulib/lib \ + --tests-base=gnulib/tests \ + --aux-dir=build/ac-aux \ + --libtool \ + --quiet \ + --import $modules diff --git a/build/ac-aux/compile b/build/ac-aux/compile deleted file mode 100755 index 531136b..0000000 --- a/build/ac-aux/compile +++ /dev/null @@ -1,347 +0,0 @@ -#! /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/ac-aux/config.guess b/build/ac-aux/config.guess deleted file mode 100755 index 1f5c50c..0000000 --- a/build/ac-aux/config.guess +++ /dev/null @@ -1,1420 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright 1992-2014 Free Software Foundation, Inc. - -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 3 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General 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 Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). -# -# Originally written by Per Bothner. -# -# You can get the latest version of this script from: -# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -# -# Please send patches with a ChangeLog entry to config-patches@gnu.org. - - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -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 "$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 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -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) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -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 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 - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - 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 - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:Bitrig:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - 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:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *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 - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "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/^[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 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - 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 ;; - arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - 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 - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - 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 ;; - 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 ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - 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 ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - 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 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - 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 - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # 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 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - 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 ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $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 ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # 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 ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - 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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - 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 ;; - *: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 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 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" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #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); - - 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 - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - 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 - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - 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 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - 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 ;; - 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 ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - 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 ;; - *:MINGW64*:*) - echo ${UNAME_MACHINE}-pc-mingw64 - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - *:MSYS*:*) - echo ${UNAME_MACHINE}-pc-msys - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - 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 ;; - 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 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # 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 ;; - 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:*:*) - 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 ${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-${LIBC} - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - m68*: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 ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - 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-${LIBC}"; exit; } - ;; - 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-${LIBC} ;; - PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; - *) echo hppa-unknown-linux-${LIBC} ;; - esac - 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-${LIBC} - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-${LIBC} - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - 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 ${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 ;; - 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, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - 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 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - 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 ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - 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 - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - 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 ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/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 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - 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; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { 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; } ;; - 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 ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - 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 ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - 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 ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - 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 ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - 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 ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - 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 ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - 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 ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - 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 - -cat >&2 < in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/build/ac-aux/config.rpath b/build/ac-aux/config.rpath deleted file mode 100755 index 1a07018..0000000 --- a/build/ac-aux/config.rpath +++ /dev/null @@ -1,690 +0,0 @@ -#! /bin/sh -# Output a system dependent set of variables, describing how to set the -# run time search path of shared libraries in an executable. -# -# Copyright 1996-2012 Free Software Foundation, Inc. -# Taken from GNU libtool, 2001 -# Originally by Gordon Matzigkeit , 1996 -# -# 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 first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld -# should be set by the caller. -# -# The set of defined variables is at the end of this script. - -# Known limitations: -# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer -# than 256 bytes, otherwise the compiler driver will dump core. The only -# 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, -# which needs '.lib'). -libext=a -shrext=.so - -host="$1" -host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` -host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` -host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` - -# Code taken from libtool.m4's _LT_CC_BASENAME. - -for cc_temp in $CC""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'` - -# Code taken from libtool.m4's _LT_COMPILER_PIC. - -wl= -if test "$GCC" = yes; then - wl='-Wl,' -else - case "$host_os" in - aix*) - wl='-Wl,' - ;; - mingw* | cygwin* | pw32* | os2* | cegcc*) - ;; - hpux9* | hpux10* | hpux11*) - wl='-Wl,' - ;; - irix5* | irix6* | nonstopux*) - wl='-Wl,' - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - ecc*) - wl='-Wl,' - ;; - icc* | ifort*) - wl='-Wl,' - ;; - lf95*) - wl='-Wl,' - ;; - nagfor*) - wl='-Wl,-Wl,,' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - wl='-Wl,' - ;; - ccc*) - wl='-Wl,' - ;; - xl* | bgxl* | bgf* | mpixl*) - wl='-Wl,' - ;; - como) - wl='-lopt=' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) - wl= - ;; - *Sun\ C*) - wl='-Wl,' - ;; - esac - ;; - esac - ;; - newsos6) - ;; - *nto* | *qnx*) - ;; - osf3* | osf4* | osf5*) - wl='-Wl,' - ;; - rdos*) - ;; - solaris*) - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - wl='-Qoption ld ' - ;; - *) - wl='-Wl,' - ;; - esac - ;; - sunos4*) - wl='-Qoption ld ' - ;; - sysv4 | sysv4.2uw2* | sysv4.3*) - wl='-Wl,' - ;; - sysv4*MP*) - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - wl='-Wl,' - ;; - unicos*) - wl='-Wl,' - ;; - uts4*) - ;; - esac -fi - -# Code taken from libtool.m4's _LT_LINKER_SHLIBS. - -hardcode_libdir_flag_spec= -hardcode_libdir_separator= -hardcode_direct=no -hardcode_minus_L=no - -case "$host_os" in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; -esac - -ld_shlibs=yes -if test "$with_gnu_ld" = yes; then - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - # Unlike libtool, we use -rpath here, not --rpath, since the documented - # option of GNU ld is called -rpath, not --rpath. - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - case "$host_os" in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - fi - ;; - amigaos*) - case "$host_cpu" in - powerpc) - ;; - m68k) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - cygwin* | mingw* | pw32* | cegcc*) - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - haiku*) - ;; - interix[3-9]*) - hardcode_direct=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - netbsd*) - ;; - solaris*) - if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - else - ld_shlibs=no - fi - ;; - esac - ;; - sunos4*) - hardcode_direct=yes - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - : - else - ld_shlibs=no - fi - ;; - esac - if test "$ld_shlibs" = no; then - hardcode_libdir_flag_spec= - fi -else - case "$host_os" in - aix3*) - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - else - aix_use_runtimelinking=no - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - fi - hardcode_direct=yes - hardcode_libdir_separator=':' - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && \ - strings "$collect2name" | grep resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - fi - # Begin _LT_AC_SYS_LIBPATH_AIX. - echo 'int main () { return 0; }' > conftest.c - ${CC} ${LDFLAGS} conftest.c -o conftest - aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } -}'` - fi - if test -z "$aix_libpath"; then - aix_libpath="/usr/lib:/lib" - fi - rm -f conftest.c conftest - # End _LT_AC_SYS_LIBPATH_AIX. - if test "$aix_use_runtimelinking" = yes; then - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - else - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - fi - fi - ;; - amigaos*) - case "$host_cpu" in - powerpc) - ;; - m68k) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - bsdi[45]*) - ;; - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - libext=lib - ;; - darwin* | rhapsody*) - hardcode_direct=no - if { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then - : - else - ld_shlibs=no - fi - ;; - dgux*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - freebsd2.2*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - freebsd2*) - hardcode_direct=yes - hardcode_minus_L=yes - ;; - freebsd* | dragonfly*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - hpux9*) - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - hpux10*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - hpux11*) - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - ;; - *) - hardcode_direct=yes - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - irix5* | irix6* | nonstopux*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - netbsd*) - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - ;; - newsos6) - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - *nto* | *qnx*) - ;; - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - else - case "$host_os" in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - osf3*) - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - osf4* | osf5*) - if test "$GCC" = yes; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - # Both cc and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - hardcode_libdir_separator=: - ;; - solaris*) - hardcode_libdir_flag_spec='-R$libdir' - ;; - sunos4*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - ;; - sysv4) - case $host_vendor in - sni) - hardcode_direct=yes # is this really true??? - ;; - siemens) - hardcode_direct=no - ;; - motorola) - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - ;; - sysv4.3*) - ;; - sysv4*MP*) - if test -d /usr/nec; then - ld_shlibs=yes - fi - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - ;; - sysv5* | sco3.2v5* | sco5v6*) - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - ;; - uts4*) - hardcode_libdir_flag_spec='-L$libdir' - ;; - *) - ld_shlibs=no - ;; - esac -fi - -# Check dynamic linker characteristics -# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER. -# Unlike libtool.m4, here we don't care about _all_ names of the library, but -# only about the one the linker finds when passed -lNAME. This is the last -# element of library_names_spec in libtool.m4, or possibly two of them if the -# linker has special search rules. -library_names_spec= # the last element of library_names_spec in libtool.m4 -libname_spec='lib$name' -case "$host_os" in - aix3*) - library_names_spec='$libname.a' - ;; - aix[4-9]*) - library_names_spec='$libname$shrext' - ;; - amigaos*) - case "$host_cpu" in - powerpc*) - library_names_spec='$libname$shrext' ;; - m68k) - library_names_spec='$libname.a' ;; - esac - ;; - beos*) - library_names_spec='$libname$shrext' - ;; - bsdi[45]*) - library_names_spec='$libname$shrext' - ;; - cygwin* | mingw* | pw32* | cegcc*) - shrext=.dll - library_names_spec='$libname.dll.a $libname.lib' - ;; - darwin* | rhapsody*) - shrext=.dylib - library_names_spec='$libname$shrext' - ;; - dgux*) - library_names_spec='$libname$shrext' - ;; - freebsd* | dragonfly*) - case "$host_os" in - freebsd[123]*) - library_names_spec='$libname$shrext$versuffix' ;; - *) - library_names_spec='$libname$shrext' ;; - esac - ;; - gnu*) - library_names_spec='$libname$shrext' - ;; - haiku*) - library_names_spec='$libname$shrext' - ;; - hpux9* | hpux10* | hpux11*) - case $host_cpu in - ia64*) - shrext=.so - ;; - hppa*64*) - shrext=.sl - ;; - *) - shrext=.sl - ;; - esac - library_names_spec='$libname$shrext' - ;; - interix[3-9]*) - library_names_spec='$libname$shrext' - ;; - irix5* | irix6* | nonstopux*) - library_names_spec='$libname$shrext' - case "$host_os" in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; - *) libsuff= shlibsuff= ;; - esac - ;; - esac - ;; - linux*oldld* | linux*aout* | linux*coff*) - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - library_names_spec='$libname$shrext' - ;; - knetbsd*-gnu) - library_names_spec='$libname$shrext' - ;; - netbsd*) - library_names_spec='$libname$shrext' - ;; - newsos6) - library_names_spec='$libname$shrext' - ;; - *nto* | *qnx*) - library_names_spec='$libname$shrext' - ;; - openbsd*) - library_names_spec='$libname$shrext$versuffix' - ;; - os2*) - libname_spec='$name' - shrext=.dll - library_names_spec='$libname.a' - ;; - osf3* | osf4* | osf5*) - library_names_spec='$libname$shrext' - ;; - rdos*) - ;; - solaris*) - library_names_spec='$libname$shrext' - ;; - sunos4*) - library_names_spec='$libname$shrext$versuffix' - ;; - sysv4 | sysv4.3*) - library_names_spec='$libname$shrext' - ;; - sysv4*MP*) - library_names_spec='$libname$shrext' - ;; - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - library_names_spec='$libname$shrext' - ;; - tpf*) - library_names_spec='$libname$shrext' - ;; - uts4*) - library_names_spec='$libname$shrext' - ;; -esac - -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' -escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` -shlibext=`echo "$shrext" | sed -e 's,^\.,,'` -escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` -escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` - -LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <. -# -# 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 Exception is an additional permission under section 7 -# of the GNU General Public License, version 3 ("GPLv3"). - - -# 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. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to ." - -version="\ -GNU config.sub ($timestamp) - -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." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# 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* | 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 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze*) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -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/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # 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/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*178) - os=-lynxos178 - ;; - -lynx*5) - os=-lynxos5 - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | aarch64 | aarch64_be \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | 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 \ - | epiphany \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | hexagon \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | k1om \ - | le32 | le64 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | 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 \ - | open8 | or1k | or1knd | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle \ - | pyramid \ - | 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 | 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 | xc16x | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - 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 - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | aarch64-* | aarch64_be-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | be32-* | be64-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | hexagon-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | k1om-* \ - | le32-* | le64-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | microblaze-* | microblazeel-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | 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-* \ - | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | open8-* \ - | or1k*-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ - | pyramid-* \ - | rl78-* | romp-* | rs6000-* | rx-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ - | tahoe-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile*-* \ - | tron-* \ - | ubicom32-* \ - | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ - | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | 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. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - 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 - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - 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 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - 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 - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - 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 - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - microblaze*) - basic_machine=microblaze-xilinx - ;; - mingw64) - basic_machine=x86_64-pc - os=-mingw64 - ;; - mingw32) - basic_machine=i686-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - 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 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - neo-tandem) - basic_machine=neo-tandem - ;; - nse-tandem) - basic_machine=nse-tandem - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - 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 - ;; - pbb) - basic_machine=m68k-tti - ;; - 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 - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc | ppcbe) basic_machine=powerpc-unknown - ;; - ppc-* | ppcbe-*) - basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - 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 - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - strongarm-* | thumb-*) - basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tile*) - basic_machine=$basic_machine-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - 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 - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # 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|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # 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* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -bitrig* | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -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* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -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|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -nacl*) - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - 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 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/build/ac-aux/depcomp b/build/ac-aux/depcomp deleted file mode 100755 index 4ebd5b3..0000000 --- a/build/ac-aux/depcomp +++ /dev/null @@ -1,791 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2013-05-30.07; # UTC - -# 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 -# 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. - -# Originally written by Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - 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 outputting dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -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 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -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 -# here, because this file can only contain one case statement. -if test "$depmode" = hp; then - # HP compiler uses -M and no extra arg. - gccflag=-M - depmode=gcc -fi - -if test "$depmode" = dashXmstdout; then - # 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 -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 -gcc3) -## gcc 3 implements dependency tracking that does exactly what -## we want. Yay! Note: for some reason libtool 1.4 doesn't like -## it if -MD -MP comes after the -MF stuff. Hmm. -## Unfortunately, FreeBSD c89 acceptance of flags depends upon -## the command line argument order; so add the flags where they -## appear in depend2.am. Note that the slowdown incurred here -## affects only configure: in makefiles, %FASTDEP% shortcuts this. - for arg - do - case $arg in - -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; - *) set fnord "$@" "$arg" ;; - esac - shift # fnord - shift # $arg - done - "$@" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - mv "$tmpdepfile" "$depfile" - ;; - -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). 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 - gccflag=-MD, - fi - "$@" -Wp,"$gccflag$tmpdepfile" - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - echo "$object : \\" > "$depfile" - # 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. -## 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. -## 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. 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. - tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -hp) - # 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 - ;; - -sgi) - if test "$libtool" = yes; then - "$@" "-Wp,-MDupdate,$tmpdepfile" - else - "$@" -MDupdate "$tmpdepfile" - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - - if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files - echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be - # clever and replace this with sed code, as IRIX sed won't handle - # lines with more than a fixed number of characters (4096 in - # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; - # the IRIX cc adds comments like '#:fec' to the end of the - # dependency line. - tr ' ' "$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 ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" - else - 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 - # start of each line; $object doesn't have directory information. - # Version 6 uses the directory in both cases. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.u - tmpdepfile2=$base.u - tmpdepfile3=$dir.libs/$base.u - "$@" -Wc,-M - else - tmpdepfile1=$dir$base.u - tmpdepfile2=$dir$base.u - tmpdepfile3=$dir$base.u - "$@" -M - 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 - 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" - ;; - -## 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 '\' : - # 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 - - if test $stat -ne 0; then - rm -f "$tmpdepfile" - exit $stat - fi - rm -f "$depfile" - # Each line is of the form `foo.o: dependent.h', - # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. - # Do two passes, one to just change these to - # `$object: dependent.h' and one to simply `dependent.h:'. - 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" - rm -f "$tmpdepfile" - ;; - -hp2) - # The "hp" stanza above does not work with aCC (C++) and HP's ia64 - # compilers, which have integrated preprocessors. The correct option - # to use with these is +Maked; it writes dependencies to a file named - # '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. - set_dir_from "$object" - set_base_from "$object" - if test "$libtool" = yes; then - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir.libs/$base.d - "$@" -Wc,+Maked - else - tmpdepfile1=$dir$base.d - tmpdepfile2=$dir$base.d - "$@" +Maked - fi - stat=$? - if test $stat -ne 0; then - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" - # Add 'dependent.h:' lines. - sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" - else - 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. - 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 - # dependency tracking mechanisms from slower ones. - -dashmstdout) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, regardless of -o. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - esac - done - - test -z "$dashmflag" && dashmflag=-M - # 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. - "$@" $dashmflag | - sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" - rm -f "$depfile" - cat < "$tmpdepfile" > "$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" - ;; - -dashXmstdout) - # This case only exists to satisfy depend.m4. It is never actually - # run, as this mode is specially recognized in the preamble. - exit 1 - ;; - -makedepend) - "$@" || exit $? - # Remove any Libtool call - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - # X makedepend - shift - cleared=no eat=no - for arg - do - case $cleared in - no) - set ""; shift - cleared=yes ;; - esac - if test $eat = yes; then - eat=no - continue - fi - case "$arg" in - -D*|-I*) - set fnord "$@" "$arg"; shift ;; - # Strip any option that makedepend may not understand. Remove - # the object too, otherwise makedepend will parse it as a source file. - -arch) - eat=yes ;; - -*|$object) - ;; - *) - set fnord "$@" "$arg"; shift ;; - esac - done - obj_suffix=`echo "$object" | sed 's/^.*\././'` - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" - rm -f "$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 - ;; - -cpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - # Remove '-o $object'. - IFS=" " - for arg - do - case $arg in - -o) - shift - ;; - $object) - shift - ;; - *) - set fnord "$@" "$arg" - shift # fnord - shift # $arg - ;; - 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" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout. - "$@" || exit $? - - # Remove the call to Libtool. - if test "$libtool" = yes; then - while test "X$1" != 'X--mode=compile'; do - shift - done - shift - fi - - IFS=" " - for arg - do - case "$arg" in - -o) - shift - ;; - $object) - shift - ;; - "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - 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::'"$tab"'\1 \\:p' >> "$depfile" - echo "$tab" >> "$depfile" - sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvcmsys) - # 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 - ;; - -none) - exec "$@" - ;; - -*) - echo "Unknown depmode $depmode" 1>&2 - exit 1 - ;; -esac - -exit 0 - -# 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/gitlog-to-changelog b/build/ac-aux/gitlog-to-changelog deleted file mode 100755 index d79e7aa..0000000 --- a/build/ac-aux/gitlog-to-changelog +++ /dev/null @@ -1,407 +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 = '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/ac-aux/install-sh b/build/ac-aux/install-sh deleted file mode 100755 index 377bb86..0000000 --- a/build/ac-aux/install-sh +++ /dev/null @@ -1,527 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -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 -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# 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 -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. - -nl=' -' -IFS=" "" $nl" - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit=${DOITPROG-} -if test -z "$doit"; then - doit_exec=exec -else - doit_exec=$doit -fi - -# Put in absolute file names if you don't have them in your path; -# or use environment vars. - -chgrpprog=${CHGRPPROG-chgrp} -chmodprog=${CHMODPROG-chmod} -chownprog=${CHOWNPROG-chown} -cmpprog=${CMPPROG-cmp} -cpprog=${CPPROG-cp} -mkdirprog=${MKDIRPROG-mkdir} -mvprog=${MVPROG-mv} -rmprog=${RMPROG-rm} -stripprog=${STRIPPROG-strip} - -posix_glob='?' -initialize_posix_glob=' - test "$posix_glob" != "?" || { - if (set -f) 2>/dev/null; then - posix_glob= - else - posix_glob=: - fi - } -' - -posix_mkdir= - -# Desired mode of installed file. -mode=0755 - -chgrpcmd= -chmodcmd=$chmodprog -chowncmd= -mvcmd=$mvprog -rmcmd="$rmprog -f" -stripcmd= - -src= -dst= -dir_arg= -dst_arg= - -copy_on_change=false -no_target_directory= - -usage="\ -Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: - --help display this help and exit. - --version display version info and exit. - - -c (ignored) - -C install only if different (preserve the last data modification time) - -d create directories instead of installing files. - -g GROUP $chgrpprog installed files to GROUP. - -m MODE $chmodprog installed files to MODE. - -o USER $chownprog installed files to USER. - -s $stripprog installed files. - -t DIRECTORY install into DIRECTORY. - -T report an error if DSTFILE is a directory. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG - RMPROG STRIPPROG -" - -while test $# -ne 0; do - case $1 in - -c) ;; - - -C) copy_on_change=true;; - - -d) dir_arg=true;; - - -g) chgrpcmd="$chgrpprog $2" - shift;; - - --help) echo "$usage"; exit $?;; - - -m) mode=$2 - case $mode in - *' '* | *' '* | *' -'* | *'*'* | *'?'* | *'['*) - echo "$0: invalid mode: $mode" >&2 - exit 1;; - esac - shift;; - - -o) chowncmd="$chownprog $2" - shift;; - - -s) stripcmd=$stripprog;; - - -t) dst_arg=$2 - # Protect names problematic for 'test' and other utilities. - case $dst_arg in - -* | [=\(\)!]) dst_arg=./$dst_arg;; - esac - shift;; - - -T) no_target_directory=true;; - - --version) echo "$0 $scriptversion"; exit $?;; - - --) shift - break;; - - -*) echo "$0: invalid option: $1" >&2 - exit 1;; - - *) break;; - esac - shift -done - -if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then - # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dst_arg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dst_arg" - shift # fnord - 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 - -if test $# -eq 0; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # 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 - 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. - case $mode in - # Optimize common cases. - *644) cp_umask=133;; - *755) cp_umask=22;; - - *[0-7]) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw='% 200' - fi - cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; - *) - if test -z "$stripcmd"; then - u_plus_rw= - else - u_plus_rw=,u+rw - fi - cp_umask=$mode$u_plus_rw;; - esac -fi - -for src -do - # Protect names problematic for 'test' and other utilities. - case $src in - -* | [=\(\)!]) src=./$src;; - esac - - if test -n "$dir_arg"; then - dst=$src - dstdir=$dst - test -d "$dstdir" - dstdir_status=$? - else - - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dst_arg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - dst=$dst_arg - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dst_arg: Is a directory" >&2 - exit 1 - fi - dstdir=$dst - dst=$dstdir/`basename "$src"` - dstdir_status=0 - else - # Prefer dirname, but fall back on a substitute if dirname fails. - dstdir=` - (dirname "$dst") 2>/dev/null || - expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$dst" : 'X\(//\)[^/]' \| \ - X"$dst" : 'X\(//\)$' \| \ - X"$dst" : 'X\(/\)' \| . 2>/dev/null || - echo X"$dst" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q' - ` - - test -d "$dstdir" - dstdir_status=$? - fi - fi - - obsolete_mkdir_used=false - - if test $dstdir_status != 0; then - case $posix_mkdir in - '') - # Create intermediate dirs using mode 755 as modified by the umask. - # This is like FreeBSD 'install' as of 1997-10-28. - umask=`umask` - case $stripcmd.$umask in - # Optimize common cases. - *[2367][2367]) mkdir_umask=$umask;; - .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; - - *[0-7]) - mkdir_umask=`expr $umask + 22 \ - - $umask % 100 % 40 + $umask % 20 \ - - $umask % 10 % 4 + $umask % 2 - `;; - *) mkdir_umask=$umask,go-w;; - esac - - # With -d, create the new directory with the user-specified mode. - # Otherwise, rely on $mkdir_umask. - if test -n "$dir_arg"; then - mkdir_mode=-m$mode - else - mkdir_mode= - fi - - posix_mkdir=false - case $umask in - *[123567][0-7][0-7]) - # POSIX mkdir -p sets u+wx bits regardless of umask, which - # is incompatible with FreeBSD 'install' when (umask & 300) != 0. - ;; - *) - tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ - trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 - - if (umask $mkdir_umask && - exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 - then - if test -z "$dir_arg" || { - # Check for POSIX incompatibilities with -m. - # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writable bit of parent directory when it shouldn't. - # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. - ls_ld_tmpdir=`ls -ld "$tmpdir"` - case $ls_ld_tmpdir in - d????-?r-*) different_mode=700;; - d????-?--*) different_mode=755;; - *) false;; - esac && - $mkdirprog -m$different_mode -p -- "$tmpdir" && { - ls_ld_tmpdir_1=`ls -ld "$tmpdir"` - test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" - } - } - then posix_mkdir=: - fi - rmdir "$tmpdir/d" "$tmpdir" - else - # Remove any dirs left behind by ancient mkdir implementations. - rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null - fi - trap '' 0;; - esac;; - esac - - if - $posix_mkdir && ( - umask $mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" - ) - then : - else - - # The umask is ridiculous, or mkdir does not conform to POSIX, - # or it failed possibly due to a race condition. Create the - # directory the slow way, step by step, checking for races as we go. - - case $dstdir in - /*) prefix='/';; - [-=\(\)!]*) prefix='./';; - *) prefix='';; - esac - - eval "$initialize_posix_glob" - - oIFS=$IFS - IFS=/ - $posix_glob set -f - set fnord $dstdir - shift - $posix_glob set +f - IFS=$oIFS - - prefixes= - - for d - do - test X"$d" = X && continue - - prefix=$prefix$d - if test -d "$prefix"; then - prefixes= - else - if $posix_mkdir; then - (umask=$mkdir_umask && - $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break - # Don't fail if two instances are running concurrently. - test -d "$prefix" || exit 1 - else - case $prefix in - *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; - *) qprefix=$prefix;; - esac - prefixes="$prefixes '$qprefix'" - fi - fi - prefix=$prefix/ - done - - if test -n "$prefixes"; then - # Don't fail if two instances are running concurrently. - (umask $mkdir_umask && - eval "\$doit_exec \$mkdirprog $prefixes") || - test -d "$dstdir" || exit 1 - obsolete_mkdir_used=true - fi - fi - fi - - if test -n "$dir_arg"; then - { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && - { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || - test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 - else - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - - # Copy the file name to the temp name. - (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && - { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && - { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && - { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && - - # If -C, don't bother to copy if it wouldn't change the file. - if $copy_on_change && - old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && - new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && - - eval "$initialize_posix_glob" && - $posix_glob set -f && - set X $old && old=:$2:$4:$5:$6 && - set X $new && new=:$2:$4:$5:$6 && - $posix_glob set +f && - - test "$old" = "$new" && - $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 - then - rm -f "$dsttmp" - else - # Rename the file to the real destination. - $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || - - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - { - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - test ! -f "$dst" || - $doit $rmcmd -f "$dst" 2>/dev/null || - { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && - { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } - } || - { echo "$0: cannot unlink or rename $dst" >&2 - (exit 1); exit 1 - } - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dst" - } - fi || exit 1 - - trap '' 0 - fi -done - -# 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/ac-aux/ltmain.sh b/build/ac-aux/ltmain.sh deleted file mode 100644 index 63ae69d..0000000 --- a/build/ac-aux/ltmain.sh +++ /dev/null @@ -1,9655 +0,0 @@ - -# 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, 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. - -# GNU Libtool is free software; you can 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 -# (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, -# or obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - -# Usage: $progname [OPTION]... [MODE-ARG]... -# -# Provide generalized library-building support services. -# -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --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 -# --version print version information -# -h, --help, --help-all print short, long, or detailed help message -# -# MODE must be one of the following: -# -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory -# -# MODE-ARGS vary depending on the MODE. When passed as first option, -# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. -# Try `$progname --help --mode=MODE' for a more detailed description of MODE. -# -# When reporting a bug, please describe a test case to reproduce it and -# include the following information: -# -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 -# automake: $automake_version -# autoconf: $autoconf_version -# -# Report bugs to . -# GNU libtool home page: . -# General help using GNU software: . - -PROGRAM=libtool -PACKAGE=libtool -VERSION=2.4.2 -TIMESTAMP="" -package_revision=1.3337 - -# Be Bourne compatible -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' -} - -# NLS nuisances: We save the old values to restore during execute mode. -lt_user_locale= -lt_safe_locale= -for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES -do - eval "if test \"\${$lt_var+set}\" = set; then - save_$lt_var=\$$lt_var - $lt_var=C - export $lt_var - lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" - lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" - fi" -done -LC_ALL=C -LANGUAGE=C -export LANGUAGE LC_ALL - -$lt_unset CDPATH - - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - - - -: ${CP="cp -f"} -test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${MAKE="make"} -: ${MKDIR="mkdir"} -: ${MV="mv -f"} -: ${RM="rm -f"} -: ${SHELL="${CONFIG_SHELL-/bin/sh}"} -: ${Xsed="$SED -e 1s/^X//"} - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 -EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. -EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. - -exit_status=$EXIT_SUCCESS - -# Make sure IFS has a sensible default -lt_nl=' -' -IFS=" $lt_nl" - -dirname="s,/[^/]*$,," -basename="s,^.*/,," - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} # func_dirname may be replaced by extended shell implementation - - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "${1}" | $SED "$basename"` -} # func_basename may be replaced by extended shell implementation - - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` -} # func_dirname_and_basename may be replaced by extended shell implementation - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname may be replaced by extended shell implementation - - -# These SED scripts presuppose an absolute path with a trailing slash. -pathcar='s,^/\([^/]*\).*$,\1,' -pathcdr='s,^/[^/]*,,' -removedotparts=':dotsl - s@/\./@/@g - t dotsl - s,/\.$,/,' -collapseslashes='s@/\{1,\}@/@g' -finalslash='s,/*$,/,' - -# func_normal_abspath PATH -# Remove doubled-up and trailing slashes, "." path components, -# and cancel out any ".." path components in PATH after making -# it an absolute path. -# value returned in "$func_normal_abspath_result" -func_normal_abspath () -{ - # Start from root dir and reassemble the path. - func_normal_abspath_result= - func_normal_abspath_tpath=$1 - func_normal_abspath_altnamespace= - case $func_normal_abspath_tpath in - "") - # Empty path, that just means $cwd. - func_stripname '' '/' "`pwd`" - func_normal_abspath_result=$func_stripname_result - return - ;; - # The next three entries are used to spot a run of precisely - # two leading slashes without using negated character classes; - # we take advantage of case's first-match behaviour. - ///*) - # Unusual form of absolute path, do nothing. - ;; - //*) - # Not necessarily an ordinary path; POSIX reserves leading '//' - # and for example Cygwin uses it to access remote file shares - # over CIFS/SMB, so we conserve a leading double slash if found. - func_normal_abspath_altnamespace=/ - ;; - /*) - # Absolute path, do nothing. - ;; - *) - # Relative path, prepend $cwd. - func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath - ;; - esac - # Cancel out all the simple stuff to save iterations. We also want - # the path to end with a slash for ease of parsing, so make sure - # there is one (and only one) here. - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` - while :; do - # Processed it all yet? - if test "$func_normal_abspath_tpath" = / ; then - # If we ascended to the root using ".." the result may be empty now. - if test -z "$func_normal_abspath_result" ; then - func_normal_abspath_result=/ - fi - break - fi - func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcar"` - func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ - -e "$pathcdr"` - # Figure out what to do with it - case $func_normal_abspath_tcomponent in - "") - # Trailing empty path component, ignore it. - ;; - ..) - # Parent dir; strip last assembled component from result. - func_dirname "$func_normal_abspath_result" - func_normal_abspath_result=$func_dirname_result - ;; - *) - # Actual path component, append it. - func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent - ;; - esac - done - # Restore leading double-slash if one was found on entry. - func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result -} - -# func_relative_path SRCDIR DSTDIR -# generates a relative path from SRCDIR to DSTDIR, with a trailing -# slash if non-empty, suitable for immediately appending a filename -# without needing to append a separator. -# value returned in "$func_relative_path_result" -func_relative_path () -{ - func_relative_path_result= - func_normal_abspath "$1" - func_relative_path_tlibdir=$func_normal_abspath_result - func_normal_abspath "$2" - func_relative_path_tbindir=$func_normal_abspath_result - - # Ascend the tree starting from libdir - while :; do - # check if we have found a prefix of bindir - case $func_relative_path_tbindir in - $func_relative_path_tlibdir) - # found an exact match - func_relative_path_tcancelled= - break - ;; - $func_relative_path_tlibdir*) - # found a matching prefix - func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" - func_relative_path_tcancelled=$func_stripname_result - if test -z "$func_relative_path_result"; then - func_relative_path_result=. - fi - break - ;; - *) - func_dirname $func_relative_path_tlibdir - func_relative_path_tlibdir=${func_dirname_result} - if test "x$func_relative_path_tlibdir" = x ; then - # Have to descend all the way to the root! - func_relative_path_result=../$func_relative_path_result - func_relative_path_tcancelled=$func_relative_path_tbindir - break - fi - func_relative_path_result=../$func_relative_path_result - ;; - esac - done - - # Now calculate path; take care to avoid doubling-up slashes. - func_stripname '' '/' "$func_relative_path_result" - func_relative_path_result=$func_stripname_result - func_stripname '/' '/' "$func_relative_path_tcancelled" - if test "x$func_stripname_result" != x ; then - func_relative_path_result=${func_relative_path_result}/${func_stripname_result} - fi - - # Normalisation. If bindir is libdir, return empty string, - # else relative path ending with a slash; either way, target - # file name can be directly appended. - if test ! -z "$func_relative_path_result"; then - func_stripname './' '' "$func_relative_path_result/" - func_relative_path_result=$func_stripname_result - fi -} - -# The name of this program: -func_dirname_and_basename "$progpath" -progname=$func_basename_result - -# Make sure we have an absolute path for reexecution: -case $progpath in - [\\/]*|[A-Za-z]:\\*) ;; - *[\\/]*) - progdir=$func_dirname_result - progdir=`cd "$progdir" && pwd` - progpath="$progdir/$progname" - ;; - *) - save_IFS="$IFS" - IFS=${PATH_SEPARATOR-:} - for progdir in $PATH; do - IFS="$save_IFS" - test -x "$progdir/$progname" && break - done - IFS="$save_IFS" - test -n "$progdir" || progdir=`pwd` - progpath="$progdir/$progname" - ;; -esac - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed="${SED}"' -e 1s/^X//' -sed_quote_subst='s/\([`"$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution that turns a string into a regex matching for the -# string literally. -sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' - -# Sed substitution that converts a w32 file name or path -# which contains forward slashes, into one that contains -# (escaped) backslashes. A very naive implementation. -lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - -# Re-`\' parameter expansions in output of double_quote_subst that were -# `\'-ed in input to the same. If an odd number of `\' preceded a '$' -# in input to double_quote_subst, that '$' was protected from expansion. -# Since each input `\' is now two `\'s, look for any number of runs of -# four `\'s followed by two `\'s and then a '$'. `\' that '$'. -bs='\\' -bs2='\\\\' -bs4='\\\\\\\\' -dollar='\$' -sed_double_backslash="\ - s/$bs4/&\\ -/g - s/^$bs2$dollar/$bs&/ - s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g - s/\n//g" - -# Standard options: -opt_dry_run=false -opt_help=false -opt_quiet=false -opt_verbose=false -opt_warning=: - -# func_echo arg... -# Echo program name prefixed message, along with the current mode -# name if it has been set yet. -func_echo () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }$*" -} - -# func_verbose arg... -# Echo program name prefixed message in verbose mode only. -func_verbose () -{ - $opt_verbose && func_echo ${1+"$@"} - - # A bug in bash halts the script if the last line of a function - # fails when set -e is in force, so we need another command to - # work around that: - : -} - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -# func_error arg... -# Echo program name prefixed message to standard error. -func_error () -{ - $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 -} - -# func_warning arg... -# Echo program name prefixed warning message to standard error. -func_warning () -{ - $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 - - # bash bug again: - : -} - -# func_fatal_error arg... -# Echo program name prefixed message to standard error, and exit. -func_fatal_error () -{ - func_error ${1+"$@"} - exit $EXIT_FAILURE -} - -# func_fatal_help arg... -# Echo program name prefixed message to standard error, followed by -# a help hint, and exit. -func_fatal_help () -{ - func_error ${1+"$@"} - func_fatal_error "$help" -} -help="Try \`$progname --help' for more information." ## default - - -# func_grep expression filename -# Check whether EXPRESSION matches any line of FILENAME, without output. -func_grep () -{ - $GREP "$1" "$2" >/dev/null 2>&1 -} - - -# func_mkdir_p directory-path -# Make sure the entire path to DIRECTORY-PATH is available. -func_mkdir_p () -{ - my_directory_path="$1" - my_dir_list= - - if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then - - # Protect directory names starting with `-' - case $my_directory_path in - -*) my_directory_path="./$my_directory_path" ;; - esac - - # While some portion of DIR does not yet exist... - while test ! -d "$my_directory_path"; do - # ...make a list in topmost first order. Use a colon delimited - # list incase some portion of path contains whitespace. - my_dir_list="$my_directory_path:$my_dir_list" - - # If the last portion added has no slash in it, the list is done - case $my_directory_path in */*) ;; *) break ;; esac - - # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` - done - my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` - - save_mkdir_p_IFS="$IFS"; IFS=':' - for my_dir in $my_dir_list; do - IFS="$save_mkdir_p_IFS" - # mkdir can fail with a `File exist' error if two processes - # try to create one of the directories concurrently. Don't - # stop in that case! - $MKDIR "$my_dir" 2>/dev/null || : - done - IFS="$save_mkdir_p_IFS" - - # Bail out if we (or some other process) failed to create a directory. - test -d "$my_directory_path" || \ - func_fatal_error "Failed to create \`$1'" - fi -} - - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$opt_dry_run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $MKDIR "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || \ - func_fatal_error "cannot create temporary directory \`$my_tmpdir'" - fi - - $ECHO "$my_tmpdir" -} - - -# func_quote_for_eval arg -# Aesthetically quote ARG to be evaled later. -# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT -# is double-quoted, suitable for a subsequent eval, whereas -# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters -# which are still active within double quotes backslashified. -func_quote_for_eval () -{ - case $1 in - *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; - *) - func_quote_for_eval_unquoted_result="$1" ;; - esac - - case $func_quote_for_eval_unquoted_result in - # Double-quote args containing shell metacharacters to delay - # word splitting, command substitution and and variable - # expansion for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" - ;; - *) - func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" - esac -} - - -# func_quote_for_expand arg -# Aesthetically quote ARG to be evaled later; same as above, -# but do not quote variable references. -func_quote_for_expand () -{ - case $1 in - *[\\\`\"]*) - my_arg=`$ECHO "$1" | $SED \ - -e "$double_quote_subst" -e "$sed_double_backslash"` ;; - *) - my_arg="$1" ;; - esac - - case $my_arg in - # Double-quote args containing shell metacharacters to delay - # word splitting and command substitution for a subsequent eval. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - my_arg="\"$my_arg\"" - ;; - esac - - func_quote_for_expand_result="$my_arg" -} - - -# func_show_eval cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. -func_show_eval () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$my_cmd" - my_status=$? - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - - -# func_show_eval_locale cmd [fail_exp] -# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is -# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP -# is given, then evaluate it. Use the saved locale for evaluation. -func_show_eval_locale () -{ - my_cmd="$1" - my_fail_exp="${2-:}" - - ${opt_silent-false} || { - func_quote_for_expand "$my_cmd" - eval "func_echo $func_quote_for_expand_result" - } - - if ${opt_dry_run-false}; then :; else - eval "$lt_user_locale - $my_cmd" - my_status=$? - eval "$lt_safe_locale" - if test "$my_status" -eq 0; then :; else - eval "(exit $my_status); $my_fail_exp" - fi - fi -} - -# func_tr_sh -# Turn $1 into a string suitable for a shell variable name. -# Result is stored in $func_tr_sh_result. All characters -# not in the set a-zA-Z0-9_ are replaced with '_'. Further, -# if $1 begins with a digit, a '_' is prepended as well. -func_tr_sh () -{ - case $1 in - [0-9]* | *[!a-zA-Z0-9_]*) - func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` - ;; - * ) - func_tr_sh_result=$1 - ;; - esac -} - - -# func_version -# Echo version message to standard output and exit. -func_version () -{ - $opt_debug - - $SED -n '/(C)/!b go - :more - /\./!{ - N - s/\n# / / - b more - } - :go - /^# '$PROGRAM' (GNU /,/# warranty; / { - s/^# // - s/^# *$// - s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ - p - }' < "$progpath" - exit $? -} - -# func_usage -# Echo short help message to standard output and exit. -func_usage () -{ - $opt_debug - - $SED -n '/^# Usage:/,/^# *.*--help/ { - s/^# // - s/^# *$// - s/\$progname/'$progname'/ - p - }' < "$progpath" - echo - $ECHO "run \`$progname --help | more' for full usage" - exit $? -} - -# func_help [NOEXIT] -# Echo long help message to standard output and exit, -# unless 'noexit' is passed as argument. -func_help () -{ - $opt_debug - - $SED -n '/^# Usage:/,/# Report bugs to/ { - :print - s/^# // - s/^# *$// - s*\$progname*'$progname'* - s*\$host*'"$host"'* - s*\$SHELL*'"$SHELL"'* - s*\$LTCC*'"$LTCC"'* - s*\$LTCFLAGS*'"$LTCFLAGS"'* - s*\$LD*'"$LD"'* - s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ - p - d - } - /^# .* home page:/b print - /^# General help using/b print - ' < "$progpath" - ret=$? - if test -z "$1"; then - exit $ret - fi -} - -# func_missing_arg argname -# Echo program name prefixed message to standard error and set global -# exit_cmd. -func_missing_arg () -{ - $opt_debug - - func_error "missing argument for $1." - exit_cmd=exit -} - - -# func_split_short_opt shortopt -# Set func_split_short_opt_name and func_split_short_opt_arg shell -# variables after splitting SHORTOPT after the 2nd character. -func_split_short_opt () -{ - my_sed_short_opt='1s/^\(..\).*$/\1/;q' - my_sed_short_rest='1s/^..\(.*\)$/\1/;q' - - func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` - func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` -} # func_split_short_opt may be replaced by extended shell implementation - - -# func_split_long_opt longopt -# Set func_split_long_opt_name and func_split_long_opt_arg shell -# variables after splitting LONGOPT at the `=' sign. -func_split_long_opt () -{ - my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' - my_sed_long_arg='1s/^--[^=]*=//' - - func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` - func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` -} # func_split_long_opt may be replaced by extended shell implementation - -exit_cmd=: - - - - - -magic="%%%MAGIC variable%%%" -magic_exe="%%%MAGIC EXE variable%%%" - -# Global variables. -nonopt= -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "${1}=\$${1}\${2}" -} # func_append may be replaced by extended shell implementation - -# func_append_quoted var value -# Quote VALUE and append to the end of shell variable VAR, separated -# by a space. -func_append_quoted () -{ - func_quote_for_eval "${2}" - eval "${1}=\$${1}\\ \$func_quote_for_eval_result" -} # func_append_quoted may be replaced by extended shell implementation - - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "${@}"` -} # func_arith may be replaced by extended shell implementation - - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` -} # func_len may be replaced by extended shell implementation - - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` -} # func_lo2o may be replaced by extended shell implementation - - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` -} # func_xform may be replaced by extended shell implementation - - -# func_fatal_configuration arg... -# Echo program name prefixed message to standard error, followed by -# a configuration failure hint, and exit. -func_fatal_configuration () -{ - func_error ${1+"$@"} - func_error "See the $PACKAGE documentation for more information." - func_fatal_error "Fatal configuration error." -} - - -# func_config -# Display the configuration for all the tags in this script. -func_config () -{ - re_begincf='^# ### BEGIN LIBTOOL' - re_endcf='^# ### END LIBTOOL' - - # Default configuration. - $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" - - # Now print the configurations for the tags. - for tagname in $taglist; do - $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" - done - - exit $? -} - -# func_features -# Display the features supported by this script. -func_features () -{ - echo "host: $host" - if test "$build_libtool_libs" = yes; then - echo "enable shared libraries" - else - echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - echo "enable static libraries" - else - echo "disable static libraries" - fi - - exit $? -} - -# func_enable_tag tagname -# Verify that TAGNAME is valid, and either flag an error and exit, or -# enable the TAGNAME tag. We also add TAGNAME to the global $taglist -# variable here. -func_enable_tag () -{ - # Global variable: - tagname="$1" - - re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" - re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" - sed_extractcf="/$re_begincf/,/$re_endcf/p" - - # Validate tagname. - case $tagname in - *[!-_A-Za-z0-9,/]*) - func_fatal_error "invalid tag name: $tagname" - ;; - esac - - # Don't test for the "default" C tag, as we know it's - # there but not specially marked. - case $tagname in - CC) ;; - *) - if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then - taglist="$taglist $tagname" - - # Evaluate the configuration. Be careful to quote the path - # and the sed script, to avoid splitting on whitespace, but - # also don't use non-portable quotes within backquotes within - # quotes we have to do it in 2 steps: - extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` - eval "$extractedcf" - else - func_error "ignoring unknown tag $tagname" - fi - ;; - esac -} - -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF - fi - - exit $EXIT_MISMATCH - fi -} - - -# Shorthand for --mode=foo, only valid as the first argument -case $1 in -clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; -compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; -execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; -finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; -install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; -link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; -uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; -esac - - - -# Option defaults: -opt_debug=: -opt_dry_run=false -opt_config=false -opt_preserve_dup_deps=false -opt_features=false -opt_finish=false -opt_help=false -opt_help_all=false -opt_silent=: -opt_warning=: -opt_verbose=: -opt_silent=false -opt_verbose=false - - -# Parse options once, thoroughly. This comes as soon as possible in the -# script to make things like `--version' happen as quickly as we can. -{ - # this just eases exit handling - while test $# -gt 0; do - opt="$1" - shift - case $opt in - --debug|-x) opt_debug='set -x' - func_echo "enabling shell trace mode" - $opt_debug - ;; - --dry-run|--dryrun|-n) - opt_dry_run=: - ;; - --config) - opt_config=: -func_config - ;; - --dlopen|-dlopen) - optarg="$1" - opt_dlopen="${opt_dlopen+$opt_dlopen -}$optarg" - shift - ;; - --preserve-dup-deps) - opt_preserve_dup_deps=: - ;; - --features) - opt_features=: -func_features - ;; - --finish) - opt_finish=: -set dummy --mode finish ${1+"$@"}; shift - ;; - --help) - opt_help=: - ;; - --help-all) - opt_help_all=: -opt_help=': help-all' - ;; - --mode) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_mode="$optarg" -case $optarg in - # Valid mode arguments: - clean|compile|execute|finish|install|link|relink|uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; -esac - shift - ;; - --no-silent|--no-quiet) - 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" - ;; - --silent|--quiet) - opt_silent=: -func_append preserve_args " $opt" - opt_verbose=false - ;; - --verbose|-v) - opt_verbose=: -func_append preserve_args " $opt" -opt_silent=false - ;; - --tag) - test $# = 0 && func_missing_arg $opt && break - optarg="$1" - opt_tag="$optarg" -func_append preserve_args " $opt $optarg" -func_enable_tag "$optarg" - shift - ;; - - -\?|-h) func_usage ;; - --help) func_help ;; - --version) func_version ;; - - # Separate optargs to long options: - --*=*) - func_split_long_opt "$opt" - set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} - shift - ;; - - # Separate non-argument short options: - -\?*|-h*|-n*|-v*) - func_split_short_opt "$opt" - set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} - shift - ;; - - --) break ;; - -*) func_fatal_help "unrecognized option \`$opt'" ;; - *) set dummy "$opt" ${1+"$@"}; shift; break ;; - esac - done - - # Validate options: - - # save first non-option argument - if test "$#" -gt 0; then - nonopt="$opt" - shift - fi - - # preserve --debug - test "$opt_debug" = : || func_append preserve_args " --debug" - - case $host in - *cygwin* | *mingw* | *pw32* | *cegcc*) - # don't eliminate duplications in $postdeps and $predeps - opt_duplicate_compiler_generated_deps=: - ;; - *) - opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps - ;; - esac - - $opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi - - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$opt_dlopen" && test "$opt_mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$opt_mode' for more information." - } - - - # Bail if the options were screwed - $exit_cmd $EXIT_FAILURE -} - - - - -## ----------- ## -## Main. ## -## ----------- ## - -# func_lalib_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_lalib_p () -{ - test -f "$1" && - $SED -e 4q "$1" 2>/dev/null \ - | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 -} - -# func_lalib_unsafe_p file -# True iff FILE is a libtool `.la' library or `.lo' object file. -# This function implements the same check as func_lalib_p without -# resorting to external programs. To this end, it redirects stdin and -# closes it afterwards, without saving the original file descriptor. -# As a safety measure, use it only where a negative result would be -# fatal anyway. Works if `file' does not exist. -func_lalib_unsafe_p () -{ - lalib_p=no - if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then - for lalib_p_l in 1 2 3 4 - do - read lalib_p_line - case "$lalib_p_line" in - \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; - esac - done - exec 0<&5 5<&- - fi - test "$lalib_p" = yes -} - -# func_ltwrapper_script_p file -# True iff FILE is a libtool wrapper script -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_script_p () -{ - func_lalib_p "$1" -} - -# func_ltwrapper_executable_p file -# True iff FILE is a libtool wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_executable_p () -{ - func_ltwrapper_exec_suffix= - case $1 in - *.exe) ;; - *) func_ltwrapper_exec_suffix=.exe ;; - esac - $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 -} - -# func_ltwrapper_scriptname file -# Assumes file is an ltwrapper_executable -# uses $file to determine the appropriate filename for a -# temporary ltwrapper_script. -func_ltwrapper_scriptname () -{ - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" -} - -# func_ltwrapper_p file -# True iff FILE is a libtool wrapper script or wrapper executable -# This function is only a basic sanity check; it will hardly flush out -# determined imposters. -func_ltwrapper_p () -{ - func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" -} - - -# func_execute_cmds commands fail_cmd -# Execute tilde-delimited COMMANDS. -# If FAIL_CMD is given, eval that upon failure. -# FAIL_CMD may read-access the current command in variable CMD! -func_execute_cmds () -{ - $opt_debug - save_ifs=$IFS; IFS='~' - for cmd in $1; do - IFS=$save_ifs - eval cmd=\"$cmd\" - func_show_eval "$cmd" "${2-:}" - done - IFS=$save_ifs -} - - -# func_source file -# Source FILE, adding directory component if necessary. -# Note that it is not necessary on cygwin/mingw to append a dot to -# FILE even if both FILE and FILE.exe exist: automatic-append-.exe -# behavior happens only for exec(3), not for open(2)! Also, sourcing -# `FILE.' does not work on cygwin managed mounts. -func_source () -{ - $opt_debug - case $1 in - */* | *\\*) . "$1" ;; - *) . "./$1" ;; - esac -} - - -# func_resolve_sysroot PATH -# Replace a leading = in PATH with a sysroot. Store the result into -# func_resolve_sysroot_result -func_resolve_sysroot () -{ - func_resolve_sysroot_result=$1 - case $func_resolve_sysroot_result in - =*) - func_stripname '=' '' "$func_resolve_sysroot_result" - func_resolve_sysroot_result=$lt_sysroot$func_stripname_result - ;; - esac -} - -# func_replace_sysroot PATH -# If PATH begins with the sysroot, replace it with = and -# store the result into func_replace_sysroot_result. -func_replace_sysroot () -{ - case "$lt_sysroot:$1" in - ?*:"$lt_sysroot"*) - func_stripname "$lt_sysroot" '' "$1" - func_replace_sysroot_result="=$func_stripname_result" - ;; - *) - # Including no sysroot. - func_replace_sysroot_result=$1 - ;; - esac -} - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - $opt_debug - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - func_append_quoted CC_quoted "$arg" - done - CC_expanded=`func_echo_all $CC` - CC_quoted_expanded=`func_echo_all $CC_quoted` - case "$@ " in - " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ - " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - func_echo "unable to infer tagged configuration" - func_fatal_error "specify a tag with \`--tag'" -# else -# func_verbose "using $tagname tagged configuration" - fi - ;; - esac - fi -} - - - -# func_write_libtool_object output_name pic_name nonpic_name -# Create a libtool object file (analogous to a ".la" file), -# but don't create it if we're doing a dry run. -func_write_libtool_object () -{ - write_libobj=${1} - if test "$build_libtool_libs" = yes; then - write_lobj=\'${2}\' - else - write_lobj=none - fi - - if test "$build_old_libs" = yes; then - write_oldobj=\'${3}\' - else - write_oldobj=none - fi - - $opt_dry_run || { - cat >${write_libobj}T </dev/null` - if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then - func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | - $SED -e "$lt_sed_naive_backslashify"` - else - func_convert_core_file_wine_to_w32_result= - fi - fi -} -# end: func_convert_core_file_wine_to_w32 - - -# func_convert_core_path_wine_to_w32 ARG -# Helper function used by path conversion functions when $build is *nix, and -# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly -# configured wine environment available, with the winepath program in $build's -# $PATH. Assumes ARG has no leading or trailing path separator characters. -# -# ARG is path to be converted from $build format to win32. -# Result is available in $func_convert_core_path_wine_to_w32_result. -# Unconvertible file (directory) names in ARG are skipped; if no directory names -# are convertible, then the result may be empty. -func_convert_core_path_wine_to_w32 () -{ - $opt_debug - # unfortunately, winepath doesn't convert paths, only file names - func_convert_core_path_wine_to_w32_result="" - if test -n "$1"; then - oldIFS=$IFS - IFS=: - for func_convert_core_path_wine_to_w32_f in $1; do - IFS=$oldIFS - func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" - if test -n "$func_convert_core_file_wine_to_w32_result" ; then - if test -z "$func_convert_core_path_wine_to_w32_result"; then - func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" - else - func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" - fi - fi - done - IFS=$oldIFS - fi -} -# end: func_convert_core_path_wine_to_w32 - - -# func_cygpath ARGS... -# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when -# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) -# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or -# (2), returns the Cygwin file name or path in func_cygpath_result (input -# file name or path is assumed to be in w32 format, as previously converted -# from $build's *nix or MSYS format). In case (3), returns the w32 file name -# or path in func_cygpath_result (input file name or path is assumed to be in -# Cygwin format). Returns an empty string on error. -# -# ARGS are passed to cygpath, with the last one being the file name or path to -# be converted. -# -# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH -# environment variable; do not put it in $PATH. -func_cygpath () -{ - $opt_debug - if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then - func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` - if test "$?" -ne 0; then - # on failure, ensure result is empty - func_cygpath_result= - fi - else - func_cygpath_result= - func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" - fi -} -#end: func_cygpath - - -# func_convert_core_msys_to_w32 ARG -# Convert file name or path ARG from MSYS format to w32 format. Return -# result in func_convert_core_msys_to_w32_result. -func_convert_core_msys_to_w32 () -{ - $opt_debug - # awkward: cmd appends spaces to result - func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | - $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` -} -#end: func_convert_core_msys_to_w32 - - -# func_convert_file_check ARG1 ARG2 -# Verify that ARG1 (a file name in $build format) was converted to $host -# format in ARG2. Otherwise, emit an error message, but continue (resetting -# func_to_host_file_result to ARG1). -func_convert_file_check () -{ - $opt_debug - if test -z "$2" && test -n "$1" ; then - func_error "Could not determine host file name corresponding to" - func_error " \`$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_file_result="$1" - fi -} -# end func_convert_file_check - - -# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH -# Verify that FROM_PATH (a path in $build format) was converted to $host -# format in TO_PATH. Otherwise, emit an error message, but continue, resetting -# func_to_host_file_result to a simplistic fallback value (see below). -func_convert_path_check () -{ - $opt_debug - if test -z "$4" && test -n "$3"; then - func_error "Could not determine the host path corresponding to" - func_error " \`$3'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This is a deliberately simplistic "conversion" and - # should not be "improved". See libtool.info. - if test "x$1" != "x$2"; then - lt_replace_pathsep_chars="s|$1|$2|g" - func_to_host_path_result=`echo "$3" | - $SED -e "$lt_replace_pathsep_chars"` - else - func_to_host_path_result="$3" - fi - fi -} -# end func_convert_path_check - - -# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG -# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT -# and appending REPL if ORIG matches BACKPAT. -func_convert_path_front_back_pathsep () -{ - $opt_debug - case $4 in - $1 ) func_to_host_path_result="$3$func_to_host_path_result" - ;; - esac - case $4 in - $2 ) func_append func_to_host_path_result "$3" - ;; - esac -} -# end func_convert_path_front_back_pathsep - - -################################################## -# $build to $host FILE NAME CONVERSION FUNCTIONS # -################################################## -# invoked via `$to_host_file_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# Result will be available in $func_to_host_file_result. - - -# func_to_host_file ARG -# Converts the file name ARG from $build format to $host format. Return result -# in func_to_host_file_result. -func_to_host_file () -{ - $opt_debug - $to_host_file_cmd "$1" -} -# end func_to_host_file - - -# func_to_tool_file ARG LAZY -# converts the file name ARG from $build format to toolchain format. Return -# result in func_to_tool_file_result. If the conversion in use is listed -# in (the comma separated) LAZY, no conversion takes place. -func_to_tool_file () -{ - $opt_debug - case ,$2, in - *,"$to_tool_file_cmd",*) - func_to_tool_file_result=$1 - ;; - *) - $to_tool_file_cmd "$1" - func_to_tool_file_result=$func_to_host_file_result - ;; - esac -} -# end func_to_tool_file - - -# func_convert_file_noop ARG -# Copy ARG to func_to_host_file_result. -func_convert_file_noop () -{ - func_to_host_file_result="$1" -} -# end func_convert_file_noop - - -# func_convert_file_msys_to_w32 ARG -# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_file_result. -func_convert_file_msys_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_to_host_file_result="$func_convert_core_msys_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_w32 - - -# func_convert_file_cygwin_to_w32 ARG -# Convert file name ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_file_cygwin_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # because $build is cygwin, we call "the" cygpath in $PATH; no need to use - # LT_CYGPATH in this case. - func_to_host_file_result=`cygpath -m "$1"` - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_cygwin_to_w32 - - -# func_convert_file_nix_to_w32 ARG -# Convert file name ARG from *nix to w32 format. Requires a wine environment -# and a working winepath. Returns result in func_to_host_file_result. -func_convert_file_nix_to_w32 () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_file_wine_to_w32 "$1" - func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_w32 - - -# func_convert_file_msys_to_cygwin ARG -# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_file_msys_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - func_convert_core_msys_to_w32 "$1" - func_cygpath -u "$func_convert_core_msys_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_msys_to_cygwin - - -# func_convert_file_nix_to_cygwin ARG -# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed -# in a wine environment, working winepath, and LT_CYGPATH set. Returns result -# in func_to_host_file_result. -func_convert_file_nix_to_cygwin () -{ - $opt_debug - func_to_host_file_result="$1" - if test -n "$1"; then - # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. - func_convert_core_file_wine_to_w32 "$1" - func_cygpath -u "$func_convert_core_file_wine_to_w32_result" - func_to_host_file_result="$func_cygpath_result" - fi - func_convert_file_check "$1" "$func_to_host_file_result" -} -# end func_convert_file_nix_to_cygwin - - -############################################# -# $build to $host PATH CONVERSION FUNCTIONS # -############################################# -# invoked via `$to_host_path_cmd ARG' -# -# In each case, ARG is the path to be converted from $build to $host format. -# The result will be available in $func_to_host_path_result. -# -# Path separators are also converted from $build format to $host format. If -# ARG begins or ends with a path separator character, it is preserved (but -# converted to $host format) on output. -# -# All path conversion functions are named using the following convention: -# file name conversion function : func_convert_file_X_to_Y () -# path conversion function : func_convert_path_X_to_Y () -# where, for any given $build/$host combination the 'X_to_Y' value is the -# same. If conversion functions are added for new $build/$host combinations, -# the two new functions must follow this pattern, or func_init_to_host_path_cmd -# will break. - - -# func_init_to_host_path_cmd -# Ensures that function "pointer" variable $to_host_path_cmd is set to the -# appropriate value, based on the value of $to_host_file_cmd. -to_host_path_cmd= -func_init_to_host_path_cmd () -{ - $opt_debug - if test -z "$to_host_path_cmd"; then - func_stripname 'func_convert_file_' '' "$to_host_file_cmd" - to_host_path_cmd="func_convert_path_${func_stripname_result}" - fi -} - - -# func_to_host_path ARG -# Converts the path ARG from $build format to $host format. Return result -# in func_to_host_path_result. -func_to_host_path () -{ - $opt_debug - func_init_to_host_path_cmd - $to_host_path_cmd "$1" -} -# end func_to_host_path - - -# func_convert_path_noop ARG -# Copy ARG to func_to_host_path_result. -func_convert_path_noop () -{ - func_to_host_path_result="$1" -} -# end func_convert_path_noop - - -# func_convert_path_msys_to_w32 ARG -# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic -# conversion to w32 is not available inside the cwrapper. Returns result in -# func_to_host_path_result. -func_convert_path_msys_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from ARG. MSYS - # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; - # and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_msys_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_msys_to_w32 - - -# func_convert_path_cygwin_to_w32 ARG -# Convert path ARG from Cygwin to w32 format. Returns result in -# func_to_host_file_result. -func_convert_path_cygwin_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_cygwin_to_w32 - - -# func_convert_path_nix_to_w32 ARG -# Convert path ARG from *nix to w32 format. Requires a wine environment and -# a working winepath. Returns result in func_to_host_file_result. -func_convert_path_nix_to_w32 () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" - func_convert_path_check : ";" \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" - fi -} -# end func_convert_path_nix_to_w32 - - -# func_convert_path_msys_to_cygwin ARG -# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. -# Returns result in func_to_host_file_result. -func_convert_path_msys_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # See func_convert_path_msys_to_w32: - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_msys_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_msys_to_cygwin - - -# func_convert_path_nix_to_cygwin ARG -# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a -# a wine environment, working winepath, and LT_CYGPATH set. Returns result in -# func_to_host_file_result. -func_convert_path_nix_to_cygwin () -{ - $opt_debug - func_to_host_path_result="$1" - if test -n "$1"; then - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_stripname : : "$1" - func_to_host_path_tmp1=$func_stripname_result - func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" - func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" - func_to_host_path_result="$func_cygpath_result" - func_convert_path_check : : \ - "$func_to_host_path_tmp1" "$func_to_host_path_result" - func_convert_path_front_back_pathsep ":*" "*:" : "$1" - fi -} -# end func_convert_path_nix_to_cygwin - - -# func_mode_compile arg... -func_mode_compile () -{ - $opt_debug - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - pie_flag= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - test -n "$libobj" && \ - func_fatal_error "you cannot specify \`-o' more than once" - arg_mode=target - continue - ;; - - -pie | -fpie | -fPIE) - func_append pie_flag " $arg" - continue - ;; - - -shared | -static | -prefer-pic | -prefer-non-pic) - func_append later " $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - func_append_quoted lastarg "$arg" - done - IFS="$save_ifs" - func_stripname ' ' '' "$lastarg" - lastarg=$func_stripname_result - - # Add the arguments to base_compile. - func_append base_compile " $lastarg" - continue - ;; - - *) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - func_append_quoted base_compile "$lastarg" - done # for arg - - case $arg_mode in - arg) - func_fatal_error "you must specify an argument for -Xcompile" - ;; - target) - func_fatal_error "you must specify a target with \`-o'" - ;; - *) - # Get the name of the library object. - test -z "$libobj" && { - func_basename "$srcfile" - libobj="$func_basename_result" - } - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - case $libobj in - *.[cCFSifmso] | \ - *.ada | *.adb | *.ads | *.asm | \ - *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) - func_xform "$libobj" - libobj=$func_xform_result - ;; - esac - - case $libobj in - *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; - *) - func_fatal_error "cannot determine name of library object from \`$libobj'" - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - continue - ;; - - -static) - build_libtool_libs=no - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - func_quote_for_eval "$libobj" - test "X$libobj" != "X$func_quote_for_eval_result" \ - && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && func_warning "libobj name \`$libobj' may not contain shell special characters." - func_dirname_and_basename "$obj" "/" "" - objname="$func_basename_result" - xdir="$func_dirname_result" - lobj=${xdir}$objdir/$objname - - test -z "$base_compile" && \ - func_fatal_help "you must specify a compilation command" - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2* | cegcc*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $ECHO "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - func_append removelist " $output_obj" - $ECHO "$srcfile" > "$lockfile" - fi - - $opt_dry_run || $RM $removelist - func_append removelist " $lockfile" - trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - - func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 - srcfile=$func_to_tool_file_result - func_quote_for_eval "$srcfile" - qsrcfile=$func_quote_for_eval_result - - # Only build a PIC object if we are building libtool libraries. - if test "$build_libtool_libs" = yes; then - # Without this assignment, base_compile gets emptied. - fbsd_hideous_sh_bug=$base_compile - - if test "$pic_mode" != no; then - command="$base_compile $qsrcfile $pic_flag" - else - # Don't build PIC code - command="$base_compile $qsrcfile" - fi - - func_mkdir_p "$xdir$objdir" - - if test -z "$output_obj"; then - # Place PIC objects in $objdir - func_append command " -o $lobj" - fi - - func_show_eval_locale "$command" \ - 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - func_show_eval '$MV "$output_obj" "$lobj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - - # Allow error messages only from the first compilation. - if test "$suppress_opt" = yes; then - suppress_output=' >/dev/null 2>&1' - fi - fi - - # Only build a position-dependent object if we build old libraries. - if test "$build_old_libs" = yes; then - if test "$pic_mode" != yes; then - # Don't build PIC code - command="$base_compile $qsrcfile$pie_flag" - else - command="$base_compile $qsrcfile $pic_flag" - fi - if test "$compiler_c_o" = yes; then - func_append command " -o $obj" - fi - - # Suppress compiler output if we already did a PIC compilation. - func_append command "$suppress_output" - func_show_eval_locale "$command" \ - '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' - - if test "$need_locks" = warn && - test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then - $ECHO "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $opt_dry_run || $RM $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - func_show_eval '$MV "$output_obj" "$obj"' \ - 'error=$?; $opt_dry_run || $RM $removelist; exit $error' - fi - fi - - $opt_dry_run || { - func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" - - # Unlock the critical section if it was locked - if test "$need_locks" != no; then - removelist=$lockfile - $RM "$lockfile" - fi - } - - exit $EXIT_SUCCESS -} - -$opt_help || { - test "$opt_mode" = compile && func_mode_compile ${1+"$@"} -} - -func_mode_help () -{ - # We need to display help for each of the modes. - case $opt_mode in - "") - # Generic help is extracted from the usage comments - # at the start of this file. - func_help - ;; - - clean) - $ECHO \ -"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - - compile) - $ECHO \ -"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to build PIC objects only - -prefer-non-pic try to build non-PIC objects only - -shared do not build a \`.o' file suitable for static linking - -static only build a \`.o' file suitable for static linking - -Wc,FLAG pass FLAG directly to the compiler - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - - execute) - $ECHO \ -"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - - finish) - $ECHO \ -"Usage: $progname [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - - install) - $ECHO \ -"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The following components of INSTALL-COMMAND are treated specially: - - -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - - link) - $ECHO \ -"Usage: $progname [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -bindir BINDIR specify path to binaries directory (for systems where - libraries must be found in the PATH setting at runtime) - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -shared only do dynamic linking of libtool libraries - -shrext SUFFIX override the standard shared library file extension - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -weak LIBNAME declare that the target provides the LIBNAME interface - -Wc,FLAG - -Xcompiler FLAG pass linker-specific FLAG directly to the compiler - -Wl,FLAG - -Xlinker FLAG pass linker-specific FLAG directly to the linker - -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - - uninstall) - $ECHO \ -"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - - *) - func_fatal_help "invalid operation mode \`$opt_mode'" - ;; - esac - - echo - $ECHO "Try \`$progname --help' for more information about other modes." -} - -# Now that we've collected a possible --mode arg, show help if necessary -if $opt_help; then - if test "$opt_help" = :; then - func_mode_help - else - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - func_mode_help - done - } | sed -n '1p; 2,$s/^Usage:/ or: /p' - { - func_help noexit - for opt_mode in compile link execute install finish uninstall clean; do - echo - func_mode_help - done - } | - sed '1d - /^When reporting/,/^Report/{ - H - d - } - $x - /information about other modes/d - /more detailed .*MODE/d - s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' - fi - exit $? -fi - - -# func_mode_execute arg... -func_mode_execute () -{ - $opt_debug - # The first argument is the command name. - cmd="$nonopt" - test -z "$cmd" && \ - func_fatal_help "you must specify a COMMAND" - - # Handle -dlopen flags immediately. - for file in $opt_dlopen; do - test -f "$file" \ - || func_fatal_help "\`$file' is not a file" - - dir= - case $file in - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$lib' is not a valid libtool archive" - - # Read the libtool library. - dlname= - library_names= - func_source "$file" - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && \ - func_warning "\`$file' was not linked with \`-export-dynamic'" - continue - fi - - func_dirname "$file" "" "." - dir="$func_dirname_result" - - if test -f "$dir/$objdir/$dlname"; then - func_append dir "/$objdir" - else - if test ! -f "$dir/$dlname"; then - func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" - fi - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - func_dirname "$file" "" "." - dir="$func_dirname_result" - ;; - - *) - func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -* | *.la | *.lo ) ;; - *) - # Do a test to see if this is really a libtool program. - if func_ltwrapper_script_p "$file"; then - func_source "$file" - # Transform arg to wrapped name. - file="$progdir/$program" - elif func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - func_source "$func_ltwrapper_scriptname_result" - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - func_append_quoted args "$file" - done - - if test "X$opt_dry_run" = Xfalse; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - echo "export $shlibpath_var" - fi - $ECHO "$cmd$args" - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = execute && func_mode_execute ${1+"$@"} - - -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libs= - libdirs= - admincmds= - - for opt in "$nonopt" ${1+"$@"} - do - if test -d "$opt"; then - func_append libdirs " $opt" - - elif test -f "$opt"; then - if func_lalib_unsafe_p "$opt"; then - func_append libs " $opt" - else - func_warning "\`$opt' is not a valid libtool archive" - fi - - else - func_fatal_error "invalid argument \`$opt'" - fi - done - - if test -n "$libs"; then - if test -n "$lt_sysroot"; then - sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` - sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" - else - sysroot_cmd= - fi - - # Remove sysroot references - if $opt_dry_run; then - for lib in $libs; do - echo "removing references to $lt_sysroot and \`=' prefixes from $lib" - done - else - tmpdir=`func_mktempdir` - for lib in $libs; do - sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ - > $tmpdir/tmp-la - mv -f $tmpdir/tmp-la $lib - done - ${RM}r "$tmpdir" - fi - fi - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - func_execute_cmds "$finish_cmds" 'admincmds="$admincmds -'"$cmd"'"' - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || func_append admincmds " - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - $opt_silent && exit $EXIT_SUCCESS - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - echo "----------------------------------------------------------------------" - echo "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - echo - echo "If you ever happen to want to link against installed libraries" - echo "in a given directory, LIBDIR, you must either use libtool, and" - echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - echo " during execution" - fi - if test -n "$runpath_var"; then - echo " - add LIBDIR to the \`$runpath_var' environment variable" - echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - echo - - echo "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" - echo "pages." - ;; - *) - echo "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - echo "----------------------------------------------------------------------" - fi - exit $EXIT_SUCCESS -} - -test "$opt_mode" = finish && func_mode_finish ${1+"$@"} - - -# func_mode_install arg... -func_mode_install () -{ - $opt_debug - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - case $nonopt in *shtool*) :;; *) false;; esac; then - # Aesthetically quote it. - func_quote_for_eval "$nonopt" - install_prog="$func_quote_for_eval_result " - arg=$1 - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - func_quote_for_eval "$arg" - func_append install_prog "$func_quote_for_eval_result" - install_shared_prog=$install_prog - case " $install_prog " in - *[\\\ /]cp\ *) install_cp=: ;; - *) install_cp=false ;; - esac - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - no_mode=: - for arg - do - arg2= - if test -n "$dest"; then - func_append files " $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - if $install_cp; then :; else - prev=$arg - fi - ;; - -g | -m | -o) - prev=$arg - ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - if test "x$prev" = x-m && test -n "$install_override_mode"; then - arg2=$install_override_mode - no_mode=false - fi - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - func_quote_for_eval "$arg" - func_append install_prog " $func_quote_for_eval_result" - if test -n "$arg2"; then - func_quote_for_eval "$arg2" - fi - func_append install_shared_prog " $func_quote_for_eval_result" - done - - test -z "$install_prog" && \ - func_fatal_help "you must specify an install program" - - test -n "$prev" && \ - func_fatal_help "the \`$prev' option requires an argument" - - if test -n "$install_override_mode" && $no_mode; then - if $install_cp; then :; else - func_quote_for_eval "$install_override_mode" - func_append install_shared_prog " -m $func_quote_for_eval_result" - fi - fi - - if test -z "$files"; then - if test -z "$dest"; then - func_fatal_help "no file or destination specified" - else - func_fatal_help "you must specify a destination" - fi - fi - - # Strip any trailing slash from the destination. - func_stripname '' '/' "$dest" - dest=$func_stripname_result - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - func_dirname_and_basename "$dest" "" "." - destdir="$func_dirname_result" - destname="$func_basename_result" - - # Not a directory, so check to see that there is only one file specified. - set dummy $files; shift - test "$#" -gt 1 && \ - func_fatal_help "\`$dest' is not a directory" - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - func_fatal_help "\`$destdir' must be an absolute directory name" - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - func_append staticlibs " $file" - ;; - - *.la) - func_resolve_sysroot "$file" - file=$func_resolve_sysroot_result - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$file" \ - || func_fatal_help "\`$file' is not a valid libtool archive" - - library_names= - old_library= - relink_command= - func_source "$file" - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) func_append current_libdirs " $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) func_append future_libdirs " $libdir" ;; - esac - fi - - func_dirname "$file" "/" "" - dir="$func_dirname_result" - func_append dir "$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - test "$inst_prefix_dir" = "$destdir" && \ - func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - func_warning "relinking \`$file'" - func_show_eval "$relink_command" \ - 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' - fi - - # See the names of the shared library. - set dummy $library_names; shift - if test -n "$1"; then - realname="$1" - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ - 'exit $?' - tstripme="$stripme" - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - case $realname in - *.dll.a) - tstripme="" - ;; - esac - ;; - esac - if test -n "$tstripme" && test -n "$striplib"; then - func_show_eval "$striplib $destdir/$realname" 'exit $?' - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - test "$linkname" != "$realname" \ - && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - func_execute_cmds "$postinstall_cmds" 'exit $?' - fi - - # Install the pseudo-library for information purposes. - func_basename "$file" - name="$func_basename_result" - instname="$dir/$name"i - func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' - - # Maybe install the static library, too. - test -n "$old_library" && func_append staticlibs " $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - func_lo2o "$destfile" - staticdest=$func_lo2o_result - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - func_fatal_help "cannot copy a libtool object to \`$destfile'" - ;; - esac - - # Install the libtool object if requested. - test -n "$destfile" && \ - func_show_eval "$install_prog $file $destfile" 'exit $?' - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - func_lo2o "$file" - staticobj=$func_lo2o_result - func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - func_basename "$file" - destfile="$func_basename_result" - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - func_stripname '' '.exe' "$file" - file=$func_stripname_result - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin* | *mingw*) - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - wrapper=$func_ltwrapper_scriptname_result - else - func_stripname '' '.exe' "$file" - wrapper=$func_stripname_result - fi - ;; - *) - wrapper=$file - ;; - esac - if func_ltwrapper_script_p "$wrapper"; then - notinst_deplibs= - relink_command= - - func_source "$wrapper" - - # Check the variables that should have been set. - test -z "$generated_by_libtool_version" && \ - func_fatal_error "invalid libtool wrapper script \`$wrapper'" - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - func_source "$lib" - fi - libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - func_warning "\`$lib' has not been installed in \`$libdir'" - finalize=no - fi - done - - relink_command= - func_source "$wrapper" - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - $opt_dry_run || { - if test "$finalize" = yes; then - tmpdir=`func_mktempdir` - func_basename "$file$stripped_ext" - file="$func_basename_result" - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` - - $opt_silent || { - func_quote_for_expand "$relink_command" - eval "func_echo $func_quote_for_expand_result" - } - if eval "$relink_command"; then : - else - func_error "error: relink \`$file' with the above command before installing it" - $opt_dry_run || ${RM}r "$tmpdir" - continue - fi - file="$outputname" - else - func_warning "cannot relink \`$file'" - fi - } - else - # Install the binary that we compiled earlier. - file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - func_stripname '' '.exe' "$destfile" - destfile=$func_stripname_result - ;; - esac - ;; - esac - func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' - $opt_dry_run || if test -n "$outputname"; then - ${RM}r "$tmpdir" - fi - ;; - esac - done - - for file in $staticlibs; do - func_basename "$file" - name="$func_basename_result" - - # 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 $tool_oldlib" 'exit $?' - fi - - # Do each command in the postinstall commands. - func_execute_cmds "$old_postinstall_cmds" 'exit $?' - done - - test -n "$future_libdirs" && \ - func_warning "remember to run \`$progname --finish$future_libdirs'" - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - $opt_dry_run && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi -} - -test "$opt_mode" = install && func_mode_install ${1+"$@"} - - -# func_generate_dlsyms outputname originator pic_p -# Extract symbols from dlprefiles and create ${outputname}S.o with -# a dlpreopen symbol table. -func_generate_dlsyms () -{ - $opt_debug - my_outputname="$1" - my_originator="$2" - my_pic_p="${3-no}" - my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` - my_dlsyms= - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - my_dlsyms="${my_outputname}S.c" - else - func_error "not configured to extract global symbols from dlpreopened files" - fi - fi - - if test -n "$my_dlsyms"; then - case $my_dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${my_outputname}.nm" - - func_show_eval "$RM $nlist ${nlist}S ${nlist}T" - - # Parse the name list into a source file. - func_verbose "creating $output_objdir/$my_dlsyms" - - $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ -/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ -/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) -#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" -#endif - -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - func_verbose "generating symbol list for \`$output'" - - $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` - for progfile in $progfiles; do - func_to_tool_file "$progfile" func_convert_file_msys_to_w32 - func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" - $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $opt_dry_run || { - eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - if test -n "$export_symbols_regex"; then - $opt_dry_run || { - eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - } - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $opt_dry_run || { - $RM $export_symbols - eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - } - else - $opt_dry_run || { - eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - eval '$MV "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* | *cegcc* ) - eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - } - fi - fi - - for dlprefile in $dlprefiles; do - func_verbose "extracting global C symbols from \`$dlprefile'" - func_basename "$dlprefile" - name="$func_basename_result" - case $host in - *cygwin* | *mingw* | *cegcc* ) - # if an import library, we need to obtain dlname - if func_win32_import_lib_p "$dlprefile"; then - func_tr_sh "$dlprefile" - eval "curr_lafile=\$libfile_$func_tr_sh_result" - dlprefile_dlbasename="" - if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then - # Use subshell, to avoid clobbering current variable values - dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` - if test -n "$dlprefile_dlname" ; then - func_basename "$dlprefile_dlname" - dlprefile_dlbasename="$func_basename_result" - else - # no lafile. user explicitly requested -dlpreopen . - $sharedlib_from_linklib_cmd "$dlprefile" - dlprefile_dlbasename=$sharedlib_from_linklib_result - fi - fi - $opt_dry_run || { - if test -n "$dlprefile_dlbasename" ; then - eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' - else - func_warning "Could not compute DLL name from $name" - eval '$ECHO ": $name " >> "$nlist"' - fi - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | - $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" - } - else # not an import lib - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - fi - ;; - *) - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 - eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } - ;; - esac - done - - $opt_dry_run || { - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $MV "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if $GREP -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - $GREP -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' - else - echo '/* NONE */' >> "$output_objdir/$my_dlsyms" - fi - - echo >> "$output_objdir/$my_dlsyms" "\ - -/* The mapping between symbol names and symbols. */ -typedef struct { - const char *name; - void *address; -} lt_dlsymlist; -extern LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[]; -LT_DLSYM_CONST lt_dlsymlist -lt_${my_prefix}_LTX_preloaded_symbols[] = -{\ - { \"$my_originator\", (void *) 0 }," - - case $need_lib_prefix in - no) - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - *) - eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" - ;; - esac - echo >> "$output_objdir/$my_dlsyms" "\ - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_${my_prefix}_LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - } # !$opt_dry_run - - pic_flag_for_symtable= - case "$compile_command " in - *" -static "*) ;; - *) - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # 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*) - pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; - *-*-hpux*) - pic_flag_for_symtable=" $pic_flag" ;; - *) - if test "X$my_pic_p" != Xno; then - pic_flag_for_symtable=" $pic_flag" - fi - ;; - esac - ;; - esac - symtab_cflags= - for arg in $LTCFLAGS; do - case $arg in - -pie | -fpie | -fPIE) ;; - *) func_append symtab_cflags " $arg" ;; - esac - done - - # Now compile the dynamic symbol file. - func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' - - # Clean up the generated files. - func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' - - # Transform the symbol file into the correct name. - symfileobj="$output_objdir/${my_outputname}S.$objext" - case $host in - *cygwin* | *mingw* | *cegcc* ) - if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - else - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - fi - ;; - *) - compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` - ;; - esac - ;; - *) - func_fatal_error "unknown suffix for \`$my_dlsyms'" - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` - finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` - fi -} - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -# Despite the name, also deal with 64 bit binaries. -func_win32_libid () -{ - $opt_debug - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then - func_to_tool_file "$1" func_convert_file_msys_to_w32 - win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | - $SED -n -e ' - 1,100{ - / I /{ - s,.*,import, - p - q - } - }'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $ECHO "$win32_libid_type" -} - -# func_cygming_dll_for_implib ARG -# -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib () -{ - $opt_debug - sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` -} - -# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs -# -# The is the core of a fallback implementation of a -# platform-specific function to extract the name of the -# DLL associated with the specified import library LIBNAME. -# -# SECTION_NAME is either .idata$6 or .idata$7, depending -# on the platform and compiler that created the implib. -# -# Echos the name of the DLL associated with the -# specified import library. -func_cygming_dll_for_implib_fallback_core () -{ - $opt_debug - match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` - $OBJDUMP -s --section "$1" "$2" 2>/dev/null | - $SED '/^Contents of section '"$match_literal"':/{ - # Place marker at beginning of archive member dllname section - s/.*/====MARK====/ - p - d - } - # These lines can sometimes be longer than 43 characters, but - # are always uninteresting - /:[ ]*file format pe[i]\{,1\}-/d - /^In archive [^:]*:/d - # Ensure marker is printed - /^====MARK====/p - # Remove all lines with less than 43 characters - /^.\{43\}/!d - # From remaining lines, remove first 43 characters - s/^.\{43\}//' | - $SED -n ' - # Join marker and all lines until next marker into a single line - /^====MARK====/ b para - H - $ b para - b - :para - x - s/\n//g - # Remove the marker - s/^====MARK====// - # Remove trailing dots and whitespace - s/[\. \t]*$// - # Print - /./p' | - # we now have a list, one entry per line, of the stringified - # contents of the appropriate section of all members of the - # archive which possess that section. Heuristic: eliminate - # all those which have a first or second character that is - # a '.' (that is, objdump's representation of an unprintable - # character.) This should work for all archives with less than - # 0x302f exports -- but will fail for DLLs whose name actually - # begins with a literal '.' or a single character followed by - # a '.'. - # - # Of those that remain, print the first one. - $SED -e '/^\./d;/^.\./d;q' -} - -# func_cygming_gnu_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is a GNU/binutils-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_gnu_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` - test -n "$func_cygming_gnu_implib_tmp" -} - -# func_cygming_ms_implib_p ARG -# This predicate returns with zero status (TRUE) if -# ARG is an MS-style import library. Returns -# with nonzero status (FALSE) otherwise. -func_cygming_ms_implib_p () -{ - $opt_debug - func_to_tool_file "$1" func_convert_file_msys_to_w32 - func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` - test -n "$func_cygming_ms_implib_tmp" -} - -# func_cygming_dll_for_implib_fallback ARG -# Platform-specific function to extract the -# name of the DLL associated with the specified -# import library ARG. -# -# This fallback implementation is for use when $DLLTOOL -# does not support the --identify-strict option. -# Invoked by eval'ing the libtool variable -# $sharedlib_from_linklib_cmd -# Result is available in the variable -# $sharedlib_from_linklib_result -func_cygming_dll_for_implib_fallback () -{ - $opt_debug - if func_cygming_gnu_implib_p "$1" ; then - # binutils import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` - elif func_cygming_ms_implib_p "$1" ; then - # ms-generated import library - sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` - else - # unknown - sharedlib_from_linklib_result="" - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - $opt_debug - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - if test "$lock_old_archive_extraction" = yes; then - lockfile=$f_ex_an_ar_oldlib.lock - until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do - func_echo "Waiting for $lockfile to be removed" - sleep 2 - done - fi - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ - 'stat=$?; rm -f "$lockfile"; exit $stat' - if test "$lock_old_archive_extraction" = yes; then - $opt_dry_run || rm -f "$lockfile" - fi - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" - fi -} - - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - $opt_debug - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - func_basename "$my_xlib" - my_xlib="$func_basename_result" - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - func_arith $extracted_serial + 1 - extracted_serial=$func_arith_result - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - func_mkdir_p "$my_xdir" - - case $host in - *-darwin*) - func_verbose "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - $opt_dry_run || { - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`basename "$darwin_archive"` - darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` - if test -n "$darwin_arches"; then - darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we've a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` - $LIPO -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - $RM -rf unfat-$$ - cd "$darwin_orig_dir" - else - cd $darwin_orig_dir - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - } # !$opt_dry_run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` - done - - func_extract_archives_result="$my_oldobjs" -} - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=${1-no} - - $ECHO "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible -if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi -BIN_SH=xpg4; export BIN_SH # for Tru64 -DUALCASE=1; export DUALCASE # for MKS sh - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variables: - generated_by_libtool_version='$macro_version' - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$ECHO are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - file=\"\$0\"" - - qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` - $ECHO "\ - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - ECHO=\"$qECHO\" - fi - -# Very basic option parsing. These options are (a) specific to -# the libtool wrapper, (b) are identical between the wrapper -# /script/ and the wrapper /executable/ which is used only on -# windows platforms, and (c) all begin with the string "--lt-" -# (application programs are unlikely to have options which match -# this pattern). -# -# There are only two supported options: --lt-debug and -# --lt-dump-script. There is, deliberately, no --lt-help. -# -# The first argument to this parsing function should be the -# script's $0 value, followed by "$@". -lt_option_debug= -func_parse_lt_options () -{ - lt_script_arg0=\$0 - shift - for lt_opt - do - case \"\$lt_opt\" in - --lt-debug) lt_option_debug=1 ;; - --lt-dump-script) - lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` - test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. - lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` - cat \"\$lt_dump_D/\$lt_dump_F\" - exit 0 - ;; - --lt-*) - \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 - exit 1 - ;; - esac - done - - # Print the debug banner immediately: - if test -n \"\$lt_option_debug\"; then - echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 - fi -} - -# Used when --lt-debug. Prints its arguments to stdout -# (redirection is the responsibility of the caller) -func_lt_dump_args () -{ - lt_dump_args_N=1; - for lt_arg - do - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" - lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` - done -} - -# Core function for launching the target application -func_exec_program_core () -{ -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - if test -n \"\$lt_option_debug\"; then - \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 - func_lt_dump_args \${1+\"\$@\"} 1>&2 - fi - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 -} - -# A function to encapsulate launching the target application -# Strips options in the --lt-* namespace from \$@ and -# launches target application with the remaining arguments. -func_exec_program () -{ - 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+\"\$@\"} -} - - # Parse options - func_parse_lt_options \"\$0\" \${1+\"\$@\"} - - # Find the directory that this script lives in. - thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` - done - - # Usually 'no', except on cygwin/mingw when embedded into - # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 - if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then - # special case for '.' - if test \"\$thisdir\" = \".\"; then - thisdir=\`pwd\` - fi - # remove .libs from thisdir - case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; - $objdir ) thisdir=. ;; - esac - fi - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $ECHO "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $MKDIR \"\$progdir\" - else - $RM \"\$progdir/\$file\" - fi" - - $ECHO "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $ECHO \"\$relink_command_output\" >&2 - $RM \"\$progdir/\$file\" - exit 1 - fi - fi - - $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $RM \"\$progdir/\$program\"; - $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $RM \"\$progdir/\$file\" - fi" - else - $ECHO "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $ECHO "\ - - if test -f \"\$progdir/\$program\"; then" - - # fixup the dll searchpath if we need to. - # - # Fix the DLL searchpath if we need to. Do this before prepending - # to shlibpath, because on Windows, both are PATH and uninstalled - # libraries must come first. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $ECHO "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` - - export $shlibpath_var -" - fi - - $ECHO "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. - func_exec_program \${1+\"\$@\"} - fi - else - # The program doesn't exist. - \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} - - -# func_emit_cwrapperexe_src -# emit the source code for a wrapper executable on stdout -# Must ONLY be called from within func_mode_link because -# it depends on a number of variable set therein. -func_emit_cwrapperexe_src () -{ - cat < -#include -#ifdef _MSC_VER -# include -# include -# include -#else -# include -# include -# ifdef __CYGWIN__ -# include -# endif -#endif -#include -#include -#include -#include -#include -#include -#include -#include - -/* declarations of non-ANSI functions */ -#if defined(__MINGW32__) -# ifdef __STRICT_ANSI__ -int _putenv (const char *); -# endif -#elif defined(__CYGWIN__) -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif -/* #elif defined (other platforms) ... */ -#endif - -/* portability defines, excluding path handling macros */ -#if defined(_MSC_VER) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -# define S_IXUSR _S_IEXEC -# ifndef _INTPTR_T_DEFINED -# define _INTPTR_T_DEFINED -# define intptr_t int -# endif -#elif defined(__MINGW32__) -# define setmode _setmode -# define stat _stat -# define chmod _chmod -# define getcwd _getcwd -# define putenv _putenv -#elif defined(__CYGWIN__) -# define HAVE_SETENV -# define FOPEN_WB "wb" -/* #elif defined (other platforms) ... */ -#endif - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef S_IXOTH -# define S_IXOTH 0 -#endif -#ifndef S_IXGRP -# define S_IXGRP 0 -#endif - -/* path handling portability macros */ -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# define FOPEN_WB "wb" -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#ifndef FOPEN_WB -# define FOPEN_WB "w" -#endif -#ifndef _O_BINARY -# define _O_BINARY 0 -#endif - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -#if defined(LT_DEBUGWRAPPER) -static int lt_debug = 1; -#else -static int lt_debug = 0; -#endif - -const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ - -void *xmalloc (size_t num); -char *xstrdup (const char *string); -const char *base_name (const char *name); -char *find_executable (const char *wrapper); -char *chase_symlinks (const char *pathspec); -int make_executable (const char *path); -int check_executable (const char *path); -char *strendzap (char *str, const char *pat); -void lt_debugprintf (const char *file, int line, const char *fmt, ...); -void lt_fatal (const char *file, int line, const char *message, ...); -static const char *nonnull (const char *s); -static const char *nonempty (const char *s); -void lt_setenv (const char *name, const char *value); -char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_update_exe_path (const char *name, const char *value); -void lt_update_lib_path (const char *name, const char *value); -char **prepare_spawn (char **argv); -void lt_dump_script (FILE *f); -EOF - - cat <= 0) - && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) - return 1; - else - return 0; -} - -int -make_executable (const char *path) -{ - int rval = 0; - struct stat st; - - lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", - nonempty (path)); - if ((!path) || (!*path)) - return 0; - - if (stat (path, &st) >= 0) - { - rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); - } - return rval; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise - Does not chase symlinks, even on platforms that support them. -*/ -char * -find_executable (const char *wrapper) -{ - int has_slash = 0; - const char *p; - const char *p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char *concat_name; - - lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", - nonempty (wrapper)); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char *path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char *q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR (*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = - XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = - XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", - nonnull (strerror (errno))); - tmp_len = strlen (tmp); - concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable (concat_name)) - return concat_name; - XFREE (concat_name); - return NULL; -} - -char * -chase_symlinks (const char *pathspec) -{ -#ifndef S_ISLNK - return xstrdup (pathspec); -#else - char buf[LT_PATHMAX]; - struct stat s; - char *tmp_pathspec = xstrdup (pathspec); - char *p; - int has_symlinks = 0; - while (strlen (tmp_pathspec) && !has_symlinks) - { - lt_debugprintf (__FILE__, __LINE__, - "checking path component for symlinks: %s\n", - tmp_pathspec); - if (lstat (tmp_pathspec, &s) == 0) - { - if (S_ISLNK (s.st_mode) != 0) - { - has_symlinks = 1; - break; - } - - /* search backwards for last DIR_SEPARATOR */ - p = tmp_pathspec + strlen (tmp_pathspec) - 1; - while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - p--; - if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) - { - /* no more DIR_SEPARATORS left */ - break; - } - *p = '\0'; - } - else - { - lt_fatal (__FILE__, __LINE__, - "error accessing file \"%s\": %s", - tmp_pathspec, nonnull (strerror (errno))); - } - } - XFREE (tmp_pathspec); - - if (!has_symlinks) - { - return xstrdup (pathspec); - } - - tmp_pathspec = realpath (pathspec, buf); - if (tmp_pathspec == 0) - { - lt_fatal (__FILE__, __LINE__, - "could not follow symlinks for %s", pathspec); - } - return xstrdup (tmp_pathspec); -#endif -} - -char * -strendzap (char *str, const char *pat) -{ - size_t len, patlen; - - assert (str != NULL); - assert (pat != NULL); - - len = strlen (str); - patlen = strlen (pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp (str, pat) == 0) - *str = '\0'; - } - return str; -} - -void -lt_debugprintf (const char *file, int line, const char *fmt, ...) -{ - va_list args; - if (lt_debug) - { - (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); - } -} - -static void -lt_error_core (int exit_status, const char *file, - int line, const char *mode, - const char *message, va_list ap) -{ - fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *file, int line, const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); - va_end (ap); -} - -static const char * -nonnull (const char *s) -{ - return s ? s : "(null)"; -} - -static const char * -nonempty (const char *s) -{ - return (s && !*s) ? "(empty)" : nonnull (s); -} - -void -lt_setenv (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_setenv) setting '%s' to '%s'\n", - nonnull (name), nonnull (value)); - { -#ifdef HAVE_SETENV - /* always make a copy, for consistency with !HAVE_SETENV */ - char *str = xstrdup (value); - setenv (name, str, 1); -#else - int len = strlen (name) + 1 + strlen (value) + 1; - char *str = XMALLOC (char, len); - sprintf (str, "%s=%s", name, value); - if (putenv (str) != EXIT_SUCCESS) - { - XFREE (str); - } -#endif - } -} - -char * -lt_extend_str (const char *orig_value, const char *add, int to_end) -{ - char *new_value; - if (orig_value && *orig_value) - { - int orig_value_len = strlen (orig_value); - int add_len = strlen (add); - new_value = XMALLOC (char, add_len + orig_value_len + 1); - if (to_end) - { - strcpy (new_value, orig_value); - strcpy (new_value + orig_value_len, add); - } - else - { - strcpy (new_value, add); - strcpy (new_value + add_len, orig_value); - } - } - else - { - new_value = xstrdup (add); - } - return new_value; -} - -void -lt_update_exe_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - /* some systems can't cope with a ':'-terminated path #' */ - int len = strlen (new_value); - while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) - { - new_value[len-1] = '\0'; - } - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -void -lt_update_lib_path (const char *name, const char *value) -{ - lt_debugprintf (__FILE__, __LINE__, - "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - nonnull (name), nonnull (value)); - - if (name && *name && value && *value) - { - char *new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - } -} - -EOF - case $host_os in - mingw*) - cat <<"EOF" - -/* Prepares an argument vector before calling spawn(). - Note that spawn() does not by itself call the command interpreter - (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : - ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); - GetVersionEx(&v); - v.dwPlatformId == VER_PLATFORM_WIN32_NT; - }) ? "cmd.exe" : "command.com"). - Instead it simply concatenates the arguments, separated by ' ', and calls - CreateProcess(). We must quote the arguments since Win32 CreateProcess() - interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a - special way: - - Space and tab are interpreted as delimiters. They are not treated as - delimiters if they are surrounded by double quotes: "...". - - Unescaped double quotes are removed from the input. Their only effect is - that within double quotes, space and tab are treated like normal - characters. - - Backslashes not followed by double quotes are not special. - - But 2*n+1 backslashes followed by a double quote become - n backslashes followed by a double quote (n >= 0): - \" -> " - \\\" -> \" - \\\\\" -> \\" - */ -#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" -char ** -prepare_spawn (char **argv) -{ - size_t argc; - char **new_argv; - size_t i; - - /* Count number of arguments. */ - for (argc = 0; argv[argc] != NULL; argc++) - ; - - /* Allocate new argument vector. */ - new_argv = XMALLOC (char *, argc + 1); - - /* Put quoted arguments into the new argument vector. */ - for (i = 0; i < argc; i++) - { - const char *string = argv[i]; - - if (string[0] == '\0') - new_argv[i] = xstrdup ("\"\""); - else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) - { - int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); - size_t length; - unsigned int backslashes; - const char *s; - char *quoted_string; - char *p; - - length = 0; - backslashes = 0; - if (quote_around) - length++; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - length += backslashes + 1; - length++; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - length += backslashes + 1; - - quoted_string = XMALLOC (char, length + 1); - - p = quoted_string; - backslashes = 0; - if (quote_around) - *p++ = '"'; - for (s = string; *s != '\0'; s++) - { - char c = *s; - if (c == '"') - { - unsigned int j; - for (j = backslashes + 1; j > 0; j--) - *p++ = '\\'; - } - *p++ = c; - if (c == '\\') - backslashes++; - else - backslashes = 0; - } - if (quote_around) - { - unsigned int j; - for (j = backslashes; j > 0; j--) - *p++ = '\\'; - *p++ = '"'; - } - *p = '\0'; - - new_argv[i] = quoted_string; - } - else - new_argv[i] = (char *) string; - } - new_argv[argc] = NULL; - - return new_argv; -} -EOF - ;; - esac - - cat <<"EOF" -void lt_dump_script (FILE* f) -{ -EOF - func_emit_wrapper yes | - $SED -n -e ' -s/^\(.\{79\}\)\(..*\)/\1\ -\2/ -h -s/\([\\"]\)/\\\1/g -s/$/\\n/ -s/\([^\n]*\).*/ fputs ("\1", f);/p -g -D' - cat <<"EOF" -} -EOF -} -# end: func_emit_cwrapperexe_src - -# func_win32_import_lib_p ARG -# True if ARG is an import lib, as indicated by $file_magic_cmd -func_win32_import_lib_p () -{ - $opt_debug - case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in - *import*) : ;; - *) false ;; - esac -} - -# func_mode_link arg... -func_mode_link () -{ - $opt_debug - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - # It is impossible to link a dll without this setting, and - # we shouldn't force the makefile maintainer to figure out - # which system we are compiling for in order to pass an extra - # flag for every libtool invocation. - # allow_undefined=no - - # FIXME: Unfortunately, there are problems with the above when trying - # to make a dll which has undefined symbols, in which case not - # even a static library is built. For now, we need to specify - # -no-undefined on the libtool link line when we can be certain - # that all symbols are satisfied, otherwise we get a static library. - allow_undefined=yes - ;; - *) - allow_undefined=yes - ;; - esac - libtool_args=$nonopt - base_compile="$nonopt $@" - compile_command=$nonopt - finalize_command=$nonopt - - compile_rpath= - finalize_rpath= - compile_shlibpath= - finalize_shlibpath= - convenience= - old_convenience= - deplibs= - old_deplibs= - compiler_flags= - linker_flags= - dllsearchpath= - lib_search_path=`pwd` - inst_prefix_dir= - new_inherited_linker_flags= - - avoid_version=no - bindir= - dlfiles= - dlprefiles= - dlself=no - export_dynamic=no - export_symbols= - export_symbols_regex= - generated= - libobjs= - ltlibs= - module=no - no_install=no - objs= - non_pic_objects= - precious_files_regex= - prefer_static_libs=no - preload=no - prev= - prevarg= - release= - rpath= - xrpath= - perm_rpath= - temp_rpath= - thread_safe=no - vinfo= - vinfo_number=no - weak_libs= - single_module="${wl}-single_module" - func_infer_tag $base_compile - - # We need to know -static, to get the right output filenames. - for arg - do - case $arg in - -shared) - test "$build_libtool_libs" != yes && \ - func_fatal_configuration "can not build a shared library" - build_old_libs=no - break - ;; - -all-static | -static | -static-libtool-libs) - case $arg in - -all-static) - if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then - func_warning "complete static linking is impossible in this configuration" - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - func_quote_for_eval "$arg" - qarg=$func_quote_for_eval_unquoted_result - func_append libtool_args " $func_quote_for_eval_result" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - func_append compile_command " @OUTPUT@" - func_append finalize_command " @OUTPUT@" - ;; - esac - - case $prev in - bindir) - bindir="$arg" - prev= - continue - ;; - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - func_append compile_command " @SYMFILE@" - func_append finalize_command " @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - func_append dlfiles " $arg" - else - func_append dlprefiles " $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - test -f "$arg" \ - || func_fatal_error "symbol file \`$arg' does not exist" - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - framework) - case $host in - *-*-darwin*) - case "$deplibs " in - *" $qarg.ltframework "*) ;; - *) func_append deplibs " $qarg.ltframework" # this is fixed later - ;; - esac - ;; - esac - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat "$save_arg"` - do -# func_append moreargs " $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - done - else - func_fatal_error "link input file \`$arg' does not exist" - fi - arg=$save_arg - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) func_append rpath " $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) func_append xrpath " $arg" ;; - esac - fi - prev= - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - weak) - func_append weak_libs " $arg" - prev= - continue - ;; - xcclinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xcompiler) - func_append compiler_flags " $qarg" - prev= - func_append compile_command " $qarg" - func_append finalize_command " $qarg" - continue - ;; - xlinker) - func_append linker_flags " $qarg" - func_append compiler_flags " $wl$qarg" - prev= - func_append compile_command " $wl$qarg" - func_append finalize_command " $wl$qarg" - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - # See comment for -static flag below, for more details. - func_append compile_command " $link_static_flag" - func_append finalize_command " $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - func_fatal_error "\`-allow-undefined' must not be used because it is the default" - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -bindir) - prev=bindir - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - func_fatal_error "more than one -exported-symbols argument is not allowed" - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework) - prev=framework - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - func_append compile_command " $arg" - func_append finalize_command " $arg" - ;; - esac - continue - ;; - - -L*) - func_stripname "-L" '' "$arg" - if test -z "$func_stripname_result"; then - if test "$#" -gt 0; then - func_fatal_error "require no space between \`-L' and \`$1'" - else - func_fatal_error "need path for \`-L' option" - fi - fi - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - test -z "$absdir" && \ - func_fatal_error "cannot determine absolute directory name of \`$dir'" - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "* | *" $arg "*) - # Will only happen for absolute or sysroot arguments - ;; - *) - # Preserve sysroot, but never include relative directories - case $dir in - [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; - *) func_append deplibs " -L$dir" ;; - esac - func_append lib_search_path " $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - ::) dllsearchpath=$dir;; - *) func_append dllsearchpath ":$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - func_append deplibs " System.ltframework" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - func_append deplibs " $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot|--sysroot) - func_append compiler_flags " $arg" - func_append compile_command " $arg" - func_append finalize_command " $arg" - prev=xcompiler - continue - ;; - - -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" - case "$new_inherited_linker_flags " in - *" $arg "*) ;; - * ) func_append new_inherited_linker_flags " $arg" ;; - esac - continue - ;; - - -multi_module) - single_module="${wl}-multi_module" - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) - # The PATH hackery in wrapper scripts is required on Windows - # and Darwin in order for the loader to find any dlls it needs. - func_warning "\`-no-install' is ignored for $host" - func_warning "assuming \`-no-fast-install' instead" - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - func_stripname '-R' '' "$arg" - dir=$func_stripname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - =*) - func_stripname '=' '' "$dir" - dir=$lt_sysroot$func_stripname_result - ;; - *) - func_fatal_error "only absolute run-paths are allowed" - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - continue - ;; - - -shared) - # The effects of -shared are defined in a previous loop. - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -weak) - prev=weak - continue - ;; - - -Wc,*) - func_stripname '-Wc,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $func_quote_for_eval_result" - func_append compiler_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Wl,*) - func_stripname '-Wl,' '' "$arg" - args=$func_stripname_result - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - func_quote_for_eval "$flag" - func_append arg " $wl$func_quote_for_eval_result" - func_append compiler_flags " $wl$func_quote_for_eval_result" - func_append linker_flags " $func_quote_for_eval_result" - done - IFS="$save_ifs" - func_stripname ' ' '' "$arg" - arg=$func_stripname_result - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # -msg_* for osf cc - -msg_*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - # Flags to be passed through unchanged, with rationale: - # -64, -mips[0-9] enable 64-bit mode for the SGI compiler - # -r[0-9][0-9]* specify processor for the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler - # +DA*, +DD* enable 64-bit mode for the HP compiler - # -q* compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* architecture-specific flags for GCC - # -F/path path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* profiling flags for GCC - # @file GCC response files - # -tp=* Portland pgcc target processor selection - # --sysroot=* for sysroot support - # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ - -O*|-flto*|-fwhopr*|-fuse-linker-plugin) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - func_append compile_command " $arg" - func_append finalize_command " $arg" - func_append compiler_flags " $arg" - continue - ;; - - # Some other compiler flag. - -* | +*) - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - - *.$objext) - # A standard object. - func_append objs " $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if func_lalib_unsafe_p "$arg"; then - pic_object= - non_pic_object= - - # Read the .lo file - func_source "$arg" - - if test -z "$pic_object" || - test -z "$non_pic_object" || - test "$pic_object" = none && - test "$non_pic_object" = none; then - func_fatal_error "cannot find name of object for \`$arg'" - fi - - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - func_append dlfiles " $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - func_append dlprefiles " $pic_object" - prev= - fi - - # A PIC object. - func_append libobjs " $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - func_append non_pic_objects " $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - func_append non_pic_objects " $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if $opt_dry_run; then - # Extract subdirectory from the argument. - func_dirname "$arg" "/" "" - xdir="$func_dirname_result" - - func_lo2o "$arg" - pic_object=$xdir$objdir/$func_lo2o_result - non_pic_object=$xdir$func_lo2o_result - func_append libobjs " $pic_object" - func_append non_pic_objects " $non_pic_object" - else - func_fatal_error "\`$arg' is not a valid libtool object" - fi - fi - ;; - - *.$libext) - # An archive. - func_append deplibs " $arg" - func_append old_deplibs " $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - func_resolve_sysroot "$arg" - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - func_append dlfiles " $func_resolve_sysroot_result" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - func_append dlprefiles " $func_resolve_sysroot_result" - prev= - else - func_append deplibs " $func_resolve_sysroot_result" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - func_quote_for_eval "$arg" - arg="$func_quote_for_eval_result" - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - done # argument parsing loop - - test -n "$prev" && \ - func_fatal_help "the \`$prevarg' option requires an argument" - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - func_append compile_command " $arg" - func_append finalize_command " $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - func_basename "$output" - outputname="$func_basename_result" - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - func_dirname "$output" "/" "" - output_objdir="$func_dirname_result$objdir" - func_to_tool_file "$output_objdir/" - tool_output_objdir=$func_to_tool_file_result - # Create the object directory. - func_mkdir_p "$output_objdir" - - # Determine the type of output - case $output in - "") - func_fatal_help "you must specify an output file" - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if $opt_preserve_dup_deps ; then - case "$libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append libs " $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if $opt_duplicate_compiler_generated_deps; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; - esac - func_append pre_post_deps " $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - notinst_path= # paths that contain not-installed libtool libraries - - case $linkmode in - lib) - passes="conv dlpreopen link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - - for pass in $passes; do - # The preopen pass in lib mode reverses $deplibs; put it back here - # so that -L comes before libs that need it for instance... - if test "$linkmode,$pass" = "lib,link"; then - ## FIXME: Find the place where the list is rebuilt in the wrong - ## order, and fix it there properly - tmp_deplibs= - for deplib in $deplibs; do - tmp_deplibs="$deplib $tmp_deplibs" - done - deplibs="$tmp_deplibs" - fi - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$linkmode,$pass" = "lib,dlpreopen"; then - # Collect and forward deplibs of preopened libtool libs - for lib in $dlprefiles; do - # Ignore non-libtool-libs - dependency_libs= - func_resolve_sysroot "$lib" - case $lib in - *.la) func_source "$func_resolve_sysroot_result" ;; - esac - - # Collect preopened libtool deplibs, except any this library - # has declared as weak libs - for deplib in $dependency_libs; do - func_basename "$deplib" - deplib_base=$func_basename_result - case " $weak_libs " in - *" $deplib_base "*) ;; - *) func_append deplibs " $deplib" ;; - esac - done - done - libs="$dlprefiles" - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - - for deplib in $libs; do - lib= - found=no - case $deplib in - -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" - else - func_append compiler_flags " $deplib" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - func_warning "\`-l' is ignored for archives/objects" - continue - fi - func_stripname '-l' '' "$deplib" - name=$func_stripname_result - if test "$linkmode" = lib; then - searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" - else - searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" - fi - for searchdir in $searchdirs; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if func_lalib_p "$lib"; then - library_names= - old_library= - func_source "$lib" - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - *.ltframework) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - if test "$linkmode" = lib ; then - case "$new_inherited_linker_flags " in - *" $deplib "*) ;; - * ) func_append new_inherited_linker_flags " $deplib" ;; - esac - fi - fi - continue - ;; - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - *) - func_warning "\`-L' is ignored for archives/objects" - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - func_stripname '-R' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - dir=$func_resolve_sysroot_result - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) func_append xrpath " $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) - func_resolve_sysroot "$deplib" - lib=$func_resolve_sysroot_result - ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - # Linking convenience modules into shared libraries is allowed, - # but linking other static libraries is non-portable. - case " $dlpreconveniencelibs " in - *" $deplib "*) ;; - *) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - echo - $ECHO "*** Warning: Trying to link with static lib archive $deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because the file extensions .$libext of this argument makes me believe" - echo "*** that it is just a static archive that I should not use here." - else - echo - $ECHO "*** Warning: Linking the shared library $output against the" - $ECHO "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - ;; - esac - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - func_append newdlprefiles " $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - func_append newdlfiles " $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - - if test "$found" = yes || test -f "$lib"; then : - else - func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" - fi - - # Check to see that this really is a libtool archive. - func_lalib_unsafe_p "$lib" \ - || func_fatal_error "\`$lib' is not a valid libtool archive" - - func_dirname "$lib" "" "." - ladir="$func_dirname_result" - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - inherited_linker_flags= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - func_source "$lib" - - # Convert "-framework foo" to "foo.ltframework" - if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` - for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do - case " $new_inherited_linker_flags " in - *" $tmp_inherited_linker_flag "*) ;; - *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; - esac - done - fi - dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && func_append dlfiles " $dlopen" - test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - # It is a libtool convenience library, so add in its objects. - func_append convenience " $ladir/$objdir/$old_library" - func_append old_convenience " $ladir/$objdir/$old_library" - elif test "$linkmode" != prog && test "$linkmode" != lib; then - func_fatal_error "\`$lib' is not a convenience library" - fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - if test -n "$old_library" && - { test "$prefer_static_libs" = yes || - test "$prefer_static_libs,$installed" = "built,no"; }; then - linklib=$old_library - else - for l in $old_library $library_names; do - linklib="$l" - done - fi - if test -z "$linklib"; then - func_fatal_error "cannot find name of link library for \`$lib'" - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - func_fatal_error "cannot -dlopen a convenience library: \`$lib'" - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - func_append dlprefiles " $lib $dependency_libs" - else - func_append newdlfiles " $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - func_warning "cannot determine absolute directory name of \`$ladir'" - func_warning "passing it literally to the linker, although it might fail" - abs_ladir="$ladir" - fi - ;; - esac - func_basename "$lib" - laname="$func_basename_result" - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - func_warning "library \`$lib' was moved." - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$lt_sysroot$libdir" - absdir="$lt_sysroot$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - func_append notinst_path " $abs_ladir" - fi - fi # $installed = yes - func_stripname 'lib' '.la' "$laname" - name=$func_stripname_result - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir" && test "$linkmode" = prog; then - func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" - fi - case "$host" in - # special handling for platforms with PE-DLLs. - *cygwin* | *mingw* | *cegcc* ) - # Linker will automatically link against shared library if both - # static and shared are present. Therefore, ensure we extract - # symbols from the import library if a shared library is present - # (otherwise, the dlopen module name will be incorrect). We do - # this by putting the import library name into $newdlprefiles. - # We recover the dlopen module name by 'saving' the la file - # name in a special purpose variable, and (later) extracting the - # dlname from the la file. - if test -n "$dlname"; then - func_tr_sh "$dir/$linklib" - eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" - func_append newdlprefiles " $dir/$linklib" - else - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - fi - ;; - * ) - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - func_append newdlprefiles " $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - func_append dlpreconveniencelibs " $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - func_append newdlprefiles " $dir/$dlname" - else - func_append newdlprefiles " $dir/$linklib" - fi - ;; - esac - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - func_append newlib_search_path " $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result" - func_append newlib_search_path " $func_resolve_sysroot_result" - ;; - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath:" in - *"$absdir:"*) ;; - *) func_append temp_rpath "$absdir:" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - case $host in - *cygwin* | *mingw* | *cegcc*) - # No point in relinking DLLs because paths are not encoded - func_append notinst_deplibs " $lib" - need_relink=no - ;; - *) - if test "$installed" = no; then - func_append notinst_deplibs " $lib" - need_relink=yes - fi - ;; - esac - # This is a shared library - - # Warn about portability, can't link against -module's on some - # systems (darwin). Don't bleat about dlopened modules though! - dlopenmodule="" - for dlpremoduletest in $dlprefiles; do - if test "X$dlpremoduletest" = "X$lib"; then - dlopenmodule="$dlpremoduletest" - break - fi - done - if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - echo - if test "$linkmode" = prog; then - $ECHO "*** Warning: Linking the executable $output against the loadable module" - else - $ECHO "*** Warning: Linking the shared library $output against the loadable module" - fi - $ECHO "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) func_append compile_rpath " $absdir" ;; - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - shift - realname="$1" - shift - libname=`eval "\\$ECHO \"$libname_spec\""` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw* | *cegcc*) - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - func_basename "$soroot" - soname="$func_basename_result" - func_stripname 'lib' '.dll' "$soname" - newlib=libimp-$func_stripname_result.a - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - func_verbose "extracting exported symbol list from \`$soname'" - func_execute_cmds "$extract_expsyms_cmds" 'exit $?' - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - func_verbose "generating import library for \`$soname'" - func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$opt_mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a (non-dlopened) module then we can not - # link against it, someone is ignoring the earlier warnings - if /usr/bin/file -L $add 2> /dev/null | - $GREP ": [^:]* bundle" >/dev/null ; then - if test "X$dlopenmodule" != "X$lib"; then - $ECHO "*** Warning: lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - echo - echo "*** And there doesn't seem to be a static archive available" - echo "*** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - elif test -n "$old_library"; then - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - 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 - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - func_fatal_configuration "unsupported hardcode properties" - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) func_append compile_shlibpath "$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && - test "$hardcode_minus_L" != yes && - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$opt_mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes && - test "$hardcode_direct_absolute" = no; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) func_append finalize_shlibpath "$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - func_append add_dir " -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - echo - $ECHO "*** Warning: This system can not link to static lib archive $lib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - echo "*** But as you try to build a module library, libtool will still create " - echo "*** a static module, that should work as long as the dlopening application" - echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) func_stripname '-R' '' "$libdir" - temp_xrpath=$func_stripname_result - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) func_append xrpath " $temp_xrpath";; - esac;; - *) func_append temp_deplibs " $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - func_append newlib_search_path " $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - case $deplib in - -L*) func_stripname '-L' '' "$deplib" - func_resolve_sysroot "$func_stripname_result";; - *) func_resolve_sysroot "$deplib" ;; - esac - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $func_resolve_sysroot_result "*) - func_append specialdeplibs " $func_resolve_sysroot_result" ;; - esac - fi - func_append tmp_libs " $func_resolve_sysroot_result" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - path= - case $deplib in - -L*) path="$deplib" ;; - *.la) - func_resolve_sysroot "$deplib" - deplib=$func_resolve_sysroot_result - func_dirname "$deplib" "" "." - dir=$func_dirname_result - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - func_warning "cannot determine absolute directory name of \`$dir'" - absdir="$dir" - fi - ;; - esac - if $GREP "^installed=no" $deplib > /dev/null; then - case $host in - *-*-darwin*) - depdepl= - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$absdir/$objdir/$depdepl" ; then - depdepl="$absdir/$objdir/$depdepl" - darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - if test -z "$darwin_install_name"; then - darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` - fi - func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" - path= - fi - fi - ;; - *) - path="-L$absdir/$objdir" - ;; - esac - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - test -z "$libdir" && \ - func_fatal_error "\`$deplib' is not a valid libtool archive" - test "$absdir" != "$libdir" && \ - func_warning "\`$deplib' seems to be moved" - - path="-L$absdir" - fi - ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - if test "$pass" = link; then - if test "$linkmode" = "prog"; then - compile_deplibs="$new_inherited_linker_flags $compile_deplibs" - finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" - else - compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - fi - fi - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) func_append lib_search_path " $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) func_append tmp_libs " $deplib" ;; - esac - ;; - *) func_append tmp_libs " $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - func_append tmp_libs " $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - fi - if test "$linkmode" = prog || test "$linkmode" = lib; then - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for archives" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for archives" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for archives" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for archives" - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for archives" - - test -n "$release" && \ - func_warning "\`-release' is ignored for archives" - - test -n "$export_symbols$export_symbols_regex" && \ - func_warning "\`-export-symbols' is ignored for archives" - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - func_append objs "$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - func_stripname 'lib' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - test "$module" = no && \ - func_fatal_help "libtool library \`$output' must begin with \`lib'" - - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - func_stripname '' '.la' "$outputname" - name=$func_stripname_result - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - func_stripname '' '.la' "$outputname" - libname=$func_stripname_result - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" - else - echo - $ECHO "*** Warning: Linking the shared library $output against the non-libtool" - $ECHO "*** objects $objs is not portable!" - func_append libobjs " $objs" - fi - fi - - test "$dlself" != no && \ - func_warning "\`-dlopen self' is ignored for libtool libraries" - - set dummy $rpath - shift - test "$#" -gt 1 && \ - func_warning "ignoring multiple \`-rpath's for a libtool library" - - install_libdir="$1" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - test -n "$vinfo" && \ - func_warning "\`-version-info/-version-number' is ignored for convenience libraries" - - test -n "$release" && \ - func_warning "\`-release' is ignored for convenience libraries" - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - shift - IFS="$save_ifs" - - test -n "$7" && \ - func_fatal_help "too many parameters to \`-version-info'" - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$1" - number_minor="$2" - number_revision="$3" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # 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 - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|qnx|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - func_arith $number_major + $number_minor - current=$func_arith_result - age="$number_minor" - revision="$number_minor" - lt_irix_increment=no - ;; - esac - ;; - no) - current="$1" - revision="$2" - age="$3" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "CURRENT \`$current' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "REVISION \`$revision' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - func_error "AGE \`$age' must be a nonnegative integer" - func_fatal_error "\`$vinfo' is not valid version information" - ;; - esac - - if test "$age" -gt "$current"; then - func_error "AGE \`$age' is greater than the current interface number \`$current'" - func_fatal_error "\`$vinfo' is not valid version information" - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - func_arith $current + 1 - minor_current=$func_arith_result - xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current" - ;; - - irix | nonstopux) - if test "X$lt_irix_increment" = "Xno"; then - func_arith $current - $age - else - func_arith $current - $age + 1 - fi - major=$func_arith_result - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - func_arith $revision - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) # correct to gnu/linux during the next big refactor - func_arith $current - $age - major=.$func_arith_result - versuffix="$major.$age.$revision" - ;; - - osf) - func_arith $current - $age - major=.$func_arith_result - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - func_arith $current - $loop - iface=$func_arith_result - func_arith $loop - 1 - loop=$func_arith_result - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - func_append verstring ":${current}.0" - ;; - - qnx) - major=".$current" - versuffix=".$current" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - func_arith $current - $age - major=$func_arith_result - versuffix="-$major" - ;; - - *) - func_fatal_configuration "unknown library version type \`$version_type'" - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - func_warning "undefined symbols not allowed in $host shared libraries" - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - - fi - - func_generate_dlsyms "$libname" "$libname" "yes" - func_append libobjs " $symfileobj" - test "X$libobjs" = "X " && libobjs= - - if test "$opt_mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$ECHO "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext | *.gcno) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - func_append removelist " $p" - ;; - *) ;; - esac - done - test -n "$removelist" && \ - func_show_eval "${RM}r \$removelist" - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - func_append oldlibs " $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - #for path in $notinst_path; do - # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` - # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` - # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` - #done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - func_replace_sysroot "$libdir" - func_append temp_xrpath " -R$func_replace_sysroot_result" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) func_append dlfiles " $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) func_append dlprefiles " $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - func_append deplibs " System.ltframework" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - func_append deplibs " -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $opt_dry_run || $RM conftest.c - cat > conftest.c </dev/null` - $nocaseglob - else - potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` - fi - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null | - $GREP " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | - $SED -e 10q | - $EGREP "$file_magic_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for file magic test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a file magic. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method; shift - match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - for a_deplib in $deplibs; do - case $a_deplib in - -l*) - func_stripname -l '' "$a_deplib" - name=$func_stripname_result - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - func_append newdeplibs " $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval "\\$ECHO \"$libname_spec\""` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ - $EGREP "$match_pattern_regex" > /dev/null; then - func_append newdeplibs " $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - echo - $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - echo "*** I have the capability to make that library automatically link in when" - echo "*** you link to this library. But I can only do this if you have a" - echo "*** shared version of the library, which you do not appear to have" - echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $ECHO "*** with $libname and none of the candidates passed a file format test" - $ECHO "*** using a regex pattern. Last file checked: $potlib" - fi - fi - ;; - *) - # Add a -L argument. - func_append newdeplibs " $a_deplib" - ;; - esac - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` - done - fi - case $tmp_deplibs in - *[!\ \ ]*) - echo - if test "X$deplibs_check_method" = "Xnone"; then - echo "*** Warning: inter-library dependencies are not supported in this platform." - else - echo "*** Warning: inter-library dependencies are not known to be supported." - fi - echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - ;; - esac - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - echo - echo "*** Warning: libtool could not satisfy all declared inter-library" - $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - echo "*** a static module, that should work as long as the dlopening" - echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - echo - echo "*** However, this would only work if libtool was able to extract symbol" - echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - echo "*** not find such a program. So, this module is probably useless." - echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - echo "*** The inter-library dependencies that have been dropped here will be" - echo "*** automatically added whenever a program is linked with this library" - echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - echo - echo "*** Since this library must not contain undefined symbols," - echo "*** because either the platform does not support them or" - echo "*** it was explicitly requested with -no-undefined," - echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - case $host in - *-*-darwin*) - newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - deplibs="$new_libs" - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # 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= - dep_rpath= - rpath="$finalize_rpath" - test "$opt_mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - func_replace_sysroot "$libdir" - libdir=$func_replace_sysroot_result - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append dep_rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - shift - realname="$1" - shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - func_append linknames " $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` - test "X$libobjs" = "X " && libobjs= - - delfiles= - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" - export_symbols="$output_objdir/$libname.uexp" - func_append delfiles " $export_symbols" - fi - - orig_export_symbols= - case $host_os in - cygwin* | mingw* | cegcc*) - if test -n "$export_symbols" && test -z "$export_symbols_regex"; then - # exporting using user supplied symfile - if test "x`$SED 1q $export_symbols`" != xEXPORTS; then - # and it's NOT already a .def file. Must figure out - # which of the given symbols are data symbols and tag - # them as such. So, trigger use of export_symbols_cmds. - # export_symbols gets reassigned inside the "prepare - # the list of exported symbols" if statement, so the - # include_expsyms logic still works. - orig_export_symbols="$export_symbols" - export_symbols= - always_export_symbols=yes - fi - fi - ;; - esac - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd1 in $cmds; do - IFS="$save_ifs" - # Take the normal branch if the nm_file_list_spec branch - # doesn't work or if tool conversion is not needed. - case $nm_file_list_spec~$to_tool_file_cmd in - *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) - try_normal_branch=yes - eval cmd=\"$cmd1\" - func_len " $cmd" - len=$func_len_result - ;; - *) - try_normal_branch=no - ;; - esac - if test "$try_normal_branch" = yes \ - && { test "$len" -lt "$max_cmd_len" \ - || test "$max_cmd_len" -le -1; } - then - func_show_eval "$cmd" 'exit $?' - skipped_export=false - elif test -n "$nm_file_list_spec"; then - func_basename "$output" - output_la=$func_basename_result - save_libobjs=$libobjs - save_output=$output - output=${output_objdir}/${output_la}.nm - func_to_tool_file "$output" - libobjs=$nm_file_list_spec$func_to_tool_file_result - func_append delfiles " $output" - func_verbose "creating $NM input file list: $output" - for obj in $save_libobjs; do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > "$output" - eval cmd=\"$cmd1\" - func_show_eval "$cmd" 'exit $?' - output=$save_output - libobjs=$save_libobjs - skipped_export=false - else - # The command line is too long to execute in one step. - func_verbose "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - func_append tmp_deplibs " $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec" && - test "$compiler_needs_object" = yes && - test -z "$libobjs"; then - # extract the archives, so we have objects to list. - # TODO: could optimize this to just extract one archive. - whole_archive_flag_spec= - fi - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - else - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - func_append linker_flags " $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - func_len " $test_cmds" && - len=$func_len_result && - test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise - # or, if using GNU ld and skipped_export is not :, use a linker - # script. - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - func_basename "$output" - output_la=$func_basename_result - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - last_robj= - k=1 - - if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then - output=${output_objdir}/${output_la}.lnkscript - func_verbose "creating GNU ld script: $output" - echo 'INPUT (' > $output - for obj in $save_libobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - echo ')' >> $output - func_append delfiles " $output" - func_to_tool_file "$output" - output=$func_to_tool_file_result - elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then - output=${output_objdir}/${output_la}.lnk - func_verbose "creating linker input file list: $output" - : > $output - set x $save_libobjs - shift - firstobj= - if test "$compiler_needs_object" = yes; then - firstobj="$1 " - shift - fi - for obj - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" >> $output - done - func_append delfiles " $output" - func_to_tool_file "$output" - output=$firstobj\"$file_list_spec$func_to_tool_file_result\" - else - if test -n "$save_libobjs"; then - func_verbose "creating reloadable object files..." - output=$output_objdir/$output_la-${k}.$objext - eval test_cmds=\"$reload_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - if test "X$objlist" = X || - test "$len" -lt "$max_cmd_len"; then - func_append objlist " $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - reload_objs=$objlist - eval concat_cmds=\"$reload_cmds\" - else - # All subsequent reloadable object files will link in - # the last one created. - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - func_arith $k + 1 - k=$func_arith_result - output=$output_objdir/$output_la-${k}.$objext - objlist=" $obj" - func_len " $last_robj" - func_arith $len0 + $func_len_result - len=$func_arith_result - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - reload_objs="$objlist $last_robj" - eval concat_cmds=\"\${concat_cmds}$reload_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" - fi - func_append delfiles " $output" - - else - output= - fi - - if ${skipped_export-false}; then - func_verbose "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $opt_dry_run || $RM $export_symbols - libobjs=$output - # Append the command to create the export file. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" - if test -n "$last_robj"; then - eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" - fi - fi - - test -n "$save_libobjs" && - func_verbose "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - if test -n "$export_symbols_regex" && ${skipped_export-false}; then - func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - func_show_eval '$MV "${export_symbols}T" "$export_symbols"' - fi - fi - - if ${skipped_export-false}; then - if test -n "$export_symbols" && test -n "$include_expsyms"; then - tmp_export_symbols="$export_symbols" - test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' - fi - - if test -n "$orig_export_symbols"; then - # The given exports_symbols file has to be filtered, so filter it. - func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" - # FIXME: $output_objdir/$libname.filter potentially contains lots of - # 's' commands which not all seds can handle. GNU sed should be fine - # though. Also, the filter scales superlinearly with the number of - # global variables. join(1) would be nice here, but unfortunately - # isn't a blessed tool. - $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - func_append delfiles " $export_symbols $output_objdir/$libname.filter" - export_symbols=$output_objdir/$libname.def - $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols - fi - fi - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - test "X$libobjs" = "X " && libobjs= - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - fi - - if test -n "$delfiles"; then - # Append the command to remove temporary files to $cmds. - eval cmds=\"\$cmds~\$RM $delfiles\" - fi - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append libobjs " $func_extract_archives_result" - test "X$libobjs" = "X " && libobjs= - fi - - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $opt_silent || { - func_quote_for_expand "$cmd" - eval "func_echo $func_quote_for_expand_result" - } - $opt_dry_run || eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - ( cd "$output_objdir" && \ - $RM "${realname}T" && \ - $MV "${realname}U" "$realname" ) - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$opt_mode" = relink; then - $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - func_show_eval '${RM}r "$gentop"' - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - func_warning "\`-dlopen' is ignored for objects" - fi - - case " $deplibs" in - *\ -l* | *\ -L*) - func_warning "\`-l' and \`-L' are ignored for objects" ;; - esac - - test -n "$rpath" && \ - func_warning "\`-rpath' is ignored for objects" - - test -n "$xrpath" && \ - func_warning "\`-R' is ignored for objects" - - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for objects" - - test -n "$release" && \ - func_warning "\`-release' is ignored for objects" - - case $output in - *.lo) - test -n "$objs$old_deplibs" && \ - func_fatal_error "cannot build library object \`$output' from non-libtool objects" - - libobj=$output - func_lo2o "$libobj" - obj=$func_lo2o_result - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $opt_dry_run || $RM $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - func_append generated " $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # If we're not building shared, we need to use non_pic_objs - test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - func_execute_cmds "$reload_cmds" 'exit $?' - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - func_execute_cmds "$reload_cmds" 'exit $?' - fi - - if test -n "$gentop"; then - func_show_eval '${RM}r "$gentop"' - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) func_stripname '' '.exe' "$output" - output=$func_stripname_result.exe;; - esac - test -n "$vinfo" && \ - func_warning "\`-version-info' is ignored for programs" - - test -n "$release" && \ - func_warning "\`-release' is ignored for programs" - - test "$preload" = yes \ - && test "$dlopen_support" = unknown \ - && test "$dlopen_self" = unknown \ - && test "$dlopen_self_static" = unknown && \ - func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` - ;; - esac - - case $host in - *-*-darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - # But is supposedly fixed on 10.4 or later (yay!). - if test "$tagname" = CXX ; then - case ${MACOSX_DEPLOYMENT_TARGET-10.0} in - 10.[0123]) - func_append compile_command " ${wl}-bind_at_load" - func_append finalize_command " ${wl}-bind_at_load" - ;; - esac - fi - # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - func_append new_libs " -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) func_append new_libs " $deplib" ;; - esac - ;; - *) func_append new_libs " $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - func_append compile_command " $compile_deplibs" - func_append finalize_command " $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) func_append finalize_rpath " $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) func_append perm_rpath " $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - ::) dllsearchpath=$libdir;; - *) func_append dllsearchpath ":$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - ::) dllsearchpath=$testbindir;; - *) func_append dllsearchpath ":$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - func_append rpath " $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) func_append finalize_perm_rpath " $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` - fi - - func_generate_dlsyms "$outputname" "@PROGRAM@" "no" - - # template prelinking step - if test -n "$prelink_cmds"; then - func_execute_cmds "$prelink_cmds" 'exit $?' - fi - - wrappers_required=yes - case $host in - *cegcc* | *mingw32ce*) - # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. - wrappers_required=no - ;; - *cygwin* | *mingw* ) - if test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - *) - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - wrappers_required=no - fi - ;; - esac - if test "$wrappers_required" = no; then - # Replace the output file specification. - compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - exit_status=0 - func_show_eval "$link_command" 'exit_status=$?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Delete the generated files. - if test -f "$output_objdir/${outputname}S.${objext}"; then - func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' - fi - - exit $exit_status - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - func_append rpath "$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - func_append rpath "$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $opt_dry_run || $RM $output - # Link the executable and exit - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - func_warning "this platform does not like uninstalled shared libraries" - func_warning "\`$output' will be relinked during installation" - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname - - func_show_eval "$link_command" 'exit $?' - - if test -n "$postlink_cmds"; then - func_to_tool_file "$output_objdir/$outputname" - postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` - func_execute_cmds "$postlink_cmds" 'exit $?' - fi - - # Now create the wrapper script. - func_verbose "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - fi - - # Only actually do things if not in dry run mode. - $opt_dry_run || { - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) func_stripname '' '.exe' "$output" - output=$func_stripname_result ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - func_stripname '' '.exe' "$outputname" - outputname=$func_stripname_result ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - func_dirname_and_basename "$output" "" "." - output_name=$func_basename_result - output_path=$func_dirname_result - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $RM $cwrappersource $cwrapper - trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - func_emit_cwrapperexe_src > $cwrappersource - - # The wrapper executable is built using the $host compiler, - # because it contains $host paths and files. If cross- - # compiling, it, like the target executable, must be - # executed on the $host or under an emulation environment. - $opt_dry_run || { - $LTCC $LTCFLAGS -o $cwrapper $cwrappersource - $STRIP $cwrapper - } - - # Now, create the wrapper script for func_source use: - func_ltwrapper_scriptname $cwrapper - $RM $func_ltwrapper_scriptname_result - trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 - $opt_dry_run || { - # note: this script will not be executed, so do not chmod. - if test "x$build" = "x$host" ; then - $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result - else - func_emit_wrapper no > $func_ltwrapper_scriptname_result - fi - } - ;; - * ) - $RM $output - trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 - - func_emit_wrapper no > $output - chmod +x $output - ;; - esac - } - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save $symfileobj" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - if test "$preload" = yes && test -f "$symfileobj"; then - func_append oldobjs " $symfileobj" - fi - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $addlibs - func_append oldobjs " $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - - # Add any objects from preloaded convenience libraries - if test -n "$dlprefiles"; then - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - - func_extract_archives $gentop $dlprefiles - func_append oldobjs " $func_extract_archives_result" - fi - - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - func_basename "$obj" - $ECHO "$func_basename_result" - done | sort | sort -uc >/dev/null 2>&1); then - : - else - echo "copying selected object files to avoid basename conflicts..." - gentop="$output_objdir/${outputname}x" - func_append generated " $gentop" - func_mkdir_p "$gentop" - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - func_basename "$obj" - objbase="$func_basename_result" - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - func_arith $counter + 1 - counter=$func_arith_result - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - func_append oldobjs " $gentop/$newobj" - ;; - *) func_append oldobjs " $obj" ;; - 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" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - elif test -n "$archiver_list_spec"; then - func_verbose "using command file archive linking..." - for obj in $oldobjs - do - func_to_tool_file "$obj" - $ECHO "$func_to_tool_file_result" - done > $output_objdir/$libname.libcmd - func_to_tool_file "$output_objdir/$libname.libcmd" - oldobjs=" $archiver_list_spec$func_to_tool_file_result" - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - func_verbose "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - oldobjs= - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - eval test_cmds=\"$old_archive_cmds\" - func_len " $test_cmds" - len0=$func_len_result - len=$len0 - for obj in $save_oldobjs - do - func_len " $obj" - func_arith $len + $func_len_result - len=$func_arith_result - func_append objlist " $obj" - if test "$len" -lt "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - len=$len0 - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - func_execute_cmds "$cmds" 'exit $?' - done - - test -n "$generated" && \ - func_show_eval "${RM}r$generated" - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - func_verbose "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - func_quote_for_eval "$var_value" - relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - # Only create the output if not a dry run. - $opt_dry_run || { - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - func_basename "$deplib" - name="$func_basename_result" - 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" - ;; - -L*) - func_stripname -L '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -L$func_replace_sysroot_result" - ;; - -R*) - func_stripname -R '' "$deplib" - func_replace_sysroot "$func_stripname_result" - func_append newdependency_libs " -R$func_replace_sysroot_result" - ;; - *) func_append newdependency_libs " $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - - for lib in $dlfiles; do - case $lib in - *.la) - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" - ;; - *) func_append newdlfiles " $lib" ;; - esac - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - *.la) - # Only pass preopened files to the pseudo-archive (for - # eventual linking with the app. that links it) if we - # didn't already link the preopened objects directly into - # the library: - func_basename "$lib" - name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - test -z "$libdir" && \ - func_fatal_error "\`$lib' is not a valid libtool archive" - func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" - ;; - esac - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlfiles " $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - func_append newdlprefiles " $abs" - done - dlprefiles="$newdlprefiles" - fi - $RM $output - # place dlname in correct position for cygwin - # In fact, it would be nice if we could use this code for all target - # systems that can't hard-code library paths into their executables - # and that have no shared library path variable independent of PATH, - # but it turns out we can't easily determine that from inspecting - # libtool variables, so we have to hard-code the OSs to which it - # applies here; at the moment, that means platforms that use the PE - # object format with DLL files. See the long comment at the top of - # tests/bindir.at for full details. - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) - # If a -bindir argument was supplied, place the dll there. - if test "x$bindir" != x ; - then - func_relative_path "$install_libdir" "$bindir" - tdlname=$func_relative_path_result$dlname - else - # Otherwise fall back on heuristic. - tdlname=../bin/$dlname - fi - ;; - esac - $ECHO > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Linker flags that can not go in dependency_libs. -inherited_linker_flags='$new_inherited_linker_flags' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Names of additional weak libraries provided by this library -weak_library_names='$weak_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $ECHO >> $output "\ -relink_command=\"$relink_command\"" - fi - done - } - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' - ;; - esac - exit $EXIT_SUCCESS -} - -{ test "$opt_mode" = link || test "$opt_mode" = relink; } && - func_mode_link ${1+"$@"} - - -# func_mode_uninstall arg... -func_mode_uninstall () -{ - $opt_debug - RM="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) func_append RM " $arg"; rmforce=yes ;; - -*) func_append RM " $arg" ;; - *) func_append files " $arg" ;; - esac - done - - test -z "$RM" && \ - func_fatal_help "you must specify an RM program" - - rmdirs= - - for file in $files; do - func_dirname "$file" "" "." - dir="$func_dirname_result" - if test "X$dir" = X.; then - odir="$objdir" - else - odir="$dir/$objdir" - fi - func_basename "$file" - name="$func_basename_result" - test "$opt_mode" = uninstall && odir="$dir" - - # Remember odir for removal later, being careful to avoid duplicates - if test "$opt_mode" = clean; then - case " $rmdirs " in - *" $odir "*) ;; - *) func_append rmdirs " $odir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if { test -L "$file"; } >/dev/null 2>&1 || - { test -h "$file"; } >/dev/null 2>&1 || - test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if func_lalib_p "$file"; then - func_source $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - func_append rmfiles " $odir/$n" - done - test -n "$old_library" && func_append rmfiles " $odir/$old_library" - - case "$opt_mode" in - clean) - case " $library_names " in - *" $dlname "*) ;; - *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; - esac - test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if func_lalib_p "$file"; then - - # Read the .lo file - func_source $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" && - test "$pic_object" != none; then - func_append rmfiles " $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" && - test "$non_pic_object" != none; then - func_append rmfiles " $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$opt_mode" = clean ; then - noexename=$name - case $file in - *.exe) - func_stripname '' '.exe' "$file" - file=$func_stripname_result - func_stripname '' '.exe' "$name" - noexename=$func_stripname_result - # $file with .exe has already been added to rmfiles, - # add $file without .exe - func_append rmfiles " $file" - ;; - esac - # Do a test to see if this is a libtool program. - if func_ltwrapper_p "$file"; then - if func_ltwrapper_executable_p "$file"; then - func_ltwrapper_scriptname "$file" - relink_command= - func_source $func_ltwrapper_scriptname_result - func_append rmfiles " $func_ltwrapper_scriptname_result" - else - relink_command= - func_source $dir/$noexename - fi - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - func_append rmfiles " $odir/$name $odir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - func_append rmfiles " $odir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - func_append rmfiles " $odir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - func_show_eval "$RM $rmfiles" 'exit_status=1' - done - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - func_show_eval "rmdir $dir >/dev/null 2>&1" - fi - done - - exit $exit_status -} - -{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && - func_mode_uninstall ${1+"$@"} - -test -z "$opt_mode" && { - help="$generic_help" - func_fatal_help "you must specify a MODE" -} - -test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$opt_mode'" - -if test -n "$exec_cmd"; then - eval exec "$exec_cmd" - exit $EXIT_FAILURE -fi - -exit $exit_status - - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: -# vi:sw=2 - diff --git a/build/ac-aux/missing b/build/ac-aux/missing deleted file mode 100755 index cdea514..0000000 --- a/build/ac-aux/missing +++ /dev/null @@ -1,215 +0,0 @@ -#! /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/ac-aux/snippet/_Noreturn.h b/build/ac-aux/snippet/_Noreturn.h deleted file mode 100644 index c44ad89..0000000 --- a/build/ac-aux/snippet/_Noreturn.h +++ /dev/null @@ -1,10 +0,0 @@ -#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/ac-aux/snippet/arg-nonnull.h b/build/ac-aux/snippet/arg-nonnull.h deleted file mode 100644 index 3a9dd26..0000000 --- a/build/ac-aux/snippet/arg-nonnull.h +++ /dev/null @@ -1,26 +0,0 @@ -/* A C macro for declaring that specific arguments must not be NULL. - 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 . */ - -/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools - that the values passed as arguments n, ..., m must be non-NULL pointers. - n = 1 stands for the first argument, n = 2 for the second argument etc. */ -#ifndef _GL_ARG_NONNULL -# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3 -# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params)) -# else -# define _GL_ARG_NONNULL(params) -# endif -#endif diff --git a/build/ac-aux/snippet/c++defs.h b/build/ac-aux/snippet/c++defs.h deleted file mode 100644 index 96da94b..0000000 --- a/build/ac-aux/snippet/c++defs.h +++ /dev/null @@ -1,271 +0,0 @@ -/* C++ compatible function declaration macros. - 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 the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef _GL_CXXDEFS_H -#define _GL_CXXDEFS_H - -/* The three most frequent use cases of these macros are: - - * For providing a substitute for a function that is missing on some - platforms, but is declared and works fine on the platforms on which - it exists: - - #if @GNULIB_FOO@ - # if !@HAVE_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on all platforms, - but is broken/insufficient and needs to be replaced on some platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif - - * For providing a replacement for a function that exists on some platforms - but is broken/insufficient and needs to be replaced on some of them and - is additionally either missing or undeclared on some other platforms: - - #if @GNULIB_FOO@ - # if @REPLACE_FOO@ - # if !(defined __cplusplus && defined GNULIB_NAMESPACE) - # undef foo - # define foo rpl_foo - # endif - _GL_FUNCDECL_RPL (foo, ...); - _GL_CXXALIAS_RPL (foo, ...); - # else - # if !@HAVE_FOO@ or if !@HAVE_DECL_FOO@ - _GL_FUNCDECL_SYS (foo, ...); - # endif - _GL_CXXALIAS_SYS (foo, ...); - # endif - _GL_CXXALIASWARN (foo); - #elif defined GNULIB_POSIXCHECK - ... - #endif -*/ - -/* _GL_EXTERN_C declaration; - performs the declaration with C linkage. */ -#if defined __cplusplus -# define _GL_EXTERN_C extern "C" -#else -# define _GL_EXTERN_C extern -#endif - -/* _GL_FUNCDECL_RPL (func, rettype, parameters_and_attributes); - declares a replacement function, named rpl_func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_RPL(func,rettype,parameters_and_attributes) \ - _GL_FUNCDECL_RPL_1 (rpl_##func, rettype, parameters_and_attributes) -#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype rpl_func parameters_and_attributes - -/* _GL_FUNCDECL_SYS (func, rettype, parameters_and_attributes); - declares the system function, named func, with the given prototype, - consisting of return type, parameters, and attributes. - Example: - _GL_FUNCDECL_SYS (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); - */ -#define _GL_FUNCDECL_SYS(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C rettype func parameters_and_attributes - -/* _GL_CXXALIAS_RPL (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to rpl_func, if GNULIB_NAMESPACE is defined. - Example: - _GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); - */ -#define _GL_CXXALIAS_RPL(func,rettype,parameters) \ - _GL_CXXALIAS_RPL_1 (func, rpl_##func, rettype, parameters) -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - rettype (*const func) parameters = ::rpl_func; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_RPL_CAST_1 (func, rpl_func, rettype, parameters); - is like _GL_CXXALIAS_RPL_1 (func, rpl_func, rettype, parameters); - except that the C function rpl_func may have a slightly different - declaration. A cast is used to silence the "invalid conversion" error - that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - rettype (*const func) parameters = \ - reinterpret_cast(::rpl_func); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_RPL_CAST_1(func,rpl_func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS (func, rettype, parameters); - declares a C++ alias called GNULIB_NAMESPACE::func - that redirects to the system provided function func, if GNULIB_NAMESPACE - is defined. - Example: - _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); - */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* If we were to write - rettype (*const func) parameters = ::func; - like above in _GL_CXXALIAS_RPL_1, the compiler could optimize calls - better (remove an indirection through a 'static' pointer variable), - but then the _GL_CXXALIASWARN macro below would cause a warning not only - for uses of ::func but also for uses of GNULIB_NAMESPACE::func. */ -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = ::func; \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST (func, rettype, parameters); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function func may have a slightly different declaration. - A cast is used to silence the "invalid conversion" error that would - otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = \ - reinterpret_cast(::func); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST(func,rettype,parameters) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIAS_SYS_CAST2 (func, rettype, parameters, rettype2, parameters2); - is like _GL_CXXALIAS_SYS (func, rettype, parameters); - except that the C function is picked among a set of overloaded functions, - namely the one with rettype2 and parameters2. Two consecutive casts - are used to silence the "cannot find a match" and "invalid conversion" - errors that would otherwise occur. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE - /* The outer cast must be a reinterpret_cast. - The inner cast: When the function is defined as a set of overloaded - functions, it works as a static_cast<>, choosing the designated variant. - When the function is defined as a single variant, it works as a - reinterpret_cast<>. The parenthesized cast syntax works both ways. */ -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - namespace GNULIB_NAMESPACE \ - { \ - static rettype (*func) parameters = \ - reinterpret_cast( \ - (rettype2(*)parameters2)(::func)); \ - } \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#else -# define _GL_CXXALIAS_SYS_CAST2(func,rettype,parameters,rettype2,parameters2) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN (func); - causes a warning to be emitted when ::func is used but not when - GNULIB_NAMESPACE::func is used. func must be defined without overloaded - variants. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN(func) \ - _GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN_1(func,namespace) \ - _GL_CXXALIASWARN_2 (func, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_WARN_ON_USE (func, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN_2(func,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN_2(func,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN(func) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -/* _GL_CXXALIASWARN1 (func, rettype, parameters_and_attributes); - causes a warning to be emitted when the given overloaded variant of ::func - is used but not when GNULIB_NAMESPACE::func is used. */ -#if defined __cplusplus && defined GNULIB_NAMESPACE -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_CXXALIASWARN1_1 (func, rettype, parameters_and_attributes, \ - GNULIB_NAMESPACE) -# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \ - _GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace) -/* To work around GCC bug , - we enable the warning only when not optimizing. */ -# if !__OPTIMIZE__ -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_WARN_ON_USE_CXX (func, rettype, parameters_and_attributes, \ - "The symbol ::" #func " refers to the system function. " \ - "Use " #namespace "::" #func " instead.") -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - extern __typeof__ (func) func -# else -# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -# endif -#else -# define _GL_CXXALIASWARN1(func,rettype,parameters_and_attributes) \ - _GL_EXTERN_C int _gl_cxxalias_dummy -#endif - -#endif /* _GL_CXXDEFS_H */ diff --git a/build/ac-aux/snippet/unused-parameter.h b/build/ac-aux/snippet/unused-parameter.h deleted file mode 100644 index 1c8d61f..0000000 --- a/build/ac-aux/snippet/unused-parameter.h +++ /dev/null @@ -1,36 +0,0 @@ -/* A C macro for declaring that specific function parameters are not used. - 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 . */ - -/* _GL_UNUSED_PARAMETER is a marker that can be appended to function parameter - declarations for parameters that are not used. This helps to reduce - warnings, such as from GCC -Wunused-parameter. The syntax is as follows: - type param _GL_UNUSED_PARAMETER - or more generally - param_decl _GL_UNUSED_PARAMETER - For example: - int param _GL_UNUSED_PARAMETER - int *(*param)(void) _GL_UNUSED_PARAMETER - Other possible, but obscure and discouraged syntaxes: - int _GL_UNUSED_PARAMETER *(*param)(void) - _GL_UNUSED_PARAMETER int *(*param)(void) - */ -#ifndef _GL_UNUSED_PARAMETER -# if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED_PARAMETER __attribute__ ((__unused__)) -# else -# define _GL_UNUSED_PARAMETER -# endif -#endif diff --git a/build/ac-aux/snippet/warn-on-use.h b/build/ac-aux/snippet/warn-on-use.h deleted file mode 100644 index d4cb94f..0000000 --- a/build/ac-aux/snippet/warn-on-use.h +++ /dev/null @@ -1,109 +0,0 @@ -/* A C macro for emitting warnings if a function is used. - 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 the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* _GL_WARN_ON_USE (function, "literal string") issues a declaration - for FUNCTION which will then trigger a compiler warning containing - the text of "literal string" anywhere that function is called, if - supported by the compiler. If the compiler does not support this - feature, the macro expands to an unused extern declaration. - - This macro is useful for marking a function as a potential - portability trap, with the intent that "literal string" include - instructions on the replacement function that should be used - instead. However, one of the reasons that a function is a - portability trap is if it has the wrong signature. Declaring - FUNCTION with a different signature in C is a compilation error, so - this macro must use the same type as any existing declaration so - that programs that avoid the problematic FUNCTION do not fail to - compile merely because they included a header that poisoned the - function. But this implies that _GL_WARN_ON_USE is only safe to - use if FUNCTION is known to already have a declaration. Use of - this macro implies that there must not be any other macro hiding - the declaration of FUNCTION; but undefining FUNCTION first is part - of the poisoning process anyway (although for symbols that are - provided only via a macro, the result is a compilation error rather - than a warning containing "literal string"). Also note that in - C++, it is only safe to use if FUNCTION has no overloads. - - For an example, it is possible to poison 'getline' by: - - adding a call to gl_WARN_ON_USE_PREPARE([[#include ]], - [getline]) in configure.ac, which potentially defines - HAVE_RAW_DECL_GETLINE - - adding this code to a header that wraps the system : - #undef getline - #if HAVE_RAW_DECL_GETLINE - _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but" - "not universally present; use the gnulib module getline"); - #endif - - It is not possible to directly poison global variables. But it is - possible to write a wrapper accessor function, and poison that - (less common usage, like &environ, will cause a compilation error - rather than issue the nice warning, but the end result of informing - the developer about their portability problem is still achieved): - #if HAVE_RAW_DECL_ENVIRON - static inline char ***rpl_environ (void) { return &environ; } - _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared"); - # undef environ - # define environ (*rpl_environ ()) - #endif - */ -#ifndef _GL_WARN_ON_USE - -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -/* A compiler attribute is available in gcc versions 4.3.0 and later. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function __attribute__ ((__warning__ (message))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE(function, message) \ -extern __typeof__ (function) function -# else /* Unsupported. */ -# define _GL_WARN_ON_USE(function, message) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_ON_USE_CXX (function, rettype, parameters_and_attributes, "string") - is like _GL_WARN_ON_USE (function, "string"), except that the function is - declared with the given prototype, consisting of return type, parameters, - and attributes. - This variant is useful for overloaded functions in C++. _GL_WARN_ON_USE does - not work in this case. */ -#ifndef _GL_WARN_ON_USE_CXX -# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes \ - __attribute__ ((__warning__ (msg))) -# elif __GNUC__ >= 3 && GNULIB_STRICT_CHECKING -/* Verify the existence of the function. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -extern rettype function parameters_and_attributes -# else /* Unsupported. */ -# define _GL_WARN_ON_USE_CXX(function,rettype,parameters_and_attributes,msg) \ -_GL_WARN_EXTERN_C int _gl_warn_on_use -# endif -#endif - -/* _GL_WARN_EXTERN_C declaration; - performs the declaration with C linkage. */ -#ifndef _GL_WARN_EXTERN_C -# if defined __cplusplus -# define _GL_WARN_EXTERN_C extern "C" -# else -# define _GL_WARN_EXTERN_C extern -# endif -#endif diff --git a/build/ac-aux/test-driver b/build/ac-aux/test-driver deleted file mode 100755 index 32bf39e..0000000 --- a/build/ac-aux/test-driver +++ /dev/null @@ -1,127 +0,0 @@ -#! /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 deleted file mode 100755 index 1c4d776..0000000 --- a/build/ac-aux/ylwrap +++ /dev/null @@ -1,249 +0,0 @@ -#! /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/config.h.in b/config.h.in deleted file mode 100644 index 6e64abf..0000000 --- a/config.h.in +++ /dev/null @@ -1,1584 +0,0 @@ -/* 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 - -/* Define to the number of bits in type 'sig_atomic_t'. */ -#undef BITSIZEOF_SIG_ATOMIC_T - -/* Define to the number of bits in type 'size_t'. */ -#undef BITSIZEOF_SIZE_T - -/* Define to the number of bits in type 'wchar_t'. */ -#undef BITSIZEOF_WCHAR_T - -/* Define to the number of bits in type 'wint_t'. */ -#undef BITSIZEOF_WINT_T - -/* 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. - */ -#undef CRAY_STACKSEG_END - -/* 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 - -/* Define to 1 if realpath() can malloc memory, always gives an absolute path, - 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 - -/* Define to 1 when the gnulib module canonicalize_file_name should be tested. - */ -#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 - -/* Define to 1 when the gnulib module getline should be tested. */ -#undef GNULIB_TEST_GETLINE - -/* Define to 1 when the gnulib module getopt-gnu should be tested. */ -#undef GNULIB_TEST_GETOPT_GNU - -/* 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 - -/* Define to 1 when the gnulib module malloc-posix should be tested. */ -#undef GNULIB_TEST_MALLOC_POSIX - -/* Define to 1 when the gnulib module mbrtowc should be tested. */ -#undef GNULIB_TEST_MBRTOWC - -/* Define to 1 when the gnulib module mbsinit should be tested. */ -#undef GNULIB_TEST_MBSINIT - -/* Define to 1 when the gnulib module mbsrtowcs should be tested. */ -#undef GNULIB_TEST_MBSRTOWCS - -/* Define to 1 when the gnulib module mbtowc should be tested. */ -#undef GNULIB_TEST_MBTOWC - -/* Define to 1 when the gnulib module memchr should be tested. */ -#undef GNULIB_TEST_MEMCHR - -/* 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 - -/* Define to 1 when the gnulib module open should be tested. */ -#undef GNULIB_TEST_OPEN - -/* 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 - -/* Define to 1 when the gnulib module realloc-posix should be tested. */ -#undef GNULIB_TEST_REALLOC_POSIX - -/* Define to 1 when the gnulib module realpath should be tested. */ -#undef GNULIB_TEST_REALPATH - -/* Define to 1 when the gnulib module setenv should be tested. */ -#undef GNULIB_TEST_SETENV - -/* Define to 1 when the gnulib module setlocale should be tested. */ -#undef GNULIB_TEST_SETLOCALE - -/* Define to 1 when the gnulib module stat should be tested. */ -#undef GNULIB_TEST_STAT - -/* Define to 1 when the gnulib module stpcpy should be tested. */ -#undef GNULIB_TEST_STPCPY - -/* 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 - -/* Define to 1 when the gnulib module strnlen should be tested. */ -#undef GNULIB_TEST_STRNLEN - -/* Define to 1 when the gnulib module strstr should be tested. */ -#undef GNULIB_TEST_STRSTR - -/* Define to 1 when the gnulib module symlink should be tested. */ -#undef GNULIB_TEST_SYMLINK - -/* Define to 1 when the gnulib module unsetenv should be tested. */ -#undef GNULIB_TEST_UNSETENV - -/* Define to 1 when the gnulib module vasprintf should be tested. */ -#undef GNULIB_TEST_VASPRINTF - -/* Define to 1 when the gnulib module wcrtomb should be tested. */ -#undef GNULIB_TEST_WCRTOMB - -/* Define to 1 when the gnulib module wctob should be tested. */ -#undef GNULIB_TEST_WCTOB - -/* Define to 1 when the gnulib module wctomb should be tested. */ -#undef GNULIB_TEST_WCTOMB - -/* Define to 1 if you have 'alloca' after including , a header that - may be supplied by this distribution. */ -#undef HAVE_ALLOCA - -/* Define to 1 if you have and it should be used (not on Ultrix). - */ -#undef HAVE_ALLOCA_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARGZ_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_BP_SYM_H - -/* Define to 1 if you have the 'btowc' function. */ -#undef HAVE_BTOWC - -/* Define to 1 if you have the 'canonicalize_file_name' function. */ -#undef HAVE_CANONICALIZE_FILE_NAME - -/* 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 Mac OS X function CFPreferencesCopyAppValue in - the CoreFoundation framework. */ -#undef HAVE_CFPREFERENCESCOPYAPPVALUE - -/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't. - */ -#undef HAVE_DECL_ALARM - -/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you - don't. */ -#undef HAVE_DECL_GETC_UNLOCKED - -/* Define to 1 if you have the declaration of `getdelim', and to 0 if you - don't. */ -#undef HAVE_DECL_GETDELIM - -/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't. - */ -#undef HAVE_DECL_GETENV - -/* Define to 1 if you have the declaration of `getline', and to 0 if you - don't. */ -#undef HAVE_DECL_GETLINE - -/* Define to 1 if you have the declaration of `isblank', and to 0 if you - don't. */ -#undef HAVE_DECL_ISBLANK - -/* Define to 1 if you have the declaration of `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 - -/* Define to 1 if you have the declaration of `stpncpy', and to 0 if you - don't. */ -#undef HAVE_DECL_STPNCPY - -/* Define to 1 if you have the declaration of `strndup', and to 0 if you - don't. */ -#undef HAVE_DECL_STRNDUP - -/* Define to 1 if you have the declaration of `strnlen', and to 0 if you - 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 - -/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you - don't. */ -#undef HAVE_DECL__SNPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the 'dup2' function. */ -#undef HAVE_DUP2 - -/* Define if you have the declaration of environ. */ -#undef HAVE_ENVIRON_DECL - -/* Define to 1 if the system has the type `error_t'. */ -#undef HAVE_ERROR_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_FEATURES_H - -/* Define to 1 if you have the `flockfile' function. */ -#undef HAVE_FLOCKFILE - -/* Define to 1 if you have the `fsync' function. */ -#undef HAVE_FSYNC - -/* Define to 1 if you have the `funlockfile' function. */ -#undef HAVE_FUNLOCKFILE - -/* Define to 1 if you have the 'getcwd' function. */ -#undef HAVE_GETCWD - -/* Define to 1 if you have the 'getdelim' function. */ -#undef HAVE_GETDELIM - -/* Define to 1 if you have the header file. */ -#undef HAVE_GETOPT_H - -/* Define to 1 if you have the `getopt_long_only' function. */ -#undef HAVE_GETOPT_LONG_ONLY - -/* 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 - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define if exists, doesn't clash with , and - declares uintmax_t. */ -#undef HAVE_INTTYPES_H_WITH_UINTMAX - -/* Define to 1 if you have the 'isblank' function. */ -#undef HAVE_ISBLANK - -/* Define to 1 if you have the 'iswcntrl' function. */ -#undef HAVE_ISWCNTRL - -/* Define to 1 if you have the 'iswctype' function. */ -#undef HAVE_ISWCTYPE - -/* Define if you have and nl_langinfo(CODESET). */ -#undef HAVE_LANGINFO_CODESET - -/* Define to 1 if you have the header file. */ -#undef HAVE_LANGINFO_H - -/* Define if your file defines LC_MESSAGES. */ -#undef HAVE_LC_MESSAGES - -/* 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'. */ -#undef HAVE_LONG_LONG_INT - -/* Define to 1 if you have the 'lstat' function. */ -#undef HAVE_LSTAT - -/* Define to 1 if your system has a GNU libc compatible 'malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC_GNU - -/* Define if the 'malloc' function is POSIX compliant. */ -#undef HAVE_MALLOC_POSIX - -/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and . */ -#undef HAVE_MAP_ANONYMOUS - -/* Define to 1 if you have the `mbrtowc' function. */ -#undef HAVE_MBRTOWC - -/* Define to 1 if you have the 'mbsinit' function. */ -#undef HAVE_MBSINIT - -/* 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 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 'mkstemp' function. */ -#undef HAVE_MKSTEMP - -/* Define to 1 if you have the 'mprotect' function. */ -#undef HAVE_MPROTECT - -/* 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. */ -#undef HAVE_NL_LANGINFO - -/* Define to 1 if you have the `open_memstream' function. */ -#undef HAVE_OPEN_MEMSTREAM - -/* Define to 1 if you have the header file. */ -#undef HAVE_OS_H - -/* Define to 1 if you have the `pthread_atfork' function. */ -#undef HAVE_PTHREAD_ATFORK - -/* Define if the defines PTHREAD_MUTEX_RECURSIVE. */ -#undef HAVE_PTHREAD_MUTEX_RECURSIVE - -/* 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 - -/* Define to 1 if btowc is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_BTOWC - -/* Define to 1 if canonicalize_file_name is declared even after undefining - 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 - -/* Define to 1 if dup3 is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUP3 - -/* Define to 1 if duplocale is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_DUPLOCALE - -/* Define to 1 if endusershell is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ENDUSERSHELL - -/* Define to 1 if environ is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ENVIRON - -/* Define to 1 if euidaccess is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_EUIDACCESS - -/* Define to 1 if faccessat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FACCESSAT - -/* Define to 1 if fchdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHDIR - -/* Define to 1 if fchmodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHMODAT - -/* Define to 1 if fchownat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FCHOWNAT - -/* 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 - -/* Define to 1 if fsync is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FSYNC - -/* Define to 1 if ftello is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FTELLO - -/* Define to 1 if ftruncate is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FTRUNCATE - -/* Define to 1 if futimens is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_FUTIMENS - -/* Define to 1 if getcwd is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETCWD - -/* Define to 1 if getdelim is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDELIM - -/* Define to 1 if getdomainname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDOMAINNAME - -/* Define to 1 if getdtablesize is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETDTABLESIZE - -/* Define to 1 if getgroups is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETGROUPS - -/* Define to 1 if gethostname is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETHOSTNAME - -/* Define to 1 if getline is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLINE - -/* Define to 1 if getloadavg is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOADAVG - -/* Define to 1 if getlogin is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOGIN - -/* Define to 1 if getlogin_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_GETLOGIN_R - -/* 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 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 - -/* Define to 1 if iswctype is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_ISWCTYPE - -/* Define to 1 if lchmod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LCHMOD - -/* Define to 1 if lchown is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LCHOWN - -/* Define to 1 if link is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LINK - -/* Define to 1 if linkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LINKAT - -/* Define to 1 if lseek is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LSEEK - -/* Define to 1 if lstat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_LSTAT - -/* Define to 1 if mbrlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBRLEN - -/* Define to 1 if mbrtowc is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBRTOWC - -/* Define to 1 if mbsinit is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSINIT - -/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSNRTOWCS - -/* Define to 1 if mbsrtowcs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MBSRTOWCS - -/* Define to 1 if memmem is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMMEM - -/* Define to 1 if mempcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMPCPY - -/* Define to 1 if memrchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MEMRCHR - -/* Define to 1 if mkdirat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKDIRAT - -/* Define to 1 if mkdtemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKDTEMP - -/* Define to 1 if mkfifo is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFO - -/* Define to 1 if mkfifoat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKFIFOAT - -/* Define to 1 if mknod is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNOD - -/* Define to 1 if mknodat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKNODAT - -/* Define to 1 if mkostemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKOSTEMP - -/* Define to 1 if mkostemps is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKOSTEMPS - -/* Define to 1 if mkstemp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKSTEMP - -/* Define to 1 if mkstemps is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_MKSTEMPS - -/* Define to 1 if nl_langinfo is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_NL_LANGINFO - -/* Define to 1 if openat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_OPENAT - -/* Define to 1 if 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 - -/* Define to 1 if pipe2 is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_PIPE2 - -/* 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 - -/* Define to 1 if rawmemchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RAWMEMCHR - -/* Define to 1 if readlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_READLINK - -/* Define to 1 if readlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_READLINKAT - -/* Define to 1 if realpath is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_REALPATH - -/* Define to 1 if renameat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RENAMEAT - -/* Define to 1 if rmdir is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RMDIR - -/* Define to 1 if rpmatch is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_RPMATCH - -/* 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 - -/* Define to 1 if setusershell is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SETUSERSHELL - -/* Define to 1 if sleep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SLEEP - -/* 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 - -/* Define to 1 if stat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STAT - -/* Define to 1 if stpcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STPCPY - -/* Define to 1 if stpncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STPNCPY - -/* Define to 1 if strcasestr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRCASESTR - -/* Define to 1 if strchrnul is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRCHRNUL - -/* Define to 1 if strdup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRDUP - -/* Define to 1 if strerror_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRERROR_R - -/* Define to 1 if strncat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNCAT - -/* Define to 1 if strndup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNDUP - -/* Define to 1 if strnlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRNLEN - -/* Define to 1 if strpbrk is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRPBRK - -/* Define to 1 if strsep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRSEP - -/* Define to 1 if strsignal is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRSIGNAL - -/* 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 - -/* Define to 1 if strtoll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_STRTOLL - -/* 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 - -/* Define to 1 if symlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SYMLINK - -/* Define to 1 if symlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_SYMLINKAT - -/* Define to 1 if tmpfile is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_TMPFILE - -/* Define to 1 if towctrans is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_TOWCTRANS - -/* Define to 1 if ttyname_r is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_TTYNAME_R - -/* Define to 1 if unlink is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLINK - -/* Define to 1 if unlinkat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLINKAT - -/* Define to 1 if unlockpt is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNLOCKPT - -/* Define to 1 if unsetenv is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UNSETENV - -/* Define to 1 if usleep is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_USLEEP - -/* Define to 1 if utimensat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_UTIMENSAT - -/* Define to 1 if vdprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_VDPRINTF - -/* Define to 1 if vsnprintf is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_VSNPRINTF - -/* Define to 1 if waitpid is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WAITPID - -/* Define to 1 if wcpcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCPCPY - -/* Define to 1 if wcpncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCPNCPY - -/* Define to 1 if wcrtomb is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCRTOMB - -/* Define to 1 if wcscasecmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCASECMP - -/* Define to 1 if wcscat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCAT - -/* Define to 1 if wcschr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCHR - -/* Define to 1 if wcscmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCMP - -/* Define to 1 if wcscoll is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCOLL - -/* Define to 1 if wcscpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCPY - -/* Define to 1 if wcscspn is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSCSPN - -/* Define to 1 if wcsdup is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSDUP - -/* Define to 1 if wcslen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSLEN - -/* Define to 1 if wcsncasecmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCASECMP - -/* Define to 1 if wcsncat is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCAT - -/* Define to 1 if wcsncmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCMP - -/* Define to 1 if wcsncpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNCPY - -/* Define to 1 if wcsnlen is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNLEN - -/* Define to 1 if wcsnrtombs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSNRTOMBS - -/* Define to 1 if wcspbrk is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSPBRK - -/* Define to 1 if wcsrchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSRCHR - -/* Define to 1 if wcsrtombs is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSRTOMBS - -/* Define to 1 if wcsspn is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSSPN - -/* Define to 1 if wcsstr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSSTR - -/* Define to 1 if wcstok is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSTOK - -/* Define to 1 if wcswidth is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSWIDTH - -/* Define to 1 if wcsxfrm is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCSXFRM - -/* Define to 1 if wctob is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTOB - -/* Define to 1 if wctrans is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTRANS - -/* Define to 1 if wctype is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCTYPE - -/* Define to 1 if wcwidth is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WCWIDTH - -/* Define to 1 if wmemchr is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCHR - -/* Define to 1 if wmemcmp is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCMP - -/* Define to 1 if wmemcpy is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMCPY - -/* Define to 1 if wmemmove is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMMOVE - -/* Define to 1 if wmemset is declared even after undefining macros. */ -#undef HAVE_RAW_DECL_WMEMSET - -/* Define to 1 if _Exit is declared even after undefining macros. */ -#undef HAVE_RAW_DECL__EXIT - -/* Define to 1 if you have the header file. */ -#undef HAVE_READLINE_READLINE_H - -/* 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. */ -#undef HAVE_REALPATH - -/* Define to 1 if you have the `rl_completion_matches' function. */ -#undef HAVE_RL_COMPLETION_MATCHES - -/* Define to 1 if you have the header file. */ -#undef HAVE_SEARCH_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SELINUX_CONTEXT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SELINUX_SELINUX_H - -/* Define to 1 if you have the 'setenv' function. */ -#undef HAVE_SETENV - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if 'sig_atomic_t' is a signed integer type. */ -#undef HAVE_SIGNED_SIG_ATOMIC_T - -/* Define to 1 if 'wchar_t' is a signed integer type. */ -#undef HAVE_SIGNED_WCHAR_T - -/* 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. */ -#undef HAVE_SNPRINTF - -/* Define if the return value of the snprintf function is the number of of - bytes (excluding the terminating NUL) that would have been produced if the - buffer had been large enough. */ -#undef HAVE_SNPRINTF_RETVAL_C99 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define if exists, doesn't clash with , and declares - uintmax_t. */ -#undef HAVE_STDINT_H_WITH_UINTMAX - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* 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 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* 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 `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. */ -#undef HAVE_SYS_BITYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_MMAN_H - -/* 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 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* 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 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* 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'. */ -#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. */ -#undef HAVE_VASNPRINTF - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define to 1 if you have the header file. */ -#undef HAVE_WCHAR_H - -/* Define if you have the 'wchar_t' type. */ -#undef HAVE_WCHAR_T - -/* Define to 1 if you have the 'wcrtomb' function. */ -#undef HAVE_WCRTOMB - -/* Define to 1 if you have the 'wcscoll' function. */ -#undef HAVE_WCSCOLL - -/* Define to 1 if you have the `wcslen' function. */ -#undef HAVE_WCSLEN - -/* Define to 1 if you have the `wcsnlen' function. */ -#undef HAVE_WCSNLEN - -/* Define to 1 if you have the 'wctob' function. */ -#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. */ -#undef HAVE_WMEMCHR - -/* Define to 1 if you have the 'wmemcpy' function. */ -#undef HAVE_WMEMCPY - -/* 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 */ -#undef HAVE_WORKING_ARGZ - -/* Define to 1 if O_NOATIME works. */ -#undef HAVE_WORKING_O_NOATIME - -/* Define to 1 if O_NOFOLLOW works. */ -#undef HAVE_WORKING_O_NOFOLLOW - -/* Define to 1 if you have the header file. */ -#undef HAVE_XLOCALE_H - -/* Define to 1 if the system has the type `_Bool'. */ -#undef HAVE__BOOL - -/* 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 - -/* Define to the sub-directory in which libtool stores uninstalled libraries. - */ -#undef LT_OBJDIR - -/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */ -#undef MALLOC_0_IS_NONNULL - -/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */ -#undef MAP_ANONYMOUS - -/* Define if the mbrtowc function has the NULL pwc argument bug. */ -#undef MBRTOWC_NULL_ARG1_BUG - -/* Define if the mbrtowc function has the NULL string argument bug. */ -#undef MBRTOWC_NULL_ARG2_BUG - -/* Define if the mbrtowc function does not return 0 for a NUL character. */ -#undef MBRTOWC_NUL_RETVAL_BUG - -/* Define if the mbrtowc function returns a wrong return value. */ -#undef MBRTOWC_RETVAL_BUG - -/* Define to 1 if open() fails to recognize a trailing slash. */ -#undef OPEN_TRAILING_SLASH_BUG - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the home page for this package. */ -#undef PACKAGE_URL - -/* 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 - -/* Define if the pthread_in_use() detection is hard. */ -#undef PTHREAD_IN_USE_DETECTION_HARD - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'ptrdiff_t'. */ -#undef PTRDIFF_T_SUFFIX - -/* Define to 1 if readlink fails to recognize a trailing slash. */ -#undef READLINK_TRAILING_SLASH_BUG - -/* Define to 1 if stat needs help when passed a directory name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_DIR - -/* Define to 1 if stat needs help when passed a file name with a trailing - slash */ -#undef REPLACE_FUNC_STAT_FILE - -/* Define if nl_langinfo exists but is overridden by gnulib. */ -#undef REPLACE_NL_LANGINFO - -/* Define if vasnprintf exists but is overridden by gnulib. */ -#undef REPLACE_VASNPRINTF - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'sig_atomic_t'. */ -#undef SIG_ATOMIC_T_SUFFIX - -/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -# undef SIZE_MAX -#endif - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'size_t'. */ -#undef SIZE_T_SUFFIX - -/* 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 - -/* Define to 1 if the `S_IS*' macros in do not work properly. */ -#undef STAT_MACROS_BROKEN - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define if the POSIX multithreading library can be used. */ -#undef USE_POSIX_THREADS - -/* Define if references to the POSIX multithreading library should be made - weak. */ -#undef USE_POSIX_THREADS_WEAK - -/* Define if the GNU Pth multithreading library can be used. */ -#undef USE_PTH_THREADS - -/* Define if references to the GNU Pth multithreading library should be made - weak. */ -#undef USE_PTH_THREADS_WEAK - -/* Define if the old Solaris multithreading library can be used. */ -#undef USE_SOLARIS_THREADS - -/* Define if references to the old Solaris multithreading library should be - made weak. */ -#undef USE_SOLARIS_THREADS_WEAK - -/* Define if the native Windows multithreading API can be used. */ -#undef USE_WINDOWS_THREADS - -/* Version number of package */ -#undef VERSION - -/* Define to 1 if unsetenv returns void instead of int. */ -#undef VOID_UNSETENV - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - 'wchar_t'. */ -#undef WCHAR_T_SUFFIX - -/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type - '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. */ -#undef _POSIX_SOURCE - -/* Define if you want to include , so that it consistently - overrides 's RE_DUP_MAX. */ -#undef _REGEX_INCLUDE_LIMITS_H - -/* Define if you want regoff_t to be at least as wide POSIX requires. */ -#undef _REGEX_LARGE_OFFSETS - -/* Define to 500 only on HP-UX. */ -#undef _XOPEN_SOURCE - -/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable 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 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif - - -/* Define to rpl_ if the getopt replacement functions and variables should be - used. */ -#undef __GETOPT_PREFIX - -/* Define 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. */ -#undef error_t - -/* Always use our fgetfilecon wrapper. */ -#undef fgetfilecon - -/* Define to a replacement function name for fnmatch(). */ -#undef fnmatch - -/* 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 -#undef inline -#endif - -/* Define to long or long long if and don't define. */ -#undef intmax_t - -/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif - -/* 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 - -/* Define to `int' if does not define. */ -#undef mode_t - -/* 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 - -/* Define to rpl_re_comp if the replacement should be used. */ -#undef re_comp - -/* Define to rpl_re_compile_fastmap if the replacement should be used. */ -#undef re_compile_fastmap - -/* Define to rpl_re_compile_pattern if the replacement should be used. */ -#undef re_compile_pattern - -/* Define to rpl_re_exec if the replacement should be used. */ -#undef re_exec - -/* Define to rpl_re_match if the replacement should be used. */ -#undef re_match - -/* Define to rpl_re_match_2 if the replacement should be used. */ -#undef re_match_2 - -/* Define to rpl_re_search if the replacement should be used. */ -#undef re_search - -/* Define to rpl_re_search_2 if the replacement should be used. */ -#undef re_search_2 - -/* Define to rpl_re_set_registers if the replacement should be used. */ -#undef re_set_registers - -/* Define to rpl_re_set_syntax if the replacement should be used. */ -#undef re_set_syntax - -/* Define to rpl_re_syntax_options if the replacement should be used. */ -#undef re_syntax_options - -/* Define to rpl_regcomp if the replacement should be used. */ -#undef regcomp - -/* Define to rpl_regerror if the replacement should be used. */ -#undef regerror - -/* Define to rpl_regexec if the replacement should be used. */ -#undef regexec - -/* Define to rpl_regfree if the replacement should be used. */ -#undef regfree - -/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict or - __restrict__, even though the corresponding Sun C compiler ends up with - "#define restrict _Restrict" or "#define restrict __restrict__" in the - previous line. Perhaps some future version of Sun C++ will work with - restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -# define __restrict__ -#endif - -/* Define to `unsigned int' if does not define. */ -#undef size_t - -/* Define as a signed type of the same size as size_t. */ -#undef ssize_t - -/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif - diff --git a/configure b/configure deleted file mode 100755 index cbe86fd..0000000 --- a/configure +++ /dev/null @@ -1,38914 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for augeas 1.3.0. -# -# -# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. -# -# -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -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 - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which - # is contrary to our usage. Disable this feature. - alias -g '\${1+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi -" - as_required="as_fn_return () { (exit \$1); } -as_fn_success () { as_fn_return 0; } -as_fn_failure () { as_fn_return 1; } -as_fn_ret_success () { return 0; } -as_fn_ret_failure () { return 1; } - -exitcode=0 -as_fn_success || { exitcode=1; echo as_fn_success failed.; } -as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } -as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } -as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } -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 / || 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'\" && - test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1 - - test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ - || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" - if (eval "$as_required") 2>/dev/null; then : - as_have_required=yes -else - as_have_required=no -fi - if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : - -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_found=false -for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - as_found=: - case $as_dir in #( - /*) - for as_base in sh bash ksh sh5; do - # Try only shells that exist, to save several forks. - as_shell=$as_dir/$as_base - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : - CONFIG_SHELL=$as_shell as_have_required=yes - if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : - break 2 -fi -fi - done;; - esac - as_found=false -done -$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && - { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : - CONFIG_SHELL=$SHELL as_have_required=yes -fi; } -IFS=$as_save_IFS - - - if test "x$CONFIG_SHELL" != x; then : - 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 : - $as_echo "$0: This script requires a shell more modern than all" - $as_echo "$0: the shells that I found on your system." - if test x${ZSH_VERSION+set} = xset ; then - $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" - $as_echo "$0: be upgraded to zsh 4.3.4 or later." - else - $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, -$0: including any error possibly output before this -$0: message. Then install a modern shell, or manually run -$0: the script under such a shell if you do have one." - fi - exit 1 -fi -fi -fi -SHELL=${CONFIG_SHELL-/bin/sh} -export SHELL -# Unset more variables known to interfere with behavior of common tools. -CLICOLOR_FORCE= GREP_OPTIONS= -unset CLICOLOR_FORCE GREP_OPTIONS - -## --------------------- ## -## M4sh Shell Functions. ## -## --------------------- ## -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $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 -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - - - as_lineno_1=$LINENO as_lineno_1a=$LINENO - as_lineno_2=$LINENO as_lineno_2a=$LINENO - eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && - test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { - # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\n.*// - ' >$as_me.lineno && - 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). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... 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 -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - -SHELL=${CONFIG_SHELL-/bin/sh} - - -test -n "$DJDIR" || exec 7<&0 &1 - -# Name of the host. -# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, -# so uname gets run too. -ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= - -# Identity of this package. -PACKAGE_NAME='augeas' -PACKAGE_TARNAME='augeas' -PACKAGE_VERSION='1.3.0' -PACKAGE_STRING='augeas 1.3.0' -PACKAGE_BUGREPORT='' -PACKAGE_URL='' - -ac_unique_file="src/augeas.c" -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -gl_use_threads_default= -gl_func_list= -gl_header_list= -gl_fnmatch_required=POSIX -gl_getopt_required=POSIX -gl_getopt_required=POSIX -ac_subst_vars='gltests_LTLIBOBJS -gltests_LIBOBJS -gl_LTLIBOBJS -gl_LIBOBJS -am__EXEEXT_FALSE -am__EXEEXT_TRUE -LTLIBOBJS -LIBOBJS -LIBXML_LIBS -LIBXML_CFLAGS -PKG_CONFIG_LIBDIR -PKG_CONFIG_PATH -PKG_CONFIG -LIBTESTS_LIBDEPS -YIELD_LIB -LTLIBMULTITHREAD -LIBMULTITHREAD -LTLIBTHREAD -LIBTHREAD -LIBPTH_PREFIX -LTLIBPTH -LIBPTH -INTL_MACOSX_LIBS -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 -NEXT_WCTYPE_H -HAVE_ISWCNTRL -REPLACE_ISWBLANK -HAVE_WCTRANS_T -HAVE_WCTYPE_T -HAVE_ISWBLANK -GNULIB_TOWCTRANS -GNULIB_WCTRANS -GNULIB_ISWCTYPE -GNULIB_WCTYPE -GNULIB_ISWBLANK -HAVE_WINT_T -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H -NEXT_WCHAR_H -HAVE_FEATURES_H -HAVE_UNISTD_H -NEXT_AS_FIRST_DIRECTIVE_UNISTD_H -NEXT_UNISTD_H -PTHREAD_H_DEFINES_STRUCT_TIMESPEC -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC -TIME_H_DEFINES_STRUCT_TIMESPEC -NEXT_AS_FIRST_DIRECTIVE_TIME_H -NEXT_TIME_H -REPLACE_TIMEGM -REPLACE_NANOSLEEP -REPLACE_MKTIME -REPLACE_LOCALTIME_R -HAVE_TIMEGM -HAVE_STRPTIME -HAVE_NANOSLEEP -HAVE_DECL_LOCALTIME_R -GNULIB_TIME_R -GNULIB_TIMEGM -GNULIB_STRPTIME -GNULIB_NANOSLEEP -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 -NEXT_STRING_H -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 -SIG_ATOMIC_T_SUFFIX -SIZE_T_SUFFIX -PTRDIFF_T_SUFFIX -HAVE_SIGNED_WINT_T -HAVE_SIGNED_WCHAR_T -HAVE_SIGNED_SIG_ATOMIC_T -BITSIZEOF_WINT_T -BITSIZEOF_WCHAR_T -BITSIZEOF_SIG_ATOMIC_T -BITSIZEOF_SIZE_T -BITSIZEOF_PTRDIFF_T -HAVE_SYS_BITYPES_H -HAVE_SYS_INTTYPES_H -HAVE_STDINT_H -NEXT_AS_FIRST_DIRECTIVE_STDINT_H -NEXT_STDINT_H -HAVE_SYS_TYPES_H -HAVE_INTTYPES_H -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 -LIB_SELINUX -APPLE_UNIVERSAL_BUILD -UNDEFINE_STRTOK_R -REPLACE_STRTOK_R -REPLACE_STRSIGNAL -REPLACE_STRNLEN -REPLACE_STRNDUP -REPLACE_STRNCAT -REPLACE_STRERROR_R -REPLACE_STRERROR -REPLACE_STRCHRNUL -REPLACE_STRCASESTR -REPLACE_STRSTR -REPLACE_STRDUP -REPLACE_STPNCPY -REPLACE_MEMMEM -REPLACE_MEMCHR -HAVE_STRVERSCMP -HAVE_DECL_STRSIGNAL -HAVE_DECL_STRERROR_R -HAVE_DECL_STRTOK_R -HAVE_STRCASESTR -HAVE_STRSEP -HAVE_STRPBRK -HAVE_DECL_STRNLEN -HAVE_DECL_STRNDUP -HAVE_DECL_STRDUP -HAVE_STRCHRNUL -HAVE_STPNCPY -HAVE_STPCPY -HAVE_RAWMEMCHR -HAVE_DECL_MEMRCHR -HAVE_MEMPCPY -HAVE_DECL_MEMMEM -HAVE_MEMCHR -HAVE_FFSLL -HAVE_FFSL -HAVE_MBSLEN -GNULIB_STRVERSCMP -GNULIB_STRSIGNAL -GNULIB_STRERROR_R -GNULIB_STRERROR -GNULIB_MBSTOK_R -GNULIB_MBSSEP -GNULIB_MBSSPN -GNULIB_MBSPBRK -GNULIB_MBSCSPN -GNULIB_MBSCASESTR -GNULIB_MBSPCASECMP -GNULIB_MBSNCASECMP -GNULIB_MBSCASECMP -GNULIB_MBSSTR -GNULIB_MBSRCHR -GNULIB_MBSCHR -GNULIB_MBSNLEN -GNULIB_MBSLEN -GNULIB_STRTOK_R -GNULIB_STRCASESTR -GNULIB_STRSTR -GNULIB_STRSEP -GNULIB_STRPBRK -GNULIB_STRNLEN -GNULIB_STRNDUP -GNULIB_STRNCAT -GNULIB_STRDUP -GNULIB_STRCHRNUL -GNULIB_STPNCPY -GNULIB_STPCPY -GNULIB_RAWMEMCHR -GNULIB_MEMRCHR -GNULIB_MEMPCPY -GNULIB_MEMMEM -GNULIB_MEMCHR -GNULIB_FFSLL -GNULIB_FFSL -LOCALE_FR_UTF8 -LOCALE_ZH_CN -LOCALE_JA -REPLACE_UTIMENSAT -REPLACE_STAT -REPLACE_MKNOD -REPLACE_MKFIFO -REPLACE_MKDIR -REPLACE_LSTAT -REPLACE_FUTIMENS -REPLACE_FSTATAT -REPLACE_FSTAT -HAVE_UTIMENSAT -HAVE_MKNODAT -HAVE_MKNOD -HAVE_MKFIFOAT -HAVE_MKFIFO -HAVE_MKDIRAT -HAVE_LSTAT -HAVE_LCHMOD -HAVE_FUTIMENS -HAVE_FSTATAT -HAVE_FCHMODAT -GNULIB_UTIMENSAT -GNULIB_STAT -GNULIB_MKNODAT -GNULIB_MKNOD -GNULIB_MKFIFOAT -GNULIB_MKFIFO -GNULIB_MKDIRAT -GNULIB_LSTAT -GNULIB_LCHMOD -GNULIB_FUTIMENS -GNULIB_FSTATAT -GNULIB_FSTAT -GNULIB_FCHMODAT -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H -NEXT_LOCALE_H -HAVE_XLOCALE_H -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H -NEXT_STDDEF_H -GL_GENERATE_STDDEF_H_FALSE -GL_GENERATE_STDDEF_H_TRUE -STDDEF_H -HAVE_WCHAR_T -REPLACE_NULL -REPLACE_STRUCT_LCONV -REPLACE_DUPLOCALE -REPLACE_SETLOCALE -REPLACE_LOCALECONV -HAVE_DUPLOCALE -GNULIB_DUPLOCALE -GNULIB_SETLOCALE -GNULIB_LOCALECONV -LOCALCHARSET_TESTS_ENVIRONMENT -GLIBC21 -HAVE_LANGINFO_YESEXPR -HAVE_LANGINFO_ERA -HAVE_LANGINFO_T_FMT_AMPM -HAVE_LANGINFO_CODESET -HAVE_LANGINFO_H -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H -NEXT_LANGINFO_H -REPLACE_NL_LANGINFO -HAVE_NL_LANGINFO -GNULIB_NL_LANGINFO -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 -NEXT_GETOPT_H -UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS -UNISTD_H_HAVE_WINSOCK2_H -REPLACE_WRITE -REPLACE_USLEEP -REPLACE_UNLINKAT -REPLACE_UNLINK -REPLACE_TTYNAME_R -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 -REPLACE_CLOSE -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 -HAVE_UNLINKAT -HAVE_SYMLINKAT -HAVE_SYMLINK -HAVE_SLEEP -HAVE_SETHOSTNAME -HAVE_READLINKAT -HAVE_READLINK -HAVE_PWRITE -HAVE_PREAD -HAVE_PIPE2 -HAVE_PIPE -HAVE_LINKAT -HAVE_LINK -HAVE_LCHOWN -HAVE_GROUP_MEMBER -HAVE_GETPAGESIZE -HAVE_GETLOGIN -HAVE_GETHOSTNAME -HAVE_GETGROUPS -HAVE_GETDTABLESIZE -HAVE_FTRUNCATE -HAVE_FSYNC -HAVE_FDATASYNC -HAVE_FCHOWNAT -HAVE_FCHDIR -HAVE_FACCESSAT -HAVE_EUIDACCESS -HAVE_DUP3 -HAVE_DUP2 -HAVE_CHOWN -GNULIB_WRITE -GNULIB_USLEEP -GNULIB_UNLINKAT -GNULIB_UNLINK -GNULIB_UNISTD_H_SIGPIPE -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 -GNULIB_PIPE -GNULIB_LSEEK -GNULIB_LINKAT -GNULIB_LINK -GNULIB_LCHOWN -GNULIB_ISATTY -GNULIB_GROUP_MEMBER -GNULIB_GETUSERSHELL -GNULIB_GETPAGESIZE -GNULIB_GETLOGIN_R -GNULIB_GETLOGIN -GNULIB_GETHOSTNAME -GNULIB_GETGROUPS -GNULIB_GETDTABLESIZE -GNULIB_GETDOMAINNAME -GNULIB_GETCWD -GNULIB_FTRUNCATE -GNULIB_FSYNC -GNULIB_FDATASYNC -GNULIB_FCHOWNAT -GNULIB_FCHDIR -GNULIB_FACCESSAT -GNULIB_EUIDACCESS -GNULIB_ENVIRON -GNULIB_DUP3 -GNULIB_DUP2 -GNULIB_DUP -GNULIB_CLOSE -GNULIB_CHOWN -GNULIB_CHDIR -REPLACE_VSPRINTF -REPLACE_VSNPRINTF -REPLACE_VPRINTF -REPLACE_VFPRINTF -REPLACE_VDPRINTF -REPLACE_VASPRINTF -REPLACE_TMPFILE -REPLACE_STDIO_WRITE_FUNCS -REPLACE_STDIO_READ_FUNCS -REPLACE_SPRINTF -REPLACE_SNPRINTF -REPLACE_RENAMEAT -REPLACE_RENAME -REPLACE_REMOVE -REPLACE_PRINTF -REPLACE_POPEN -REPLACE_PERROR -REPLACE_OBSTACK_PRINTF -REPLACE_GETLINE -REPLACE_GETDELIM -REPLACE_FTELLO -REPLACE_FTELL -REPLACE_FSEEKO -REPLACE_FSEEK -REPLACE_FREOPEN -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 -HAVE_DECL_VSNPRINTF -HAVE_DECL_SNPRINTF -HAVE_DECL_OBSTACK_PRINTF -HAVE_DECL_GETLINE -HAVE_DECL_GETDELIM -HAVE_DECL_FTELLO -HAVE_DECL_FSEEKO -HAVE_DECL_FPURGE -GNULIB_VSPRINTF_POSIX -GNULIB_VSNPRINTF -GNULIB_VPRINTF_POSIX -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 -GNULIB_PUTS -GNULIB_PUTCHAR -GNULIB_PUTC -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 -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H -NEXT_CTYPE_H -PRAGMA_COLUMNS -PRAGMA_SYSTEM_HEADER -INCLUDE_NEXT_AS_FIRST_DIRECTIVE -INCLUDE_NEXT -HAVE_ISBLANK -GNULIB_ISBLANK -pkglibexecdir -lispdir -REPLACE_WCTOMB -REPLACE_UNSETENV -REPLACE_STRTOD -REPLACE_SETENV -REPLACE_REALPATH -REPLACE_REALLOC -REPLACE_RANDOM_R -REPLACE_PUTENV -REPLACE_PTSNAME_R -REPLACE_MKSTEMP -REPLACE_MBTOWC -REPLACE_MALLOC -REPLACE_CANONICALIZE_FILE_NAME -REPLACE_CALLOC -HAVE_DECL_UNSETENV -HAVE_UNLOCKPT -HAVE_SYS_LOADAVG_H -HAVE_STRUCT_RANDOM_DATA -HAVE_STRTOULL -HAVE_STRTOLL -HAVE_STRTOD -HAVE_DECL_SETENV -HAVE_SETENV -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 -HAVE_MKOSTEMP -HAVE_MKDTEMP -HAVE_GRANTPT -HAVE_GETSUBOPT -HAVE_DECL_GETLOADAVG -HAVE_CANONICALIZE_FILE_NAME -HAVE_ATOLL -HAVE__EXIT -GNULIB_WCTOMB -GNULIB_UNSETENV -GNULIB_UNLOCKPT -GNULIB_SYSTEM_POSIX -GNULIB_STRTOULL -GNULIB_STRTOLL -GNULIB_STRTOD -GNULIB_SETENV -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 -GNULIB_MKOSTEMP -GNULIB_MKDTEMP -GNULIB_MBTOWC -GNULIB_MALLOC_POSIX -GNULIB_GRANTPT -GNULIB_GETSUBOPT -GNULIB_GETLOADAVG -GNULIB_CANONICALIZE_FILE_NAME -GNULIB_CALLOC_POSIX -GNULIB_ATOLL -GNULIB__EXIT -LOCALE_FR -REPLACE_WCSWIDTH -REPLACE_WCWIDTH -REPLACE_WCSNRTOMBS -REPLACE_WCSRTOMBS -REPLACE_WCRTOMB -REPLACE_MBSNRTOWCS -REPLACE_MBSRTOWCS -REPLACE_MBRLEN -REPLACE_MBRTOWC -REPLACE_MBSINIT -REPLACE_WCTOB -REPLACE_BTOWC -REPLACE_MBSTATE_T -HAVE_DECL_WCWIDTH -HAVE_DECL_WCTOB -HAVE_WCSWIDTH -HAVE_WCSTOK -HAVE_WCSSTR -HAVE_WCSPBRK -HAVE_WCSSPN -HAVE_WCSCSPN -HAVE_WCSRCHR -HAVE_WCSCHR -HAVE_WCSDUP -HAVE_WCSXFRM -HAVE_WCSCOLL -HAVE_WCSNCASECMP -HAVE_WCSCASECMP -HAVE_WCSNCMP -HAVE_WCSCMP -HAVE_WCSNCAT -HAVE_WCSCAT -HAVE_WCPNCPY -HAVE_WCSNCPY -HAVE_WCPCPY -HAVE_WCSCPY -HAVE_WCSNLEN -HAVE_WCSLEN -HAVE_WMEMSET -HAVE_WMEMMOVE -HAVE_WMEMCPY -HAVE_WMEMCMP -HAVE_WMEMCHR -HAVE_WCSNRTOMBS -HAVE_WCSRTOMBS -HAVE_WCRTOMB -HAVE_MBSNRTOWCS -HAVE_MBSRTOWCS -HAVE_MBRLEN -HAVE_MBRTOWC -HAVE_MBSINIT -HAVE_BTOWC -GNULIB_WCSWIDTH -GNULIB_WCSTOK -GNULIB_WCSSTR -GNULIB_WCSPBRK -GNULIB_WCSSPN -GNULIB_WCSCSPN -GNULIB_WCSRCHR -GNULIB_WCSCHR -GNULIB_WCSDUP -GNULIB_WCSXFRM -GNULIB_WCSCOLL -GNULIB_WCSNCASECMP -GNULIB_WCSCASECMP -GNULIB_WCSNCMP -GNULIB_WCSCMP -GNULIB_WCSNCAT -GNULIB_WCSCAT -GNULIB_WCPNCPY -GNULIB_WCSNCPY -GNULIB_WCPCPY -GNULIB_WCSCPY -GNULIB_WCSNLEN -GNULIB_WCSLEN -GNULIB_WMEMSET -GNULIB_WMEMMOVE -GNULIB_WMEMCPY -GNULIB_WMEMCMP -GNULIB_WMEMCHR -GNULIB_WCWIDTH -GNULIB_WCSNRTOMBS -GNULIB_WCSRTOMBS -GNULIB_WCRTOMB -GNULIB_MBSNRTOWCS -GNULIB_MBSRTOWCS -GNULIB_MBRLEN -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 -GL_COND_LIBTOOL_FALSE -GL_COND_LIBTOOL_TRUE -USE_VERSION_SCRIPT_FALSE -USE_VERSION_SCRIPT_TRUE -VERSION_SCRIPT_FLAGS -READLINE_LIBS -AUGEAS_CFLAGS -WARN_CFLAGS -LEXLIB -LEX_OUTPUT_ROOT -LEX -YFLAGS -YACC -OTOOL64 -OTOOL -LIPO -NMEDIT -DSYMUTIL -MANIFEST_TOOL -ac_ct_AR -DLLTOOL -OBJDUMP -LN_S -NM -ac_ct_DUMPBIN -DUMPBIN -LD -FGREP -SED -LIBTOOL -RANLIB -ARFLAGS -AR -EGREP -GREP -CPP -am__fastdepCC_FALSE -am__fastdepCC_TRUE -CCDEPMODE -am__nodep -AMDEPBACKSLASH -AMDEP_FALSE -AMDEP_TRUE -am__quote -am__include -DEPDIR -OBJEXT -EXEEXT -ac_ct_CC -CPPFLAGS -LDFLAGS -CFLAGS -CC -host_os -host_vendor -host_cpu -host -build_os -build_vendor -build_cpu -build -LIBFA_VERSION_INFO -LIBAUGEAS_VERSION_INFO -ENABLE_DEBUG_FALSE -ENABLE_DEBUG_TRUE -WITH_FAILMALLOC_FALSE -WITH_FAILMALLOC_TRUE -LIBFAILMALLOC -PDFDOCS -PDFLATEX -ND_FORMAT -ND_ENABLED_FALSE -ND_ENABLED_TRUE -ND_PROG -AM_BACKSLASH -AM_DEFAULT_VERBOSITY -AM_DEFAULT_V -AM_V -am__untar -am__tar -AMTAR -am__leading_dot -SET_MAKE -AWK -mkdir_p -MKDIR_P -INSTALL_STRIP_PROGRAM -STRIP -install_sh -MAKEINFO -AUTOHEADER -AUTOMAKE -AUTOCONF -ACLOCAL -VERSION -PACKAGE -CYGPATH_W -am__isrc -INSTALL_DATA -INSTALL_SCRIPT -INSTALL_PROGRAM -target_alias -host_alias -build_alias -LIBS -ECHO_T -ECHO_N -ECHO_C -DEFS -mandir -localedir -libdir -psdir -pdfdir -dvidir -htmldir -infodir -docdir -oldincludedir -includedir -localstatedir -sharedstatedir -sysconfdir -datadir -datarootdir -libexecdir -sbindir -bindir -program_transform_name -prefix -exec_prefix -PACKAGE_URL -PACKAGE_BUGREPORT -PACKAGE_STRING -PACKAGE_VERSION -PACKAGE_TARNAME -PACKAGE_NAME -PATH_SEPARATOR -SHELL' -ac_subst_files='' -ac_user_opts=' -enable_option_checking -enable_silent_rules -with_naturaldocs_output -with_pdfdocs -with_failmalloc -enable_debug -enable_dependency_tracking -enable_largefile -enable_threads -enable_shared -enable_static -with_pic -enable_fast_install -with_gnu_ld -with_sysroot -enable_libtool_lock -enable_compile_warnings -enable_iso_c -with_included_regex -with_selinux -enable_rpath -with_libpth_prefix -' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -YACC -YFLAGS -PKG_CONFIG -PKG_CONFIG_PATH -PKG_CONFIG_LIBDIR -LIBXML_CFLAGS -LIBXML_LIBS' - - -# Initialize some variables set by options. -ac_init_help= -ac_init_version=false -ac_unrecognized_opts= -ac_unrecognized_sep= -# The variables have the same names as the options, with -# dashes changed to underlines. -cache_file=/dev/null -exec_prefix=NONE -no_create= -no_recursion= -prefix=NONE -program_prefix=NONE -program_suffix=NONE -program_transform_name=s,x,x, -silent= -site= -srcdir= -verbose= -x_includes=NONE -x_libraries=NONE - -# Installation directory options. -# These are left unexpanded so users can "make install exec_prefix=/foo" -# and all the variables that are supposed to be based on exec_prefix -# by default will actually change. -# Use braces instead of parens because sh, perl, etc. also accept them. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -for ac_option -do - # If the previous option needs an argument, assign it. - if test -n "$ac_prev"; then - eval $ac_prev=\$ac_option - ac_prev= - continue - fi - - case $ac_option in - *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *=) ac_optarg= ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -bindir | --bindir | --bindi | --bind | --bin | --bi) - ac_prev=bindir ;; - -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) - bindir=$ac_optarg ;; - - -build | --build | --buil | --bui | --bu) - ac_prev=build_alias ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=*) - build_alias=$ac_optarg ;; - - -cache-file | --cache-file | --cache-fil | --cache-fi \ - | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) - ac_prev=cache_file ;; - -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ - | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) - cache_file=$ac_optarg ;; - - --config-cache | -C) - cache_file=config.cache ;; - - -datadir | --datadir | --datadi | --datad) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$ac_optarg ;; - - -disable-* | --disable-*) - ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=no ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -enable-* | --enable-*) - ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid feature name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"enable_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval enable_$ac_useropt=\$ac_optarg ;; - - -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ - | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ - | --exec | --exe | --ex) - ac_prev=exec_prefix ;; - -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ - | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ - | --exec=* | --exe=* | --ex=*) - exec_prefix=$ac_optarg ;; - - -gas | --gas | --ga | --g) - # Obsolete; use --with-gas. - with_gas=yes ;; - - -help | --help | --hel | --he | -h) - ac_init_help=long ;; - -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) - ac_init_help=recursive ;; - -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) - ac_init_help=short ;; - - -host | --host | --hos | --ho) - ac_prev=host_alias ;; - -host=* | --host=* | --hos=* | --ho=*) - host_alias=$ac_optarg ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$ac_optarg ;; - - -includedir | --includedir | --includedi | --included | --include \ - | --includ | --inclu | --incl | --inc) - ac_prev=includedir ;; - -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ - | --includ=* | --inclu=* | --incl=* | --inc=*) - includedir=$ac_optarg ;; - - -infodir | --infodir | --infodi | --infod | --info | --inf) - ac_prev=infodir ;; - -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) - infodir=$ac_optarg ;; - - -libdir | --libdir | --libdi | --libd) - ac_prev=libdir ;; - -libdir=* | --libdir=* | --libdi=* | --libd=*) - libdir=$ac_optarg ;; - - -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ - | --libexe | --libex | --libe) - ac_prev=libexecdir ;; - -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ - | --libexe=* | --libex=* | --libe=*) - libexecdir=$ac_optarg ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - localstatedir=$ac_optarg ;; - - -mandir | --mandir | --mandi | --mand | --man | --ma | --m) - ac_prev=mandir ;; - -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) - mandir=$ac_optarg ;; - - -nfp | --nfp | --nf) - # Obsolete; use --without-fp. - with_fp=no ;; - - -no-create | --no-create | --no-creat | --no-crea | --no-cre \ - | --no-cr | --no-c | -n) - no_create=yes ;; - - -no-recursion | --no-recursion | --no-recursio | --no-recursi \ - | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) - no_recursion=yes ;; - - -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ - | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ - | --oldin | --oldi | --old | --ol | --o) - ac_prev=oldincludedir ;; - -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ - | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ - | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) - oldincludedir=$ac_optarg ;; - - -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) - ac_prev=prefix ;; - -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) - prefix=$ac_optarg ;; - - -program-prefix | --program-prefix | --program-prefi | --program-pref \ - | --program-pre | --program-pr | --program-p) - ac_prev=program_prefix ;; - -program-prefix=* | --program-prefix=* | --program-prefi=* \ - | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) - program_prefix=$ac_optarg ;; - - -program-suffix | --program-suffix | --program-suffi | --program-suff \ - | --program-suf | --program-su | --program-s) - ac_prev=program_suffix ;; - -program-suffix=* | --program-suffix=* | --program-suffi=* \ - | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) - program_suffix=$ac_optarg ;; - - -program-transform-name | --program-transform-name \ - | --program-transform-nam | --program-transform-na \ - | --program-transform-n | --program-transform- \ - | --program-transform | --program-transfor \ - | --program-transfo | --program-transf \ - | --program-trans | --program-tran \ - | --progr-tra | --program-tr | --program-t) - ac_prev=program_transform_name ;; - -program-transform-name=* | --program-transform-name=* \ - | --program-transform-nam=* | --program-transform-na=* \ - | --program-transform-n=* | --program-transform-=* \ - | --program-transform=* | --program-transfor=* \ - | --program-transfo=* | --program-transf=* \ - | --program-trans=* | --program-tran=* \ - | --progr-tra=* | --program-tr=* | --program-t=*) - program_transform_name=$ac_optarg ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$ac_optarg ;; - - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - silent=yes ;; - - -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) - ac_prev=sbindir ;; - -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ - | --sbi=* | --sb=*) - sbindir=$ac_optarg ;; - - -sharedstatedir | --sharedstatedir | --sharedstatedi \ - | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ - | --sharedst | --shareds | --shared | --share | --shar \ - | --sha | --sh) - ac_prev=sharedstatedir ;; - -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ - | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ - | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ - | --sha=* | --sh=*) - sharedstatedir=$ac_optarg ;; - - -site | --site | --sit) - ac_prev=site ;; - -site=* | --site=* | --sit=*) - site=$ac_optarg ;; - - -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) - ac_prev=srcdir ;; - -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) - srcdir=$ac_optarg ;; - - -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ - | --syscon | --sysco | --sysc | --sys | --sy) - ac_prev=sysconfdir ;; - -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ - | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) - sysconfdir=$ac_optarg ;; - - -target | --target | --targe | --targ | --tar | --ta | --t) - ac_prev=target_alias ;; - -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) - target_alias=$ac_optarg ;; - - -v | -verbose | --verbose | --verbos | --verbo | --verb) - verbose=yes ;; - - -version | --version | --versio | --versi | --vers | -V) - ac_init_version=: ;; - - -with-* | --with-*) - ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=\$ac_optarg ;; - - -without-* | --without-*) - ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` - # Reject names that are not valid shell variable names. - expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error $? "invalid package name: $ac_useropt" - ac_useropt_orig=$ac_useropt - ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` - case $ac_user_opts in - *" -"with_$ac_useropt" -"*) ;; - *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" - ac_unrecognized_sep=', ';; - esac - eval with_$ac_useropt=no ;; - - --x) - # Obsolete; use --with-x. - with_x=yes ;; - - -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ - | --x-incl | --x-inc | --x-in | --x-i) - ac_prev=x_includes ;; - -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ - | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) - x_includes=$ac_optarg ;; - - -x-libraries | --x-libraries | --x-librarie | --x-librari \ - | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) - ac_prev=x_libraries ;; - -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ - | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) - x_libraries=$ac_optarg ;; - - -*) as_fn_error $? "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information" - ;; - - *=*) - ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` - # Reject names that are not valid shell variable names. - case $ac_envvar in #( - '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; - esac - eval $ac_envvar=\$ac_optarg - export $ac_envvar ;; - - *) - # FIXME: should be removed in autoconf 3.0. - $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 - expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && - $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" - ;; - - esac -done - -if test -n "$ac_prev"; then - ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error $? "missing argument to $ac_option" -fi - -if test -n "$ac_unrecognized_opts"; then - case $enable_option_checking in - no) ;; - fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; - *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; - esac -fi - -# Check all directory arguments for consistency. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - # Remove trailing slashes. - case $ac_val in - */ ) - ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` - eval $ac_var=\$ac_val;; - esac - # Be sure to have absolute directory names. - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" -done - -# There might be people who depend on the old broken behavior: `$host' -# used to hold the argument of --host etc. -# FIXME: To remove some day. -build=$build_alias -host=$host_alias -target=$target_alias - -# FIXME: To remove some day. -if test "x$host_alias" != x; then - if test "x$build_alias" = x; then - cross_compiling=maybe - elif test "x$build_alias" != "x$host_alias"; then - cross_compiling=yes - fi -fi - -ac_tool_prefix= -test -n "$host_alias" && ac_tool_prefix=$host_alias- - -test "$silent" = yes && exec 6>/dev/null - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error $? "working directory cannot be determined" -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error $? "pwd does not report name of working directory" - - -# Find the source files, if location was not specified. -if test -z "$srcdir"; then - ac_srcdir_defaulted=yes - # Try the directory containing this script, then the parent directory. - ac_confdir=`$as_dirname -- "$as_myself" || -$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_myself" : 'X\(//\)[^/]' \| \ - X"$as_myself" : 'X\(//\)$' \| \ - X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_myself" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - srcdir=$ac_confdir - if test ! -r "$srcdir/$ac_unique_file"; then - srcdir=.. - fi -else - ac_srcdir_defaulted=no -fi -if test ! -r "$srcdir/$ac_unique_file"; then - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# Report the --help message. -# -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 1.3.0 to adapt to many kinds of systems. - -Usage: $0 [OPTION]... [VAR=VALUE]... - -To assign environment variables (e.g., CC, CFLAGS...), specify them as -VAR=VALUE. See below for descriptions of some of the useful variables. - -Defaults for the options are specified in brackets. - -Configuration: - -h, --help display this help and exit - --help=short display options specific to this package - --help=recursive display the short help of all the included packages - -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking ...' messages - --cache-file=FILE cache test results in FILE [disabled] - -C, --config-cache alias for \`--cache-file=config.cache' - -n, --no-create do not create output files - --srcdir=DIR find the sources in DIR [configure dir or \`..'] - -Installation directories: - --prefix=PREFIX install architecture-independent files in PREFIX - [$ac_default_prefix] - --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX - [PREFIX] - -By default, \`make install' will install all the files in -\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify -an installation prefix other than \`$ac_default_prefix' using \`--prefix', -for instance \`--prefix=\$HOME'. - -For better control, use the options below. - -Fine tuning of the installation directories: - --bindir=DIR user executables [EPREFIX/bin] - --sbindir=DIR system admin executables [EPREFIX/sbin] - --libexecdir=DIR program executables [EPREFIX/libexec] - --sysconfdir=DIR read-only single-machine data [PREFIX/etc] - --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] - --localstatedir=DIR modifiable single-machine data [PREFIX/var] - --libdir=DIR object code libraries [EPREFIX/lib] - --includedir=DIR C header files [PREFIX/include] - --oldincludedir=DIR C header files for non-gcc [/usr/include] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/augeas] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_ACEOF - - cat <<\_ACEOF - -Program names: - --program-prefix=PREFIX prepend PREFIX to installed program names - --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names - -System types: - --build=BUILD configure for building on BUILD [guessed] - --host=HOST cross-compile to build programs to run on HOST [BUILD] -_ACEOF -fi - -if test -n "$ac_init_help"; then - case $ac_init_help in - short | recursive ) echo "Configuration of augeas 1.3.0:";; - esac - cat <<\_ACEOF - -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-debug=no/yes enable debugging output - --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 - --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] - --enable-fast-install[=PKGS] - optimize for fast installation [default=yes] - --disable-libtool-lock avoid locking (might break parallel builds) - --enable-compile-warnings=[no/minimum/yes/maximum/error] - Turn on compiler warnings - --enable-iso-c Try to warn if code is not ISO C - --disable-rpath do not hardcode runtime library paths - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-naturaldocs-output=FORMAT - format of NaturalDocs output (possible values: - HTML/FramedHTML, default: HTML) - --with-pdfdocs whether to use pdflatex to build PDF docs - --with-failmalloc=FAILMALLOC - enable failmalloc test targets and use the - failmalloc library FAILMALLOC - --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 - (or the compiler's sysroot if not specified). - --without-included-regex - don't compile regex; this is the default on systems - with recent-enough versions of the GNU C Library - (use with caution on other systems). - --without-selinux do not use SELinux, even on systems with SELinux - --with-gnu-ld assume the C compiler uses GNU ld default=no - --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib - --without-libpth-prefix don't search for libpth in includedir and libdir - -Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags - LDFLAGS linker flags, e.g. -L if you have libraries in a - nonstandard directory - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if - you have headers in a nonstandard directory - CPP C preprocessor - YACC The `Yet Another Compiler Compiler' implementation to use. - Defaults to the first program found out of: `bison -y', `byacc', - `yacc'. - YFLAGS The list of arguments that will be passed by default to $YACC. - This script will default YFLAGS to the empty string to avoid a - default value of `-d' given by some make applications. - PKG_CONFIG path to pkg-config utility - PKG_CONFIG_PATH - directories to add to pkg-config's search path - PKG_CONFIG_LIBDIR - path overriding pkg-config's built-in search path - LIBXML_CFLAGS - C compiler flags for LIBXML, overriding pkg-config - LIBXML_LIBS linker flags for LIBXML, overriding pkg-config - -Use these variables to override the choices made by `configure' or to help -it to find libraries and programs with nonstandard names/locations. - -Report bugs to the package provider. -_ACEOF -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || - { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || - continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested configure. - if test -f "$ac_srcdir/configure.gnu"; then - echo && - $SHELL "$ac_srcdir/configure.gnu" --help=recursive - elif test -f "$ac_srcdir/configure"; then - echo && - $SHELL "$ac_srcdir/configure" --help=recursive - else - $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -augeas configure 1.3.0 -generated by GNU Autoconf 2.69 - -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 - exit -fi - -## ------------------------ ## -## Autoconf initialization. ## -## ------------------------ ## - -# ac_fn_c_try_compile LINENO -# -------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_compile - -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.err - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_cpp - -# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists, giving a warning if it cannot be compiled using -# the include files in INCLUDES and setting the cache variable VAR -# accordingly. -ac_fn_c_check_header_mongrel () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if eval \${$3+:} false; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -else - # Is the header compilable? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 -$as_echo_n "checking $2 usability... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_header_compiler=yes -else - ac_header_compiler=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 -$as_echo "$ac_header_compiler" >&6; } - -# Is the header present? -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 -$as_echo_n "checking $2 presence... " >&6; } -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <$2> -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - ac_header_preproc=yes -else - ac_header_preproc=no -fi -rm -f conftest.err conftest.i conftest.$ac_ext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 -$as_echo "$ac_header_preproc" >&6; } - -# So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( - yes:no: ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 -$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; - no:yes:* ) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 -$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 -$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 -$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 -$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 -$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} - ;; -esac - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=\$ac_header_compiler" -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -fi - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_mongrel - -# ac_fn_c_try_run LINENO -# ---------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes -# that executables *can* be run. -ac_fn_c_try_run () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - ac_retval=0 -else - $as_echo "$as_me: program exited with status $ac_status" >&5 - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=$ac_status -fi - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_run - -# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES -# ------------------------------------------------------- -# Tests whether HEADER exists and can be compiled using the include files in -# INCLUDES, setting the cache variable VAR accordingly. -ac_fn_c_check_header_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -#include <$2> -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_header_compile - -# ac_fn_c_try_link LINENO -# ----------------------- -# Try to link conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_link () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext conftest$ac_exeext - if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - test -x conftest$ac_exeext - }; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information - # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would - # interfere with the next link command; also delete a directory that is - # left behind by Apple's compiler. We do this before executing the actions. - rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - as_fn_set_status $ac_retval - -} # ac_fn_c_try_link - -# ac_fn_c_check_func LINENO FUNC VAR -# ---------------------------------- -# Tests whether FUNC exists, setting the cache variable VAR accordingly -ac_fn_c_check_func () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Define $2 to an innocuous variant, in case declares $2. - For example, HP-UX 11i declares gettimeofday. */ -#define $2 innocuous_$2 - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char $2 (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef $2 - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char $2 (); -/* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined __stub_$2 || defined __stub___$2 -choke me -#endif - -int -main () -{ -return $2 (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_func - -# ac_fn_c_check_type LINENO TYPE VAR INCLUDES -# ------------------------------------------- -# Tests whether TYPE exists after having included INCLUDES, setting cache -# variable VAR accordingly. -ac_fn_c_check_type () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 -$as_echo_n "checking for $2... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - eval "$3=no" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof ($2)) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -if (sizeof (($2))) - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - eval "$3=yes" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_type - -# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES -# -------------------------------------------- -# Tries to find the compile-time value of EXPR in a program that includes -# INCLUDES, setting VAR accordingly. Returns whether the value could be -# computed -ac_fn_c_compute_int () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if test "$cross_compiling" = yes; then - # Depending upon the size, compute the lo and hi bounds. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=0 ac_mid=0 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid; break -else - as_fn_arith $ac_mid + 1 && ac_lo=$as_val - if test $ac_lo -le $ac_mid; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) < 0)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=-1 ac_mid=-1 - while :; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) >= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_lo=$ac_mid; break -else - as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val - if test $ac_mid -le $ac_hi; then - ac_lo= ac_hi= - break - fi - as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - done -else - ac_lo= ac_hi= -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -# Binary search between lo and hi bounds. -while test "x$ac_lo" != "x$ac_hi"; do - as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -static int test_array [1 - 2 * !(($2) <= $ac_mid)]; -test_array [0] = 0; -return test_array [0]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_hi=$ac_mid -else - as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -done -case $ac_lo in #(( -?*) eval "$3=\$ac_lo"; ac_retval=0 ;; -'') ac_retval=1 ;; -esac - else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -static long int longval () { return $2; } -static unsigned long int ulongval () { return $2; } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - return 1; - if (($2) < 0) - { - long int i = longval (); - if (i != ($2)) - return 1; - fprintf (f, "%ld", i); - } - else - { - unsigned long int i = ulongval (); - if (i != ($2)) - return 1; - fprintf (f, "%lu", i); - } - /* Do not output a trailing newline, as this causes \r\n confusion - on some platforms. */ - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - echo >>conftest.val; read $3 &5 -$as_echo_n "checking whether $as_decl_name is declared... " >&6; } -if eval \${$3+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$4 -int -main () -{ -#ifndef $as_decl_name -#ifdef __cplusplus - (void) $as_decl_use; -#else - (void) $as_decl_name; -#endif -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$3=yes" -else - eval "$3=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$3 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno - -} # ac_fn_c_check_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 1.3.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -cat <<_ASUNAME -## --------- ## -## Platform. ## -## --------- ## - -hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` - -/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` -/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` -/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` -/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` - -_ASUNAME - -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - $as_echo "PATH: $as_dir" - done -IFS=$as_save_IFS - -} >&5 - -cat >&5 <<_ACEOF - - -## ----------- ## -## Core tests. ## -## ----------- ## - -_ACEOF - - -# Keep a trace of the command line. -# Strip out --no-create and --no-recursion so they do not pile up. -# Strip out --silent because we don't want to record it for future runs. -# Also quote any args containing shell meta-characters. -# Make two passes to allow for proper duplicate-argument suppression. -ac_configure_args= -ac_configure_args0= -ac_configure_args1= -ac_must_keep_next=false -for ac_pass in 1 2 -do - for ac_arg - do - case $ac_arg in - -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil) - continue ;; - *\'*) - ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - case $ac_pass in - 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; - 2) - as_fn_append ac_configure_args1 " '$ac_arg'" - if test $ac_must_keep_next = true; then - ac_must_keep_next=false # Got value, back to normal. - else - case $ac_arg in - *=* | --config-cache | -C | -disable-* | --disable-* \ - | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ - | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ - | -with-* | --with-* | -without-* | --without-* | --x) - case "$ac_configure_args0 " in - "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; - esac - ;; - -* ) ac_must_keep_next=true ;; - esac - fi - as_fn_append ac_configure_args " '$ac_arg'" - ;; - esac - done -done -{ ac_configure_args0=; unset ac_configure_args0;} -{ ac_configure_args1=; unset ac_configure_args1;} - -# When interrupted or exit'd, cleanup temporary files, and complete -# config.log. We remove comments because anyway the quotes in there -# would cause problems or look ugly. -# WARNING: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -trap 'exit_status=$? - # Save into config.log some information that might help in debugging. - { - echo - - $as_echo "## ---------------- ## -## Cache variables. ## -## ---------------- ##" - echo - # The following way of writing the cache mishandles newlines in values, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - $as_echo "## ----------------- ## -## Output variables. ## -## ----------------- ##" - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - $as_echo "## ------------------- ## -## File substitutions. ## -## ------------------- ##" - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - $as_echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - $as_echo "## ----------- ## -## confdefs.h. ## -## ----------- ##" - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - $as_echo "$as_me: caught signal $ac_signal" - $as_echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r conftest* confdefs* conf$$* $ac_clean_files && - exit $exit_status -' 0 -for ac_signal in 1 2 13 15; do - trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal -done -ac_signal=0 - -# confdefs.h avoids OS command line length limits that DEFS can exceed. -rm -f -r conftest* confdefs.h - -$as_echo "/* confdefs.h */" > confdefs.h - -# Predefined preprocessor variables. - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_NAME "$PACKAGE_NAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_TARNAME "$PACKAGE_TARNAME" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_VERSION "$PACKAGE_VERSION" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_STRING "$PACKAGE_STRING" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" -_ACEOF - -cat >>confdefs.h <<_ACEOF -#define PACKAGE_URL "$PACKAGE_URL" -_ACEOF - - -# Let the site file select an alternate cache file if it wants to. -# Prefer an explicitly selected file to automatically selected ones. -ac_site_file1=NONE -ac_site_file2=NONE -if test -n "$CONFIG_SITE"; then - # We do not want a PATH search for config.site. - case $CONFIG_SITE in #(( - -*) ac_site_file1=./$CONFIG_SITE;; - */*) ac_site_file1=$CONFIG_SITE;; - *) ac_site_file1=./$CONFIG_SITE;; - esac -elif test "x$prefix" != xNONE; then - ac_site_file1=$prefix/share/config.site - ac_site_file2=$prefix/etc/config.site -else - ac_site_file1=$ac_default_prefix/share/config.site - ac_site_file2=$ac_default_prefix/etc/config.site -fi -for ac_site_file in "$ac_site_file1" "$ac_site_file2" -do - test "x$ac_site_file" = xNONE && continue - if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 -$as_echo "$as_me: loading site script $ac_site_file" >&6;} - sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" \ - || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "failed to load site script $ac_site_file -See \`config.log' for more details" "$LINENO" 5; } - fi -done - -if test -r "$cache_file"; then - # Some versions of bash will fail to source /dev/null (special files - # actually), so we avoid doing that. DJGPP emulates it as a regular file. - if test /dev/null != "$cache_file" && test -f "$cache_file"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 -$as_echo "$as_me: loading cache $cache_file" >&6;} - case $cache_file in - [\\/]* | ?:[\\/]* ) . "$cache_file";; - *) . "./$cache_file";; - esac - fi -else - { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 -$as_echo "$as_me: creating cache $cache_file" >&6;} - >$cache_file -fi - -gl_func_list="$gl_func_list btowc" -gl_func_list="$gl_func_list canonicalize_file_name" -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" -gl_func_list="$gl_func_list mempcpy" -gl_func_list="$gl_func_list wmemchr" -gl_func_list="$gl_func_list wmemcpy" -gl_func_list="$gl_func_list wmempcpy" -gl_header_list="$gl_header_list wctype.h" -gl_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" -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 mkstemp" -gl_func_list="$gl_func_list nl_langinfo" -gl_func_list="$gl_func_list wcscoll" -gl_header_list="$gl_header_list selinux/selinux.h" -gl_header_list="$gl_header_list wchar.h" -gl_header_list="$gl_header_list stdint.h" -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_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 _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 wctob" -# Check that the precious variables saved in the cache have kept the same -# value. -ac_cache_corrupted=false -for ac_var in $ac_precious_vars; do - eval ac_old_set=\$ac_cv_env_${ac_var}_set - eval ac_new_set=\$ac_env_${ac_var}_set - eval ac_old_val=\$ac_cv_env_${ac_var}_value - eval ac_new_val=\$ac_env_${ac_var}_value - case $ac_old_set,$ac_new_set in - set,) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,set) - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 -$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} - ac_cache_corrupted=: ;; - ,);; - *) - if test "x$ac_old_val" != "x$ac_new_val"; then - # differences in whitespace do not lead to failure. - ac_old_val_w=`echo x $ac_old_val` - ac_new_val_w=`echo x $ac_new_val` - if test "$ac_old_val_w" != "$ac_new_val_w"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 -$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} - ac_cache_corrupted=: - else - { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 -$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} - eval $ac_var=\$ac_old_val - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 -$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 -$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} - fi;; - esac - # Pass precious variables to config.status. - if test "$ac_new_set" = set; then - case $ac_new_val in - *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; - *) ac_arg=$ac_var=$ac_new_val ;; - esac - case " $ac_configure_args " in - *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. - *) as_fn_append ac_configure_args " '$ac_arg'" ;; - esac - fi -done -if $ac_cache_corrupted; then - { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 -$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 -fi -## -------------------- ## -## Main body of script. ## -## -------------------- ## - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - - -ac_aux_dir= -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" - break - elif test -f "$ac_dir/install.sh"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/install.sh -c" - break - elif test -f "$ac_dir/shtool"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/shtool install -c" - break - fi -done -if test -z "$ac_aux_dir"; then - 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, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -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.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 -# incompatible versions: -# SysV /etc/install, /usr/sbin/install -# SunOS /usr/etc/install -# IRIX /sbin/install -# AIX /bin/install -# AmigaOS /C/install, which installs bootblocks on floppy discs -# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag -# AFS /usr/afsws/bin/install, which mishandles nonexistent args -# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" -# OS/2's system install, which has a completely different semantic -# ./install, which can be erroneously created by make from ./install.sh. -# Reject install programs that cannot install multiple files. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 -$as_echo_n "checking for a BSD-compatible install... " >&6; } -if test -z "$INSTALL"; then -if ${ac_cv_path_install+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - # Account for people who put trailing slashes in PATH elements. -case $as_dir/ in #(( - ./ | .// | /[cC]/* | \ - /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ - ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ - /usr/ucb/* ) ;; - *) - # OSF1 and SCO ODT 3.0 have their own names for install. - # Don't use installbsd from OSF since it installs stuff as root - # by default. - for ac_prog in ginstall scoinst install; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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. - : - elif test $ac_prog = install && - grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then - # program-specific install script used by HP pwplus--don't use. - : - else - rm -rf conftest.one conftest.two conftest.dir - echo one > conftest.one - echo two > conftest.two - mkdir conftest.dir - if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && - test -s conftest.one && test -s conftest.two && - test -s conftest.dir/conftest.one && - test -s conftest.dir/conftest.two - then - ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" - break 3 - fi - fi - fi - done - done - ;; -esac - - done -IFS=$as_save_IFS - -rm -rf conftest.one conftest.two conftest.dir - -fi - if test "${ac_cv_path_install+set}" = set; then - INSTALL=$ac_cv_path_install - else - # As a last resort, use the slow shell script. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - INSTALL=$ac_install_sh - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 -$as_echo "$INSTALL" >&6; } - -# Use test -z because SunOS4 sh mishandles braces in ${var-val}. -# It thinks the first close brace ends the variable substitution. -test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' - -test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' - -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; } -# Reject unsafe characters in $srcdir or the absolute working directory -# name. Accept space and tab only in the latter. -am_lf=' -' -case `pwd` in - *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; -esac -case $srcdir in - *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; -esac - -# 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 ( - 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 - # Ok. - : -else - as_fn_error $? "newly created file is older than distributed files! -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. -test "$program_suffix" != NONE && - program_transform_name="s&\$&$program_suffix&;$program_transform_name" -# Double any \ or $. -# By default was `s,x,x', remove it if useless. -ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' -program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` - -# expand $ac_aux_dir to an absolute path -am_aux_dir=`cd $ac_aux_dir && pwd` - -if test x"${MISSING+set}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; - *) - MISSING="\${SHELL} $am_aux_dir/missing" ;; - esac -fi -# Use eval to expand $SHELL -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;} -fi - -if test x"${install_sh}" != xset; then - case $am_aux_dir in - *\ * | *\ *) - install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; - *) - install_sh="\${SHELL} $am_aux_dir/install-sh" - esac -fi - -# 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. -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. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - $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 -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" - $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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - 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 - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 -$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } -if test -z "$MKDIR_P"; then - if ${ac_cv_path_mkdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - 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) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done - done -IFS=$as_save_IFS - -fi - - test -d ./--version && rmdir ./--version - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - MKDIR_P="$ac_install_sh -d" - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 -$as_echo "$MKDIR_P" >&6; } - - -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. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AWK+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AWK"; then - ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AWK=$ac_cv_prog_AWK -if test -n "$AWK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 -$as_echo "$AWK" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AWK" && break -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 -$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } -set x ${MAKE-make} -ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - SET_MAKE= -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - SET_MAKE="MAKE=${MAKE-make}" -fi - -rm -rf .tst 2>/dev/null -mkdir .tst 2>/dev/null -if test -d .tst; then - am__leading_dot=. -else - am__leading_dot=_ -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." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 - fi -fi - -# test whether we have cygpath -if test -z "$CYGPATH_W"; then - if (cygpath --version) >/dev/null 2>/dev/null; then - CYGPATH_W='cygpath -w' - else - CYGPATH_W=echo - fi -fi - - -# Define the identity of the package. - PACKAGE='augeas' - VERSION='1.3.0' - - -cat >>confdefs.h <<_ACEOF -#define PACKAGE "$PACKAGE" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define VERSION "$VERSION" -_ACEOF - -# Some tools Automake needs. - -ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} - - -AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} - - -AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} - - -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. Yes, it's still used -# in the wild :-( We should find a proper way to deprecate it ... -AMTAR='$${TAR-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 -' - - - - - - -# 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=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. - - -for ac_prog in naturaldocs NaturalDocs -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ND_PROG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ND_PROG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ND_PROG="$ND_PROG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_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 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ND_PROG=$ac_cv_path_ND_PROG -if test -n "$ND_PROG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ND_PROG" >&5 -$as_echo "$ND_PROG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ND_PROG" && break -done -test -n "$ND_PROG" || ND_PROG="missing" - - if test "x$ND_PROG" != "xmissing"; then - ND_ENABLED_TRUE= - ND_ENABLED_FALSE='#' -else - ND_ENABLED_TRUE='#' - ND_ENABLED_FALSE= -fi - - -ND_FORMAT=HTML - -# Check whether --with-naturaldocs-output was given. -if test "${with_naturaldocs_output+set}" = set; then : - withval=$with_naturaldocs_output; - if test "x$ND_PROG" = "xmissing"; then - as_fn_error $? "NaturalDocs was not found on your path; there's no point in setting the output format" "$LINENO" 5 - fi - case $withval in - HTML|FramedHTML) - ND_FORMAT=$withval - ;; - *) - as_fn_error $? "$withval is not a supported output format for NaturalDocs" "$LINENO" 5 - ;; - esac - -fi - - - - -PDFDOCS="" - -# Check whether --with-pdfdocs was given. -if test "${with_pdfdocs+set}" = set; then : - withval=$with_pdfdocs; # Extract the first word of "pdflatex", so it can be a program name with args. -set dummy pdflatex; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PDFLATEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PDFLATEX in - [\\/]* | ?:[\\/]*) - ac_cv_path_PDFLATEX="$PDFLATEX" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_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 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_PDFLATEX" && ac_cv_path_PDFLATEX="no" - ;; -esac -fi -PDFLATEX=$ac_cv_path_PDFLATEX -if test -n "$PDFLATEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PDFLATEX" >&5 -$as_echo "$PDFLATEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - if test "x$PDFLATEX" = "xno"; then - as_fn_error $? "You asked to use PDFLatex but it could not be found" "$LINENO" 5 - else - PDFDOCS="pdfdocs" - fi - -fi - - - - - -# Check whether --with-failmalloc was given. -if test "${with_failmalloc+set}" = set; then : - withval=$with_failmalloc; LIBFAILMALLOC="$with_failmalloc" - -else - with_failmalloc=no -fi - - - if test x$with_failmalloc != xno; then - WITH_FAILMALLOC_TRUE= - WITH_FAILMALLOC_FALSE='#' -else - WITH_FAILMALLOC_TRUE='#' - WITH_FAILMALLOC_FALSE= -fi - - -# Check whether --enable-debug was given. -if test "${enable_debug+set}" = set; then : - enableval=$enable_debug; -else - enable_debug=yes -fi - - if test x"$enable_debug" = x"yes"; then - ENABLE_DEBUG_TRUE= - ENABLE_DEBUG_FALSE='#' -else - ENABLE_DEBUG_TRUE='#' - ENABLE_DEBUG_FALSE= -fi - -if test x"$enable_debug" = x"yes"; then - -$as_echo "#define ENABLE_DEBUG 1" >>confdefs.h - -fi - -LIBAUGEAS_VERSION_INFO=19:0:19 - -LIBFA_VERSION_INFO=5:0:4 - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 -$as_echo_n "checking build system type... " >&6; } -if ${ac_cv_build+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 -ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 -$as_echo "$ac_cv_build" >&6; } -case $ac_cv_build in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 -$as_echo_n "checking host system type... " >&6; } -if ${ac_cv_host+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 -$as_echo "$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -DEPDIR="${am__leading_dot}deps" - -ac_config_commands="$ac_config_commands depfiles" - - -am_make=${MAKE-make} -cat > confinc << 'END' -am__doit: - @echo this is the am__doit target -.PHONY: am__doit -END -# If we don't find an include directive, just comment out the code. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 -$as_echo_n "checking for style of include used by $am_make... " >&6; } -am__include="#" -am__quote= -_am_result=none -# First try GNU make style include. -echo "include confinc" > confmf -# 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 - am__quote= - _am_result=GNU - ;; -esac -# Now try BSD make style include. -if test "$am__include" = "#"; then - echo '.include "confinc"' > confmf - case `$am_make -s -f confmf 2> /dev/null` in #( - *the\ am__doit\ target*) - am__include=.include - am__quote="\"" - _am_result=BSD - ;; - esac -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 -$as_echo "$_am_result" >&6; } -rm -f confinc confmf - -# Check whether --enable-dependency-tracking was given. -if test "${enable_dependency_tracking+set}" = set; then : - enableval=$enable_dependency_tracking; -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= - AMDEP_FALSE='#' -else - AMDEP_TRUE='#' - AMDEP_FALSE= -fi - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}gcc" - $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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="gcc" - $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_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}cc" - $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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" -# Try to create an executable without -o first, disregard a.out. -# It will help us diagnose broken compilers, and finding out an intuition -# of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } -ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` - -# The possible output files: -ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" - -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { { ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi -if test -z "$ac_file"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -$as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables -See \`config.log' for more details" "$LINENO" 5; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 -$as_echo "$ac_file" >&6; } -ac_exeext=$ac_cv_exeext - -rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 -$as_echo_n "checking for suffix of executables... " >&6; } -if { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - # If both `conftest.exe' and `conftest' are `present' (well, observable) -# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will -# work properly (i.e., refer to `conftest.exe'), while it won't with -# `rm'. -for ac_file in conftest.exe conftest conftest.*; do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - break;; - * ) break;; - esac -done -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest conftest$ac_cv_exeext -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 -$as_echo "$ac_cv_exeext" >&6; } - -rm -f conftest.$ac_ext -EXEEXT=$ac_cv_exeext -ac_exeext=$EXEEXT -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -FILE *f = fopen ("conftest.out", "w"); - return ferror (f) || fclose (f) != 0; - - ; - return 0; -} -_ACEOF -ac_clean_files="$ac_clean_files conftest.out" -# Check that the compiler produces executables we can run. If not, either -# the compiler is broken, or we cross compile. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 -$as_echo_n "checking whether we are cross compiling... " >&6; } -if test "$cross_compiling" != yes; then - { { ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if { ac_try='./conftest$ac_cv_exeext' - { { case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then - cross_compiling=no - else - if test "$cross_compiling" = maybe; then - cross_compiling=yes - else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. -If you meant to cross compile, use \`--host'. -See \`config.log' for more details" "$LINENO" 5; } - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 -$as_echo "$cross_compiling" >&6; } - -rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out -ac_clean_files=$ac_clean_files_save -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 -$as_echo_n "checking for suffix of object files... " >&6; } -if ${ac_cv_objext+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -rm -f conftest.o conftest.obj -if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then : - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; - *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` - break;; - esac -done -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot compute suffix of object files: cannot compile -See \`config.log' for more details" "$LINENO" 5; } -fi -rm -f conftest.$ac_cv_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 -$as_echo "$ac_cv_objext" >&6; } -OBJEXT=$ac_cv_objext -ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 -$as_echo_n "checking how to run the C preprocessor... " >&6; } -# On Suns, sometimes $CPP names a directory. -if test -n "$CPP" && test -d "$CPP"; then - CPP= -fi -if test -z "$CPP"; then - if ${ac_cv_prog_CPP+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CPP needs to be expanded - for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" - do - ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CPP=$CPP - -fi - CPP=$ac_cv_prog_CPP -else - ac_cv_prog_CPP=$CPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 -$as_echo "$CPP" >&6; } -ac_preproc_ok=false -for ac_c_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.i conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.i conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.i conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details" "$LINENO" 5; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 -$as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if ${ac_cv_path_GREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$GREP"; then - ac_path_GREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_GREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_GREP"; then - as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_GREP=$GREP -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 -$as_echo "$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 -$as_echo_n "checking for egrep... " >&6; } -if ${ac_cv_path_EGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 - then ac_cv_path_EGREP="$GREP -E" - else - if test -z "$EGREP"; then - ac_path_EGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_EGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_EGREP"; then - as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_EGREP=$EGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 -$as_echo "$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 -$as_echo_n "checking for ANSI C header files... " >&6; } -if ${ac_cv_header_stdc+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#include -#include - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdc=yes -else - ac_cv_header_stdc=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -if test $ac_cv_header_stdc = yes; then - # SunOS 4.x string.h does not declare mem*, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "memchr" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "free" >/dev/null 2>&1; then : - -else - ac_cv_header_stdc=no -fi -rm -f conftest* - -fi - -if test $ac_cv_header_stdc = yes; then - # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -#if ((' ' & 0x0FF) == 0x020) -# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') -# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) -#else -# define ISLOWER(c) \ - (('a' <= (c) && (c) <= 'i') \ - || ('j' <= (c) && (c) <= 'r') \ - || ('s' <= (c) && (c) <= 'z')) -# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) -#endif - -#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) -int -main () -{ - int i; - for (i = 0; i < 256; i++) - if (XOR (islower (i), ISLOWER (i)) - || toupper (i) != TOUPPER (i)) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_header_stdc=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 -$as_echo "$ac_cv_header_stdc" >&6; } -if test $ac_cv_header_stdc = yes; then - -$as_echo "#define STDC_HEADERS 1" >>confdefs.h - -fi - -# On IRIX 5.3, sys/types and inttypes.h are conflicting. -for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ - inttypes.h stdint.h unistd.h -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_compile "$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 - - - - - - ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" -if test "x$ac_cv_header_minix_config_h" = xyes; then : - MINIX=yes -else - MINIX= -fi - - - if test "$MINIX" = yes; then - -$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h - - -$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h - - -$as_echo "#define _MINIX 1" >>confdefs.h - - fi - - case "$host_os" in - hpux*) - -$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h - - ;; - esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 -$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } -if ${ac_cv_safe_to_define___extensions__+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# define __EXTENSIONS__ 1 - $ac_includes_default -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_safe_to_define___extensions__=yes -else - ac_cv_safe_to_define___extensions__=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 -$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } - test $ac_cv_safe_to_define___extensions__ = yes && - $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h - - $as_echo "#define _ALL_SOURCE 1" >>confdefs.h - - $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h - - $as_echo "#define _GNU_SOURCE 1" >>confdefs.h - - $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h - - $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h - - - - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}gcc" - $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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="gcc" - $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_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -else - CC="$ac_cv_prog_CC" -fi - -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}cc" - $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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GCC=yes -else - GCC= -fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -else - CFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#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); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -depcc="$CC" am_compiler_list= - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 -$as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then - # 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". - 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. - cp "$am_depcomp" conftest.dir - cd conftest.dir - # We will build objects and dependencies in a subdirectory because - # it helps to detect inapplicable dependency modes. For instance - # both Tru64's cc and ICC support -MD to output dependencies as a - # side effect of compilation, but ICC will put the dependencies in - # the current directory while Tru64 will put them in the object - # directory. - mkdir sub - - am_cv_CC_dependencies_compiler_type=none - if test "$am_compiler_list" = ""; then - am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` - fi - am__universal=false - case " $depcc " in #( - *\ -arch\ *\ -arch\ *) am__universal=true ;; - esac - - for depmode in $am_compiler_list; do - # Setup a source with many dependencies, because some compilers - # like to wrap large dependency lists on column 80 (with \), and - # we should not choose a depcomp mode which is confused by this. - # - # We need to recreate these files for each test, as the compiler may - # overwrite some of them when testing with obscure command lines. - # This happens at least with the AIX C compiler. - : > 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 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" - # 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. - am__obj=sub/conftest.${OBJEXT-o} - am__minus_obj="-o $am__obj" - case $depmode in - gcc) - # This depmode causes a compiler race in universal mode. - test "$am__universal" = false || continue - ;; - nosideeffect) - # 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 - ;; - 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} - am__minus_obj= - ;; - none) break ;; - esac - if depmode=$depmode \ - source=sub/conftest.c object=$am__obj \ - depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ - $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ - >/dev/null 2>conftest.err && - grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && - grep $am__obj sub/conftest.Po > /dev/null 2>&1 && - ${MAKE-make} -s -f confmf > /dev/null 2>&1; then - # icc doesn't choke on unknown options, it will just issue warnings - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode - break - fi - fi - done - - cd .. - rm -rf conftest.dir -else - am_cv_CC_dependencies_compiler_type=none -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type - - if - test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' -else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 -$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } -if ${gl_cv_c_amsterdam_compiler+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __ACK__ -Amsterdam -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Amsterdam" >/dev/null 2>&1; then : - gl_cv_c_amsterdam_compiler=yes -else - gl_cv_c_amsterdam_compiler=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 -$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } - if test -z "$AR"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - AR='cc -c.a' - if test -z "$ARFLAGS"; then - ARFLAGS='-o' - fi - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="${ac_tool_prefix}ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AR"; then - ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="ar" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AR" = x; then - AR="ar" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -else - AR="$ac_cv_prog_AR" -fi - - if test -z "$ARFLAGS"; then - ARFLAGS='cru' - fi - fi - else - if test -z "$ARFLAGS"; then - ARFLAGS='cru' - fi - fi - - - if test -z "$RANLIB"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - RANLIB=':' - else - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - - fi - fi - - - - - - - - - - - # 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 : - 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 - - - - - - - # 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 - - - - -case `pwd` in - *\ * | *\ *) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 -$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; -esac - - - -macro_version='2.4.2' -macro_revision='1.3337' - - - - - - - - - - - - - -ltmain="$ac_aux_dir/ltmain.sh" - -# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - -ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 -$as_echo_n "checking how to print strings... " >&6; } -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "" -} - -case "$ECHO" in - printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 -$as_echo "printf" >&6; } ;; - print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 -$as_echo "print -r" >&6; } ;; - *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 -$as_echo "cat" >&6; } ;; -esac - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 -$as_echo_n "checking for a sed that does not truncate output... " >&6; } -if ${ac_cv_path_SED+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ - for ac_i in 1 2 3 4 5 6 7; do - ac_script="$ac_script$as_nl$ac_script" - done - echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed - { ac_script=; unset ac_script;} - if test -z "$SED"; then - ac_path_SED_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - as_fn_executable_p "$ac_path_SED" || continue -# Check for GNU ac_path_SED and select it if it is found. - # Check for GNU $ac_path_SED -case `"$ac_path_SED" --version 2>&1` in -*GNU*) - ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo '' >> "conftest.nl" - "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_SED_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_SED="$ac_path_SED" - ac_path_SED_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_SED_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_SED"; then - as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 - fi -else - ac_cv_path_SED=$SED -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 -$as_echo "$ac_cv_path_SED" >&6; } - SED="$ac_cv_path_SED" - rm -f conftest.sed - -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 -$as_echo_n "checking for fgrep... " >&6; } -if ${ac_cv_path_FGREP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 - then ac_cv_path_FGREP="$GREP -F" - else - if test -z "$FGREP"; then - ac_path_FGREP_found=false - # Loop through the user's path and test for each of PROGNAME-LIST - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - 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" - 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 -*GNU*) - ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; -*) - ac_count=0 - $as_echo_n 0123456789 >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - $as_echo 'FGREP' >> "conftest.nl" - "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - as_fn_arith $ac_count + 1 && ac_count=$as_val - if test $ac_count -gt ${ac_path_FGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_FGREP="$ac_path_FGREP" - ac_path_FGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - $ac_path_FGREP_found && break 3 - done - done - done -IFS=$as_save_IFS - if test -z "$ac_cv_path_FGREP"; then - as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 - fi -else - ac_cv_path_FGREP=$FGREP -fi - - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 -$as_echo "$ac_cv_path_FGREP" >&6; } - FGREP="$ac_cv_path_FGREP" - - -test -z "$GREP" && GREP=grep - - - - - - - - - - - - - - - - - - - -# 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 - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 -$as_echo_n "checking for ld used by $CC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | ?:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${lt_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${lt_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU lds only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$lt_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$lt_cv_prog_gnu_ld - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 -$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if ${lt_cv_path_NM+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 -$as_echo "$lt_cv_path_NM" >&6; } -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - if test -n "$ac_tool_prefix"; then - for ac_prog in dumpbin "link -dump" - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DUMPBIN"; then - ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DUMPBIN=$ac_cv_prog_DUMPBIN -if test -n "$DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 -$as_echo "$DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$DUMPBIN" && break - done -fi -if test -z "$DUMPBIN"; then - ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in dumpbin "link -dump" -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DUMPBIN"; then - ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN -if test -n "$ac_ct_DUMPBIN"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 -$as_echo "$ac_ct_DUMPBIN" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_DUMPBIN" && break -done - - if test "x$ac_ct_DUMPBIN" = x; then - DUMPBIN=":" - 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 - DUMPBIN=$ac_ct_DUMPBIN - fi -fi - - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 -$as_echo_n "checking the name lister ($NM) interface... " >&6; } -if ${lt_cv_nm_interface+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&5 - (eval echo "\"\$as_me:$LINENO: output\"" >&5) - cat conftest.out >&5 - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 -$as_echo "$lt_cv_nm_interface" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 -$as_echo_n "checking whether ln -s works... " >&6; } -LN_S=$as_ln_s -if test "$LN_S" = "ln -s"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 -$as_echo "no, using $LN_S" >&6; } -fi - -# find the maximum length of command line arguments -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 -$as_echo_n "checking the maximum length of command line arguments... " >&6; } -if ${lt_cv_sys_max_cmd_len+:} false; then : - $as_echo_n "(cached) " >&6 -else - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac - -fi - -if test -n $lt_cv_sys_max_cmd_len ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 -$as_echo "$lt_cv_sys_max_cmd_len" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 -$as_echo "none" >&6; } -fi -max_cmd_len=$lt_cv_sys_max_cmd_len - - - - - - -: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 -$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 -$as_echo "$xsi_shell" >&6; } - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 -$as_echo_n "checking whether the shell understands \"+=\"... " >&6; } -lt_shell_append=no -( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 -$as_echo "$lt_shell_append" >&6; } - - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi - - - - - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 -$as_echo_n "checking how to convert $build file names to $host format... " >&6; } -if ${lt_cv_to_host_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac - -fi - -to_host_file_cmd=$lt_cv_to_host_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 -$as_echo "$lt_cv_to_host_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 -$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } -if ${lt_cv_to_tool_file_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - #assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac - -fi - -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 -$as_echo "$lt_cv_to_tool_file_cmd" >&6; } - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if ${lt_cv_ld_reload_flag+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - if test "$GCC" != yes; then - reload_cmds=false - fi - ;; - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump" - $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 -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; 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_OBJDUMP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump" - $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_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" - 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 - OBJDUMP=$ac_ct_OBJDUMP - fi -else - OBJDUMP="$ac_cv_prog_OBJDUMP" -fi - -test -z "$OBJDUMP" && OBJDUMP=objdump - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 -$as_echo_n "checking how to recognize dependent libraries... " >&6; } -if ${lt_cv_deplibs_check_method+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_file_magic_cmd='$MAGIC_CMD' -lt_cv_file_magic_test_file= -lt_cv_deplibs_check_method='unknown' -# Need to set the preceding variable on all platforms that support -# interlibrary dependencies. -# 'none' -- dependencies not supported. -# `unknown' -- same as none, but documents that we really don't know. -# 'pass_all' -- all dependencies passed with no checks. -# 'test_compile' -- check by making test program. -# 'file_magic [[regex]]' -- check by looking for files in library path -# which responds to the $file_magic_cmd with a given extended regex. -# If you have `file' or equivalent on your system and you're not sure -# whether `pass_all' will *always* work, you probably want this one. - -case $host_os in -aix[4-9]*) - lt_cv_deplibs_check_method=pass_all - ;; - -beos*) - lt_cv_deplibs_check_method=pass_all - ;; - -bsdi[45]*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' - lt_cv_file_magic_cmd='/usr/bin/file -L' - lt_cv_file_magic_test_file=/shlib/libc.so - ;; - -cygwin*) - # func_win32_libid is a shell function defined in ltmain.sh - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_win32_libid shell function, so use a weaker test based on 'objdump', - # unless we find 'file', for example because we are cross-compiling. - # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. - if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[3-9]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 -$as_echo "$lt_cv_deplibs_check_method" >&6; } - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - - - - - - - - - - - - - - - - - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool" - $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 -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; 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_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool" - $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_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - 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 - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - -test -z "$DLLTOOL" && DLLTOOL=dlltool - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 -$as_echo_n "checking how to associate runtime and link libraries... " >&6; } -if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 -$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - - - - - - - -if test -n "$ac_tool_prefix"; then - for ac_prog in ar - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AR"; then - ac_cv_prog_AR="$AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AR="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AR=$ac_cv_prog_AR -if test -n "$AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 -$as_echo "$AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$AR" && break - done -fi -if test -z "$AR"; then - ac_ct_AR=$AR - for ac_prog in ar -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AR+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AR"; then - ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AR="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AR=$ac_cv_prog_ac_ct_AR -if test -n "$ac_ct_AR"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 -$as_echo "$ac_ct_AR" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_AR" && break -done - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -fi - -: ${AR=ar} -: ${AR_FLAGS=cru} - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 -$as_echo_n "checking for archiver @FILE support... " >&6; } -if ${lt_cv_ar_at_file+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ar_at_file=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 - (eval $lt_ar_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 -$as_echo "$lt_cv_ar_at_file" >&6; } - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi - - - - - - - -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. -set dummy ${ac_tool_prefix}strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$STRIP"; then - ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip" - $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 -STRIP=$ac_cv_prog_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_STRIP"; then - ac_ct_STRIP=$STRIP - # Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_STRIP"; then - ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip" - $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_STRIP=$ac_cv_prog_ac_ct_STRIP -if test -n "$ac_ct_STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 -$as_echo "$ac_ct_STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - 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 - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -test -z "$STRIP" && STRIP=: - - - - - - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. -set dummy ${ac_tool_prefix}ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$RANLIB"; then - ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -RANLIB=$ac_cv_prog_RANLIB -if test -n "$RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 -$as_echo "$RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_RANLIB"; then - ac_ct_RANLIB=$RANLIB - # Extract the first word of "ranlib", so it can be a program name with args. -set dummy ranlib; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_RANLIB"; then - ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_RANLIB="ranlib" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB -if test -n "$ac_ct_RANLIB"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 -$as_echo "$ac_ct_RANLIB" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -else - RANLIB="$ac_cv_prog_RANLIB" -fi - -test -z "$RANLIB" && RANLIB=: - - - - - - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# Check for command to grab the raw symbol name followed by C symbol from nm. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 -$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if ${lt_cv_sys_global_symbol_pipe+:} false; then : - $as_echo_n "(cached) " >&6 -else - -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[BCDEGRST]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([_A-Za-z][_A-Za-z0-9]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[BCDT]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[ABCDGISTW]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDEGRST]' - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -sysv4) - symcode='[DFNSTU]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[ABCDGIRSTW]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - # Now try to grab the symbols. - nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT_DLSYM_CONST -#else -# define LT_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" - 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 - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&5 - fi - else - echo "cannot find nm_test_var in $nlist" >&5 - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 - fi - else - echo "$progname: failed program was:" >&5 - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done - -fi - -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 -$as_echo "failed" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 -$as_echo "ok" >&6; } -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 -$as_echo_n "checking for sysroot... " >&6; } - -# Check whether --with-sysroot was given. -if test "${with_sysroot+set}" = set; then : - withval=$with_sysroot; -else - with_sysroot=no -fi - - -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 -$as_echo "${with_sysroot}" >&6; } - as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 - ;; -esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 -$as_echo "${lt_sysroot:-no}" >&6; } - - - - - -# Check whether --enable-libtool-lock was given. -if test "${enable_libtool_lock+set}" = set; then : - enableval=$enable_libtool_lock; -fi - -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # Find out which ABI we are using. - echo 'int i;' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '#line '$LINENO' "configure"' > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -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 - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 -$as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if ${lt_cv_cc_needs_belf+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_cc_needs_belf=yes -else - lt_cv_cc_needs_belf=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 -$as_echo "$lt_cv_cc_needs_belf" >&6; } - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*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 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - case `/usr/bin/file conftest.o` in - *64-bit*) - case $lt_cv_prog_gnu_ld in - 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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" - -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. -set dummy ${ac_tool_prefix}mt; 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_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$MANIFEST_TOOL"; then - ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # 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_MANIFEST_TOOL="${ac_tool_prefix}mt" - $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 -MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL -if test -n "$MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 -$as_echo "$MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_MANIFEST_TOOL"; then - ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL - # Extract the first word of "mt", so it can be a program name with args. -set dummy mt; 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_MANIFEST_TOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_MANIFEST_TOOL"; then - ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # 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_MANIFEST_TOOL="mt" - $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_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL -if test -n "$ac_ct_MANIFEST_TOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 -$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_MANIFEST_TOOL" = x; then - MANIFEST_TOOL=":" - 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 - MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL - fi -else - MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" -fi - -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 -$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } -if ${lt_cv_path_mainfest_tool+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&5 - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest* -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 -$as_echo "$lt_cv_path_mainfest_tool" >&6; } -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi - - - - - - - case $host_os in - rhapsody* | darwin*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. -set dummy ${ac_tool_prefix}dsymutil; 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_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DSYMUTIL"; then - ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil" - $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 -DSYMUTIL=$ac_cv_prog_DSYMUTIL -if test -n "$DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 -$as_echo "$DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DSYMUTIL"; then - ac_ct_DSYMUTIL=$DSYMUTIL - # Extract the first word of "dsymutil", so it can be a program name with args. -set dummy dsymutil; 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_DSYMUTIL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DSYMUTIL"; then - ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil" - $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_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL -if test -n "$ac_ct_DSYMUTIL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 -$as_echo "$ac_ct_DSYMUTIL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DSYMUTIL" = x; then - DSYMUTIL=":" - 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 - DSYMUTIL=$ac_ct_DSYMUTIL - fi -else - DSYMUTIL="$ac_cv_prog_DSYMUTIL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. -set dummy ${ac_tool_prefix}nmedit; 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_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$NMEDIT"; then - ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit" - $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 -NMEDIT=$ac_cv_prog_NMEDIT -if test -n "$NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 -$as_echo "$NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_NMEDIT"; then - ac_ct_NMEDIT=$NMEDIT - # Extract the first word of "nmedit", so it can be a program name with args. -set dummy nmedit; 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_NMEDIT+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_NMEDIT"; then - ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit" - $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_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT -if test -n "$ac_ct_NMEDIT"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 -$as_echo "$ac_ct_NMEDIT" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_NMEDIT" = x; then - NMEDIT=":" - 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 - NMEDIT=$ac_ct_NMEDIT - fi -else - NMEDIT="$ac_cv_prog_NMEDIT" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. -set dummy ${ac_tool_prefix}lipo; 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_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LIPO"; then - ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo" - $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 -LIPO=$ac_cv_prog_LIPO -if test -n "$LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 -$as_echo "$LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_LIPO"; then - ac_ct_LIPO=$LIPO - # Extract the first word of "lipo", so it can be a program name with args. -set dummy lipo; 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_LIPO+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_LIPO"; then - ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo" - $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_LIPO=$ac_cv_prog_ac_ct_LIPO -if test -n "$ac_ct_LIPO"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 -$as_echo "$ac_ct_LIPO" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_LIPO" = x; then - LIPO=":" - 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 - LIPO=$ac_ct_LIPO - fi -else - LIPO="$ac_cv_prog_LIPO" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool; 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_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL"; then - ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool" - $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 -OTOOL=$ac_cv_prog_OTOOL -if test -n "$OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 -$as_echo "$OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL"; then - ac_ct_OTOOL=$OTOOL - # Extract the first word of "otool", so it can be a program name with args. -set dummy otool; 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_OTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL"; then - ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool" - $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_OTOOL=$ac_cv_prog_ac_ct_OTOOL -if test -n "$ac_ct_OTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 -$as_echo "$ac_ct_OTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL" = x; then - OTOOL=":" - 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 - OTOOL=$ac_ct_OTOOL - fi -else - OTOOL="$ac_cv_prog_OTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. -set dummy ${ac_tool_prefix}otool64; 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_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$OTOOL64"; then - ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64" - $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 -OTOOL64=$ac_cv_prog_OTOOL64 -if test -n "$OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 -$as_echo "$OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_OTOOL64"; then - ac_ct_OTOOL64=$OTOOL64 - # Extract the first word of "otool64", so it can be a program name with args. -set dummy otool64; 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_OTOOL64+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_OTOOL64"; then - ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64" - $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_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 -if test -n "$ac_ct_OTOOL64"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 -$as_echo "$ac_ct_OTOOL64" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_OTOOL64" = x; then - OTOOL64=":" - 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 - OTOOL64=$ac_ct_OTOOL64 - fi -else - OTOOL64="$ac_cv_prog_OTOOL64" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if ${lt_cv_apple_cc_single_mod+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -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 : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -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 : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_force_load=no - cat > conftest.c << _LT_EOF -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 - echo "$AR cru libconftest.a conftest.o" >&5 - $AR cru libconftest.a conftest.o 2>&5 - echo "$RANLIB libconftest.a" >&5 - $RANLIB libconftest.a 2>&5 - cat > conftest.c << _LT_EOF -int main() { return 0;} -_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 -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 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 -$as_echo "$lt_cv_ld_force_load" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - - - -# Set options - - - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_shared=yes -fi - - - - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=yes -fi - - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - 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 - - -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_fast_install=yes -fi - - - - - - - - - - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -test -z "$LN_S" && LN_S="ln -s" - - - - - - - - - - - - - - -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 -$as_echo_n "checking for objdir... " >&6; } -if ${lt_cv_objdir+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 -$as_echo "$lt_cv_objdir" >&6; } -objdir=$lt_cv_objdir - - - - - -cat >>confdefs.h <<_ACEOF -#define LT_OBJDIR "$lt_cv_objdir/" -_ACEOF - - - - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` - - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 -$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/${ac_tool_prefix}file; then - lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - - - -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 -$as_echo_n "checking for file... " >&6; } -if ${lt_cv_path_MAGIC_CMD+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $MAGIC_CMD in -[\\/*] | ?:[\\/]*) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/file; then - lt_cv_path_MAGIC_CMD="$ac_dir/file" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac -fi - -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 -$as_echo "$MAGIC_CMD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - else - MAGIC_CMD=: - fi -fi - - fi - ;; -esac - -# Use C for the default configuration in the libtool script - -lt_save_CC="$CC" -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -objext=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - - - - - - - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* - -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* - - -## 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_prog_compiler_no_builtin_flag= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; - *) - lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 -$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_rtti_exceptions=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="-fno-rtti -fno-exceptions" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_rtti_exceptions=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 -$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } - -if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then - lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" -else - : -fi - -fi - - - - - - - lt_prog_compiler_wl= -lt_prog_compiler_pic= -lt_prog_compiler_static= - - - if test "$GCC" = yes; then - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_static='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - lt_prog_compiler_pic='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - lt_prog_compiler_pic='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - lt_prog_compiler_static= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - ;; - - interix[3-9]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - lt_prog_compiler_can_build_shared=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - lt_prog_compiler_pic=-Kconform_pic - fi - ;; - - *) - lt_prog_compiler_pic='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - lt_prog_compiler_wl='-Xlinker ' - if test -n "$lt_prog_compiler_pic"; then - lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" - fi - ;; - esac - else - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - lt_prog_compiler_wl='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - lt_prog_compiler_static='-Bstatic' - else - lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - lt_prog_compiler_pic='-DDLL_EXPORT' - ;; - - hpux9* | hpux10* | hpux11*) - lt_prog_compiler_wl='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - lt_prog_compiler_static='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - lt_prog_compiler_wl='-Wl,' - # PIC (with -KPIC) is the default. - lt_prog_compiler_static='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fPIC' - lt_prog_compiler_static='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='--shared' - lt_prog_compiler_static='--static' - ;; - nagfor*) - # NAG Fortran compiler - lt_prog_compiler_wl='-Wl,-Wl,,' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - ccc*) - lt_prog_compiler_wl='-Wl,' - # All Alpha code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-qpic' - lt_prog_compiler_static='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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 - ;; - - newsos6) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - lt_prog_compiler_pic='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - lt_prog_compiler_wl='-Wl,' - # All OSF/1 code is PIC. - lt_prog_compiler_static='-non_shared' - ;; - - rdos*) - lt_prog_compiler_static='-non_shared' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - lt_prog_compiler_pic='-Kconform_pic' - lt_prog_compiler_static='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - uts4*) - lt_prog_compiler_pic='-pic' - lt_prog_compiler_static='-Bstatic' - ;; - - *) - lt_prog_compiler_can_build_shared=no - ;; - esac - fi - -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - lt_prog_compiler_pic= - ;; - *) - lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" - ;; -esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } -if ${lt_cv_prog_compiler_pic+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic=$lt_prog_compiler_pic -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 -$as_echo "$lt_cv_prog_compiler_pic" >&6; } -lt_prog_compiler_pic=$lt_cv_prog_compiler_pic - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$lt_prog_compiler_pic"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 -$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if ${lt_cv_prog_compiler_pic_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_pic_works=no - ac_outfile=conftest.$ac_objext - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$lt_prog_compiler_pic -DPIC" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_pic_works=yes - fi - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 -$as_echo "$lt_cv_prog_compiler_pic_works" >&6; } - -if test x"$lt_cv_prog_compiler_pic_works" = xyes; then - case $lt_prog_compiler_pic in - "" | " "*) ;; - *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; - esac -else - lt_prog_compiler_pic= - lt_prog_compiler_can_build_shared=no -fi - -fi - - - - - - - - - - - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if ${lt_cv_prog_compiler_static_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_static_works=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler_static_works=yes - fi - else - lt_cv_prog_compiler_static_works=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 -$as_echo "$lt_cv_prog_compiler_static_works" >&6; } - -if test x"$lt_cv_prog_compiler_static_works" = xyes; then - : -else - lt_prog_compiler_static= -fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 -$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if ${lt_cv_prog_compiler_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler_c_o=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 -$as_echo "$lt_cv_prog_compiler_c_o" >&6; } - - - - -hard_links="nottested" -if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 -$as_echo_n "checking if we can lock with hard links... " >&6; } - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 -$as_echo "$hard_links" >&6; } - if test "$hard_links" = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 -$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} - need_locks=warn - fi -else - need_locks=no -fi - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 -$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } - - runpath_var= - allow_undefined_flag= - always_export_symbols=no - archive_cmds= - archive_expsym_cmds= - compiler_needs_object=no - enable_shared_with_static_runtimes=no - export_dynamic_flag_spec= - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - hardcode_automatic=no - hardcode_direct=no - hardcode_direct_absolute=no - hardcode_libdir_flag_spec= - hardcode_libdir_separator= - hardcode_minus_L=no - hardcode_shlibpath_var=unsupported - inherit_rpath=no - link_all_deplibs=unknown - module_cmds= - module_expsym_cmds= - old_archive_from_new_cmds= - old_archive_from_expsyms_cmds= - thread_safe_flag_spec= - whole_archive_flag_spec= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - include_expsyms= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - ld_shlibs=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; - *\ \(GNU\ Binutils\)\ [3-9]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - export_dynamic_flag_spec='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - whole_archive_flag_spec= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[3-9]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec='-L$libdir' - export_dynamic_flag_spec='${wl}--export-all-symbols' - allow_undefined_flag=unsupported - always_export_symbols=no - enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - haiku*) - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - link_all_deplibs=yes - ;; - - interix[3-9]*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - whole_archive_flag_spec= - tmp_sharedflag='--shared' ;; - xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - compiler_needs_object=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - 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='${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~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - ld_shlibs=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - - if test "$ld_shlibs" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - allow_undefined_flag=unsupported - always_export_symbols=yes - archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - hardcode_minus_L=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - hardcode_direct=unsupported - fi - ;; - - aix[4-9]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - archive_cmds='' - hardcode_direct=yes - hardcode_direct_absolute=yes - hardcode_libdir_separator=':' - link_all_deplibs=yes - file_list_spec='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[012]|aix4.[012].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - hardcode_direct=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - hardcode_minus_L=yes - hardcode_libdir_flag_spec='-L$libdir' - hardcode_libdir_separator= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - export_dynamic_flag_spec='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - always_export_symbols=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - allow_undefined_flag='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' - allow_undefined_flag="-z nodefs" - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - if ${lt_cv_aix_libpath_+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - - lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }' - lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test -z "$lt_cv_aix_libpath_"; then - lt_cv_aix_libpath_="/usr/lib:/lib" - fi - -fi - - aix_libpath=$lt_cv_aix_libpath_ -fi - - hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - no_undefined_flag=' ${wl}-bernotok' - allow_undefined_flag=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - fi - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='' - ;; - m68k) - archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - ;; - esac - ;; - - bsdi[45]*) - export_dynamic_flag_spec=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - always_export_symbols=yes - file_list_spec='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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' - postlink_cmds='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - enable_shared_with_static_runtimes=yes - ;; - esac - ;; - - darwin* | rhapsody*) - - - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - 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 - link_all_deplibs=yes - allow_undefined_flag="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - - else - ld_shlibs=no - fi - - ;; - - dgux*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=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 - # extra space). - freebsd2.2*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2.*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - hpux9*) - if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - export_dynamic_flag_spec='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 -$as_echo_n "checking if $CC understands -b... " >&6; } -if ${lt_cv_prog_compiler__b+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_prog_compiler__b=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -b" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&5 - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_cv_prog_compiler__b=yes - fi - else - lt_cv_prog_compiler__b=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 -$as_echo "$lt_cv_prog_compiler__b" >&6; } - -if test x"$lt_cv_prog_compiler__b" = xyes; then - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' -else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' -fi - - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - hardcode_direct=yes - hardcode_direct_absolute=yes - export_dynamic_flag_spec='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - hardcode_minus_L=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 -$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } -if ${lt_cv_irix_exported_symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -int foo (void) { return 0; } -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_irix_exported_symbol=yes -else - lt_cv_irix_exported_symbol=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 -$as_echo "$lt_cv_irix_exported_symbol" >&6; } - if test "$lt_cv_irix_exported_symbol" = yes; then - archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - inherit_rpath=yes - link_all_deplibs=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - newsos6) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - hardcode_shlibpath_var=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - hardcode_direct=yes - hardcode_shlibpath_var=no - hardcode_direct_absolute=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - else - case $host_os in - openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) - archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-R$libdir' - ;; - *) - archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - ;; - esac - fi - else - ld_shlibs=no - fi - ;; - - os2*) - hardcode_libdir_flag_spec='-L$libdir' - hardcode_minus_L=yes - allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - archive_cmds_need_lc='no' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - hardcode_libdir_separator=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' - else - allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - hardcode_libdir_flag_spec='-rpath $libdir' - fi - archive_cmds_need_lc='no' - hardcode_libdir_separator=: - ;; - - solaris*) - no_undefined_flag=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - hardcode_libdir_flag_spec='-R$libdir' - hardcode_shlibpath_var=no - case $host_os in - solaris2.[0-5] | solaris2.[0-5].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' - fi - ;; - esac - link_all_deplibs=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - hardcode_libdir_flag_spec='-L$libdir' - hardcode_direct=yes - hardcode_minus_L=yes - hardcode_shlibpath_var=no - ;; - - sysv4) - case $host_vendor in - sni) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' - reload_cmds='$CC -r -o $output$reload_objs' - hardcode_direct=no - ;; - motorola) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_direct=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - hardcode_shlibpath_var=no - ;; - - sysv4.3*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - export_dynamic_flag_spec='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_shlibpath_var=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - ld_shlibs=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-R,$libdir' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - hardcode_libdir_flag_spec='-L$libdir' - hardcode_shlibpath_var=no - ;; - - *) - ld_shlibs=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - export_dynamic_flag_spec='${wl}-Blargedynsym' - ;; - esac - fi - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 -$as_echo "$ld_shlibs" >&6; } -test "$ld_shlibs" = no && can_build_shared=no - -with_gnu_ld=$with_gnu_ld - - - - - - - - - - - - - - - -# -# Do we need to explicitly link libc? -# -case "x$archive_cmds_need_lc" in -x|xyes) - # Assume -lc should be added - archive_cmds_need_lc=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $archive_cmds in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 -$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } -if ${lt_cv_archive_cmds_need_lc+:} false; then : - $as_echo_n "(cached) " >&6 -else - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 - (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - lt_cv_archive_cmds_need_lc=no - else - lt_cv_archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 -$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } - archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc - ;; - esac - fi - ;; -esac - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 -$as_echo_n "checking dynamic linker characteristics... " >&6; } - -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[lt_foo]++; } - if (lt_freq[lt_foo] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([A-Za-z]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - 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 - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[4-9]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[01] | aix4.[01].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[45]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' - - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[23].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[01]* | freebsdelf3.[01]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - 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 # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[3-9]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - if ${lt_cv_shlibpath_overrides_runpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - lt_cv_shlibpath_overrides_runpath=yes -fi -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - -fi - - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - 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 - ;; - -*nto* | *qnx*) - version_type=qnx - 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 - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[89] | openbsd2.[89].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 -$as_echo "$dynamic_linker" >&6; } -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 -$as_echo_n "checking how to hardcode library paths into programs... " >&6; } -hardcode_action= -if test -n "$hardcode_libdir_flag_spec" || - test -n "$runpath_var" || - test "X$hardcode_automatic" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$hardcode_direct" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && - test "$hardcode_minus_L" != no; then - # Linking always hardcodes the temporary library directory. - hardcode_action=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - hardcode_action=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - hardcode_action=unsupported -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 -$as_echo "$hardcode_action" >&6; } - -if test "$hardcode_action" = relink || - test "$inherit_rpath" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi - - - - - - - if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - -fi - - ;; - - *) - ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 -$as_echo_n "checking for shl_load in -ldld... " >&6; } -if ${ac_cv_lib_dld_shl_load+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_shl_load=yes -else - ac_cv_lib_dld_shl_load=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 -$as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = xyes; then : - lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" -else - ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 -$as_echo_n "checking for dlopen in -ldl... " >&6; } -if ${ac_cv_lib_dl_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dl_dlopen=yes -else - ac_cv_lib_dl_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 -$as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 -$as_echo_n "checking for dlopen in -lsvld... " >&6; } -if ${ac_cv_lib_svld_dlopen+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsvld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_svld_dlopen=yes -else - ac_cv_lib_svld_dlopen=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 -$as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = xyes; then : - lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 -$as_echo_n "checking for dld_link in -ldld... " >&6; } -if ${ac_cv_lib_dld_dld_link+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ldld $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_dld_dld_link=yes -else - ac_cv_lib_dld_dld_link=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 -$as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = xyes; then : - lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" -fi - - -fi - - -fi - - -fi - - -fi - - -fi - - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 -$as_echo_n "checking whether a program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - 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} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 -$as_echo "$lt_cv_dlopen_self" >&6; } - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 -$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if ${lt_cv_dlopen_self_static+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - lt_cv_dlopen_self_static=cross -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -} -_LT_EOF - 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} 2>/dev/null; then - (./conftest; exit; ) >&5 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; - x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; - esac - else : - # compilation failed - lt_cv_dlopen_self_static=no - fi -fi -rm -fr conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 -$as_echo "$lt_cv_dlopen_self_static" >&6; } - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi - - - - - - - - - - - - - - - - - -striplib= -old_striplib= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 -$as_echo_n "checking whether stripping libraries is possible... " >&6; } -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - fi - ;; - *) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - ;; - esac -fi - - - - - - - - - - - - - # Report which library types will actually be built - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 -$as_echo_n "checking if libtool supports shared libraries... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 -$as_echo "$can_build_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 -$as_echo_n "checking whether to build shared libraries... " >&6; } - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[4-9]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 -$as_echo "$enable_shared" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 -$as_echo_n "checking whether to build static libraries... " >&6; } - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 -$as_echo "$enable_static" >&6; } - - - - -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -CC="$lt_save_CC" - - - - - - - - - - - - - - - - ac_config_commands="$ac_config_commands libtool" - - - - -# Only expand once: - - -for ac_prog in 'bison -y' byacc -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_YACC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$YACC"; then - ac_cv_prog_YACC="$YACC" # 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_YACC="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -YACC=$ac_cv_prog_YACC -if test -n "$YACC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 -$as_echo "$YACC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$YACC" && break -done -test -n "$YACC" || YACC="yacc" - -for ac_prog in flex lex -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_LEX+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$LEX"; then - ac_cv_prog_LEX="$LEX" # 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_LEX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -LEX=$ac_cv_prog_LEX -if test -n "$LEX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 -$as_echo "$LEX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$LEX" && break -done -test -n "$LEX" || LEX=":" - -if test "x$LEX" != "x:"; then - cat >conftest.l <<_ACEOF -%% -a { ECHO; } -b { REJECT; } -c { yymore (); } -d { yyless (1); } -e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ - yyless ((input () != 0)); } -f { unput (yytext[0]); } -. { BEGIN INITIAL; } -%% -#ifdef YYTEXT_POINTER -extern char *yytext; -#endif -int -main (void) -{ - return ! yylex () + ! yywrap (); -} -_ACEOF -{ { ac_try="$LEX conftest.l" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$LEX conftest.l") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 -$as_echo_n "checking lex output file root... " >&6; } -if ${ac_cv_prog_lex_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - -if test -f lex.yy.c; then - ac_cv_prog_lex_root=lex.yy -elif test -f lexyy.c; then - ac_cv_prog_lex_root=lexyy -else - as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 -fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 -$as_echo "$ac_cv_prog_lex_root" >&6; } -LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root - -if test -z "${LEXLIB+set}"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 -$as_echo_n "checking lex library... " >&6; } -if ${ac_cv_lib_lex+:} false; then : - $as_echo_n "(cached) " >&6 -else - - ac_save_LIBS=$LIBS - ac_cv_lib_lex='none needed' - for ac_lib in '' -lfl -ll; do - LIBS="$ac_lib $ac_save_LIBS" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_lex=$ac_lib -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - test "$ac_cv_lib_lex" != 'none needed' && break - done - LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 -$as_echo "$ac_cv_lib_lex" >&6; } - test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex -fi - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 -$as_echo_n "checking whether yytext is a pointer... " >&6; } -if ${ac_cv_prog_lex_yytext_pointer+:} false; then : - $as_echo_n "(cached) " >&6 -else - # POSIX says lex can declare yytext either as a pointer or an array; the -# default is implementation-dependent. Figure out which it is, since -# not all implementations provide the %pointer and %array declarations. -ac_cv_prog_lex_yytext_pointer=no -ac_save_LIBS=$LIBS -LIBS="$LEXLIB $ac_save_LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define YYTEXT_POINTER 1 -`cat $LEX_OUTPUT_ROOT.c` -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_prog_lex_yytext_pointer=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_save_LIBS - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 -$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } -if test $ac_cv_prog_lex_yytext_pointer = yes; then - -$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h - -fi -rm -f conftest.l $LEX_OUTPUT_ROOT.c - -fi - - - - # Check whether --enable-compile-warnings was given. -if test "${enable_compile_warnings+set}" = set; then : - enableval=$enable_compile_warnings; -else - enable_compile_warnings="maximum" -fi - - - warnCFLAGS= - - common_flags="-fexceptions -fasynchronous-unwind-tables" - - case "$enable_compile_warnings" in - no) - try_compiler_flags="" - ;; - minimum) - try_compiler_flags="-Wall -Wformat -Wformat-security $common_flags" - ;; - yes) - try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes $common_flags" - ;; - maximum|error) - try_compiler_flags="-Wall -Wformat -Wformat-security -Wmissing-prototypes -Wnested-externs -Wpointer-arith" - try_compiler_flags="$try_compiler_flags -Wextra -Wshadow -Wcast-align -Wwrite-strings -Waggregate-return" - try_compiler_flags="$try_compiler_flags -Wstrict-prototypes -Winline -Wredundant-decls -Wno-sign-compare" - try_compiler_flags="$try_compiler_flags $common_flags" - if test "$enable_compile_warnings" = "error" ; then - try_compiler_flags="$try_compiler_flags -Werror" - fi - ;; - *) - as_fn_error $? "Unknown argument '$enable_compile_warnings' to --enable-compile-warnings" "$LINENO" 5 - ;; - esac - - - - compiler_flags= - for option in $try_compiler_flags; do - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $option" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc understands $option" >&5 -$as_echo_n "checking whether gcc understands $option... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - has_option=yes -else - has_option=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - CFLAGS="$SAVE_CFLAGS" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_option" >&5 -$as_echo "$has_option" >&6; } - if test $has_option = yes; then - compiler_flags="$compiler_flags $option" - fi - unset has_option - unset SAVE_CFLAGS - done - unset option - unset try_compiler_flags - - # Check whether --enable-iso-c was given. -if test "${enable_iso_c+set}" = set; then : - enableval=$enable_iso_c; -else - enable_iso_c=no -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking what language compliance flags to pass to the C compiler" >&5 -$as_echo_n "checking what language compliance flags to pass to the C compiler... " >&6; } - complCFLAGS= - if test "x$enable_iso_c" != "xno"; then - if test "x$GCC" = "xyes"; then - case " $CFLAGS " in - *\ \ -ansi\ \ *) ;; - *) complCFLAGS="$complCFLAGS -ansi" ;; - esac - case " $CFLAGS " in - *\ \ -pedantic\ \ *) ;; - *) complCFLAGS="$complCFLAGS -pedantic" ;; - esac - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $complCFLAGS" >&5 -$as_echo "$complCFLAGS" >&6; } - - WARN_CFLAGS="$compiler_flags $complCFLAGS" - - - -## Compiler flags to be used everywhere -AUGEAS_CFLAGS=-std=gnu99 - - - - for ac_header in readline/readline.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_READLINE_READLINE_H 1 -_ACEOF - -fi - -done - - - # Check for readline. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 -$as_echo_n "checking for readline in -lreadline... " >&6; } -if ${ac_cv_lib_readline_readline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char readline (); -int -main () -{ -return readline (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_readline_readline=yes -else - ac_cv_lib_readline_readline=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 -$as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = xyes; then : - use_readline=yes; READLINE_LIBS=-lreadline -else - use_readline=no -fi - - - # If the above test failed, it may simply be that -lreadline requires - # some termcap-related code, e.g., from one of the following libraries. - # See if adding one of them to LIBS helps. - if test $use_readline = no; then - saved_libs=$LIBS - LIBS= - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 -$as_echo_n "checking for library containing tgetent... " >&6; } -if ${ac_cv_search_tgetent+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char tgetent (); -int -main () -{ -return tgetent (); - ; - return 0; -} -_ACEOF -for ac_lib in '' ncurses curses termcap termlib; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_tgetent=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_tgetent+:} false; then : - break -fi -done -if ${ac_cv_search_tgetent+:} false; then : - -else - ac_cv_search_tgetent=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 -$as_echo "$ac_cv_search_tgetent" >&6; } -ac_res=$ac_cv_search_tgetent -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - -fi - - case $LIBS in - no*) ;; # handle "no" and "none required" - *) # anything else is a -lLIBRARY - # Now, check for -lreadline again, also using $LIBS. - # Note: this time we use a different function, so that - # we don't get a cached "no" result. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rl_initialize in -lreadline" >&5 -$as_echo_n "checking for rl_initialize in -lreadline... " >&6; } -if ${ac_cv_lib_readline_rl_initialize+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lreadline $LIBS $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char rl_initialize (); -int -main () -{ -return rl_initialize (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_readline_rl_initialize=yes -else - ac_cv_lib_readline_rl_initialize=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_rl_initialize" >&5 -$as_echo "$ac_cv_lib_readline_rl_initialize" >&6; } -if test "x$ac_cv_lib_readline_rl_initialize" = xyes; then : - use_readline=yes - READLINE_LIBS="-lreadline $LIBS" -fi - - ;; - esac - test $use_readline = no && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: readline library not found" >&5 -$as_echo "$as_me: WARNING: readline library not found" >&2;} - LIBS=$saved_libs - fi - - if test $use_readline = no; then - as_fn_error $? "Could not find a working readline library (see config.log for details)." "$LINENO" 5 - fi - - - - if test $use_readline = yes; then - saved_libs=$LIBS - LIBS=$READLINE_LIBS - for ac_func in rl_completion_matches -do : - ac_fn_c_check_func "$LINENO" "rl_completion_matches" "ac_cv_func_rl_completion_matches" -if test "x$ac_cv_func_rl_completion_matches" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_RL_COMPLETION_MATCHES 1 -_ACEOF - -fi -done - - LIBS=$saved_libs - fi - -for ac_func in open_memstream uselocale -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - -{ $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= -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 "$VERSION_SCRIPT_FLAGS" != none; then - USE_VERSION_SCRIPT_TRUE= - USE_VERSION_SCRIPT_FALSE='#' -else - USE_VERSION_SCRIPT_TRUE='#' - USE_VERSION_SCRIPT_FALSE= -fi - - - - - - - - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ - -ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" -if test "x$ac_cv_type_size_t" = xyes; then : - -else - -cat >>confdefs.h <<_ACEOF -#define size_t unsigned int -_ACEOF - -fi - -# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works -# for constant arguments. Useless! -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 -$as_echo_n "checking for working alloca.h... " >&6; } -if ${ac_cv_working_alloca_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char *p = (char *) alloca (2 * sizeof (int)); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_working_alloca_h=yes -else - ac_cv_working_alloca_h=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 -$as_echo "$ac_cv_working_alloca_h" >&6; } -if test $ac_cv_working_alloca_h = yes; then - -$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 -$as_echo_n "checking for alloca... " >&6; } -if ${ac_cv_func_alloca_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __GNUC__ -# define alloca __builtin_alloca -#else -# ifdef _MSC_VER -# include -# define alloca _alloca -# else -# ifdef HAVE_ALLOCA_H -# include -# else -# ifdef _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ -void *alloca (size_t); -# endif -# endif -# endif -# endif -#endif - -int -main () -{ -char *p = (char *) alloca (1); - if (p) return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_func_alloca_works=yes -else - ac_cv_func_alloca_works=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 -$as_echo "$ac_cv_func_alloca_works" >&6; } - -if test $ac_cv_func_alloca_works = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - -else - # 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. - - - - - -ALLOCA=\${LIBOBJDIR}alloca.$ac_objext - -$as_echo "#define C_ALLOCA 1" >>confdefs.h - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 -$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } -if ${ac_cv_os_cray+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "webecray" >/dev/null 2>&1; then : - ac_cv_os_cray=yes -else - ac_cv_os_cray=no -fi -rm -f conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 -$as_echo "$ac_cv_os_cray" >&6; } -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; 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 CRAY_STACKSEG_END $ac_func -_ACEOF - - break -fi - - done -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 -$as_echo_n "checking stack direction for C alloca... " >&6; } -if ${ac_cv_c_stack_direction+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - ac_cv_c_stack_direction=0 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$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; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_c_stack_direction=1 -else - ac_cv_c_stack_direction=-1 -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 -$as_echo "$ac_cv_c_stack_direction" >&6; } -cat >>confdefs.h <<_ACEOF -#define STACK_DIRECTION $ac_cv_c_stack_direction -_ACEOF - - -fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 -$as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if ${ac_cv_c_restrict+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - } -int -main () -{ -int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t) - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_restrict=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_restrict" != no && break - done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 -$as_echo "$ac_cv_c_restrict" >&6; } - - case $ac_cv_c_restrict in - restrict) ;; - no) $as_echo "#define restrict /**/" >>confdefs.h - ;; - *) cat >>confdefs.h <<_ACEOF -#define restrict $ac_cv_c_restrict -_ACEOF - ;; - esac - - - GNULIB_BTOWC=0; - GNULIB_WCTOB=0; - GNULIB_MBSINIT=0; - GNULIB_MBRTOWC=0; - GNULIB_MBRLEN=0; - GNULIB_MBSRTOWCS=0; - GNULIB_MBSNRTOWCS=0; - GNULIB_WCRTOMB=0; - GNULIB_WCSRTOMBS=0; - GNULIB_WCSNRTOMBS=0; - GNULIB_WCWIDTH=0; - GNULIB_WMEMCHR=0; - GNULIB_WMEMCMP=0; - GNULIB_WMEMCPY=0; - GNULIB_WMEMMOVE=0; - GNULIB_WMEMSET=0; - GNULIB_WCSLEN=0; - GNULIB_WCSNLEN=0; - GNULIB_WCSCPY=0; - GNULIB_WCPCPY=0; - GNULIB_WCSNCPY=0; - GNULIB_WCPNCPY=0; - GNULIB_WCSCAT=0; - GNULIB_WCSNCAT=0; - GNULIB_WCSCMP=0; - GNULIB_WCSNCMP=0; - GNULIB_WCSCASECMP=0; - GNULIB_WCSNCASECMP=0; - GNULIB_WCSCOLL=0; - GNULIB_WCSXFRM=0; - GNULIB_WCSDUP=0; - GNULIB_WCSCHR=0; - GNULIB_WCSRCHR=0; - GNULIB_WCSCSPN=0; - GNULIB_WCSSPN=0; - GNULIB_WCSPBRK=0; - GNULIB_WCSSTR=0; - GNULIB_WCSTOK=0; - GNULIB_WCSWIDTH=0; - HAVE_BTOWC=1; - HAVE_MBSINIT=1; - HAVE_MBRTOWC=1; - HAVE_MBRLEN=1; - HAVE_MBSRTOWCS=1; - HAVE_MBSNRTOWCS=1; - HAVE_WCRTOMB=1; - HAVE_WCSRTOMBS=1; - HAVE_WCSNRTOMBS=1; - HAVE_WMEMCHR=1; - HAVE_WMEMCMP=1; - HAVE_WMEMCPY=1; - HAVE_WMEMMOVE=1; - HAVE_WMEMSET=1; - HAVE_WCSLEN=1; - HAVE_WCSNLEN=1; - HAVE_WCSCPY=1; - HAVE_WCPCPY=1; - HAVE_WCSNCPY=1; - HAVE_WCPNCPY=1; - HAVE_WCSCAT=1; - HAVE_WCSNCAT=1; - HAVE_WCSCMP=1; - HAVE_WCSNCMP=1; - HAVE_WCSCASECMP=1; - HAVE_WCSNCASECMP=1; - HAVE_WCSCOLL=1; - HAVE_WCSXFRM=1; - HAVE_WCSDUP=1; - HAVE_WCSCHR=1; - HAVE_WCSRCHR=1; - HAVE_WCSCSPN=1; - HAVE_WCSSPN=1; - HAVE_WCSPBRK=1; - HAVE_WCSSTR=1; - HAVE_WCSTOK=1; - HAVE_WCSWIDTH=1; - HAVE_DECL_WCTOB=1; - HAVE_DECL_WCWIDTH=1; - REPLACE_MBSTATE_T=0; - REPLACE_BTOWC=0; - REPLACE_WCTOB=0; - REPLACE_MBSINIT=0; - REPLACE_MBRTOWC=0; - REPLACE_MBRLEN=0; - REPLACE_MBSRTOWCS=0; - REPLACE_MBSNRTOWCS=0; - REPLACE_WCRTOMB=0; - REPLACE_WCSRTOMBS=0; - REPLACE_WCSNRTOMBS=0; - REPLACE_WCWIDTH=0; - REPLACE_WCSWIDTH=0; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether uses 'inline' correctly" >&5 -$as_echo_n "checking whether uses 'inline' correctly... " >&6; } -if ${gl_cv_header_wchar_h_correct_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_wchar_h_correct_inline=yes - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -extern int zero (void); -int main () { return zero(); } - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - mv conftest.$ac_objext conftest1.$ac_objext - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int zero (void) { return 0; } - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 - (eval $ac_compile) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no - fi - fi - fi - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 -$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } - if test $gl_cv_header_wchar_h_correct_inline = no; then - as_fn_error $? " cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). -This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in -C99 mode. You have four options: - - Add the flag -fgnu89-inline to CC and reconfigure, or - - Fix your include files, using parts of - , or - - Use a gcc version older than 4.3, or - - Don't use the flags -std=c99 or -std=gnu99. -Configuration aborted." "$LINENO" 5 - fi - - - - - - for ac_func in $gl_func_list -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 - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 -$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } -if ${am_cv_langinfo_codeset+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -char* cs = nl_langinfo(CODESET); return !cs; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - am_cv_langinfo_codeset=yes -else - am_cv_langinfo_codeset=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: $am_cv_langinfo_codeset" >&5 -$as_echo "$am_cv_langinfo_codeset" >&6; } - if test $am_cv_langinfo_codeset = yes; then - -$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h - - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if ${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 - - - - 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; - - - - - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 -$as_echo_n "checking whether // is distinct from /... " >&6; } -if ${gl_cv_double_slash_root+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 -$as_echo "$gl_cv_double_slash_root" >&6; } - if test "$gl_cv_double_slash_root" = yes; then - -$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h - - fi - - - - - - - - - : - - - - - - { $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 : - 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 () -{ - - int result = 0; - { - char *name = realpath ("conftest.a", NULL); - if (!(name && *name == '/')) - result |= 1; - } - { - char *name = realpath ("conftest.b/../conftest.a", NULL); - if (name != NULL) - result |= 2; - } - { - char *name = realpath ("conftest.a/", NULL); - if (name != NULL) - result |= 4; - } - { - char *name1 = realpath (".", NULL); - char *name2 = realpath ("conftest.d//./..", NULL); - if (strcmp (name1, name2) != 0) - result |= 8; - } - return result; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_realpath_works=yes -else - gl_cv_func_realpath_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -rf conftest.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; } - case "$gl_cv_func_realpath_works" in - *yes) - -$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h - - ;; - esac - - - - - - for ac_header in $gl_header_list -do : - as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` -ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 -_ACEOF - -fi - -done - - - - - - - - - : - - - - - - - - - - - - - - - : - - - - - - - - GNULIB_ISBLANK=0; - HAVE_ISBLANK=1; - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 -$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } -if ${gl_cv_have_include_next+:} false; then : - $as_echo_n "(cached) " >&6 -else - rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=yes -else - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_have_include_next=buggy -else - gl_cv_have_include_next=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 - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 -$as_echo "$gl_cv_have_include_next" >&6; } - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 -$as_echo_n "checking whether system header files limit the line length... " >&6; } -if ${gl_cv_pragma_columns+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __TANDEM -choke me -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "choke me" >/dev/null 2>&1; then : - gl_cv_pragma_columns=yes -else - gl_cv_pragma_columns=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 -$as_echo "$gl_cv_pragma_columns" >&6; } - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 -$as_echo_n "checking for complete errno.h... " >&6; } -if ${gl_cv_header_errno_h_complete+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if !defined ETXTBSY -booboo -#endif -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ENETRESET -booboo -#endif -#if !defined ECONNABORTED -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif -#if !defined EOWNERDEAD -booboo -#endif -#if !defined ENOTRECOVERABLE -booboo -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "booboo" >/dev/null 2>&1; then : - gl_cv_header_errno_h_complete=no -else - gl_cv_header_errno_h_complete=yes -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 -$as_echo "$gl_cv_header_errno_h_complete" >&6; } - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_errno_h='<'errno.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_errno_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 '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 "$gl_absolute_header_sed"`'"' - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 -$as_echo "$gl_cv_next_errno_h" >&6; } - fi - NEXT_ERRNO_H=$gl_cv_next_errno_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='<'errno.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_errno_h - fi - NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive - - - - - ERRNO_H='errno.h' - fi - - if test -n "$ERRNO_H"; then - GL_GENERATE_ERRNO_H_TRUE= - GL_GENERATE_ERRNO_H_FALSE='#' -else - GL_GENERATE_ERRNO_H_TRUE='#' - GL_GENERATE_ERRNO_H_FALSE= -fi - - - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 -$as_echo_n "checking for EMULTIHOP value... " >&6; } -if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef EMULTIHOP -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EMULTIHOP=yes -else - gl_cv_header_errno_h_EMULTIHOP=no -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EMULTIHOP = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EMULTIHOP -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EMULTIHOP=hidden -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then - if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : - -fi - - fi - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 -$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } - case $gl_cv_header_errno_h_EMULTIHOP in - yes | no) - EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= - ;; - *) - EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" - ;; - esac - - - fi - - - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 -$as_echo_n "checking for ENOLINK value... " >&6; } -if ${gl_cv_header_errno_h_ENOLINK+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef ENOLINK -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_ENOLINK=yes -else - gl_cv_header_errno_h_ENOLINK=no -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_ENOLINK = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ENOLINK -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_ENOLINK=hidden -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_ENOLINK = hidden; then - if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : - -fi - - fi - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 -$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } - case $gl_cv_header_errno_h_ENOLINK in - yes | no) - ENOLINK_HIDDEN=0; ENOLINK_VALUE= - ;; - *) - ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" - ;; - esac - - - fi - - - if test -n "$ERRNO_H"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 -$as_echo_n "checking for EOVERFLOW value... " >&6; } -if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef EOVERFLOW -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EOVERFLOW=yes -else - gl_cv_header_errno_h_EOVERFLOW=no -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EOVERFLOW = no; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef EOVERFLOW -yes -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "yes" >/dev/null 2>&1; then : - gl_cv_header_errno_h_EOVERFLOW=hidden -fi -rm -f conftest* - - if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then - if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -"; then : - -fi - - fi - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 -$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } - case $gl_cv_header_errno_h_EOVERFLOW in - yes | no) - EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= - ;; - *) - EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" - ;; - esac - - - fi - - - - 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; } -if ${ac_cv_type_mbstate_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int -main () -{ -mbstate_t x; return sizeof x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_type_mbstate_t=yes -else - ac_cv_type_mbstate_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 -$as_echo "$ac_cv_type_mbstate_t" >&6; } - if test $ac_cv_type_mbstate_t = yes; then - -$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h - - else - -$as_echo "#define mbstate_t int" >>confdefs.h - - fi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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; - GNULIB_PRINTF_POSIX=0; - GNULIB_PUTC=0; - GNULIB_PUTCHAR=0; - GNULIB_PUTS=0; - 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; - GNULIB_VPRINTF=0; - GNULIB_VPRINTF_POSIX=0; - GNULIB_VSNPRINTF=0; - GNULIB_VSPRINTF_POSIX=0; - HAVE_DECL_FPURGE=1; - HAVE_DECL_FSEEKO=1; - HAVE_DECL_FTELLO=1; - HAVE_DECL_GETDELIM=1; - HAVE_DECL_GETLINE=1; - HAVE_DECL_OBSTACK_PRINTF=1; - HAVE_DECL_SNPRINTF=1; - HAVE_DECL_VSNPRINTF=1; - 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; - REPLACE_FPURGE=0; - REPLACE_FREOPEN=0; - REPLACE_FSEEK=0; - REPLACE_FSEEKO=0; - REPLACE_FTELL=0; - REPLACE_FTELLO=0; - REPLACE_GETDELIM=0; - REPLACE_GETLINE=0; - REPLACE_OBSTACK_PRINTF=0; - REPLACE_PERROR=0; - REPLACE_POPEN=0; - REPLACE_PRINTF=0; - REPLACE_REMOVE=0; - REPLACE_RENAME=0; - 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; - REPLACE_VDPRINTF=0; - REPLACE_VFPRINTF=0; - REPLACE_VPRINTF=0; - REPLACE_VSNPRINTF=0; - REPLACE_VSPRINTF=0; - - - ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" -if test "x$ac_cv_have_decl_getdelim" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETDELIM $ac_have_decl -_ACEOF - - - - - - - - - ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" -if test "x$ac_cv_have_decl_getline" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETLINE $ac_have_decl -_ACEOF - - - - GNULIB_CHDIR=0; - GNULIB_CHOWN=0; - GNULIB_CLOSE=0; - GNULIB_DUP=0; - GNULIB_DUP2=0; - GNULIB_DUP3=0; - GNULIB_ENVIRON=0; - GNULIB_EUIDACCESS=0; - GNULIB_FACCESSAT=0; - GNULIB_FCHDIR=0; - GNULIB_FCHOWNAT=0; - GNULIB_FDATASYNC=0; - GNULIB_FSYNC=0; - GNULIB_FTRUNCATE=0; - GNULIB_GETCWD=0; - GNULIB_GETDOMAINNAME=0; - GNULIB_GETDTABLESIZE=0; - GNULIB_GETGROUPS=0; - GNULIB_GETHOSTNAME=0; - GNULIB_GETLOGIN=0; - 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; - GNULIB_LSEEK=0; - GNULIB_PIPE=0; - 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_NONBLOCKING=0; - GNULIB_UNISTD_H_SIGPIPE=0; - GNULIB_UNLINK=0; - GNULIB_UNLINKAT=0; - GNULIB_USLEEP=0; - GNULIB_WRITE=0; - HAVE_CHOWN=1; - HAVE_DUP2=1; - HAVE_DUP3=1; - HAVE_EUIDACCESS=1; - HAVE_FACCESSAT=1; - HAVE_FCHDIR=1; - HAVE_FCHOWNAT=1; - HAVE_FDATASYNC=1; - HAVE_FSYNC=1; - HAVE_FTRUNCATE=1; - HAVE_GETDTABLESIZE=1; - HAVE_GETGROUPS=1; - HAVE_GETHOSTNAME=1; - HAVE_GETLOGIN=1; - HAVE_GETPAGESIZE=1; - HAVE_GROUP_MEMBER=1; - HAVE_LCHOWN=1; - HAVE_LINK=1; - HAVE_LINKAT=1; - HAVE_PIPE=1; - HAVE_PIPE2=1; - HAVE_PREAD=1; - HAVE_PWRITE=1; - HAVE_READLINK=1; - HAVE_READLINKAT=1; - HAVE_SETHOSTNAME=1; - HAVE_SLEEP=1; - HAVE_SYMLINK=1; - HAVE_SYMLINKAT=1; - HAVE_UNLINKAT=1; - 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; - REPLACE_CHOWN=0; - REPLACE_CLOSE=0; - 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; - REPLACE_SYMLINK=0; - REPLACE_TTYNAME_R=0; - REPLACE_UNLINK=0; - REPLACE_UNLINKAT=0; - REPLACE_USLEEP=0; - REPLACE_WRITE=0; - UNISTD_H_HAVE_WINSOCK2_H=0; - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - - - - - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_getopt_h='<'getopt.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_getopt_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_getopt_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 '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 "$gl_absolute_header_sed"`'"' - else - gl_cv_next_getopt_h='<'getopt.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 -$as_echo "$gl_cv_next_getopt_h" >&6; } - fi - NEXT_GETOPT_H=$gl_cv_next_getopt_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'getopt.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_getopt_h - fi - NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - - - gl_replace_getopt= - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_header in getopt.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" -if test "x$ac_cv_header_getopt_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_H 1 -_ACEOF - -else - gl_replace_getopt=yes -fi - -done - - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - for ac_func in getopt_long_only -do : - ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" -if test "x$ac_cv_func_getopt_long_only" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETOPT_LONG_ONLY 1 -_ACEOF - -else - gl_replace_getopt=yes -fi -done - - fi - - if test -z "$gl_replace_getopt"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 -$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } -if ${gl_cv_func_getopt_posix+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $cross_compiling = no; then - if test "$cross_compiling" = yes; then : - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run test program while cross compiling -See \`config.log' for more details" "$LINENO" 5; } -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char a[] = "-a"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, a, foo, bar, NULL }; - int c; - - c = getopt (4, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (4, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - return 0; -} - -_ACEOF -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 - -int -main () -{ - static char program[] = "program"; - static char donald[] = "donald"; - static char p[] = "-p"; - static char billy[] = "billy"; - static char duck[] = "duck"; - static char a[] = "-a"; - static char bar[] = "bar"; - char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; - int c; - - c = getopt (7, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - return 0; -} - -_ACEOF -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 - - 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 - -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; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_posix=yes -else - gl_cv_func_getopt_posix=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - else - case "$host_os" in - darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 -$as_echo "$gl_cv_func_getopt_posix" >&6; } - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 -$as_echo_n "checking for working GNU getopt function... " >&6; } -if ${gl_cv_func_getopt_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - -#include -#if defined __MACH__ && defined __APPLE__ -/* Avoid a crash on Mac OS X. */ -#include -#include -#include -#include -#include -#include -/* The exception port on which our thread listens. */ -static mach_port_t our_exception_port; -/* The main function of the thread listening for exceptions of type - EXC_BAD_ACCESS. */ -static void * -mach_exception_thread (void *arg) -{ - /* Buffer for a message to be received. */ - struct { - mach_msg_header_t head; - mach_msg_body_t msgh_body; - char data[1024]; - } msg; - mach_msg_return_t retval; - /* Wait for a message on the exception port. */ - retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), - our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); - if (retval != MACH_MSG_SUCCESS) - abort (); - exit (1); -} -static void -nocrash_init (void) -{ - mach_port_t self = mach_task_self (); - /* Allocate a port on which the thread shall listen for exceptions. */ - if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) - == KERN_SUCCESS) { - /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ - if (mach_port_insert_right (self, our_exception_port, our_exception_port, - MACH_MSG_TYPE_MAKE_SEND) - == KERN_SUCCESS) { - /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting - for us. */ - exception_mask_t mask = EXC_MASK_BAD_ACCESS; - /* Create the thread listening on the exception port. */ - pthread_attr_t attr; - pthread_t thread; - if (pthread_attr_init (&attr) == 0 - && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 - && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { - pthread_attr_destroy (&attr); - /* Replace the exception port info for these exceptions with our own. - Note that we replace the exception port for the entire task, not only - for a particular thread. This has the effect that when our exception - port gets the message, the thread specific exception port has already - been asked, and we don't need to bother about it. - See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ - task_set_exception_ports (self, mask, our_exception_port, - EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); - } - } - } -} -#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Avoid a crash on native Windows. */ -#define WIN32_LEAN_AND_MEAN -#include -#include -static LONG WINAPI -exception_filter (EXCEPTION_POINTERS *ExceptionInfo) -{ - switch (ExceptionInfo->ExceptionRecord->ExceptionCode) - { - case EXCEPTION_ACCESS_VIOLATION: - case EXCEPTION_IN_PAGE_ERROR: - case EXCEPTION_STACK_OVERFLOW: - case EXCEPTION_GUARD_PAGE: - case EXCEPTION_PRIV_INSTRUCTION: - case EXCEPTION_ILLEGAL_INSTRUCTION: - case EXCEPTION_DATATYPE_MISALIGNMENT: - case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: - case EXCEPTION_NONCONTINUABLE_EXCEPTION: - exit (1); - } - return EXCEPTION_CONTINUE_SEARCH; -} -static void -nocrash_init (void) -{ - SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); -} -#else -/* Avoid a crash on POSIX systems. */ -#include -/* A POSIX signal handler. */ -static void -exception_handler (int sig) -{ - exit (1); -} -static void -nocrash_init (void) -{ -#ifdef SIGSEGV - signal (SIGSEGV, exception_handler); -#endif -#ifdef SIGBUS - signal (SIGBUS, exception_handler); -#endif -} -#endif - - -int -main () -{ - - int result = 0; - - nocrash_init(); - - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - static char conftest[] = "conftest"; - static char plus[] = "-+"; - char *argv[3] = { conftest, plus, NULL }; - opterr = 0; - if (getopt (2, argv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - static char program[] = "program"; - static char p[] = "-p"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, p, foo, bar, NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - static char program[] = "program"; - static char foo[] = "foo"; - static char p[] = "-p"; - char *argv[] = { program, foo, p, NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 16; - } - /* This code fails on glibc 2.11. */ - { - static char program[] = "program"; - static char b[] = "-b"; - static char a[] = "-a"; - char *argv[] = { program, b, a, NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 32; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 32; - } - /* This code dumps core on glibc 2.14. */ - { - static char program[] = "program"; - static char w[] = "-W"; - static char dummy[] = "dummy"; - char *argv[] = { program, w, dummy, NULL }; - optind = opterr = 1; - if (getopt (3, argv, "W;") != 'W') - result |= 64; - } - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_gnu=yes -else - gl_cv_func_getopt_gnu=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; - *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; - esac - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 -$as_echo "$gl_cv_func_getopt_gnu" >&6; } - if test "$gl_cv_func_getopt_gnu" != yes; then - gl_replace_getopt=yes - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 -$as_echo_n "checking for working GNU getopt_long function... " >&6; } -if ${gl_cv_func_getopt_long_gnu+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; - *) gl_cv_func_getopt_long_gnu="guessing yes";; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include - #include - -int -main () -{ -static const struct option long_options[] = - { - { "xtremely-",no_argument, NULL, 1003 }, - { "xtra", no_argument, NULL, 1001 }, - { "xtreme", no_argument, NULL, 1002 }, - { "xtremely", no_argument, NULL, 1003 }, - { NULL, 0, NULL, 0 } - }; - /* This code fails on OpenBSD 5.0. */ - { - static char program[] = "program"; - static char xtremel[] = "--xtremel"; - char *argv[] = { program, xtremel, NULL }; - int option_index; - optind = 1; opterr = 0; - if (getopt_long (2, argv, "", long_options, &option_index) != 1003) - return 1; - } - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_getopt_long_gnu=yes -else - gl_cv_func_getopt_long_gnu=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 -$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } - case "$gl_cv_func_getopt_long_gnu" in - *yes) ;; - *) gl_replace_getopt=yes ;; - esac - fi - fi - - - - - - - REPLACE_GETOPT=0 - if test -n "$gl_replace_getopt"; then - REPLACE_GETOPT=1 - fi - - if test $REPLACE_GETOPT = 1; then - - GETOPT_H=getopt.h - -$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h - - - - fi - - - ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_getenv" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_GETENV $ac_have_decl -_ACEOF - - - - GNULIB_GETTIMEOFDAY=0; - HAVE_GETTIMEOFDAY=1; - HAVE_STRUCT_TIMEVAL=1; - HAVE_SYS_TIME_H=1; - REPLACE_GETTIMEOFDAY=0; - REPLACE_STRUCT_TIMEVAL=0; - - - - - - - - - - - - - - - - : - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_time_h='<'sys/time.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_time_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'sys/time.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_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 - - - - - - if test $ac_cv_header_sys_time_h != yes; then - HAVE_SYS_TIME_H=0 - fi - - - - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - 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 - 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. */ -#if HAVE_SYS_TIME_H - #include - #endif - #include - #if HAVE_WINSOCK2_H - # include - #endif - -int -main () -{ -static struct timeval x; - typedef int verify_tv_sec_type[ - sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 - ]; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timeval_tv_sec=yes -else - gl_cv_sys_struct_timeval_tv_sec=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 -$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } - if test $gl_cv_sys_struct_timeval_tv_sec != yes; then - REPLACE_STRUCT_TIMEVAL=1 - fi - fi - - - for gl_func in gettimeofday; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if HAVE_SYS_TIME_H -# include -#endif -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - - - - 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" -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 - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 -$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } -if ${ac_cv_gnu_library_2_1+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky" >/dev/null 2>&1; then : - ac_cv_gnu_library_2_1=yes -else - ac_cv_gnu_library_2_1=no -fi -rm -f conftest* - - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 -$as_echo "$ac_cv_gnu_library_2_1" >&6; } - - GLIBC21="$ac_cv_gnu_library_2_1" - - - - GNULIB_LOCALECONV=0; - GNULIB_SETLOCALE=0; - GNULIB_DUPLOCALE=0; - HAVE_DUPLOCALE=1; - REPLACE_LOCALECONV=0; - REPLACE_SETLOCALE=0; - REPLACE_DUPLOCALE=0; - REPLACE_STRUCT_LCONV=0; - - - REPLACE_NULL=0; - HAVE_WCHAR_T=1; - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if ${gt_cv_c_wchar_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - fi - - - - - STDDEF_H= - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if ${gl_cv_decl_null_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - 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 - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stddef_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'stddef.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_stddef_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_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - - - - - fi - - - - - - - - GNULIB_FCHMODAT=0; - GNULIB_FSTAT=0; - GNULIB_FSTATAT=0; - GNULIB_FUTIMENS=0; - GNULIB_LCHMOD=0; - GNULIB_LSTAT=0; - GNULIB_MKDIRAT=0; - GNULIB_MKFIFO=0; - GNULIB_MKFIFOAT=0; - GNULIB_MKNOD=0; - GNULIB_MKNODAT=0; - GNULIB_STAT=0; - GNULIB_UTIMENSAT=0; - HAVE_FCHMODAT=1; - HAVE_FSTATAT=1; - HAVE_FUTIMENS=1; - HAVE_LCHMOD=1; - HAVE_LSTAT=1; - HAVE_MKDIRAT=1; - HAVE_MKFIFO=1; - HAVE_MKFIFOAT=1; - HAVE_MKNOD=1; - HAVE_MKNODAT=1; - HAVE_UTIMENSAT=1; - REPLACE_FSTAT=0; - REPLACE_FSTATAT=0; - REPLACE_FUTIMENS=0; - REPLACE_LSTAT=0; - REPLACE_MKDIR=0; - REPLACE_MKFIFO=0; - REPLACE_MKNOD=0; - REPLACE_STAT=0; - REPLACE_UTIMENSAT=0; - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 -$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } -if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : - $as_echo_n "(cached) " >&6 -else - 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 : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ -struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_lstat_dereferences_slashed_symlink=yes -else - gl_cv_func_lstat_dereferences_slashed_symlink=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" - fi - rm -f conftest.sym conftest.file - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 -$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *yes) - -cat >>confdefs.h <<_ACEOF -#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 -_ACEOF - - ;; - esac - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 -$as_echo_n "checking for inline... " >&6; } -if ${ac_cv_c_inline+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_c_inline=$ac_kw -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - test "$ac_cv_c_inline" != no && break -done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 -$as_echo "$ac_cv_c_inline" >&6; } - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 -$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } -if ${gl_cv_func_malloc_posix+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_malloc_posix=yes -else - gl_cv_func_malloc_posix=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 -$as_echo "$gl_cv_func_malloc_posix" >&6; } - - - - for ac_header in stdlib.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" -if test "x$ac_cv_header_stdlib_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include - #else - char *malloc (); - #endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } - if test $ac_cv_func_malloc_0_nonnull = yes; then : - gl_cv_func_malloc_0_nonnull=1 -else - gl_cv_func_malloc_0_nonnull=0 -fi - - -cat >>confdefs.h <<_ACEOF -#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull -_ACEOF - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 -$as_echo_n "checking for unsigned long long int... " >&6; } -if ${ac_cv_type_unsigned_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63; -int -main () -{ -/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull)); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -else - ac_cv_type_unsigned_long_long_int=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 -$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } - if test $ac_cv_type_unsigned_long_long_int = yes; then - -$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 -$as_echo_n "checking for long long int... " >&6; } -if ${ac_cv_type_long_long_int+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #ifndef LLONG_MAX - # define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - # define LLONG_MAX (HALF - 1 + HALF) - #endif -int -main () -{ -long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - -else - ac_cv_type_long_long_int=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 -$as_echo "$ac_cv_type_long_long_int" >&6; } - if test $ac_cv_type_long_long_int = yes; then - -$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h - - fi - - - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} 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 () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - - { $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 specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; -#endif - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 -$as_echo "$gt_cv_locale_fr_utf8" >&6; } - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 - - - - - - - - - - - - - - GNULIB_FFSL=0; - GNULIB_FFSLL=0; - GNULIB_MEMCHR=0; - GNULIB_MEMMEM=0; - GNULIB_MEMPCPY=0; - GNULIB_MEMRCHR=0; - GNULIB_RAWMEMCHR=0; - GNULIB_STPCPY=0; - GNULIB_STPNCPY=0; - GNULIB_STRCHRNUL=0; - GNULIB_STRDUP=0; - GNULIB_STRNCAT=0; - GNULIB_STRNDUP=0; - GNULIB_STRNLEN=0; - GNULIB_STRPBRK=0; - GNULIB_STRSEP=0; - GNULIB_STRSTR=0; - GNULIB_STRCASESTR=0; - GNULIB_STRTOK_R=0; - GNULIB_MBSLEN=0; - GNULIB_MBSNLEN=0; - GNULIB_MBSCHR=0; - GNULIB_MBSRCHR=0; - GNULIB_MBSSTR=0; - GNULIB_MBSCASECMP=0; - GNULIB_MBSNCASECMP=0; - GNULIB_MBSPCASECMP=0; - GNULIB_MBSCASESTR=0; - GNULIB_MBSCSPN=0; - GNULIB_MBSPBRK=0; - GNULIB_MBSSPN=0; - GNULIB_MBSSEP=0; - GNULIB_MBSTOK_R=0; - GNULIB_STRERROR=0; - GNULIB_STRERROR_R=0; - GNULIB_STRSIGNAL=0; - GNULIB_STRVERSCMP=0; - HAVE_MBSLEN=0; - HAVE_FFSL=1; - HAVE_FFSLL=1; - HAVE_MEMCHR=1; - HAVE_DECL_MEMMEM=1; - HAVE_MEMPCPY=1; - HAVE_DECL_MEMRCHR=1; - HAVE_RAWMEMCHR=1; - HAVE_STPCPY=1; - HAVE_STPNCPY=1; - HAVE_STRCHRNUL=1; - HAVE_DECL_STRDUP=1; - HAVE_DECL_STRNDUP=1; - HAVE_DECL_STRNLEN=1; - HAVE_STRPBRK=1; - HAVE_STRSEP=1; - HAVE_STRCASESTR=1; - HAVE_DECL_STRTOK_R=1; - HAVE_DECL_STRERROR_R=1; - HAVE_DECL_STRSIGNAL=1; - HAVE_STRVERSCMP=1; - REPLACE_MEMCHR=0; - REPLACE_MEMMEM=0; - REPLACE_STPNCPY=0; - REPLACE_STRDUP=0; - REPLACE_STRSTR=0; - REPLACE_STRCASESTR=0; - REPLACE_STRCHRNUL=0; - REPLACE_STRERROR=0; - REPLACE_STRERROR_R=0; - REPLACE_STRNCAT=0; - REPLACE_STRNDUP=0; - REPLACE_STRNLEN=0; - REPLACE_STRSIGNAL=0; - REPLACE_STRTOK_R=0; - UNDEFINE_STRTOK_R=0; - - - - - - # 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 - - - : - - - - - - - : - - - - - - - - - if test $HAVE_MEMCHR = 1; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 -$as_echo_n "checking whether memchr works... " >&6; } -if ${gl_cv_func_memchr_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_memchr_works="guessing no" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif - -int -main () -{ - - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_memchr_works=yes -else - gl_cv_func_memchr_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 -$as_echo "$gl_cv_func_memchr_works" >&6; } - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - fi - - - - - - - - gl_cv_c_multiarch=no - 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 : - - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - - - - - - - - - - - - - - - - - -# Check whether --with-selinux was given. -if test "${with_selinux+set}" = set; then : - withval=$with_selinux; -else - with_selinux=maybe -fi - - - LIB_SELINUX= - if test "$with_selinux" != no; then - gl_save_LIBS=$LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5 -$as_echo_n "checking for library containing setfilecon... " >&6; } -if ${ac_cv_search_setfilecon+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_func_search_save_LIBS=$LIBS -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char setfilecon (); -int -main () -{ -return setfilecon (); - ; - return 0; -} -_ACEOF -for ac_lib in '' selinux; do - if test -z "$ac_lib"; then - ac_res="none required" - else - ac_res=-l$ac_lib - LIBS="-l$ac_lib $ac_func_search_save_LIBS" - fi - if ac_fn_c_try_link "$LINENO"; then : - ac_cv_search_setfilecon=$ac_res -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext - if ${ac_cv_search_setfilecon+:} false; then : - break -fi -done -if ${ac_cv_search_setfilecon+:} false; then : - -else - ac_cv_search_setfilecon=no -fi -rm conftest.$ac_ext -LIBS=$ac_func_search_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5 -$as_echo "$ac_cv_search_setfilecon" >&6; } -ac_res=$ac_cv_search_setfilecon -if test "$ac_res" != no; then : - test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" - test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon -fi - - LIBS=$gl_save_LIBS - fi - - - # Warn if SELinux is found but libselinux is absent; - if test "$ac_cv_search_setfilecon" = no && - test "$host" = "$build" && test -d /selinux; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5 -$as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;} - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: augeas will be compiled without SELinux support." >&5 -$as_echo "$as_me: WARNING: augeas will be compiled without SELinux support." >&2;} - fi - - - - - - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 -$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } -if ${ac_cv_header_stdbool_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - -int -main () -{ - - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stdbool_h=yes -else - ac_cv_header_stdbool_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 -$as_echo "$ac_cv_header_stdbool_h" >&6; } - ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" -if test "x$ac_cv_type__Bool" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE__BOOL 1 -_ACEOF - - -fi - - - - - - - - - - - - - - - - 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 - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdint_h='<'stdint.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${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 - -_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 '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_stdint_h" >&5 -$as_echo "$gl_cv_next_stdint_h" >&6; } - fi - NEXT_STDINT_H=$gl_cv_next_stdint_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdint.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdint_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - 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 : - $as_echo_n "(cached) " >&6 -else - gl_cv_header_working_stdint_h=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#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; -}; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - if test "$cross_compiling" = yes; then : - gl_cv_header_working_stdint_h=yes - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include - - - /* 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 - }; - -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; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_header_working_stdint_h=yes -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 -$as_echo "$gl_cv_header_working_stdint_h" >&6; } - 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 - - - - - 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 - - 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 : - -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 - - - - - 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 () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - result=yes -else - result=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - eval gl_cv_type_${gltype}_signed=\$result - -fi -eval ac_res=\$gl_cv_type_${gltype}_signed - { $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 - - - 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 - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - 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 - - 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 - eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif - - 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 - - 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 - - - - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_string_h='<'string.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_string_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'string.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_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_string_h" >&5 -$as_echo "$gl_cv_next_string_h" >&6; } - fi - NEXT_STRING_H=$gl_cv_next_string_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'string.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_string_h - fi - NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive - - - - - - - for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#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 - - - - - - - - - ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" -if test "x$ac_cv_have_decl_strnlen" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRNLEN $ac_have_decl -_ACEOF - - - - - - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 -$as_echo_n "checking whether strstr works... " >&6; } -if ${gl_cv_func_strstr_works_always+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_works_always="guessing yes" -else - gl_cv_func_strstr_works_always="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P - -int -main () -{ -return !!strstr (HAYSTACK, NEEDLE); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_works_always=yes -else - gl_cv_func_strstr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 -$as_echo "$gl_cv_func_strstr_works_always" >&6; } - case "$gl_cv_func_strstr_works_always" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac - fi - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 -$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } -if ${ac_cv_header_stat_broken+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include - -#if defined S_ISBLK && defined S_IFDIR -extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; -#endif - -#if defined S_ISBLK && defined S_IFCHR -extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; -#endif - -#if defined S_ISLNK && defined S_IFREG -extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; -#endif - -#if defined S_ISSOCK && defined S_IFREG -extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; -#endif - -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_header_stat_broken=no -else - ac_cv_header_stat_broken=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 -$as_echo "$ac_cv_header_stat_broken" >&6; } -if test $ac_cv_header_stat_broken = yes; then - -$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h - -fi - - - - - - - - - - - - - - - - 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 - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_time_h=yes -else - gl_cv_sys_struct_timespec_in_time_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_sys_time_h=yes -else - gl_cv_sys_struct_timespec_in_sys_time_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in " >&5 -$as_echo_n "checking for struct timespec in ... " >&6; } -if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -static struct timespec x; x.tv_sec = x.tv_nsec; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_sys_struct_timespec_in_pthread_h=yes -else - gl_cv_sys_struct_timespec_in_pthread_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 -$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - - - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_time_h='<'time.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_time_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'time.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_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 - - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if ${gt_cv_c_wint_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes -else - gt_cv_c_wint_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h - - fi - - - - - - - - - : - - - - - - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 -$as_echo_n "checking for inttypes.h... " >&6; } -if ${gl_cv_header_inttypes_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -uintmax_t i = (uintmax_t) -1; return !i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_inttypes_h=yes -else - gl_cv_header_inttypes_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 -$as_echo "$gl_cv_header_inttypes_h" >&6; } - if test $gl_cv_header_inttypes_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_INTTYPES_H_WITH_UINTMAX 1 -_ACEOF - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 -$as_echo_n "checking for stdint.h... " >&6; } -if ${gl_cv_header_stdint_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #include -int -main () -{ -uintmax_t i = (uintmax_t) -1; return !i; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_stdint_h=yes -else - gl_cv_header_stdint_h=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 -$as_echo "$gl_cv_header_stdint_h" >&6; } - if test $gl_cv_header_stdint_h = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H_WITH_UINTMAX 1 -_ACEOF - - fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 -$as_echo_n "checking for intmax_t... " >&6; } -if ${gt_cv_c_intmax_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif - -int -main () -{ -intmax_t x = -1; return !x; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_intmax_t=yes -else - gt_cv_c_intmax_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 -$as_echo "$gt_cv_c_intmax_t" >&6; } - if test $gt_cv_c_intmax_t = yes; then - -$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h - - else - - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - -cat >>confdefs.h <<_ACEOF -#define intmax_t $ac_type -_ACEOF - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 -$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } -if ${gl_cv_cc_double_expbit0+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#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. -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which - # contains only /bin. Note that ksh looks also at the FPATH variable, - # so we have to set that as well for the test. - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 -$as_echo_n "checking for ld used by GCC... " >&6; } - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [\\/]* | [A-Za-z]:[\\/]*) - re_direlt='/[^/][^/]*/\.\./' - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 -$as_echo_n "checking for GNU ld... " >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 -$as_echo_n "checking for non-GNU ld... " >&6; } -fi -if ${acl_cv_path_LD+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi -fi - -LD="$acl_cv_path_LD" -if test -n "$LD"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 -$as_echo "$LD" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi -test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 -$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if ${acl_cv_prog_gnu_ld+:} false; then : - $as_echo_n "(cached) " >&6 -else - # I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 &5 -$as_echo "$acl_cv_prog_gnu_ld" >&6; } -with_gnu_ld=$acl_cv_prog_gnu_ld - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 -$as_echo_n "checking for shared library run path origin... " >&6; } -if ${acl_cv_rpath+:} false; then : - $as_echo_n "(cached) " >&6 -else - - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 -$as_echo "$acl_cv_rpath" >&6; } - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - # Check whether --enable-rpath was given. -if test "${enable_rpath+set}" = set; then : - enableval=$enable_rpath; : -else - enable_rpath=yes -fi - - - - - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 -$as_echo_n "checking for 64-bit host... " >&6; } -if ${gl_cv_solaris_64bit+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef _LP64 -sixtyfour bits -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "sixtyfour bits" >/dev/null 2>&1; then : - gl_cv_solaris_64bit=yes -else - gl_cv_solaris_64bit=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 -$as_echo "$gl_cv_solaris_64bit" >&6; } - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" - - - - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 -$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } -if ${gl_cv_have_weak+:} false; then : - $as_echo_n "(cached) " >&6 -else - gl_cv_have_weak=no - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern void xyzzy (); -#pragma weak xyzzy -int -main () -{ -xyzzy(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_cv_have_weak=maybe -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - if test $gl_cv_have_weak = maybe; then - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __ELF__ - Extensible Linking Format - #endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : - gl_cv_have_weak="guessing yes" -else - gl_cv_have_weak="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_have_weak=yes -else - gl_cv_have_weak=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 -$as_echo "$gl_cv_have_weak" >&6; } - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" -if test "x$ac_cv_header_pthread_h" = xyes; then : - gl_have_pthread_h=yes -else - gl_have_pthread_h=no -fi - - - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_pthread=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - -$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h - - esac - -fi - - else - # Some library is needed. Try libpthread and libc_r. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 -$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } -if ${ac_cv_lib_pthread_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lpthread $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_pthread_pthread_kill=yes -else - ac_cv_lib_pthread_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 -$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } -if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : - gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread -fi - - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 -$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } -if ${ac_cv_lib_c_r_pthread_kill+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lc_r $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char pthread_kill (); -int -main () -{ -return pthread_kill (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_c_r_pthread_kill=yes -else - ac_cv_lib_c_r_pthread_kill=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 -$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } -if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : - gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r -fi - - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - -$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include - -int -main () -{ -thr_self(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_solaristhread=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - -$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h - - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 -$as_echo_n "checking how to link with libpth... " >&6; } -if ${ac_cv_libpth_libs+:} false; then : - $as_echo_n "(cached) " >&6 -else - - - - - - - - - use_additional=yes - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - -# Check whether --with-libpth-prefix was given. -if test "${with_libpth_prefix+set}" = set; then : - withval=$with_libpth_prefix; - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi - -fi - - LIBPTH= - LTLIBPTH= - INCPTH= - LIBPTH_PREFIX= - HAVE_LIBPTH= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='pth ' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" - else - : - fi - else - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - if test "$acl_hardcode_direct" = yes; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - haveit= - for x in $LDFLAGS $LIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" - fi - fi - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = 'pth'; then - LIBPTH_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INCPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - if test -n "$found_la"; then - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIBPTH; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" - ;; - esac - done - fi - else - LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - else - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - for found_dir in $ltrpathdirs; do - LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" - done - fi - - - - - - - ac_cv_libpth_libs="$LIBPTH" - ac_cv_libpth_ltlibs="$LTLIBPTH" - ac_cv_libpth_cppflags="$INCPTH" - ac_cv_libpth_prefix="$LIBPTH_PREFIX" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 -$as_echo "$ac_cv_libpth_libs" >&6; } - LIBPTH="$ac_cv_libpth_libs" - LTLIBPTH="$ac_cv_libpth_ltlibs" - INCPTH="$ac_cv_libpth_cppflags" - LIBPTH_PREFIX="$ac_cv_libpth_prefix" - - for element in $INCPTH; do - haveit= - for x in $CPPFLAGS; do - - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - eval x=\"$x\" - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" - - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" - fi - done - - - - - HAVE_LIBPTH=yes - - - - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -pth_self(); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - gl_have_pth=yes -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - -$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h - - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - -$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h - - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - case "$gl_use_threads" in - yes | windows | win32) # The 'win32' is for backward compatibility. - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=windows - -$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h - - fi - ;; - esac - fi - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 -$as_echo_n "checking for multithread API to use... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 -$as_echo "$gl_threads_api" >&6; } - - - - - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 -$as_echo_n "checking for promoted mode_t type... " >&6; } -if ${gl_cv_promoted_mode_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_promoted_mode_t='int' -else - gl_cv_promoted_mode_t='mode_t' -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 -$as_echo "$gl_cv_promoted_mode_t" >&6; } - -cat >>confdefs.h <<_ACEOF -#define PROMOTED_MODE_T $gl_cv_promoted_mode_t -_ACEOF - - - - ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" -if test "x$ac_cv_have_decl_setenv" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_SETENV $ac_have_decl -_ACEOF - - - - - - - - - - - : - - - - - - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi - - : - - - - - - - - - - : - - - - - - for ac_header in search.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" -if test "x$ac_cv_header_search_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SEARCH_H 1 -_ACEOF - -fi - -done - - for ac_func in tsearch -do : - ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" -if test "x$ac_cv_func_tsearch" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TSEARCH 1 -_ACEOF - -fi -done - - - - - ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" -if test "x$ac_cv_have_decl_alarm" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_ALARM $ac_have_decl -_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 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_UNSETENV $ac_have_decl -_ACEOF - - - - - - - - - if true; then - GL_COND_LIBTOOL_TRUE= - GL_COND_LIBTOOL_FALSE='#' -else - GL_COND_LIBTOOL_TRUE='#' - GL_COND_LIBTOOL_FALSE= -fi - - gl_cond_libtool=true - gl_m4_base='gnulib/m4' - - - - - - - - - - gl_source_base='gnulib/lib' -LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` - - - - if test $ac_cv_func_alloca_works = no; then - : - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 -$as_echo_n "checking for alloca as a compiler built-in... " >&6; } -if ${gl_cv_rpl_alloca+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Need own alloca" >/dev/null 2>&1; then : - gl_cv_rpl_alloca=yes -else - gl_cv_rpl_alloca=no -fi -rm -f conftest* - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 -$as_echo "$gl_cv_rpl_alloca" >&6; } - if test $gl_cv_rpl_alloca = yes; then - -$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h - - ALLOCA_H=alloca.h - else - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h - fi - - if test -n "$ALLOCA_H"; then - GL_GENERATE_ALLOCA_H_TRUE= - GL_GENERATE_ALLOCA_H_FALSE='#' -else - GL_GENERATE_ALLOCA_H_TRUE='#' - GL_GENERATE_ALLOCA_H_FALSE= -fi - - -: - - - -for ac_header in argz.h -do : - ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default -" -if test "x$ac_cv_header_argz_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_ARGZ_H 1 -_ACEOF - -fi - -done - - -ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H) -# include -#endif -" -if test "x$ac_cv_type_error_t" = xyes; then : - -cat >>confdefs.h <<_ACEOF -#define HAVE_ERROR_T 1 -_ACEOF - - -else - -$as_echo "#define error_t int" >>confdefs.h - - -$as_echo "#define __error_t_defined 1" >>confdefs.h - -fi - - -ARGZ_H= -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 -fi - - -if test -z "$ARGZ_H"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: checking if argz actually works" >&5 -$as_echo_n "checking if argz actually works... " >&6; } -if ${lt_cv_sys_argz_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $host_os in #( - *cygwin*) - lt_cv_sys_argz_works=no - if test "$cross_compiling" != no; then - lt_cv_sys_argz_works="guessing no" - else - lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' - save_IFS=$IFS - IFS=-. - set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` - IFS=$save_IFS - lt_os_major=${2-0} - lt_os_minor=${3-0} - lt_os_micro=${4-0} - if test "$lt_os_major" -gt 1 \ - || { test "$lt_os_major" -eq 1 \ - && { test "$lt_os_minor" -gt 5 \ - || { test "$lt_os_minor" -eq 5 \ - && test "$lt_os_micro" -gt 24; }; }; }; then - lt_cv_sys_argz_works=yes - fi - fi - ;; #( - *) lt_cv_sys_argz_works=yes ;; - esac -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5 -$as_echo "$lt_cv_sys_argz_works" >&6; } - if test "$lt_cv_sys_argz_works" = yes; then : - -$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 - - - - - - - : - - - - - - if test $ac_cv_func_btowc = no; then - HAVE_BTOWC=0 - else - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 -$as_echo_n "checking whether btowc(0) is correct... " >&6; } -if ${gl_cv_func_btowc_nul+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - - case "$host_os" in - # Guess no on Cygwin. - cygwin*) gl_cv_func_btowc_nul="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_nul="guessing yes" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (btowc ('\0') != 0) - return 1; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_btowc_nul=yes -else - gl_cv_func_btowc_nul=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 -$as_echo "$gl_cv_func_btowc_nul" >&6; } - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 -$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } -if ${gl_cv_func_btowc_eof+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; - esac - if test $LOCALE_FR != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (btowc (EOF) != WEOF) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_btowc_eof=yes -else - gl_cv_func_btowc_eof=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 -$as_echo "$gl_cv_func_btowc_eof" >&6; } - - case "$gl_cv_func_btowc_nul" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - case "$gl_cv_func_btowc_eof" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - fi - -if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" - - - : - -fi - - - - - - GNULIB_BTOWC=1 - - - - - -$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h - - - - - - - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - if test $ac_cv_func_realpath = no; then - HAVE_REALPATH=0 - else - case "$gl_cv_func_realpath_works" in - *yes) ;; - *) REPLACE_REALPATH=1 ;; - esac - fi - else - case "$gl_cv_func_realpath_works" in - *yes) - ;; - *) - REPLACE_CANONICALIZE_FILE_NAME=1 - REPLACE_REALPATH=1 - ;; - esac - fi - -if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" - -fi - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_CANONICALIZE_LGPL 1 -_ACEOF - - - - - - - - GNULIB_CANONICALIZE_FILE_NAME=1 - - - - - -$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h - - - - - - - - - GNULIB_REALPATH=1 - - - - - -$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h - - - - - if test "x$datarootdir" = x; then - datarootdir='${datadir}' - - fi - if test "x$docdir" = x; then - docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' - - fi - if test "x$htmldir" = x; then - htmldir='${docdir}' - - fi - if test "x$dvidir" = x; then - dvidir='${docdir}' - - fi - if test "x$pdfdir" = x; then - pdfdir='${docdir}' - - fi - if test "x$psdir" = x; then - psdir='${docdir}' - - fi - if test "x$lispdir" = x; then - lispdir='${datarootdir}/emacs/site-lisp' - - fi - if test "x$localedir" = x; then - localedir='${datarootdir}/locale' - - fi - - pkglibexecdir='${libexecdir}/${PACKAGE}' - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_ctype_h='<'ctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_ctype_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'ctype.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_ctype_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_ctype_h" >&5 -$as_echo "$gl_cv_next_ctype_h" >&6; } - fi - NEXT_CTYPE_H=$gl_cv_next_ctype_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'ctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_ctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive - - - - - - - for gl_func in isblank; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - - - - - - - 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 - 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 - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_float_h='<'float.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_float_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'float.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_float_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_float_h" >&5 -$as_echo "$gl_cv_next_float_h" >&6; } - fi - NEXT_FLOAT_H=$gl_cv_next_float_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'float.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_float_h - fi - NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive - - - - - 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 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" - -fi - - - - - - FNMATCH_H= - gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' - ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 -$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } -if eval \${$gl_fnmatch_cache_var+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - if test "$cross_compiling" = yes; then : - eval "$gl_fnmatch_cache_var=\"guessing no\"" -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } - -int -main () -{ -char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - eval "$gl_fnmatch_cache_var=yes" -else - eval "$gl_fnmatch_cache_var=no" -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -eval ac_res=\$$gl_fnmatch_cache_var - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - rm -f "$gl_source_base/fnmatch.h" - else - FNMATCH_H=fnmatch.h - fi - - if test -n "$FNMATCH_H"; then - GL_GENERATE_FNMATCH_H_TRUE= - GL_GENERATE_FNMATCH_H_FALSE='#' -else - GL_GENERATE_FNMATCH_H_TRUE='#' - GL_GENERATE_FNMATCH_H_FALSE= -fi - - -if test -n "$FNMATCH_H"; then - - - - - - - - - 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 -" -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_func_getdelim = yes; then - HAVE_GETDELIM=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 -$as_echo_n "checking for working getdelim function... " >&6; } -if ${gl_cv_func_working_getdelim+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : - gl_cv_func_working_getdelim="guessing yes" -else - gl_cv_func_working_getdelim="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; - } - return 0; - } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_working_getdelim=yes -else - gl_cv_func_working_getdelim=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -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 - HAVE_GETDELIM=0 - fi - - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 - fi - -if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" - - - for ac_func in flockfile funlockfile -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" -if test "x$ac_cv_have_decl_getc_unlocked" = 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 - - - - - - GNULIB_GETDELIM=1 - - - - - -$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h - - - - - - - - - - : - - - - - - - gl_getline_needs_run_time_check=no - ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" -if test "x$ac_cv_func_getline" = xyes; then : - gl_getline_needs_run_time_check=yes -else - am_cv_func_working_getline=no -fi - - if test $gl_getline_needs_run_time_check = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 -$as_echo_n "checking for working getline function... " >&6; } -if ${am_cv_func_working_getline+:} false; then : - $as_echo_n "(cached) " >&6 -else - echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky GNU user" >/dev/null 2>&1; then : - am_cv_func_working_getline="guessing yes" -else - am_cv_func_working_getline="guessing 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 - - case "$am_cv_func_working_getline" in - *no) - REPLACE_GETLINE=1 - ;; - esac - -if test $REPLACE_GETLINE = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" - - - : - -fi - - - - - - GNULIB_GETLINE=1 - - - - - -$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h - - - - - - - - -if test $REPLACE_GETOPT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - 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 - - - - fi - -if test $REPLACE_GETOPT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" - - - - : - - - - - - - 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 - - - - - - - - - : - - - - - - if test $ac_cv_func_isblank = no; then - HAVE_ISBLANK=0 - fi - -if test $HAVE_ISBLANK = 0; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" - -fi - - - - - - GNULIB_ISBLANK=1 - - - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_langinfo_h='<'langinfo.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_langinfo_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_langinfo_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 '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 "$gl_absolute_header_sed"`'"' - else - gl_cv_next_langinfo_h='<'langinfo.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5 -$as_echo "$gl_cv_next_langinfo_h" >&6; } - fi - NEXT_LANGINFO_H=$gl_cv_next_langinfo_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'langinfo.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_langinfo_h - fi - NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive - - - - - - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_T_FMT_AMPM=0 - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 - - : - - - - - - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5 -$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; } -if ${gl_cv_header_langinfo_codeset+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = CODESET; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_codeset=yes -else - gl_cv_header_langinfo_codeset=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5 -$as_echo "$gl_cv_header_langinfo_codeset" >&6; } - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5 -$as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; } -if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = T_FMT_AMPM; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_t_fmt_ampm=yes -else - gl_cv_header_langinfo_t_fmt_ampm=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5 -$as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; } - if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then - HAVE_LANGINFO_T_FMT_AMPM=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5 -$as_echo_n "checking whether langinfo.h defines ERA... " >&6; } -if ${gl_cv_header_langinfo_era+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = ERA; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_era=yes -else - gl_cv_header_langinfo_era=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5 -$as_echo "$gl_cv_header_langinfo_era" >&6; } - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5 -$as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; } -if ${gl_cv_header_langinfo_yesexpr+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int a = YESEXPR; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_langinfo_yesexpr=yes -else - gl_cv_header_langinfo_yesexpr=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5 -$as_echo "$gl_cv_header_langinfo_yesexpr" >&6; } - if test $gl_cv_header_langinfo_yesexpr = yes; then - HAVE_LANGINFO_YESEXPR=1 - fi - else - HAVE_LANGINFO_H=0 - fi - - - - - - - - for gl_func in nl_langinfo; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - : - - - - - - - - - -LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" - - - - - - - - - - case "$host_os" in - solaris*) - -$as_echo "#define _LCONV_C99 1" >>confdefs.h - - ;; - esac - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 -$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } -if ${gl_cv_header_locale_h_posix2001+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int x = LC_MESSAGES; - int y = sizeof (((struct lconv *) 0)->decimal_point); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_locale_h_posix2001=yes -else - gl_cv_header_locale_h_posix2001=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 -$as_echo "$gl_cv_header_locale_h_posix2001" >&6; } - - - : - - - - - - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 -$as_echo_n "checking whether locale.h defines locale_t... " >&6; } -if ${gl_cv_header_locale_has_locale_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - locale_t x; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_header_locale_has_locale_t=yes -else - gl_cv_header_locale_has_locale_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 -$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi - - - { $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 - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_locale_h='<'locale.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_locale_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'locale.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_locale_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_locale_h" >&5 -$as_echo "$gl_cv_next_locale_h" >&6; } - fi - NEXT_LOCALE_H=$gl_cv_next_locale_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'locale.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_locale_h - fi - NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive - - - - - - - for gl_func in setlocale duplocale; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -/* Some systems provide declarations in a non-standard header. */ -#if HAVE_XLOCALE_H -# include -#endif - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - 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 - - - - - - - : - - - - - - if test $ac_cv_func_lstat = yes; then - - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *no) - REPLACE_LSTAT=1 - ;; - esac - else - HAVE_LSTAT=0 - fi - -if test $REPLACE_LSTAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" - - - - : - -fi - - - - - - GNULIB_LSTAT=1 - - - - - -$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.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 : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDLIB_H 1 -_ACEOF - -fi - -done - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 -$as_echo_n "checking for GNU libc compatible malloc... " >&6; } -if ${ac_cv_func_malloc_0_nonnull+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ - | hpux* | solaris* | cygwin* | mingw*) - ac_cv_func_malloc_0_nonnull=yes ;; - # If we don't know, assume the worst. - *) ac_cv_func_malloc_0_nonnull=no ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H - # include - #else - char *malloc (); - #endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_malloc_0_nonnull=yes -else - ac_cv_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 -$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } - if test $ac_cv_func_malloc_0_nonnull = yes; then : - -$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h - -else - $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h - - REPLACE_MALLOC=1 - -fi - - -if test $REPLACE_MALLOC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - -fi - - -cat >>confdefs.h <<_ACEOF -#define GNULIB_MALLOC_GNU 1 -_ACEOF - - - - - - if test $gl_cv_func_malloc_posix = yes; then - -$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h - - else - REPLACE_MALLOC=1 - fi - -if test $REPLACE_MALLOC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" - -fi - - - - - - GNULIB_MALLOC_POSIX=1 - - - - - -$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h - - - - - - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes -else - gl_cv_func_mbrtowc_sanitycheck=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - - - - : - - - - - - 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 - else - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 -$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } -if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "\303\237er"; - mbstate_t state; - wchar_t wc; - size_t ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 5, &state); - if (ret != 2) - result |= 1; - if (!mbsinit (&state)) - result |= 2; - - memset (&state, '\0', sizeof (mbstate_t)); - ret = mbrtowc (NULL, input, 5, &state); - if (ret != 2) /* Solaris 7 fails here: ret is -1. */ - result |= 4; - if (!mbsinit (&state)) - result |= 8; - } - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_null_arg1=yes -else - gl_cv_func_mbrtowc_null_arg1=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 -$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 -$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } -if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - mbstate_t state; - wchar_t wc; - int ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_null_arg2=yes -else - gl_cv_func_mbrtowc_null_arg2=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 -$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 -$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } -if ${gl_cv_func_mbrtowc_retval+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on HP-UX, Solaris, native Windows. - hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; - esac - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ - || { case "$host_os" in mingw*) true;; *) false;; esac; }; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - int found_some_locale = 0; - /* This fails on Solaris. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 1) - result |= 1; - } - found_some_locale = 1; - } - /* This fails on HP-UX 11.11. */ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 2) - result |= 2; - } - found_some_locale = 1; - } - /* This fails on native Windows. */ - if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 4; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 8; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_China.936") != NULL) - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 16; - } - found_some_locale = 1; - } - return (found_some_locale ? result : 77); -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_retval=yes -else - if test $? != 77; then - gl_cv_func_mbrtowc_retval=no - fi - -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 -$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 -$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } -if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris 8 and 9. - solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8 and 9. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_nul_retval=yes -else - gl_cv_func_mbrtowc_nul_retval=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 -$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } - - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h - - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_null_arg2" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h - - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h - - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) -$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h - - REPLACE_MBRTOWC=1 - ;; - esac - fi - fi - -if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" - - - : - -fi - - - - - - GNULIB_MBRTOWC=1 - - - - - -$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h - - - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes -else - gl_cv_func_mbrtowc_sanitycheck=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - - - - : - - - - - - 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 - else - case "$host_os" in - mingw*) REPLACE_MBSINIT=1 ;; - esac - fi - fi - -if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" - - - : - -fi - - - - - - GNULIB_MBSINIT=1 - - - - - -$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h - - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes -else - gl_cv_func_mbrtowc_sanitycheck=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - - - - : - - - - - - 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 - else - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 -$as_echo_n "checking whether mbsrtowcs works... " >&6; } -if ${gl_cv_func_mbsrtowcs_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on HP-UX, Solaris, mingw. - hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; - esac - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - /* Test whether the function supports a NULL destination argument. - This fails on native Windows. */ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - const char input[] = "\337er"; - const char *src = input; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbsrtowcs (NULL, &src, 1, &state) != 3 - || src != input) - result |= 1; - } - /* Test whether the function works when started with a conversion state - in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - const char input[] = "B\303\274\303\237er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 2; - } - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "<\306\374\313\334\270\354>"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 4; - if (mbsrtowcs (NULL, &src, 10, &state) != 3) - result |= 4; - } - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - const char input[] = "B\250\271\201\060\211\070er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 8; - } - } - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbsrtowcs_works=yes -else - gl_cv_func_mbsrtowcs_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 -$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } - - case "$gl_cv_func_mbsrtowcs_works" in - *yes) ;; - *) REPLACE_MBSRTOWCS=1 ;; - esac - fi - fi - -if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" - - - : - -fi - - - - - - GNULIB_MBSRTOWCS=1 - - - - - -$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h - - - - - - - if false; then - REPLACE_MBTOWC=1 - fi - -if test $REPLACE_MBTOWC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" - - - : - -fi - - - - - - GNULIB_MBTOWC=1 - - - - - -$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h - - - - -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 - - - - - - GNULIB_MEMCHR=1 - - - - - -$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h - - - - - - - - - - for ac_func in mempcpy -do : - ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" -if test "x$ac_cv_func_mempcpy" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_MEMPCPY 1 -_ACEOF - -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 - - - - - - GNULIB_MEMPCPY=1 - - - - - -$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h - - - - - - - - : - - - - - - 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 - - - - - - - - - : - - - - - - if test $ac_cv_func_nl_langinfo = yes; then - # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5 -$as_echo_n "checking whether YESEXPR works... " >&6; } -if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - - case "$host_os" in - # Guess no on irix systems. - irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; - # Guess yes elsewhere. - *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -return !*nl_langinfo(YESEXPR); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_nl_langinfo_yesexpr_works=yes -else - gl_cv_func_nl_langinfo_yesexpr_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5 -$as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; } - case $gl_cv_func_nl_langinfo_yesexpr_works in - *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; - *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; - esac - -cat >>confdefs.h <<_ACEOF -#define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS -_ACEOF - - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then - : - else - REPLACE_NL_LANGINFO=1 - -$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h - - fi - else - HAVE_NL_LANGINFO=0 - fi - -if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext" - -fi - - - - - - GNULIB_NL_LANGINFO=1 - - - - - -$as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h - - - - - - : - - - - - - - - - - - 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 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" - - : -fi - - - - - - GNULIB_RAWMEMCHR=1 - - - - - -$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h - - - - - - - : - - - - - - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 -$as_echo_n "checking whether readlink signature is correct... " >&6; } -if ${gl_cv_decl_readlink_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t); -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_readlink_works=yes -else - gl_cv_decl_readlink_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 -$as_echo "$gl_cv_decl_readlink_works" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 -$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } -if ${gl_cv_func_readlink_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - # We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_readlink_works=yes -else - gl_cv_func_readlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.link conftest.lnk2 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 -$as_echo "$gl_cv_func_readlink_works" >&6; } - case "$gl_cv_func_readlink_works" in - *yes) - if test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - fi - ;; - *) - -$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_READLINK=1 - ;; - esac - fi - -if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" - - - : - -fi - - - - - - GNULIB_READLINK=1 - - - - - -$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h - - - - - - - if test $gl_cv_func_malloc_posix = yes; then - -$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h - - else - REPLACE_REALLOC=1 - fi - -if test $REPLACE_REALLOC = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" - -fi - - - - - - GNULIB_REALLOC_POSIX=1 - - - - - -$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h - - - - - -# Check whether --with-included-regex was given. -if test "${with_included_regex+set}" = set; then : - withval=$with_included_regex; -fi - - - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5 -$as_echo_n "checking for working re_compile_pattern... " >&6; } -if ${gl_cv_func_re_compile_pattern_working+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - gl_cv_func_re_compile_pattern_working=no -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default - #include - #include - #include - -int -main () -{ -int result = 0; - static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; - - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) - { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - result |= 1; - if (! setlocale (LC_ALL, "C")) - return 1; - } - - /* This test is from glibc bug 3957, reported by Andrew Mackey. */ - re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[^x]b", 6, ®ex); - if (s) - result |= 2; - /* This should fail, but succeeds for glibc-2.5. */ - else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - result |= 2; - - /* This regular expression is from Spencer ere test number 75 - in grep-2.3. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof regex); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - result |= 4; - - /* Ensure that [b-a] is diagnosed as invalid, when - using RE_NO_EMPTY_RANGES. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[b-a]", 6, ®ex); - if (s == 0) - result |= 8; - - /* This should succeed, but does not for glibc-2.1.3. */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("{1", 2, ®ex); - if (s) - result |= 8; - - /* The following example is derived from a problem report - against gawk from Jorge Stolfi . */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - result |= 8; - /* This should match, but does not for glibc-2.2.1. */ - else if (re_match (®ex, "an", 2, 0, ®s) != 2) - result |= 8; - - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 8; - /* glibc-2.2.93 does not work with a negative RANGE argument. */ - else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - result |= 8; - - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 16; - else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - result |= 16; - - /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html - */ - re_set_syntax (RE_SYNTAX_POSIX_BASIC - & ~RE_CONTEXT_INVALID_DUP - & ~RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); - if (s) - result |= 32; - - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - result |= 64; - -#if 0 - /* It would be nice to reject hosts whose regoff_t values are too - narrow (including glibc on hosts with 64-bit ptrdiff_t and - 32-bit int), but we should wait until glibc implements this - feature. Otherwise, support for equivalence classes and - multibyte collation symbols would always be broken except - when compiling --without-included-regex. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - result |= 64; -#endif - - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_re_compile_pattern_working=yes -else - gl_cv_func_re_compile_pattern_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5 -$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; } - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5 - ;; - esac - - 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 - - -$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 - - fi - -if test $ac_use_included_regex = yes; then - - - - - - - - - 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 - - : - - - - 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. - - - - - - - : - - - - - - - - - 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 - - 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_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 - - 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_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 - - - - { $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 - - - - - : - - - - - - { $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 : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_stat_file_slash="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -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 - -$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h -;; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 - -$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h -;; - esac - -if test $REPLACE_STAT = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" - - - - : - -fi - - - - - - GNULIB_STAT=1 - - - - - -$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h - - - - - - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - - if test -n "$STDBOOL_H"; then - GL_GENERATE_STDBOOL_H_TRUE= - GL_GENERATE_STDBOOL_H_FALSE='#' -else - GL_GENERATE_STDBOOL_H_TRUE='#' - GL_GENERATE_STDBOOL_H_FALSE= -fi - - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - - - - - - STDDEF_H= - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 -$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } -if ${gl_cv_decl_null_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_decl_null_works=yes -else - gl_cv_decl_null_works=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 -$as_echo "$gl_cv_decl_null_works" >&6; } - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - 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 - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stddef_h='<'stddef.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stddef_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'stddef.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_stddef_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_stddef_h" >&5 -$as_echo "$gl_cv_next_stddef_h" >&6; } - fi - NEXT_STDDEF_H=$gl_cv_next_stddef_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stddef.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stddef_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive - - - - - fi - - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdio_h='<'stdio.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdio_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'stdio.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_stdio_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_stdio_h" >&5 -$as_echo "$gl_cv_next_stdio_h" >&6; } - fi - NEXT_STDIO_H=$gl_cv_next_stdio_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdio.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdio_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive - - - - - - GNULIB_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 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - - - - - for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_stdlib_h='<'stdlib.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_stdlib_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'stdlib.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_stdlib_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_stdlib_h" >&5 -$as_echo "$gl_cv_next_stdlib_h" >&6; } - fi - NEXT_STDLIB_H=$gl_cv_next_stdlib_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'stdlib.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_stdlib_h - fi - NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive - - - - - - - for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_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_func in stpcpy -do : - ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" -if test "x$ac_cv_func_stpcpy" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STPCPY 1 -_ACEOF - -fi -done - - 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 - - - - - - GNULIB_STPCPY=1 - - - - - -$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h - - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_func_stpncpy = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stpncpy" >&5 -$as_echo_n "checking for working stpncpy... " >&6; } -if ${gl_cv_func_stpncpy+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - Thanks for using GNU -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Thanks for using GNU" >/dev/null 2>&1; then : - gl_cv_func_stpncpy="guessing yes" -else - gl_cv_func_stpncpy="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include /* for strcpy */ -/* The stpncpy prototype is missing in on AIX 4. */ -#if !HAVE_DECL_STPNCPY -extern -# ifdef __cplusplus -"C" -# endif -char *stpncpy (char *dest, const char *src, size_t n); -#endif -int main () -{ - int result = 0; - const char *src = "Hello"; - char dest[10]; - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+1 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 2) != dest + 2) - result |= 1; - } - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+4 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 5) != dest + 5) - result |= 2; - } - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+6 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 7) != dest + 5) - result |= 4; - } - return result; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_stpncpy=yes -else - gl_cv_func_stpncpy=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_stpncpy" >&5 -$as_echo "$gl_cv_func_stpncpy" >&6; } - case "$gl_cv_func_stpncpy" in - *yes) - -$as_echo "#define HAVE_STPNCPY 1" >>confdefs.h - - ;; - *) - REPLACE_STPNCPY=1 - ;; - esac - else - HAVE_STPNCPY=0 - fi - -if test $HAVE_STPNCPY = 0 || test $REPLACE_STPNCPY = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS stpncpy.$ac_objext" - - - : - -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 - { $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 strchrnul.$ac_objext" - - : -fi - - - - - - GNULIB_STRCHRNUL=1 - - - - - -$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_have_decl_strndup = no; then - HAVE_DECL_STRNDUP=0 - fi - - if test $ac_cv_func_strndup = yes; then - HAVE_STRNDUP=1 - # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 -$as_echo_n "checking for working strndup... " >&6; } -if ${gl_cv_func_strndup_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - - case $host_os in - aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include -int -main () -{ - -#if !HAVE_DECL_STRNDUP - extern - #ifdef __cplusplus - "C" - #endif - char *strndup (const char *, size_t); -#endif - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); - return s[13] != '\0'; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strndup_works=yes -else - gl_cv_func_strndup_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 -$as_echo "$gl_cv_func_strndup_works" >&6; } - case $gl_cv_func_strndup_works in - *no) REPLACE_STRNDUP=1 ;; - esac - else - HAVE_STRNDUP=0 - fi - -if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" - -fi - - - - - - GNULIB_STRNDUP=1 - - - - - -$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h - - - - - - - - - - : - - - - - - if test $ac_cv_have_decl_strnlen = no; then - HAVE_DECL_STRNLEN=0 - else - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 -$as_echo_n "checking for working strnlen... " >&6; } -if ${ac_cv_func_strnlen_working+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - # Guess no on AIX systems, yes otherwise. - case "$host_os" in - aix*) ac_cv_func_strnlen_working=no;; - *) ac_cv_func_strnlen_working=yes;; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - -#define S "foobar" -#define S_LEN (sizeof S - 1) - - /* At least one implementation is buggy: that of AIX 4.3 would - give strnlen (S, 1) == 3. */ - - int i; - for (i = 0; i < S_LEN + 1; ++i) - { - int expected = i <= S_LEN ? i : S_LEN; - if (strnlen (S, i) != expected) - return 1; - } - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - ac_cv_func_strnlen_working=yes -else - ac_cv_func_strnlen_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 -$as_echo "$ac_cv_func_strnlen_working" >&6; } -test $ac_cv_func_strnlen_working = no && : - - - 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 - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" - - : -fi - - - - - - GNULIB_STRNLEN=1 - - - - - -$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h - - - - - - if test $REPLACE_STRSTR = 0; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 -$as_echo_n "checking whether strstr works in linear time... " >&6; } -if ${gl_cv_func_strstr_linear+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !(defined __i386__ || defined __x86_64__) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_linear="guessing yes" -else - gl_cv_func_strstr_linear="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include /* for signal */ -#include /* for strstr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } - -int -main () -{ - - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also have quadratic strstr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strstr (haystack, needle)) - result |= 1; - } - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_linear=yes -else - gl_cv_func_strstr_linear=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 -$as_echo "$gl_cv_func_strstr_linear" >&6; } - case "$gl_cv_func_strstr_linear" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac - fi - -if test $REPLACE_STRSTR = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - -fi - - - - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 -$as_echo_n "checking whether strstr works... " >&6; } -if ${gl_cv_func_strstr_works_always+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "Lucky user" >/dev/null 2>&1; then : - gl_cv_func_strstr_works_always="guessing yes" -else - gl_cv_func_strstr_works_always="guessing no" -fi -rm -f conftest* - - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P - -int -main () -{ -return !!strstr (HAYSTACK, NEEDLE); - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_strstr_works_always=yes -else - gl_cv_func_strstr_works_always=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 -$as_echo "$gl_cv_func_strstr_works_always" >&6; } - case "$gl_cv_func_strstr_works_always" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac - fi - -if test $REPLACE_STRSTR = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" - -fi - - - - - - GNULIB_STRSTR=1 - - - - - -$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h - - - - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_stat_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_stat_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/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 "$gl_absolute_header_sed"`'"' - else - gl_cv_next_sys_stat_h='<'sys/stat.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 -$as_echo "$gl_cv_next_sys_stat_h" >&6; } - fi - NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/stat.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_stat_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive - - - - - - - - - - - - if test $WINDOWS_64_BIT_ST_SIZE = 1; then - -$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h - - fi - - ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include - #include -" -if test "x$ac_cv_type_nlink_t" = xyes; then : - -else - -$as_echo "#define nlink_t int" >>confdefs.h - -fi - - - - for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - - - - - - - - - - if test $gl_cv_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 - - - - - - - - - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_sys_wait_h='<'sys/wait.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_sys_wait_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_sys_wait_h = yes; then - - - 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/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 "$gl_absolute_header_sed"`'"' - else - gl_cv_next_sys_wait_h='<'sys/wait.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5 -$as_echo "$gl_cv_next_sys_wait_h" >&6; } - fi - NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'sys/wait.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_sys_wait_h - fi - NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive - - - - - - - - - for gl_func in waitpid; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - : - - - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_unistd_h='<'unistd.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_unistd_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_unistd_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'unistd.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' - else - gl_cv_next_unistd_h='<'unistd.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 -$as_echo "$gl_cv_next_unistd_h" >&6; } - fi - NEXT_UNISTD_H=$gl_cv_next_unistd_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'unistd.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_unistd_h - fi - NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - - - - - - - - for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#if HAVE_UNISTD_H -# include -#endif -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - : - - - - - - if test $ac_cv_func_vasnprintf = no; then - - - : - - - - - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" - - if test $ac_cv_func_vasnprintf = yes; then - -$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h - - fi - - - - - - - - - - - - ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = xyes; then : - -else - -$as_echo "#define ptrdiff_t long" >>confdefs.h - - -fi - - - - - - - - fi - - - for ac_func in vasprintf -do : - ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" -if test "x$ac_cv_func_vasprintf" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_VASPRINTF 1 -_ACEOF - -fi -done - - if test $ac_cv_func_vasprintf = no; then - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext" - - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext" - - - if test $ac_cv_func_vasprintf = yes; then - REPLACE_VASPRINTF=1 - else - HAVE_VASPRINTF=0 - fi - - - - - - - - - fi - - - - - - - GNULIB_VASPRINTF=1 - - - - - -$as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h - - - - - - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wchar_h='<'wchar.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_wchar_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_wchar_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - 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 "$gl_absolute_header_sed"`'"' - else - gl_cv_next_wchar_h='<'wchar.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 -$as_echo "$gl_cv_next_wchar_h" >&6; } - fi - NEXT_WCHAR_H=$gl_cv_next_wchar_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wchar.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wchar_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - - - - - - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - - - - for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - - - - - - - : - - - - - - - : - - - - - - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 -$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } -if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac - if test $LOCALE_JA != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_incomplete_state=yes -else - gl_cv_func_mbrtowc_incomplete_state=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 -$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 -$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } -if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac - if test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_mbrtowc_sanitycheck=yes -else - gl_cv_func_mbrtowc_sanitycheck=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 -$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } - - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi - - - - : - - - - - - 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 - else - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5 -$as_echo_n "checking whether wcrtomb return value is correct... " >&6; } -if ${gl_cv_func_wcrtomb_retval+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; - esac - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 1; - } - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 2; - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 4; - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 8; - } - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_wcrtomb_retval=yes -else - gl_cv_func_wcrtomb_retval=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5 -$as_echo "$gl_cv_func_wcrtomb_retval" >&6; } - case "$gl_cv_func_wcrtomb_retval" in - *yes) ;; - *) REPLACE_WCRTOMB=1 ;; - esac - fi - fi - -if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then - - - - - - - - - gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext" - - - : - -fi - - - - - - GNULIB_WCRTOMB=1 - - - - - -$as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h - - - - - - - - - : - - - - - - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else - HAVE_ISWCNTRL=0 - fi - - - - - - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - - - - - - - - - : - - - - - - - - - if test $gl_cv_have_include_next = yes; then - gl_cv_next_wctype_h='<'wctype.h'>' - else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of " >&5 -$as_echo_n "checking absolute name of ... " >&6; } -if ${gl_cv_next_wctype_h+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test $ac_cv_header_wctype_h = yes; then - - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - -_ACEOF - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac - - case "$host_os" in - mingw*) - gl_dirsep_regex='[/\\]' - ;; - *) - gl_dirsep_regex='\/' - ;; - esac - gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' - - gl_header_literal_regex=`echo 'wctype.h' \ - | sed -e "$gl_make_literal_regex_sed"` - gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ - s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ - s|^/[^/]|//&| - p - q - }' - gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | - sed -n "$gl_absolute_header_sed"`'"' - else - gl_cv_next_wctype_h='<'wctype.h'>' - fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 -$as_echo "$gl_cv_next_wctype_h" >&6; } - fi - NEXT_WCTYPE_H=$gl_cv_next_wctype_h - - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'wctype.h'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=$gl_cv_next_wctype_h - fi - NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive - - - - - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 -$as_echo_n "checking whether iswcntrl works... " >&6; } -if ${gl_cv_func_iswcntrl_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - - if test "$cross_compiling" = yes; then : - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - #if __GNU_LIBRARY__ == 1 - Linux libc5 i18n is broken. - #endif -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_func_iswcntrl_works="guessing yes" -else - gl_cv_func_iswcntrl_works="guessing no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - /* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_iswcntrl_works=yes -else - gl_cv_func_iswcntrl_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 -$as_echo "$gl_cv_func_iswcntrl_works" >&6; } - fi - HAVE_WCTYPE_H=1 - else - HAVE_WCTYPE_H=0 - fi - - - case "$gl_cv_func_iswcntrl_works" in - *yes) REPLACE_ISWCNTRL=0 ;; - *) REPLACE_ISWCNTRL=1 ;; - esac - - - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - : - fi - - if test $REPLACE_ISWCNTRL = 1; then - REPLACE_TOWLOWER=1 - else - for ac_func in towlower -do : - ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" -if test "x$ac_cv_func_towlower" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_TOWLOWER 1 -_ACEOF - -fi -done - - if test $ac_cv_func_towlower = yes; then - REPLACE_TOWLOWER=0 - else - ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - -" -if test "x$ac_cv_have_decl_towlower" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_TOWLOWER $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl_towlower = yes; then - REPLACE_TOWLOWER=1 - else - REPLACE_TOWLOWER=0 - fi - fi - fi - - - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then - : - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 -$as_echo_n "checking for wctype_t... " >&6; } -if ${gl_cv_type_wctype_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctype_t=yes -else - gl_cv_type_wctype_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 -$as_echo "$gl_cv_type_wctype_t" >&6; } - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 -$as_echo_n "checking for wctrans_t... " >&6; } -if ${gl_cv_type_wctrans_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - wctrans_t a; - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gl_cv_type_wctrans_t=yes -else - gl_cv_type_wctrans_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 -$as_echo "$gl_cv_type_wctrans_t" >&6; } - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 - fi - - - for gl_func in wctype iswctype wctrans towctrans ; do - as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 -$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } -if eval \${$as_gl_Symbol+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# include -#endif -#include - -int -main () -{ -#undef $gl_func - (void) $gl_func; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - eval "$as_gl_Symbol=yes" -else - eval "$as_gl_Symbol=no" -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -eval ac_res=\$$as_gl_Symbol - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } - if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 -_ACEOF - - eval ac_cv_have_decl_$gl_func=yes -fi - done - - - - - - for ac_header in stdint.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" -if test "x$ac_cv_header_stdint_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_STDINT_H 1 -_ACEOF - -fi - -done - - - # End of code from modules - - - - - - - - - - gltests_libdeps= - gltests_ltlibdeps= - - - - - - - - - - gl_source_base='gnulib/tests' - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS - - gl_module_indicator_condition=$gltests_WITNESS - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if ${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 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 turkish Unicode locale" >&5 -$as_echo_n "checking for a turkish Unicode locale... " >&6; } -if ${gt_cv_locale_tr_utf8+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. But BeOS does not - implement the Turkish upper-/lowercase mappings. Therefore, let this - program return 1 on BeOS. */ - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the eighth month, the second - character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) - return 1; - /* Check whether the upper-/lowercase mappings are as expected for - Turkish. */ - if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' - || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=Turkish_Turkey.65001 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr.UTF-8 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - fi - fi - ;; - esac - else - gt_cv_locale_tr_utf8=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5 -$as_echo "$gt_cv_locale_tr_utf8" >&6; } - LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 - - - - - - if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then - REPLACE_CLOSE=1 - fi - - - - - - : - - - - - - if test $ac_cv_header_sys_socket_h != yes; then - for ac_header in winsock2.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" -if test "x$ac_cv_header_winsock2_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_WINSOCK2_H 1 -_ACEOF - -fi - -done - - fi - if test "$ac_cv_header_winsock2_h" = yes; then - HAVE_WINSOCK2_H=1 - UNISTD_H_HAVE_WINSOCK2_H=1 - SYS_IOCTL_H_HAVE_WINSOCK2_H=1 - else - HAVE_WINSOCK2_H=0 - fi - - - if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then - REPLACE_CLOSE=1 - fi - - - -if test $REPLACE_CLOSE = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS close.$ac_objext" - -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 : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works="guessing no" ;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works="guessing no" ;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works="guessing no" ;; - haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works="guessing no" ;; - *) gl_cv_func_dup2_works="guessing yes" ;; - esac -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -#include -#include -int -main () -{ -int result = 0; -#ifdef FD_CLOEXEC - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif - if (dup2 (1, 1) == 0) - result |= 2; -#ifdef FD_CLOEXEC - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) - result |= 16; - return result; - - ; - return 0; -} - -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_dup2_works=yes -else - gl_cv_func_dup2_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 -$as_echo "$gl_cv_func_dup2_works" >&6; } - case "$gl_cv_func_dup2_works" in - *yes) ;; - *) - REPLACE_DUP2=1 - ;; - 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 - - - - - - - - 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 fstat.$ac_objext" - - - - -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 - - - - - -$as_echo "#define GNULIB_TEST_FSTAT 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 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS getcwd-lgpl.$ac_objext" - -fi - - - - - - 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 - - - - - -$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h - - - - - - - for ac_func in getpagesize -do : - ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" -if test "x$ac_cv_func_getpagesize" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_GETPAGESIZE 1 -_ACEOF - -fi -done - - if test $ac_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - for ac_header in OS.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default" -if test "x$ac_cv_header_OS_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_OS_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - for ac_header in sys/param.h -do : - ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" -if test "x$ac_cv_header_sys_param_h" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_SYS_PARAM_H 1 -_ACEOF - -fi - -done - - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - ;; - esac - ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default" -if test "x$ac_cv_have_decl_getpagesize" = xyes; then : - -else - HAVE_DECL_GETPAGESIZE=0 -fi - - -if test $REPLACE_GETPAGESIZE = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS getpagesize.$ac_objext" - -fi - - - - - - if test "$GNULIB_GETPAGESIZE" != 1; then - if test "$GNULIB_GETPAGESIZE" = 0; then - GNULIB_GETPAGESIZE=$gl_module_indicator_condition - else - GNULIB_GETPAGESIZE="($GNULIB_GETPAGESIZE || $gl_module_indicator_condition)" - fi - fi - - - - - -$as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h - - - - - - - - - - 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 - 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 - - #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 - - - else - UINT64_MAX_EQ_ULONG_MAX=-1 - fi - - - - - : - - - - - - - - - for ac_func in setlocale uselocale -do : - as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` -ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -if eval test \"x\$"$as_ac_var"\" = x"yes"; then : - cat >>confdefs.h <<_ACEOF -#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 -_ACEOF - -fi -done - - - - : - - - - - - - - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include -" -if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : - -$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h - -fi - - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include -int -main () -{ - -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - fi - - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if ${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 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 japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - - { $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 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 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 japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - - - # 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 - - - : - - - - - - - : - - - - - - - - : - - - - - - 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; } -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 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 - - - - - case "$host_os" in - mingw* | pw*) - REPLACE_OPEN=1 - ;; - *) - - : - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 -$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } -if ${gl_cv_func_open_slash+:} false; then : - $as_echo_n "(cached) " >&6 -else - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - if test "$cross_compiling" = yes; then : - - case "$host_os" in - freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#if HAVE_UNISTD_H -# include -#endif -int main () -{ - int result = 0; -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) - result |= 1; -#endif - if (open ("conftest.sl/", O_CREAT, 0600) >= 0) - result |= 2; - return result; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_open_slash=yes -else - gl_cv_func_open_slash=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.sl conftest.tmp conftest.lnk - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 -$as_echo "$gl_cv_func_open_slash" >&6; } - case "$gl_cv_func_open_slash" in - *no) - -$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h - - REPLACE_OPEN=1 - ;; - esac - ;; - esac - - - -if test $REPLACE_OPEN = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS open.$ac_objext" - - - - - : - -fi - - - - - - 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 - - - - - -$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_n "checking for putenv compatible with GNU and SVID... " >&6; } -if ${gl_cv_func_svid_putenv+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_svid_putenv="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -$ac_includes_default -int -main () -{ - - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - return 1; - - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - return 2; - - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - return 3; - - return 0; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_svid_putenv=yes -else - gl_cv_func_svid_putenv=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5 -$as_echo "$gl_cv_func_svid_putenv" >&6; } - case "$gl_cv_func_svid_putenv" in - *yes) ;; - *) - REPLACE_PUTENV=1 - ;; - esac - -if test $REPLACE_PUTENV = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS putenv.$ac_objext" - -fi - - - - - - if test "$GNULIB_PUTENV" != 1; then - if test "$GNULIB_PUTENV" = 0; then - GNULIB_PUTENV=$gl_module_indicator_condition - else - GNULIB_PUTENV="($GNULIB_PUTENV || $gl_module_indicator_condition)" - fi - fi - - - - - -$as_echo "#define GNULIB_TEST_PUTENV 1" >>confdefs.h - - - - - - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" -if test "x$ac_cv_func_mmap" = xyes; then : - gl_have_mmap=yes -else - gl_have_mmap=no -fi - - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 -$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef MAP_ANONYMOUS - I cannot identify this map -#endif - -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "I cannot identify this map" >/dev/null 2>&1; then : - gl_have_mmap_anonymous=yes -fi -rm -f conftest* - - if test $gl_have_mmap_anonymous != yes; then - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#ifdef MAP_ANON - I cannot identify this map -#endif - -_ACEOF -if (eval "$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 - - - : - - - - - - - : - - - - - - - - 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 - - - - - -$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 - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS setlocale.$ac_objext" - - - : - -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 - - - - - -$as_echo "#define GNULIB_TEST_SETLOCALE 1" >>confdefs.h - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if ${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 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 japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 -$as_echo_n "checking for wchar_t... " >&6; } -if ${gt_cv_c_wchar_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include - wchar_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wchar_t=yes -else - gt_cv_c_wchar_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 -$as_echo "$gt_cv_c_wchar_t" >&6; } - if test $gt_cv_c_wchar_t = yes; then - -$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h - - fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 -$as_echo_n "checking for wint_t... " >&6; } -if ${gt_cv_c_wint_t+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0'; -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_c_wint_t=yes -else - gt_cv_c_wint_t=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 -$as_echo "$gt_cv_c_wint_t" >&6; } - if test $gt_cv_c_wint_t = yes; then - -$as_echo "#define HAVE_WINT_T 1" >>confdefs.h - - 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 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 - - - : - - - - - - - : - - - - - - - : - - - - - - - - - # 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 - - - : - - - - - - - : - - - - - - - - - : - - - - - - 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; } -if ${gl_cv_func_symlink_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_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. */ -#include - -int -main () -{ -int result = 0; - if (!symlink ("a", "conftest.link/")) - result |= 1; - if (symlink ("conftest.f", "conftest.lnk2")) - result |= 2; - else if (!symlink ("a", "conftest.lnk2/")) - result |= 4; - return result; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_symlink_works=yes -else - gl_cv_func_symlink_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - rm -f conftest.f conftest.link conftest.lnk2 -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5 -$as_echo "$gl_cv_func_symlink_works" >&6; } - case "$gl_cv_func_symlink_works" in - *yes) ;; - *) - REPLACE_SYMLINK=1 - ;; - esac - fi - -if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS symlink.$ac_objext" - -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 - - - - - -$as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h - - - - - - - - if test $gl_threads_api = posix; then - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - for ac_func in pthread_atfork -do : - ac_fn_c_check_func "$LINENO" "pthread_atfork" "ac_cv_func_pthread_atfork" -if test "x$ac_cv_func_pthread_atfork" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_PTHREAD_ATFORK 1 -_ACEOF - -fi -done - - LIBS="$gl_save_LIBS" - fi - - - - - - - - - : - - - - - - if test $ac_cv_have_decl_unsetenv = no; then - HAVE_DECL_UNSETENV=0 - fi - for ac_func in unsetenv -do : - ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" -if test "x$ac_cv_func_unsetenv" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_UNSETENV 1 -_ACEOF - -fi -done - - if test $ac_cv_func_unsetenv = no; then - HAVE_UNSETENV=0 - else - HAVE_UNSETENV=1 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 -$as_echo_n "checking for unsetenv() return type... " >&6; } -if ${gt_cv_func_unsetenv_ret+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#undef _BSD -#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ -#include -extern -#ifdef __cplusplus -"C" -#endif -int unsetenv (const char *name); - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - gt_cv_func_unsetenv_ret='int' -else - gt_cv_func_unsetenv_ret='void' -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 -$as_echo "$gt_cv_func_unsetenv_ret" >&6; } - if test $gt_cv_func_unsetenv_ret = 'void'; then - -$as_echo "#define VOID_UNSETENV 1" >>confdefs.h - - REPLACE_UNSETENV=1 - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 -$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } -if ${gl_cv_func_unsetenv_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test "$cross_compiling" = yes; then : - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_unsetenv_works="guessing no" ;; - esac - -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - - #include - #include - extern char **environ; - -int -main () -{ - - char entry1[] = "a=1"; - char entry2[] = "b=2"; - char *env[] = { entry1, entry2, NULL }; - if (putenv ((char *) "a=1")) return 1; - if (putenv (entry2)) return 2; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 3; - if (!unsetenv ("") || errno != EINVAL) return 4; - entry2[0] = 'b'; - environ = env; - if (!getenv ("a")) return 5; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 6; - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_unsetenv_works=yes -else - gl_cv_func_unsetenv_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 -$as_echo "$gl_cv_func_unsetenv_works" >&6; } - case "$gl_cv_func_unsetenv_works" in - *yes) ;; - *) - REPLACE_UNSETENV=1 - ;; - esac - fi - -if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS unsetenv.$ac_objext" - - - - - : - - - - - - -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 - - - - - -$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h - - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 -$as_echo_n "checking for a traditional french locale... " >&6; } -if ${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 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 japanese locale" >&5 -$as_echo_n "checking for a traditional japanese locale... " >&6; } -if ${gt_cv_locale_ja+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 -$as_echo "$gt_cv_locale_ja" >&6; } - LOCALE_JA=$gt_cv_locale_ja - - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 -$as_echo_n "checking for a transitional chinese locale... " >&6; } -if ${gt_cv_locale_zh_CN+:} false; then : - $as_echo_n "(cached) " >&6 -else - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} - -_ACEOF - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 - (eval $ac_link) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 -$as_echo "$gt_cv_locale_zh_CN" >&6; } - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - - - - - - - : - - - - - - if test $ac_cv_func_wctob = no; then - HAVE_WCTOB=0 - HAVE_DECL_WCTOB=0 - else - HAVE_WCTOB=1 - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5 -$as_echo_n "checking whether wctob works... " >&6; } -if ${gl_cv_func_wctob_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - - case "$host_os" in - # Guess no on Solaris <= 9 and Cygwin. - solaris2.[1-9] | solaris2.[1-9].* | cygwin*) - gl_cv_func_wctob_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wctob_works="guessing yes" ;; - esac - case "$host_os" in - cygwin*) - if test "$cross_compiling" = yes; then : - : -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 - -register long global __asm__ ("%ebx"); - -int main () -{ - setlocale (LC_ALL, "en_US.UTF-8"); - - global = 0x12345678; - if (wctob (0x00FC) != -1) - return 1; - if (global != 0x12345678) - return 2; - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - : -else - gl_cv_func_wctob_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 - - ;; - esac - if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then - if test "$cross_compiling" = yes; then : - : -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - wchar_t wc; - - if (mbtowc (&wc, "\374", 1) == 1) - if (wctob (wc) != (unsigned char) '\374') - return 1; - } - return 0; -} -_ACEOF -if ac_fn_c_try_run "$LINENO"; then : - gl_cv_func_wctob_works=yes -else - gl_cv_func_wctob_works=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5 -$as_echo "$gl_cv_func_wctob_works" >&6; } - case "$gl_cv_func_wctob_works" in - *yes) ;; - *) REPLACE_WCTOB=1 ;; - esac - 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 - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - -" -if test "x$ac_cv_have_decl_wctob" = xyes; then : - ac_have_decl=1 -else - ac_have_decl=0 -fi - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_WCTOB $ac_have_decl -_ACEOF - - if test $ac_cv_have_decl_wctob != yes; then - HAVE_DECL_WCTOB=0 - fi - fi - fi - -if test $HAVE_WCTOB = 0 || test $REPLACE_WCTOB = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS wctob.$ac_objext" - - - : - -fi - - - - - - 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 - - - - - -$as_echo "#define GNULIB_TEST_WCTOB 1" >>confdefs.h - - - - - - - if false; then - REPLACE_WCTOMB=1 - fi - -if test $REPLACE_WCTOMB = 1; then - - - - - - - - - gltests_LIBOBJS="$gltests_LIBOBJS wctomb.$ac_objext" - - - : - -fi - - - - - - 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 - - - - - -$as_echo "#define GNULIB_TEST_WCTOMB 1" >>confdefs.h - - - - - - YIELD_LIB= - if test $gl_threads_api = posix; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 -$as_echo_n "checking for sched_yield in -lrt... " >&6; } -if ${ac_cv_lib_rt_sched_yield+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrt $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sched_yield (); -int -main () -{ -return sched_yield (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rt_sched_yield=yes -else - ac_cv_lib_rt_sched_yield=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 -$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } -if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : - YIELD_LIB=-lrt -else - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 -$as_echo_n "checking for sched_yield in -lposix4... " >&6; } -if ${ac_cv_lib_posix4_sched_yield+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lposix4 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sched_yield (); -int -main () -{ -return sched_yield (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_posix4_sched_yield=yes -else - ac_cv_lib_posix4_sched_yield=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 -$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } -if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : - YIELD_LIB=-lposix4 -fi - -fi - - fi - - - - - - - - - - - - - LIBTESTS_LIBDEPS="$gltests_libdeps" - - - - - - - - - - -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. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_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 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_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 - fi -done - done -IFS=$as_save_IFS - - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - 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 - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi -else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" -fi - -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.9.0 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBXML" >&5 -$as_echo_n "checking for LIBXML... " >&6; } - -if test -n "$LIBXML_CFLAGS"; then - pkg_cv_LIBXML_CFLAGS="$LIBXML_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 - ac_status=$? - $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 - else - pkg_failed=untried -fi -if test -n "$LIBXML_LIBS"; then - pkg_cv_LIBXML_LIBS="$LIBXML_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libxml-2.0\""; } >&5 - ($PKG_CONFIG --exists --print-errors "libxml-2.0") 2>&5 - ac_status=$? - $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 - else - pkg_failed=untried -fi - - - -if test $pkg_failed = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - -if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then - _pkg_short_errors_supported=yes -else - _pkg_short_errors_supported=no -fi - if test $_pkg_short_errors_supported = yes; then - LIBXML_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libxml-2.0" 2>&1` - else - 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 - - as_fn_error $? "Package requirements (libxml-2.0) were not met: - -$LIBXML_PKG_ERRORS - -Consider adjusting the PKG_CONFIG_PATH environment variable if you -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; } - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it -is in your PATH or set the PKG_CONFIG environment variable to the full -path to pkg-config. - -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. - -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 - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi - -for ac_func in strerror_r fsync -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_config_files="$ac_config_files Makefile gnulib/lib/Makefile gnulib/tests/Makefile src/Makefile man/Makefile tests/Makefile examples/Makefile doc/Makefile doc/naturaldocs/Makefile augeas.pc augeas.spec" - -cat >confcache <<\_ACEOF -# This file is a shell script that caches the results of configure -# tests run on this system so they can be shared between configure -# scripts and configure runs, see configure's option --config-cache. -# It is not useful on other systems. If it contains results you don't -# want to keep, you may remove or edit it. -# -# config.status only pays attention to the cache file if you give it -# the --recheck option to rerun configure. -# -# `ac_cv_env_foo' variables (set or unset) will be overridden when -# loading this file, other *unset* `ac_cv_foo' will be assigned the -# following values. - -_ACEOF - -# The following way of writing the cache mishandles newlines in values, -# but we know of no workaround that is simple, portable, and efficient. -# So, we kill variables containing newlines. -# Ultrix sh set writes to stderr and can't be redirected directly, -# and sets the high bit in the cache file unless we assign to the vars. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 -$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( - *) { eval $ac_var=; unset $ac_var;} ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - # `set' does not quote correctly, so add quotes: double-quote - # substitution turns \\\\ into \\, and sed turns \\ into \. - sed -n \ - "s/'/'\\\\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" - ;; #( - *) - # `set' quotes correctly as required by POSIX, so do not add quotes. - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ - :end' >>confcache -if diff "$cache_file" confcache >/dev/null 2>&1; then :; else - if test -w "$cache_file"; then - if test "x$cache_file" != "x/dev/null"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 -$as_echo "$as_me: updating cache $cache_file" >&6;} - if test ! -f "$cache_file" || test -h "$cache_file"; then - cat confcache >"$cache_file" - else - case $cache_file in #( - */* | ?:*) - mv -f confcache "$cache_file"$$ && - mv -f "$cache_file"$$ "$cache_file" ;; #( - *) - mv -f confcache "$cache_file" ;; - esac - fi - fi - else - { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 -$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} - fi -fi -rm -f confcache - -test "x$prefix" = xNONE && prefix=$ac_default_prefix -# Let make expand exec_prefix. -test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' - -DEFS=-DHAVE_CONFIG_H - -ac_libobjs= -ac_ltlibobjs= -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$//' - ac_i=`$as_echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" - as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' -done -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='#' -else - am__EXEEXT_TRUE='#' - am__EXEEXT_FALSE= -fi - -if test -z "${ND_ENABLED_TRUE}" && test -z "${ND_ENABLED_FALSE}"; then - as_fn_error $? "conditional \"ND_ENABLED\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${WITH_FAILMALLOC_TRUE}" && test -z "${WITH_FAILMALLOC_FALSE}"; then - as_fn_error $? "conditional \"WITH_FAILMALLOC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then - as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then - as_fn_error $? "conditional \"AMDEP\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${USE_VERSION_SCRIPT_TRUE}" && test -z "${USE_VERSION_SCRIPT_FALSE}"; then - as_fn_error $? "conditional \"USE_VERSION_SCRIPT\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -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= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - gl_LIBOBJS=$gl_libobjs - - gl_LTLIBOBJS=$gl_ltlibobjs - - - - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - gltests_LIBOBJS=$gltests_libobjs - - gltests_LTLIBOBJS=$gltests_ltlibobjs - - - -: "${CONFIG_STATUS=./config.status}" -ac_write_fail=0 -ac_clean_files_save=$ac_clean_files -ac_clean_files="$ac_clean_files $CONFIG_STATUS" -{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 -$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} -as_write_fail=0 -cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 -#! $SHELL -# Generated by $as_me. -# Run this file to recreate the current configuration. -# Compiler output produced by configure, useful for debugging -# configure, is in config.log if it exists. - -debug=false -ac_cs_recheck=false -ac_cs_silent=false - -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 -## -------------------- ## -## M4sh Initialization. ## -## -------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : - emulate sh - NULLCMD=: - # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which - # is contrary to our usage. Disable this feature. - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in #( - *posix*) : - set -o posix ;; #( - *) : - ;; -esac -fi - - -as_nl=' -' -export as_nl -# Printing a long string crashes Solaris 7 /usr/bin/printf. -as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo -as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo -# Prefer a ksh shell builtin over an external printf program on Solaris, -# but without wasting forks for bash or zsh. -if test -z "$BASH_VERSION$ZSH_VERSION" \ - && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='print -r --' - as_echo_n='print -rn --' -elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then - as_echo='printf %s\n' - as_echo_n='printf %s' -else - if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then - as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' - as_echo_n='/usr/ucb/echo -n' - else - as_echo_body='eval expr "X$1" : "X\\(.*\\)"' - as_echo_n_body='eval - arg=$1; - case $arg in #( - *"$as_nl"*) - expr "X$arg" : "X\\(.*\\)$as_nl"; - arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; - esac; - expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" - ' - export as_echo_n_body - as_echo_n='sh -c $as_echo_n_body as_echo' - fi - export as_echo_body - as_echo='sh -c $as_echo_body as_echo' -fi - -# The user is always right. -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -as_myself= -case $0 in #(( - *[\\/]* ) as_myself=$0 ;; - *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break - done -IFS=$as_save_IFS - - ;; -esac -# We did not find ourselves, most probably we were run as `sh COMMAND' -# in which case we are not to be found in the path. -if test "x$as_myself" = x; then - as_myself=$0 -fi -if test ! -f "$as_myself"; then - $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 - exit 1 -fi - -# Unset variables that we do not need and which cause bugs (e.g. in -# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" -# suppresses any "Segmentation fault" message there. '((' could -# trigger a bug in pdksh 5.2.14. -for as_var in BASH_ENV ENV MAIL MAILPATH -do eval test x\${$as_var+set} = xset \ - && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : -done -PS1='$ ' -PS2='> ' -PS4='+ ' - -# NLS nuisances. -LC_ALL=C -export LC_ALL -LANGUAGE=C -export LANGUAGE - -# CDPATH. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - - -# as_fn_error STATUS ERROR [LINENO LOG_FD] -# ---------------------------------------- -# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are -# provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with STATUS, using 1 if that was 0. -as_fn_error () -{ - as_status=$1; test $as_status -eq 0 && as_status=1 - if test "$4"; then - as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 - fi - $as_echo "$as_me: error: $2" >&2 - as_fn_exit $as_status -} # as_fn_error - - -# as_fn_set_status STATUS -# ----------------------- -# Set $? to STATUS, without forking. -as_fn_set_status () -{ - return $1 -} # as_fn_set_status - -# as_fn_exit STATUS -# ----------------- -# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. -as_fn_exit () -{ - set +e - as_fn_set_status $1 - exit $1 -} # as_fn_exit - -# as_fn_unset VAR -# --------------- -# Portably unset VAR. -as_fn_unset () -{ - { eval $1=; unset $1;} -} -as_unset=as_fn_unset -# as_fn_append VAR VALUE -# ---------------------- -# Append the text in VALUE to the end of the definition contained in VAR. Take -# advantage of any shell optimizations that allow amortized linear growth over -# repeated appends, instead of the typical quadratic growth present in naive -# implementations. -if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : - eval 'as_fn_append () - { - eval $1+=\$2 - }' -else - as_fn_append () - { - eval $1=\$$1\$2 - } -fi # as_fn_append - -# as_fn_arith ARG... -# ------------------ -# Perform arithmetic evaluation on the ARGs, and store the result in the -# global $as_val. Take advantage of shells that can avoid forks. The arguments -# must be portable across $(()) and expr. -if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : - eval 'as_fn_arith () - { - as_val=$(( $* )) - }' -else - as_fn_arith () - { - as_val=`expr "$@" || test $? -eq 1` - } -fi # as_fn_arith - - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then - as_basename=basename -else - as_basename=false -fi - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -as_me=`$as_basename -- "$0" || -$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ - X"$0" : 'X\(//\)$' \| \ - X"$0" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X/"$0" | - sed '/^.*\/\([^/][^/]*\)\/*$/{ - s//\1/ - q - } - /^X\/\(\/\/\)$/{ - s//\1/ - q - } - /^X\/\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - -# Avoid depending upon Character Ranges. -as_cr_letters='abcdefghijklmnopqrstuvwxyz' -as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' -as_cr_Letters=$as_cr_letters$as_cr_LETTERS -as_cr_digits='0123456789' -as_cr_alnum=$as_cr_Letters$as_cr_digits - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in #((((( --n*) - case `echo 'xy\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - xy) ECHO_C='\c';; - *) echo `echo ksh88 bug on AIX 6.1` > /dev/null - ECHO_T=' ';; - esac;; -*) - ECHO_N='-n';; -esac - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir 2>/dev/null -fi -if (echo >conf$$.file) 2>/dev/null; then - if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... 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 -pR'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -pR' - elif ln conf$$.file conf$$ 2>/dev/null; then - as_ln_s=ln - else - as_ln_s='cp -pR' - fi -else - as_ln_s='cp -pR' -fi -rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - - -# as_fn_mkdir_p -# ------------- -# Create "$as_dir" as a directory, including parents if necessary. -as_fn_mkdir_p () -{ - - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || eval $as_mkdir_p || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$as_dir" : 'X\(//\)[^/]' \| \ - X"$as_dir" : 'X\(//\)$' \| \ - X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$as_dir" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" - - -} # as_fn_mkdir_p -if mkdir -p . 2>/dev/null; then - as_mkdir_p='mkdir -p "$as_dir"' -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - - -# 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'" - -# Sed expression to map a string onto a valid variable name. -as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -exec 6>&1 -## ----------------------------------- ## -## Main body of $CONFIG_STATUS script. ## -## ----------------------------------- ## -_ASEOF -test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# Save the log message, to keep $0 and so on meaningful, and to -# 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 1.3.0, which was -generated by GNU Autoconf 2.69. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -case $ac_config_files in *" -"*) set x $ac_config_files; shift; ac_config_files=$*;; -esac - -case $ac_config_headers in *" -"*) set x $ac_config_headers; shift; ac_config_headers=$*;; -esac - - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -ac_cs_usage="\ -\`$as_me' instantiates files and other configuration actions -from templates according to the current configuration. Unless the files -and actions are specified as TAGs, all are instantiated by default. - -Usage: $0 [OPTION]... [TAG]... - - -h, --help print this help, then exit - -V, --version print version number and configuration settings, then exit - --config print configuration, then exit - -q, --quiet, --silent - do not print progress messages - -d, --debug don't remove temporary files - --recheck update $as_me by reconfiguring in the same conditions - --file=FILE[:TEMPLATE] - instantiate the configuration file FILE - --header=FILE[:TEMPLATE] - instantiate the configuration header FILE - -Configuration files: -$config_files - -Configuration headers: -$config_headers - -Configuration commands: -$config_commands - -Report bugs to the package provider." - -_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 1.3.0 -configured by $0, generated by GNU Autoconf 2.69, - with options \\"\$ac_cs_config\\" - -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." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -AWK='$AWK' -test -n "\$AWK" || AWK=awk -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# The default lists apply if the user does not specify any file. -ac_need_defaults=: -while test $# != 0 -do - case $1 in - --*=?*) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` - ac_shift=: - ;; - --*=) - ac_option=`expr "X$1" : 'X\([^=]*\)='` - ac_optarg= - ac_shift=: - ;; - *) - ac_option=$1 - ac_optarg=$2 - ac_shift=shift - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - $as_echo "$ac_cs_version"; exit ;; - --config | --confi | --conf | --con | --co | --c ) - $as_echo "$ac_cs_config"; exit ;; - --debug | --debu | --deb | --de | --d | -d ) - debug=: ;; - --file | --fil | --fi | --f ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - '') as_fn_error $? "missing file argument" ;; - esac - as_fn_append CONFIG_FILES " '$ac_optarg'" - ac_need_defaults=false;; - --header | --heade | --head | --hea ) - $ac_shift - case $ac_optarg in - *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; - esac - as_fn_append CONFIG_HEADERS " '$ac_optarg'" - ac_need_defaults=false;; - --he | --h) - # Conflict between --help and --header - as_fn_error $? "ambiguous option: \`$1' -Try \`$0 --help' for more information.";; - --help | --hel | -h ) - $as_echo "$ac_cs_usage"; exit ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) as_fn_error $? "unrecognized option: \`$1' -Try \`$0 --help' for more information." ;; - - *) as_fn_append ac_config_targets " $1" - ac_need_defaults=false ;; - - esac - shift -done - -ac_configure_extra_args= - -if $ac_cs_silent; then - exec 6>/dev/null - ac_configure_extra_args="$ac_configure_extra_args --silent" -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 - shift - \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 - CONFIG_SHELL='$SHELL' - export CONFIG_SHELL - exec "\$@" -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - $as_echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' -macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' -enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' -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"`' -build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' -build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' -build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' -SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' -Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' -GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' -EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' -FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' -LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' -NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' -LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' -ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' -exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' -lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' -lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' -lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' -reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' -file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' -want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' -sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' -AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' -archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' -STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' -RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' -lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' -CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' -compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' -GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' -nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' -lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' -objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' -need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' -MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' -LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' -OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' -libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' -module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' -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_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"`' -hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' -postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' -need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' -version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' -runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' -libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' -soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' -install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' -finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' -old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' -striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' - -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in SHELL \ -ECHO \ -PATH_SEPARATOR \ -SED \ -GREP \ -EGREP \ -FGREP \ -LD \ -NM \ -LN_S \ -lt_SP2NL \ -lt_NL2SP \ -reload_flag \ -OBJDUMP \ -deplibs_check_method \ -file_magic_cmd \ -file_magic_glob \ -want_nocaseglob \ -DLLTOOL \ -sharedlib_from_linklib_cmd \ -AR \ -AR_FLAGS \ -archiver_list_spec \ -STRIP \ -RANLIB \ -CC \ -CFLAGS \ -compiler \ -lt_cv_sys_global_symbol_pipe \ -lt_cv_sys_global_symbol_to_cdecl \ -lt_cv_sys_global_symbol_to_c_name_address \ -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -nm_file_list_spec \ -lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_pic \ -lt_prog_compiler_wl \ -lt_prog_compiler_static \ -lt_cv_prog_compiler_c_o \ -need_locks \ -MANIFEST_TOOL \ -DSYMUTIL \ -NMEDIT \ -LIPO \ -OTOOL \ -OTOOL64 \ -shrext_cmds \ -export_dynamic_flag_spec \ -whole_archive_flag_spec \ -compiler_needs_object \ -with_gnu_ld \ -allow_undefined_flag \ -no_undefined_flag \ -hardcode_libdir_flag_spec \ -hardcode_libdir_separator \ -exclude_expsyms \ -include_expsyms \ -file_list_spec \ -variables_saved_for_relink \ -libname_spec \ -library_names_spec \ -soname_spec \ -install_override_mode \ -finish_eval \ -old_striplib \ -striplib; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in reload_cmds \ -old_postinstall_cmds \ -old_postuninstall_cmds \ -old_archive_cmds \ -extract_expsyms_cmds \ -old_archive_from_new_cmds \ -old_archive_from_expsyms_cmds \ -archive_cmds \ -archive_expsym_cmds \ -module_cmds \ -module_expsym_cmds \ -export_symbols_cmds \ -prelink_cmds \ -postlink_cmds \ -postinstall_cmds \ -postuninstall_cmds \ -finish_cmds \ -sys_lib_search_path_spec \ -sys_lib_dlsearch_path_spec; do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -ac_aux_dir='$ac_aux_dir' -xsi_shell='$xsi_shell' -lt_shell_append='$lt_shell_append' - -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - - - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile' - - - - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "gnulib/lib/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/lib/Makefile" ;; - "gnulib/tests/Makefile") CONFIG_FILES="$CONFIG_FILES gnulib/tests/Makefile" ;; - "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; - "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; - "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; - "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; - "doc/naturaldocs/Makefile") CONFIG_FILES="$CONFIG_FILES doc/naturaldocs/Makefile" ;; - "augeas.pc") CONFIG_FILES="$CONFIG_FILES augeas.pc" ;; - "augeas.spec") CONFIG_FILES="$CONFIG_FILES augeas.spec" ;; - - *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; - esac -done - - -# If the user did not use the arguments to specify the items to instantiate, -# then the envvar interface is used. Set only those that are not. -# We use the long form for the default assignment because of an extremely -# bizarre bug on SunOS 4.1.3. -if $ac_need_defaults; then - test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files - test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers - test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands -fi - -# Have a temporary directory for convenience. Make it in the build tree -# simply because there is no reason against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= ac_tmp= - trap 'exit_status=$? - : "${ac_tmp:=$tmp}" - { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status -' 0 - trap 'as_fn_exit 1' 1 2 13 15 -} -# Create a (secure) tmp directory for tmp files. - -{ - tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 -ac_tmp=$tmp - -# Set up the scripts for CONFIG_FILES section. -# No need to generate them if there are no CONFIG_FILES. -# This happens for instance with `./config.status config.h'. -if test -n "$CONFIG_FILES"; then - - -ac_cr=`echo X | tr X '\015'` -# On cygwin, bash can eat \r inside `` if the user requested igncr. -# But we know of no other shell where ac_cr would be empty at this -# point, so we can use a bashism as a fallback. -if test "x$ac_cr" = x; then - eval ac_cr=\$\'\\r\' -fi -ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` -if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\\r' -else - ac_cs_awk_cr=$ac_cr -fi - -echo 'BEGIN {' >"$ac_tmp/subs1.awk" && -_ACEOF - - -{ - echo "cat >conf$$subs.awk <<_ACEOF" && - echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && - echo "_ACEOF" -} >conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - . ./conf$$subs.sh || - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - - ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` - if test $ac_delim_n = $ac_delim_num; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done -rm -f conf$$subs.sh - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && -_ACEOF -sed -n ' -h -s/^/S["/; s/!.*/"]=/ -p -g -s/^[^!]*!// -:repl -t repl -s/'"$ac_delim"'$// -t delim -:nl -h -s/\(.\{148\}\)..*/\1/ -t more1 -s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ -p -n -b repl -:more1 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t nl -:delim -h -s/\(.\{148\}\)..*/\1/ -t more2 -s/["\\]/\\&/g; s/^/"/; s/$/"/ -p -b -:more2 -s/["\\]/\\&/g; s/^/"/; s/$/"\\/ -p -g -s/.\{148\}// -t delim -' >$CONFIG_STATUS || ac_write_fail=1 -rm -f conf$$subs.awk -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -_ACAWK -cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && - for (key in S) S_is_set[key] = 1 - FS = "" - -} -{ - line = $ 0 - nfields = split(line, field, "@") - substed = 0 - len = length(field[1]) - for (i = 2; i < nfields; i++) { - key = field[i] - keylen = length(key) - if (S_is_set[key]) { - value = S[key] - line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) - len += length(value) + length(field[++i]) - substed = 1 - } else - len += 1 + keylen - } - - print line -} - -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then - sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" -else - cat -fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ - || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 -_ACEOF - -# VPATH may cause trouble with some makes, so we remove sole $(srcdir), -# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and -# trailing colons and then remove the whole line if VPATH becomes empty -# (actually we leave an empty line to preserve line numbers). -if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ -h -s/// -s/^/:/ -s/[ ]*$/:/ -s/:\$(srcdir):/:/g -s/:\${srcdir}:/:/g -s/:@srcdir@:/:/g -s/^:*// -s/:*$// -x -s/\(=[ ]*\).*/\1/ -G -s/\n// -s/^[^=]*=[ ]*$// -}' -fi - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -fi # test -n "$CONFIG_FILES" - -# Set up the scripts for CONFIG_HEADERS section. -# No need to generate them if there are no CONFIG_HEADERS. -# This happens for instance with `./config.status Makefile'. -if test -n "$CONFIG_HEADERS"; then -cat >"$ac_tmp/defines.awk" <<\_ACAWK || -BEGIN { -_ACEOF - -# Transform confdefs.h into an awk script `defines.awk', embedded as -# here-document in config.status, that substitutes the proper values into -# config.h.in to produce config.h. - -# Create a delimiter string that does not exist in confdefs.h, to ease -# handling of long lines. -ac_delim='%!_!# ' -for ac_last_try in false false :; do - ac_tt=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_tt"; then - break - elif $ac_last_try; then - as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -# For the awk script, D is an array of macro values keyed by name, -# likewise P contains macro parameters if any. Preserve backslash -# newline sequences. - -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -sed -n ' -s/.\{148\}/&'"$ac_delim"'/g -t rset -:rset -s/^[ ]*#[ ]*define[ ][ ]*/ / -t def -d -:def -s/\\$// -t bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3"/p -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p -d -:bsnl -s/["\\]/\\&/g -s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ -D["\1"]=" \3\\\\\\n"\\/p -t cont -s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p -t cont -d -:cont -n -s/.\{148\}/&'"$ac_delim"'/g -t clear -:clear -s/\\$// -t bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/"/p -d -:bsnlc -s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p -b cont -' >$CONFIG_STATUS || ac_write_fail=1 - -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - for (key in D) D_is_set[key] = 1 - FS = "" -} -/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { - line = \$ 0 - split(line, arg, " ") - if (arg[1] == "#") { - defundef = arg[2] - mac1 = arg[3] - } else { - defundef = substr(arg[1], 2) - mac1 = arg[2] - } - split(mac1, mac2, "(") #) - macro = mac2[1] - prefix = substr(line, 1, index(line, defundef) - 1) - if (D_is_set[macro]) { - # Preserve the white space surrounding the "#". - print prefix "define", macro P[macro] D[macro] - next - } else { - # Replace #undef with comments. This is necessary, for example, - # in the case of _POSIX_SOURCE, which is predefined and required - # on some systems where configure will not decide to define it. - if (defundef == "undef") { - print "/*", prefix defundef, macro, "*/" - next - } - } -} -{ print } -_ACAWK -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 -fi # test -n "$CONFIG_HEADERS" - - -eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" -shift -for ac_tag -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$ac_tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; - esac - case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac - as_fn_append ac_file_inputs " '$ac_f'" - done - - # Let's still pretend it is `configure' which instantiates (i.e., don't - # use $as_me), people would be surprised to read: - # /* config.h. Generated by config.status. */ - configure_input='Generated from '` - $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' - `' by configure.' - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 -$as_echo "$as_me: creating $ac_file" >&6;} - fi - # Neutralize special characters interpreted by sed in replacement strings. - case $configure_input in #( - *\&* | *\|* | *\\* ) - ac_sed_conf_input=`$as_echo "$configure_input" | - sed 's/[\\\\&|]/\\\\&/g'`;; #( - *) ac_sed_conf_input=$configure_input;; - esac - - case $ac_tag in - *:-:* | *:-) cat >"$ac_tmp/stdin" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$ac_file" : 'X\(//\)[^/]' \| \ - X"$ac_file" : 'X\(//\)$' \| \ - X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$ac_file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir="$ac_dir"; as_fn_mkdir_p - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= -ac_sed_dataroot=' -/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p' -case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -ac_sed_extra="$ac_vpsub -$extrasub -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 -:t -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -s|@configure_input@|$ac_sed_conf_input|;t t -s&@top_builddir@&$ac_top_builddir_sub&;t t -s&@top_build_prefix@&$ac_top_build_prefix&;t t -s&@srcdir@&$ac_srcdir&;t t -s&@abs_srcdir@&$ac_abs_srcdir&;t t -s&@top_srcdir@&$ac_top_srcdir&;t t -s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t -s&@builddir@&$ac_builddir&;t t -s&@abs_builddir@&$ac_abs_builddir&;t t -s&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ - >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ - "$ac_tmp/out"`; test -z "$ac_out"; } && - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&5 -$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined" >&2;} - - rm -f "$ac_tmp/stdin" - case $ac_file in - -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; - *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; - esac \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - ;; - :H) - # - # CONFIG_HEADER - # - if test x"$ac_file" != x-; then - { - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" - } >"$ac_tmp/config.h" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then - { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 -$as_echo "$as_me: $ac_file is unchanged" >&6;} - else - rm -f "$ac_file" - mv "$ac_tmp/config.h" "$ac_file" \ - || as_fn_error $? "could not create $ac_file" "$LINENO" 5 - fi - else - $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error $? "could not create -" "$LINENO" 5 - fi -# Compute "$ac_file"'s index in $config_headers. -_am_arg="$ac_file" -_am_stamp_count=1 -for _am_header in $config_headers :; do - case $_am_header in - $_am_arg | $_am_arg:* ) - break ;; - * ) - _am_stamp_count=`expr $_am_stamp_count + 1` ;; - esac -done -echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || -$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$_am_arg" : 'X\(//\)[^/]' \| \ - X"$_am_arg" : 'X\(//\)$' \| \ - X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$_am_arg" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'`/stamp-h$_am_stamp_count - ;; - - :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 -$as_echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # 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 - *\'*) eval set x "$CONFIG_FILES" ;; - *) set x $CONFIG_FILES ;; - esac - shift - for mf - do - # 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 - # 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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$mf" : 'X\(//\)[^/]' \| \ - X"$mf" : 'X\(//\)$' \| \ - X"$mf" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$mf" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # 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 - am__quote=`sed -n 's/^am__quote = //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'`; do - # Make sure the directory exists. - test -f "$dirpart/$file" && continue - fdir=`$as_dirname -- "$file" || -$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ - X"$file" : 'X\(//\)[^/]' \| \ - X"$file" : 'X\(//\)$' \| \ - X"$file" : 'X\(/\)' \| . 2>/dev/null || -$as_echo X"$file" | - sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ - s//\1/ - q - } - /^X\(\/\/\)[^/].*/{ - s//\1/ - q - } - /^X\(\/\/\)$/{ - s//\1/ - q - } - /^X\(\/\).*/{ - s//\1/ - q - } - s/.*/./; q'` - as_dir=$dirpart/$fdir; as_fn_mkdir_p - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done - done -} - ;; - "libtool":C) - - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# 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, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can 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 (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - -# The names of the tagged configurations supported by this script. -available_tags="" - -# ### BEGIN LIBTOOL CONFIG - -# Which release of libtool.m4 was used? -macro_version=$macro_version -macro_revision=$macro_revision - -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared - -# Whether or not to build static libraries. -build_old_libs=$enable_static - -# What type of objects to build. -pic_mode=$pic_mode - -# Whether or not to optimize for fast installation. -fast_install=$enable_fast_install - -# Shell to use when invoking shell scripts. -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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# A sed program that does not truncate output. -SED=$lt_SED - -# Sed that helps us avoid accidentally triggering echo(1) options like -n. -Xsed="\$SED -e 1s/^X//" - -# A grep program that handles long lines. -GREP=$lt_GREP - -# An ERE matcher. -EGREP=$lt_EGREP - -# A literal string matcher. -FGREP=$lt_FGREP - -# A BSD- or MS-compatible name lister. -NM=$lt_NM - -# Whether we need soft or hard links. -LN_S=$lt_LN_S - -# What is the maximum length of a command? -max_cmd_len=$max_cmd_len - -# Object file suffix (normally "o"). -objext=$ac_objext - -# Executable file suffix (normally ""). -exeext=$exeext - -# whether the shell understands "unset". -lt_unset=$lt_unset - -# turn spaces into newlines. -SP2NL=$lt_lt_SP2NL - -# turn newlines into spaces. -NL2SP=$lt_lt_NL2SP - -# convert \$build file names to \$host format. -to_host_file_cmd=$lt_cv_to_host_file_cmd - -# convert \$build files to toolchain format. -to_tool_file_cmd=$lt_cv_to_tool_file_cmd - -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - -# Method to check whether dependent libraries are shared objects. -deplibs_check_method=$lt_deplibs_check_method - -# Command to use when deplibs_check_method = "file_magic". -file_magic_cmd=$lt_file_magic_cmd - -# How to find potential files when deplibs_check_method = "file_magic". -file_magic_glob=$lt_file_magic_glob - -# Find potential files using nocaseglob when deplibs_check_method = "file_magic". -want_nocaseglob=$lt_want_nocaseglob - -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - -# Command to associate shared and link libraries. -sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd - -# The archiver. -AR=$lt_AR - -# Flags to create an archive. -AR_FLAGS=$lt_AR_FLAGS - -# How to feed a file listing to the archiver. -archiver_list_spec=$lt_archiver_list_spec - -# A symbol stripping program. -STRIP=$lt_STRIP - -# Commands used to install an old-style archive. -RANLIB=$lt_RANLIB -old_postinstall_cmds=$lt_old_postinstall_cmds -old_postuninstall_cmds=$lt_old_postuninstall_cmds - -# Whether to use a lock for old archive extraction. -lock_old_archive_extraction=$lock_old_archive_extraction - -# A C compiler. -LTCC=$lt_CC - -# LTCC compiler flags. -LTCFLAGS=$lt_CFLAGS - -# Take the output of nm and produce a listing of raw symbols and C names. -global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe - -# Transform the output of nm in a proper C declaration. -global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl - -# Transform the output of nm in a C name address pair. -global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address - -# Transform the output of nm in a C name address pair when lib prefix is needed. -global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix - -# Specify filename containing input files for \$NM. -nm_file_list_spec=$lt_nm_file_list_spec - -# The root where to search for dependent libraries,and in which our libraries should be installed. -lt_sysroot=$lt_sysroot - -# The name of the directory that contains temporary libtool files. -objdir=$objdir - -# Used to examine libraries when file_magic_cmd begins with "file". -MAGIC_CMD=$MAGIC_CMD - -# Must we lock files when doing compilation? -need_locks=$lt_need_locks - -# Manifest tool. -MANIFEST_TOOL=$lt_MANIFEST_TOOL - -# Tool to manipulate archived DWARF debug symbol files on Mac OS X. -DSYMUTIL=$lt_DSYMUTIL - -# Tool to change global to local symbols on Mac OS X. -NMEDIT=$lt_NMEDIT - -# Tool to manipulate fat objects and archives on Mac OS X. -LIPO=$lt_LIPO - -# ldd/readelf like tool for Mach-O binaries on Mac OS X. -OTOOL=$lt_OTOOL - -# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. -OTOOL64=$lt_OTOOL64 - -# Old archive suffix (normally "a"). -libext=$libext - -# Shared library suffix (normally ".so"). -shrext_cmds=$lt_shrext_cmds - -# The commands to extract the exported symbol list from a shared archive. -extract_expsyms_cmds=$lt_extract_expsyms_cmds - -# Variables whose values should be saved in libtool wrapper scripts and -# restored at link time. -variables_saved_for_relink=$lt_variables_saved_for_relink - -# Do we need the "lib" prefix for modules? -need_lib_prefix=$need_lib_prefix - -# Do we need a version for libraries? -need_version=$need_version - -# Library versioning type. -version_type=$version_type - -# Shared library runtime path variable. -runpath_var=$runpath_var - -# Shared library path variable. -shlibpath_var=$shlibpath_var - -# Is shlibpath searched before the hard-coded library search path? -shlibpath_overrides_runpath=$shlibpath_overrides_runpath - -# Format of library name prefix. -libname_spec=$lt_libname_spec - -# List of archive names. First name is the real one, the rest are links. -# The last name is the one that the linker finds with -lNAME -library_names_spec=$lt_library_names_spec - -# The coded name of the library, if different from the real name. -soname_spec=$lt_soname_spec - -# Permission mode override for installation of shared libraries. -install_override_mode=$lt_install_override_mode - -# Command to use after installation of a shared archive. -postinstall_cmds=$lt_postinstall_cmds - -# Command to use after uninstallation of a shared archive. -postuninstall_cmds=$lt_postuninstall_cmds - -# Commands used to finish a libtool library installation in a directory. -finish_cmds=$lt_finish_cmds - -# As "finish_cmds", except a single script fragment to be evaled but -# not shown. -finish_eval=$lt_finish_eval - -# Whether we should hardcode library paths into libraries. -hardcode_into_libs=$hardcode_into_libs - -# Compile-time system search path for libraries. -sys_lib_search_path_spec=$lt_sys_lib_search_path_spec - -# Run-time system search path for libraries. -sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec - -# Whether dlopen is supported. -dlopen_support=$enable_dlopen - -# Whether dlopen of programs is supported. -dlopen_self=$enable_dlopen_self - -# Whether dlopen of statically linked programs is supported. -dlopen_self_static=$enable_dlopen_self_static - -# Commands to strip libraries. -old_striplib=$lt_old_striplib -striplib=$lt_striplib - - -# The linker used to build libraries. -LD=$lt_LD - -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds - -# Commands used to build an old-style archive. -old_archive_cmds=$lt_old_archive_cmds - -# A language specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU compiler? -with_gcc=$GCC - -# Compiler flag to turn off builtin functions. -no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag - -# Additional compiler flags for building library objects. -pic_flag=$lt_lt_prog_compiler_pic - -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - -# Compiler flag to prevent dynamic linking. -link_static_flag=$lt_lt_prog_compiler_static - -# Does compiler simultaneously support -c and -o options? -compiler_c_o=$lt_lt_cv_prog_compiler_c_o - -# Whether or not to add -lc for building shared libraries. -build_libtool_need_lc=$archive_cmds_need_lc - -# Whether or not to disallow shared libs when runtime libs are static. -allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes - -# Compiler flag to allow reflexive dlopens. -export_dynamic_flag_spec=$lt_export_dynamic_flag_spec - -# Compiler flag to generate shared objects directly from archives. -whole_archive_flag_spec=$lt_whole_archive_flag_spec - -# Whether the compiler copes with passing no objects directly. -compiler_needs_object=$lt_compiler_needs_object - -# Create an old-style archive from a shared archive. -old_archive_from_new_cmds=$lt_old_archive_from_new_cmds - -# Create a temporary old-style archive to link instead of a shared archive. -old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds - -# Commands used to build a shared archive. -archive_cmds=$lt_archive_cmds -archive_expsym_cmds=$lt_archive_expsym_cmds - -# Commands used to build a loadable module if different from building -# a shared archive. -module_cmds=$lt_module_cmds -module_expsym_cmds=$lt_module_expsym_cmds - -# Whether we are building with GNU ld or not. -with_gnu_ld=$lt_with_gnu_ld - -# Flag that allows shared libraries with undefined symbols to be built. -allow_undefined_flag=$lt_allow_undefined_flag - -# Flag that enforces no undefined symbols. -no_undefined_flag=$lt_no_undefined_flag - -# Flag to hardcode \$libdir into a binary during linking. -# This must work even if \$libdir does not exist -hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec - -# Whether we need a single "-rpath" flag with a separated argument. -hardcode_libdir_separator=$lt_hardcode_libdir_separator - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary. -hardcode_direct=$hardcode_direct - -# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes -# DIR into the resulting binary and the resulting library dependency is -# "absolute",i.e impossible to change by setting \${shlibpath_var} if the -# library is relocated. -hardcode_direct_absolute=$hardcode_direct_absolute - -# Set to "yes" if using the -LDIR flag during linking hardcodes DIR -# into the resulting binary. -hardcode_minus_L=$hardcode_minus_L - -# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR -# into the resulting binary. -hardcode_shlibpath_var=$hardcode_shlibpath_var - -# Set to "yes" if building a shared library automatically hardcodes DIR -# into the library and all subsequent libraries and executables linked -# against it. -hardcode_automatic=$hardcode_automatic - -# Set to yes if linker adds runtime paths of dependent libraries -# to runtime path list. -inherit_rpath=$inherit_rpath - -# Whether libtool must link a program against all its dependency libraries. -link_all_deplibs=$link_all_deplibs - -# Set to "yes" if exported symbols are required. -always_export_symbols=$always_export_symbols - -# The commands to list exported symbols. -export_symbols_cmds=$lt_export_symbols_cmds - -# Symbols that should not be listed in the preloaded symbols. -exclude_expsyms=$lt_exclude_expsyms - -# Symbols that must always be exported. -include_expsyms=$lt_include_expsyms - -# Commands necessary for linking programs (against libraries) with templates. -prelink_cmds=$lt_prelink_cmds - -# Commands necessary for finishing linking programs. -postlink_cmds=$lt_postlink_cmds - -# Specify filename containing input files. -file_list_spec=$lt_file_list_spec - -# How to hardcode a shared library path into an executable. -hardcode_action=$hardcode_action - -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - -ltmain="$ac_aux_dir/ltmain.sh" - - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - if test x"$xsi_shell" = xyes; then - sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ -func_dirname ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_basename ()$/,/^} # func_basename /c\ -func_basename ()\ -{\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ -func_dirname_and_basename ()\ -{\ -\ case ${1} in\ -\ */*) func_dirname_result="${1%/*}${2}" ;;\ -\ * ) func_dirname_result="${3}" ;;\ -\ esac\ -\ func_basename_result="${1##*/}"\ -} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ -func_stripname ()\ -{\ -\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ -\ # positional parameters, so assign one to ordinary parameter first.\ -\ func_stripname_result=${3}\ -\ func_stripname_result=${func_stripname_result#"${1}"}\ -\ func_stripname_result=${func_stripname_result%"${2}"}\ -} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ -func_split_long_opt ()\ -{\ -\ func_split_long_opt_name=${1%%=*}\ -\ func_split_long_opt_arg=${1#*=}\ -} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ -func_split_short_opt ()\ -{\ -\ func_split_short_opt_arg=${1#??}\ -\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ -} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ -func_lo2o ()\ -{\ -\ case ${1} in\ -\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ -\ *) func_lo2o_result=${1} ;;\ -\ esac\ -} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_xform ()$/,/^} # func_xform /c\ -func_xform ()\ -{\ - func_xform_result=${1%.*}.lo\ -} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_arith ()$/,/^} # func_arith /c\ -func_arith ()\ -{\ - func_arith_result=$(( $* ))\ -} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_len ()$/,/^} # func_len /c\ -func_len ()\ -{\ - func_len_result=${#1}\ -} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - -fi - -if test x"$lt_shell_append" = xyes; then - sed -e '/^func_append ()$/,/^} # func_append /c\ -func_append ()\ -{\ - eval "${1}+=\\${2}"\ -} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ -func_append_quoted ()\ -{\ -\ func_quote_for_eval "${2}"\ -\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ -} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: - - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 -$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} -fi - - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" - - ;; - - esac -done # for ac_tag - - -as_fn_exit 0 -_ACEOF -ac_clean_files=$ac_clean_files_save - -test $ac_write_fail = 0 || - as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 - - -# configure is writing to config.log, and then calls config.status. -# config.status does its own redirection, appending to config.log. -# Unfortunately, on DOS this fails, as config.log is still kept open -# by configure, so config.status won't be able to write to it; its -# output is simply discarded. So we exec the FD to /dev/null, -# effectively closing config.log, so it can be properly (re)opened and -# appended to by config.status. When coming back to configure, we -# need to make the FD available again. -if test "$no_create" != yes; then - ac_cs_success=: - ac_config_status_args= - test "$silent" = yes && - ac_config_status_args="$ac_config_status_args --quiet" - exec 5>/dev/null - $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false - exec 5>>config.log - # Use ||, not &&, to avoid exiting from the if with $? = 1, which - # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit 1 -fi -if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 -$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} -fi - diff --git a/configure.ac b/configure.ac index 08769e6..5654723 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT(augeas, 1.3.0) +AC_INIT(augeas, 1.4.0) AC_CONFIG_SRCDIR([src/augeas.c]) AC_CONFIG_AUX_DIR([build/ac-aux]) AM_CONFIG_HEADER([config.h]) @@ -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], [19:0:19]) -AC_SUBST([LIBFA_VERSION_INFO], [5:0:4]) +AC_SUBST([LIBAUGEAS_VERSION_INFO], [20:0:20]) +AC_SUBST([LIBFA_VERSION_INFO], [5:1:4]) AC_GNU_SOURCE diff --git a/doc/Makefile.in b/doc/Makefile.in deleted file mode 100644 index 6713485..0000000 --- a/doc/Makefile.in +++ /dev/null @@ -1,1523 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -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 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/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -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_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) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -SUBDIRS = naturaldocs -EXTRA_DIST = lenses.tex unambig.tex syntax/augeas.vim ftdetect/augeas.vim bcprules.sty xpath.txt -vimdir = $(datadir)/vim/vimfiles -nobase_vim_DATA = syntax/augeas.vim ftdetect/augeas.vim - -# PDF targets -PDFTARGETS = lenses.pdf unambig.pdf -all: all-recursive - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-nobase_vimDATA: $(nobase_vim_DATA) - @$(NORMAL_INSTALL) - @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'"; \ - $(MKDIR_P) "$(DESTDIR)$(vimdir)/$$dir"; }; \ - echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(vimdir)/$$dir'"; \ - $(INSTALL_DATA) $$xfiles "$(DESTDIR)$(vimdir)/$$dir" || exit $$?; }; \ - done - -uninstall-nobase_vimDATA: - @$(NORMAL_UNINSTALL) - @list='$(nobase_vim_DATA)'; test -n "$(vimdir)" || list=; \ - $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ - 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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-recursive -all-am: Makefile $(DATA) all-local -installdirs: installdirs-recursive -installdirs-am: - for dir in "$(DESTDIR)$(vimdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-recursive - -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: install-nobase_vimDATA - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-nobase_vimDATA - -.MAKE: $(am__recursive_targets) 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-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) - -pdfdocs: $(PDFTARGETS) -%.pdf: %.tex - $(PDFLATEX) $< - -clean-local: - rm -f *.pdf *.aux *.log - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/doc/cutest-license.txt b/doc/cutest-license.txt new file mode 100644 index 0000000..631e6ee --- /dev/null +++ b/doc/cutest-license.txt @@ -0,0 +1,46 @@ +The files tests/cutest.[ch] contain a modified version of CuTest, written +by Asim Jalis. The original code can be found at +http://sourceforge.net/projects/cutest/ + +What follows is the license under which CuTest is distributed, as retrieved +on 2008-02-29 from +http://cutest.cvs.sourceforge.net/cutest/cutest/license.txt?revision=1.3 + +NOTE + +The license is based on the zlib/libpng license. For more details see +http://www.opensource.org/licenses/zlib-license.html. The intent of the +license is to: + +- keep the license as simple as possible +- encourage the use of CuTest in both free and commercial applications + and libraries +- keep the source code together +- give credit to the CuTest contributors for their work + +If you ship CuTest in source form with your source distribution, the +following license document must be included with it in unaltered form. +If you find CuTest useful we would like to hear about it. + +LICENSE + +Copyright (c) 2003 Asim Jalis + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not +claim that you wrote the original software. If you use this software in +a product, an acknowledgment in the product documentation would be +appreciated but is not required. + +2. Altered source versions must be plainly marked as such, and must not +be misrepresented as being the original software. + +3. This notice may not be removed or altered from any source +distribution. diff --git a/doc/etc.txt b/doc/etc.txt new file mode 100644 index 0000000..37ed97a --- /dev/null +++ b/doc/etc.txt @@ -0,0 +1,262 @@ +/etc/ +|-- DIR_COLORS +|-- DIR_COLORS.xterm + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- acpi +| |-- actions/* +| `-- events/* + shell scripts +|-- adjtime + ??? +|-- aliases + records: line + format: alias ':' redir + comments: #.*$ +|-- anacrontab + format: crontab +|-- apt + ??? +|-- at.deny + ??? +|-- auto.master + records: line + format: key [ options ] location + comments: #.*$ +|-- auto.misc + automounter map +|-- autofs_ldap_auth.conf + XML +|-- avahi + ??? some XML, some shell scripts +|-- blkid +| |-- blkid.tab + XML +|-- cron.d/* + crontab with users +|-- cron.daily + shell scripts +|-- cron.deny + ??? +|-- cron.hourly + shell scripts +|-- cron.monthly + shell scripts +|-- cron.weekly + shell scripts +|-- crontab + crontab with users +|-- cups + custom +|-- dbus-1 + XML +|-- default + sysconfig +|-- depmod.d/* + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- dev.d + ??? +|-- diskdump + ??? +|-- dnsmasq.conf + records: line + kw [ '=' value ] + comments: #.*$ +|-- dnsmasq.d/* + ??? +|-- environment + ??? +|-- exports + records: line w/ continuation + export_point ( ' ' client [ '(' option ( ',' option ) * ')' ] ) + comments: #.*$ +|-- fedora-release + freeform +|-- fstab + records: line + device ' \t'+ mount_point ' \t'+ fs [ option ( ',' option ) * ] freq passno + comments: ^#.*$ +|-- group + POSIX +|-- grub.conf -> ../boot/grub/grub.conf + records: line + format: kw ' '+ value + comments: #.*$ +|-- gshadow +|-- hal + ??? +|-- host.conf +|-- hosts + records: line + format: ip_addr ' \t'+ (hostname [ ' \t'+ alias ] * ) + comments: #.*$ +|-- hosts.allow +|-- hosts.deny + ??? + records: line w/ continuation, ordered + format: daemon_list ':' client_list [ ':' shell_command ] + comments: #.*$ +|-- htdig +| `-- htdig.conf.rpmsave +|-- httpd + custom +|-- idmapd.conf + ini-style +|-- initlog.conf + records: line + format: kw ' '+ value + comments: ^#.*$ +|-- inittab + records: line + format: id ':' runlevels ':' action ':' process ':' + comments: ^#.*$ +|-- iscsi + ??? +|-- issue +|-- issue.net + freeform +|-- jwhois.conf + custom (libconfuse ?) +|-- kdump.conf + ??? +|-- koji.conf + inistyle +|-- krb5.conf + inistyle wit { } subsections +|-- ld.so.conf + ??? +|-- ldap.conf + records: line + format: kw ' '+ value + comments: #.*$ +|-- libaudit.conf + records: line + format: kw ' '+ '=' ' '+ value + comments: #.*$ +|-- libuser.conf + inistyle +|-- libvirt + XML +|-- localtime + opaque +|-- login.defs + records: line + format: kw ' '+ value + comments: #.*$ +|-- logrotate.conf +|-- logrotate.d + custom +|-- logwatch + ??? +|-- mail.rc + custom +|-- mailcap + records: line + format: kw ' '+ '=' ' '+ value + comments: #.*$ +|-- makedev.d + ??? +|-- man.config + records: line, + format: kw ' '+ \value, fixed kw + user extensions + comments: #.*$ +|-- mime.types +|-- minicom.users +|-- mke2fs.conf + custom, like krb5.conf +|-- mock/*.cfg + python script +|-- modprobe.conf +|-- modprobe.d/* + custom +|-- multipath.conf + custom, libconfuse ? +|-- netconfig + line records +|-- nscd.conf + custom +|-- nsswitch.conf +|-- ntp + custom +|-- ntp.conf + custom +|-- openldap + ??? +|-- opt +|-- pam.d + custom +|-- pam_pkcs11 +| |-- pam_pkcs11.conf +| `-- pkcs11_eventmgr.conf + libconfuse ? +|-- passwd + Posix +|-- postfix + ??? +|-- prelink.conf + custom +|-- puppet +| |-- puppet.conf + Ini-style +|-- quotagrpadmins + records: line + format: alias ':' redir + comments: #.*$ +|-- quotatab +|-- racoon +| `-- racoon.conf + custom +|-- readahead.conf + sysconfig +|-- readahead.d + path lists +|-- resolv.conf + custom +|-- rpm + random rpm macros (kw ' ' value style) +|-- rwtab +|-- rwtab.d +|-- sasl2 +|-- scsi_id.config +|-- securetty + list of ttys +|-- security + ??? +|-- selinux + ??? +|-- sensors.conf + custom +|-- sestatus.conf + inistyle +|-- shadow + POSIX +|-- shells + list of shells +|-- smartd.conf + custom +|-- ssh + key/value pairs +|-- statetab +|-- statetab.d + list of paths +|-- sudoers + custom +|-- sysconfig + sysconfig +|-- sysctl.conf + sysconfig, with special meaning for keys +|-- syslog.conf + key/value, space separated +|-- udev + custom +|-- updatedb.conf + sysconfig +|-- xinetd.d/* + custom +|-- yum +|-- yum.conf +`-- yum.repos.d/* + inistyle with includes diff --git a/doc/examples.txt b/doc/examples.txt new file mode 100644 index 0000000..1407d2f --- /dev/null +++ b/doc/examples.txt @@ -0,0 +1,66 @@ +These examples show what hopefully will be possible with augeas one day. +For now, they are more a guide in writing the public API and augtool. + +1) Change default runlevel + + p = match("/system/config/inittab/*/action", "initdefault") + set( join(dirname(p), "runlevels"), "3") + + [works] + +2) yum + + - enable a repo + set("/system/config/yum/myrepo/enabled", "1") + + - turn off mirrorlist and set baseurl + rm("/system/config/yum/myrepo/mirrorlist") + set("/system/config/yum/myrepo/baseurl", "http://yum.example.com/repo") + + [not implemented, needs ini scanner] + +3) add entry to hosts + set("/system/config/hosts/i0/ipaddr", "192.168.1.1") + set("/system/config/hosts/i0/canonical", "pigiron.example.com") + set("/system/config/hosts/i0/aliases", "pigiron pigiron.example") + + [works] + +4) add to fstab [tree structure will probably look different] + p = "/system/config/fstab" + rm (p + "/dev.vg00.local/local") + set (p + "/dev.vg00.local/local/device", "/dev/vg00/local") + set (p + "/dev.vg00.local/local/mountpoint", "/local") + set (p + "/dev.vg00.local/local/fs", "ext3") + set (p + "/dev.vg00.local/local/options", "defaults") + set (p + "/dev.vg00.local/local/freq", "1") + set (p + "/dev.vg00.local/local/pass", "2") + + [requires fstab provider, easy, based on record scanner] + +5) Mount /dev/sda1 on /exports/foo rather than /foo + p = "/system/config/fstab" + move entries from p + "/dev.sda1/foo" to p + "/dev.sda1/exports.foo" + set(p + "/dev.sda1/exports.foo/mountpoint", "/foo") + + [same as above] + +6) Change gateway on all static interfaces + for p in find("/system/config/sysconfig/interfaces/**/gateway", "192.168.0.1") + set(p, "192.168.0.254") + + [requires key/value scanner] + +7) Setup a static interface from scratch + p = "/system/config/sysconfig/interfaces/lo" + rm (p) + set (p + "/device", "lo") + set (p + "/ipaddr", "127.0.0.1") + ... + + [requires key/value scanner] + +8) Turn on SELinux + set ("/system/config/sysconfig/selinux", "enforcing") + + [requires key/value scanner] diff --git a/doc/naturaldocs/Makefile.in b/doc/naturaldocs/Makefile.in deleted file mode 100644 index d82095b..0000000 --- a/doc/naturaldocs/Makefile.in +++ /dev/null @@ -1,1321 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = doc/naturaldocs -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -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@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = $(wildcard conf/Augeas.css conf/c_api/*.txt) \ - $(wildcard conf/lenses/*.txt) \ - Modules/NaturalDocs/Languages/Augeas.pm - -ND_CONF = $(srcdir)/conf -ND_OUTPUT = output -ND_STYLE = ../Augeas -ND_PERL5LIB = $(abs_srcdir)/Modules -ND_PERL5OPT = '-MNaturalDocs::Languages::Augeas' -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/naturaldocs/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu doc/naturaldocs/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -@ND_ENABLED_FALSE@all-local: -all-am: Makefile all-local -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-local mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: install-am install-strip - -.PHONY: all all-am all-local check check-am clean clean-generic \ - 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 - -NaturalDocs: NDLenses NDCAPI - -env: - echo LIB $(ND_PERL5LIB) - echo OPT $(ND_PERL5OPT) - test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ - test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ - PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT env | grep PERL - -NDLenses: NDConf - @mkdir -p $(ND_OUTPUT)/lenses - @(echo "Format lens documentation"; \ - test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ - test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ - PERL5LIB=$$ND_PERL5LIB PERL5OPT=$$ND_PERL5OPT \ - $(ND_PROG) -p conf/lenses \ - -i $(top_srcdir)/lenses \ - -o $(ND_FORMAT) $(ND_OUTPUT)/lenses \ - -s $(ND_STYLE)) - -NDCAPI: NDConf - @mkdir -p $(ND_OUTPUT)/c_api - @(echo "Format C API documentation"; \ - test -n "$$PERL5OPT" && ND_PERL5OPT="$(ND_PERL5OPT) $$PERL5OPT" || ND_PERL5OPT=$(ND_PERL5OPT); \ - test -n "$$PERL5LIB" && ND_PERL5LIB="$(ND_PERL5LIB):$$PERL5LIB" || ND_PERL5LIB=$(ND_PERL5LIB); \ - $(ND_PROG) -p conf/c_api \ - -i $(top_srcdir)/src \ - -o $(ND_FORMAT) $(ND_OUTPUT)/c_api \ - -s $(ND_STYLE)) - -NDConf: - @(if test ! -d $(ND_CONF); then \ - cp -pr $(ND_CONF) conf; \ - fi) - -clean-local: - rm -rf output conf/Data - rm -rf $(ND_CONF)/c_api/Data $(ND_CONF)/lenses/Data - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/doc/naturaldocs/conf/lenses/Menu.txt b/doc/naturaldocs/conf/lenses/Menu.txt index 17ec75b..c245446 100644 --- a/doc/naturaldocs/conf/lenses/Menu.txt +++ b/doc/naturaldocs/conf/lenses/Menu.txt @@ -56,6 +56,7 @@ Group: Specific Modules { File: Access (access.aug) File: ActiveMQ_Conf (activemq_conf.aug) File: ActiveMQ_XML (activemq_xml.aug) + File: AFS_cellalias (afs_cellalias.aug) File: Aliases (aliases.aug) File: Anacron (anacron.aug) File: Approx (approx.aug) @@ -101,6 +102,7 @@ Group: Specific Modules { File: JettyRealm (jettyrealm.aug) File: JMXAccess (jmxaccess.aug) File: JMXPassword (jmxpassword.aug) + File: Iscsid (iscsid.aug) File: Iptables (iptables.aug) File: Kdump (kdump.aug) File: Keepalived (keepalived.aug) @@ -141,6 +143,7 @@ Group: Specific Modules { File: Postfix_Virtual (postfix_virtual.aug) File: Postgresql (postgresql.aug) File: Protocols (protocols.aug) + File: Puppetfile (no auto-title, puppetfile.aug) File: PuppetFileserver (no auto-title, puppetfileserver.aug) File: Puppet_Auth (no auto-title, puppet_auth.aug) File: Qpid (qpid.aug) @@ -198,6 +201,7 @@ Group: Tests and Examples { File: Test_Access (tests/test_access.aug) File: Test_ActiveMQ_Conf (tests/test_activemq_conf.aug) File: Test_ActiveMQ_XML (tests/test_activemq_xml.aug) + File: Test_AFS_cellalias (tests/test_afs_cellalias.aug) File: Test_Aliases (tests/test_aliases.aug) File: Test_Anacron (tests/test_anacron.aug) File: Test_Approx (tests/test_approx.aug) @@ -208,6 +212,7 @@ Group: Tests and Examples { File: Test_Carbon (tests/test_carbon.aug) File: Test_Channels (tests/test_channels.aug) File: Test_Chrony (tests/test_chrony.aug) + File: Test_ClamAV (tests/test_clamav.aug) File: Test_Collectd (tests/test_collectd.aug) File: Test_CPanel (tests/test_cpanel.aug) File: Test_Cups (tests/test_cups.aug) @@ -220,6 +225,7 @@ Group: Tests and Examples { File: Test_Htpasswd (tests/test_htpasswd.aug) File: Test_IniFile (tests/test_inifile.aug) File: Test_Inputrc (tests/test_inputrc.aug) + File: Test_Iscsid (tests/test_iscsid.aug) File: Test_JettyRealm (tests/test_jettyrealm.aug) File: Test_JMXAccess (tests/test_jmxaccess.aug) File: Test_JMXPassword (tests/test_jmxpassword.aug) @@ -230,6 +236,8 @@ Group: Tests and Examples { File: Test_Ldso (tests/test_ldso.aug) File: Test_Lightdm (tests/test_lightdm.aug) File: Test_LVM (tests/test_lvm.aug) + File: Test_Mailscanner (tests/test_mailscanner.aug) + File: Test_Mailscanner_Rules (tests/test_mailscanner_rules.aug) File: Test_MCollective (tests/test_mcollective.aug) File: Test_Memcached (tests/test_memcached.aug) File: Test_MongoDBServer (tests/test_mongodbserver.aug) @@ -240,11 +248,14 @@ Group: Tests and Examples { 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_Pgbouncer (tests/test_pgbouncer.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_Puppetfile (tests/test_puppetfile.aug) + File: Test_Pylonspaste (tests/test_pylonspaste.aug) File: Test_Qpid (tests/test_qpid.aug) File: Test_Quote (tests/test_quote.aug) File: Test_Rabbitmq (tests/test_rabbitmq.aug) diff --git a/examples/Makefile.in b/examples/Makefile.in deleted file mode 100644 index 030ee23..0000000 --- a/examples/Makefile.in +++ /dev/null @@ -1,1466 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -VPATH = @srcdir@ -am__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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = fadot$(EXEEXT) -subdir = examples -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -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_@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/ac-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -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_@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_@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) -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -GNULIB = ../gnulib/lib/libgnu.la -GNULIB_CFLAGS = -I $(top_srcdir)/gnulib/lib -AM_CFLAGS = @AUGEAS_CFLAGS@ @WARN_CFLAGS@ $(GNULIB_CFLAGS) \ - -I $(top_srcdir)/src - -fadot_SOURCES = fadot.c -fadot_LDADD = $(top_builddir)/src/libfa.la $(GNULIB) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu examples/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @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; \ - done | \ - 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 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @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)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - 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) $(EXTRA_fadot_DEPENDENCIES) - @rm -f fadot$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fadot_OBJECTS) $(fadot_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fadot.Po@am__quote@ - -.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 -@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@ $(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 -@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@ $(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 -@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -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`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(PROGRAMS) -installdirs: - for dir in "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS - -.MAKE: install-am install-strip - -.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. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/examples/examples.sh b/examples/examples.sh new file mode 100755 index 0000000..bc78ff4 --- /dev/null +++ b/examples/examples.sh @@ -0,0 +1,21 @@ +#!/bin/sh +# create some examples of operations on finite automaton + +export PATH=./:$PATH + +dest=/tmp/fadot-examples +mkdir -p $dest + +fadot -f $dest/sample.dot -o show "[a-z]*" +fadot -f $dest/concat.dot -o concat "[a-b]" "[b-c]" +fadot -f $dest/union.dot -o union "[a-b]" "[b-c]" +fadot -f $dest/intersect.dot -o intersect "[a-b]" "[b-c]" +fadot -f $dest/complement.dot -o complement "[a-z]" +fadot -f $dest/minus.dot -o minus "[a-z]" "[a-c]" + + +for i in $(ls -1 $dest/*.dot|cut -d. -f1); do + dot -Tpng -o $i.png $i.dot +done + +echo "Example compilation complete. Results are available in directory $dest" diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am deleted file mode 100644 index 963b22d..0000000 --- a/gnulib/lib/Makefile.am +++ /dev/null @@ -1,1941 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# 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 . -# -# 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/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 - -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = -AM_CFLAGS = - -noinst_LTLIBRARIES += libgnu.la - -libgnu_la_SOURCES = -libgnu_la_LIBADD = $(gl_LTLIBOBJS) -libgnu_la_DEPENDENCIES = $(gl_LTLIBOBJS) -EXTRA_libgnu_la_SOURCES = -libgnu_la_LDFLAGS = $(AM_LDFLAGS) -libgnu_la_LDFLAGS += -no-undefined -libgnu_la_LDFLAGS += $(LIB_SELINUX) -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 - -## end gnulib module alloca - -## begin gnulib module alloca-opt - -BUILT_SOURCES += $(ALLOCA_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_ALLOCA_H -alloca.h: alloca.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - cat $(srcdir)/alloca.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -else -alloca.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += alloca.h alloca.h-t - -EXTRA_DIST += alloca.in.h - -## end gnulib module alloca-opt - -## begin gnulib module 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. -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 - -EXTRA_libgnu_la_SOURCES += argz.c - -## end gnulib module argz - -## begin gnulib module btowc - - -EXTRA_DIST += btowc.c - -EXTRA_libgnu_la_SOURCES += btowc.c - -## end gnulib module btowc - -## begin gnulib module canonicalize-lgpl - - -EXTRA_DIST += canonicalize-lgpl.c - -EXTRA_libgnu_la_SOURCES += canonicalize-lgpl.c - -## end gnulib module canonicalize-lgpl - -## begin gnulib module configmake - -# Listed in the same order as the GNU makefile conventions, and -# provided by autoconf 2.59c+. -# The Automake-defined pkg* macros are appended, in the order -# listed in the Automake 1.10a+ documentation. -configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#define PREFIX "$(prefix)"'; \ - echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ - echo '#define BINDIR "$(bindir)"'; \ - echo '#define SBINDIR "$(sbindir)"'; \ - echo '#define LIBEXECDIR "$(libexecdir)"'; \ - echo '#define DATAROOTDIR "$(datarootdir)"'; \ - echo '#define DATADIR "$(datadir)"'; \ - echo '#define SYSCONFDIR "$(sysconfdir)"'; \ - echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ - echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ - echo '#define INCLUDEDIR "$(includedir)"'; \ - echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ - echo '#define DOCDIR "$(docdir)"'; \ - echo '#define INFODIR "$(infodir)"'; \ - echo '#define HTMLDIR "$(htmldir)"'; \ - echo '#define DVIDIR "$(dvidir)"'; \ - echo '#define PDFDIR "$(pdfdir)"'; \ - echo '#define PSDIR "$(psdir)"'; \ - echo '#define LIBDIR "$(libdir)"'; \ - echo '#define LISPDIR "$(lispdir)"'; \ - echo '#define LOCALEDIR "$(localedir)"'; \ - echo '#define MANDIR "$(mandir)"'; \ - echo '#define MANEXT "$(manext)"'; \ - echo '#define PKGDATADIR "$(pkgdatadir)"'; \ - echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ - echo '#define PKGLIBDIR "$(pkglibdir)"'; \ - echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - mv -f $@-t $@ - -BUILT_SOURCES += configmake.h -CLEANFILES += configmake.h configmake.h-t - -## end gnulib module configmake - -## begin gnulib module ctype - -BUILT_SOURCES += ctype.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ - -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ - -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/ctype.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += ctype.h ctype.h-t - -EXTRA_DIST += ctype.in.h - -## end gnulib module ctype - -## begin gnulib module dosname - - -EXTRA_DIST += dosname.h - -## end gnulib module dosname - -## begin gnulib module errno - -BUILT_SOURCES += $(ERRNO_H) - -# We need the following in order to create when the system -# doesn't have one that is POSIX compliant. -if GL_GENERATE_ERRNO_H -errno.h: errno.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ - -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ - -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ - -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ - -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ - -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ - -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ - < $(srcdir)/errno.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -errno.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += errno.h errno.h-t - -EXTRA_DIST += errno.in.h - -## end gnulib module errno - -## begin gnulib module 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. -if GL_GENERATE_FLOAT_H -float.h: float.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ - -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ - < $(srcdir)/float.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -float.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += float.h float.h-t - -EXTRA_DIST += float.c float.in.h itold.c - -EXTRA_libgnu_la_SOURCES += float.c itold.c - -## end gnulib module float - -## begin gnulib module fnmatch - -BUILT_SOURCES += $(FNMATCH_H) - -# We need the following in order to create when the system -# doesn't have one that supports the required API. -if GL_GENERATE_FNMATCH_H -fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/fnmatch.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -else -fnmatch.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t - -EXTRA_DIST += fnmatch.c fnmatch.in.h fnmatch_loop.c - -EXTRA_libgnu_la_SOURCES += fnmatch.c fnmatch_loop.c - -## end gnulib module fnmatch - -## begin gnulib module getdelim - - -EXTRA_DIST += getdelim.c - -EXTRA_libgnu_la_SOURCES += getdelim.c - -## end gnulib module getdelim - -## begin gnulib module getline - - -EXTRA_DIST += getline.c - -EXTRA_libgnu_la_SOURCES += getline.c - -## end gnulib module getline - -## begin gnulib module getopt-posix - -BUILT_SOURCES += $(GETOPT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ -MOSTLYCLEANFILES += getopt.h getopt.h-t - -EXTRA_DIST += getopt.c getopt.in.h getopt1.c getopt_int.h - -EXTRA_libgnu_la_SOURCES += getopt.c getopt1.c - -## end gnulib module getopt-posix - -## begin gnulib module gettext-h - -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/ac-aux/gitlog-to-changelog - -## end gnulib module gitlog-to-changelog - -## begin gnulib module isblank - - -EXTRA_DIST += isblank.c - -EXTRA_libgnu_la_SOURCES += isblank.c - -## end gnulib module isblank - -## begin gnulib module langinfo - -BUILT_SOURCES += langinfo.h - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ - -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ - -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ - -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ - -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ - -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ - -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ - -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += langinfo.h langinfo.h-t - -EXTRA_DIST += langinfo.in.h - -## end gnulib module langinfo - -## begin gnulib module localcharset - -libgnu_la_SOURCES += localcharset.h localcharset.c - -# We need the following in order to install a simple file in $(libdir) -# which is shared with other installed packages. We use a list of referencing -# packages so that "make uninstall" will remove the file if and only if it -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed - -charset_alias = $(DESTDIR)$(libdir)/charset.alias -charset_tmp = $(DESTDIR)$(libdir)/charset.tmp -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ - -SUFFIXES += .sed .sin -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ - -CLEANFILES += charset.alias ref-add.sed ref-del.sed - -EXTRA_DIST += config.charset ref-add.sin ref-del.sin - -## end gnulib module localcharset - -## begin gnulib module locale - -BUILT_SOURCES += locale.h - -# We need the following in order to create when the system -# doesn't have one that provides all definitions. -locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ - -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ - -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ - -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ - -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ - -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ - -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ - -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ - -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ - -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += locale.h locale.h-t - -EXTRA_DIST += locale.in.h - -## end gnulib module locale - -## begin gnulib module localeconv - - -EXTRA_DIST += localeconv.c - -EXTRA_libgnu_la_SOURCES += localeconv.c - -## end gnulib module localeconv - -## begin gnulib module lstat - - -EXTRA_DIST += lstat.c - -EXTRA_libgnu_la_SOURCES += lstat.c - -## end gnulib module lstat - -## begin gnulib module malloc-gnu - - -EXTRA_DIST += malloc.c - -EXTRA_libgnu_la_SOURCES += malloc.c - -## end gnulib module malloc-gnu - -## begin gnulib module malloc-posix - - -EXTRA_DIST += malloc.c - -EXTRA_libgnu_la_SOURCES += malloc.c - -## end gnulib module malloc-posix - -## begin gnulib module malloca - -libgnu_la_SOURCES += malloca.c - -EXTRA_DIST += malloca.h malloca.valgrind - -## end gnulib module malloca - -## begin gnulib module mbrtowc - - -EXTRA_DIST += mbrtowc.c - -EXTRA_libgnu_la_SOURCES += mbrtowc.c - -## end gnulib module mbrtowc - -## begin gnulib module mbsinit - - -EXTRA_DIST += mbsinit.c - -EXTRA_libgnu_la_SOURCES += mbsinit.c - -## end gnulib module mbsinit - -## begin gnulib module mbsrtowcs - - -EXTRA_DIST += mbsrtowcs-impl.h mbsrtowcs-state.c mbsrtowcs.c - -EXTRA_libgnu_la_SOURCES += mbsrtowcs-state.c mbsrtowcs.c - -## end gnulib module mbsrtowcs - -## begin gnulib module mbtowc - - -EXTRA_DIST += mbtowc-impl.h mbtowc.c - -EXTRA_libgnu_la_SOURCES += mbtowc.c - -## end gnulib module mbtowc - -## begin gnulib module memchr - - -EXTRA_DIST += memchr.c memchr.valgrind - -EXTRA_libgnu_la_SOURCES += memchr.c - -## end gnulib module memchr - -## begin gnulib module mempcpy - - -EXTRA_DIST += mempcpy.c - -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 - - -EXTRA_DIST += nl_langinfo.c - -EXTRA_libgnu_la_SOURCES += nl_langinfo.c - -## end gnulib module nl_langinfo - -## begin gnulib module pathmax - - -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 - - -EXTRA_DIST += readlink.c - -EXTRA_libgnu_la_SOURCES += readlink.c - -## end gnulib module readlink - -## begin gnulib module realloc-posix - - -EXTRA_DIST += realloc.c - -EXTRA_libgnu_la_SOURCES += realloc.c - -## end gnulib module realloc-posix - -## begin gnulib module regex - - -EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c - -EXTRA_libgnu_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c - -## end gnulib module regex - -## begin gnulib module safe-alloc - -libgnu_la_SOURCES += safe-alloc.c - -EXTRA_DIST += safe-alloc.h - -## end gnulib module safe-alloc - -## begin gnulib module selinux-h - -libgnu_la_SOURCES += se-context.in.h se-selinux.in.h - -BUILT_SOURCES += selinux/selinux.h -selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ - -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-selinux.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += selinux/selinux.h selinux/selinux.h-t - -BUILT_SOURCES += $(SELINUX_CONTEXT_H) -if GL_GENERATE_SELINUX_CONTEXT_H -selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-context.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -else -selinux/context.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += selinux/context.h selinux/context.h-t -MOSTLYCLEANDIRS += selinux - -EXTRA_DIST += getfilecon.c - -EXTRA_libgnu_la_SOURCES += getfilecon.c - -## end gnulib module selinux-h - -## begin gnulib module size_max - -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 - - -EXTRA_DIST += stat.c - -EXTRA_libgnu_la_SOURCES += stat.c - -## end gnulib module stat - -## begin gnulib module stdbool - -BUILT_SOURCES += $(STDBOOL_H) - -# We need the following in order to create when the system -# doesn't have one that works. -if GL_GENERATE_STDBOOL_H -stdbool.h: stdbool.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdbool.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdbool.h stdbool.h-t - -EXTRA_DIST += stdbool.in.h - -## end gnulib module stdbool - -## begin gnulib module stddef - -BUILT_SOURCES += $(STDDEF_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDDEF_H -stddef.h: stddef.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ - -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ - -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ - < $(srcdir)/stddef.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stddef.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stddef.h stddef.h-t - -EXTRA_DIST += stddef.in.h - -## end gnulib module stddef - -## begin gnulib module stdint - -BUILT_SOURCES += $(STDINT_H) - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -if GL_GENERATE_STDINT_H -stdint.h: stdint.in.h $(top_builddir)/config.status - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ - -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ - -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ - -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ - -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ - -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ - -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ - -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ - -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ - -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ - -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ - -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ - -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ - -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ - -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ - -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ - -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ - -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ - < $(srcdir)/stdint.in.h; \ - } > $@-t && \ - mv $@-t $@ -else -stdint.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdint.h stdint.h-t - -EXTRA_DIST += stdint.in.h - -## end gnulib module stdint - -## begin gnulib module stdio - -BUILT_SOURCES += stdio.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ - -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ - -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ - -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ - -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ - -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ - -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ - -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ - -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ - -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ - -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ - -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ - -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ - -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ - -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ - -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ - -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ - -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ - -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ - -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ - -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ - -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ - -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ - -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ - -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ - -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ - -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ - -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ - -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ - -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ - -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ - -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ - -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ - -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ - -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ - -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ - -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ - -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ - -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ - -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ - -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ - -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdio.h stdio.h-t - -EXTRA_DIST += stdio.in.h - -## end gnulib module stdio - -## begin gnulib module stdlib - -BUILT_SOURCES += stdlib.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ - $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ - -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ - -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ - -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ - -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ - -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ - -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ - -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ - -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ - -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ - -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ - -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ - -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ - -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ - -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ - -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ - -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ - -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ - -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ - -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ - -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ - -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ - -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ - -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ - -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ - -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ - -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ - -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ - -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ - -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ - -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ - -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _Noreturn/r $(_NORETURN_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += stdlib.h stdlib.h-t - -EXTRA_DIST += stdlib.in.h - -## end gnulib module stdlib - -## begin gnulib module stpcpy - - -EXTRA_DIST += stpcpy.c - -EXTRA_libgnu_la_SOURCES += stpcpy.c - -## end gnulib module stpcpy - -## begin gnulib module stpncpy - - -EXTRA_DIST += stpncpy.c - -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 - - -EXTRA_DIST += streq.h - -## end gnulib module streq - -## begin gnulib module string - -BUILT_SOURCES += string.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ - -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ - -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ - -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ - -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ - -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ - -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ - -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ - -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ - -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ - -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ - -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ - -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ - -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ - -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ - -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ - -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ - -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ - -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ - -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ - -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ - -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ - -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ - -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ - -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ - -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ - -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ - -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ - -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ - -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ - -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ - -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ - -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ - -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ - -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ - -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ - -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ - -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ - -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += string.h string.h-t - -EXTRA_DIST += string.in.h - -## end gnulib module string - -## begin gnulib module strndup - - -EXTRA_DIST += strndup.c - -EXTRA_libgnu_la_SOURCES += strndup.c - -## end gnulib module strndup - -## begin gnulib module strnlen - - -EXTRA_DIST += strnlen.c - -EXTRA_libgnu_la_SOURCES += strnlen.c - -## end gnulib module strnlen - -## begin gnulib module strnlen1 - -libgnu_la_SOURCES += strnlen1.h strnlen1.c - -## end gnulib module strnlen1 - -## begin gnulib module strstr-simple - - -EXTRA_DIST += str-two-way.h strstr.c - -EXTRA_libgnu_la_SOURCES += strstr.c - -## end gnulib module strstr-simple - -## begin gnulib module sys_stat - -BUILT_SOURCES += sys/stat.h - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ - -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ - -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ - -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ - -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ - -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ - -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ - -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_stat.in.h - -## end gnulib module sys_stat - -## begin gnulib module sys_time - -BUILT_SOURCES += sys/time.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/time.h sys/time.h-t - -EXTRA_DIST += sys_time.in.h - -## end gnulib module sys_time - -## begin gnulib module sys_types - -BUILT_SOURCES += sys/types.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/types.h: sys_types.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/types.h sys/types.h-t - -EXTRA_DIST += sys_types.in.h - -## end gnulib module sys_types - -## begin gnulib module sys_wait - -BUILT_SOURCES += sys/wait.h - -# We need the following in order to create when the system -# has one that is incomplete. -sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ - -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_wait.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t -MOSTLYCLEANDIRS += sys - -EXTRA_DIST += sys_wait.in.h - -## end gnulib module sys_wait - -## begin gnulib module 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 $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += time.h time.h-t - -EXTRA_DIST += time.in.h - -## end gnulib module time - -## begin gnulib module unistd - -BUILT_SOURCES += unistd.h - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ - -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ - -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ - -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ - -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ - -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ - -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ - -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ - -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ - -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ - -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ - -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ - -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ - -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ - -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ - -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ - -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ - -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ - -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ - -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ - -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ - -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ - -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ - -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ - -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ - -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ - -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ - -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ - -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ - -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ - -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ - -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ - -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ - -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ - -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ - -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ - -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ - -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ - -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ - -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += unistd.h unistd.h-t - -EXTRA_DIST += unistd.in.h - -## end gnulib module unistd - -## begin gnulib module vasnprintf - - -EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h - -EXTRA_libgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c - -## end gnulib module vasnprintf - -## begin gnulib module vasprintf - - -EXTRA_DIST += asprintf.c vasprintf.c - -EXTRA_libgnu_la_SOURCES += asprintf.c vasprintf.c - -## end gnulib module vasprintf - -## begin gnulib module verify - - -EXTRA_DIST += verify.h - -## end gnulib module verify - -## begin gnulib module wchar - -BUILT_SOURCES += wchar.h - -# We need the following in order to create when the system -# version does not work standalone. -wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ - -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ - -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ - -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ - -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ - -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ - -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ - -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ - -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ - -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ - -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ - -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ - -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ - -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ - -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ - -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ - -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ - -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ - -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ - -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ - -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ - -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ - -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ - -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ - -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ - -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ - -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ - -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ - -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ - -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ - -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ - -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ - -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ - -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ - -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ - -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ - -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ - -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ - -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ - -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ - -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ - -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ - -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ - -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ - -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ - -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ - -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ - -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ - -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ - -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ - -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ - -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ - -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ - -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ - -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ - -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ - -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ - -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ - -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ - -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ - -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ - -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ - -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ - sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += wchar.h wchar.h-t - -EXTRA_DIST += wchar.in.h - -## end gnulib module wchar - -## begin gnulib module wcrtomb - - -EXTRA_DIST += wcrtomb.c - -EXTRA_libgnu_la_SOURCES += wcrtomb.c - -## end gnulib module wcrtomb - -## begin gnulib module wctype-h - -BUILT_SOURCES += wctype.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ - -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ - -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ - -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ - -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ - -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ - -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ - -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ - -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ - -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ - -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ -MOSTLYCLEANFILES += wctype.h wctype.h-t - -EXTRA_DIST += wctype.in.h - -## end gnulib module wctype-h - -## begin gnulib module xsize - -libgnu_la_SOURCES += xsize.h - -## end gnulib module xsize - - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/gnulib/lib/Makefile.in b/gnulib/lib/Makefile.in deleted file mode 100644 index ff9e087..0000000 --- a/gnulib/lib/Makefile.in +++ /dev/null @@ -1,2874 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (C) 2002-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 . -# -# 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/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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = gnulib/lib -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -LTLIBRARIES = $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -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_@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/ac-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -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_@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_@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 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_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) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.5 gnits -SUBDIRS = -noinst_HEADERS = -noinst_LIBRARIES = -noinst_LTLIBRARIES = libgnu.la -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 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 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 -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. -BUILT_SOURCES = $(ALLOCA_H) $(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 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 \ - ref-del.sed -DISTCLEANFILES = -MAINTAINERCLEANFILES = -AM_CPPFLAGS = -AM_CFLAGS = -libgnu_la_SOURCES = gettext.h localcharset.h localcharset.c malloca.c \ - 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 \ - 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) -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) - $(MAKE) $(AM_MAKEFLAGS) all-recursive - -.SUFFIXES: -.SUFFIXES: .sed .sin .c .lo .o .obj -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnulib/lib/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnits gnulib/lib/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @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: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argz.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@ -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getfilecon.Plo@am__quote@ -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs-state.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsrtowcs.Plo@am__quote@ -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/safe-alloc.Plo@am__quote@ -@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@ - -.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 -@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@ $(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 -@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@ $(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 -@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) all-local -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \ - clean-noinstLTLIBRARIES mostlyclean-am - -distclean: distclean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: install-exec-local - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf $(DEPDIR) ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: uninstall-local - -.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-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. -@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. -@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+. -# The Automake-defined pkg* macros are appended, in the order -# listed in the Automake 1.10a+ documentation. -configmake.h: Makefile - $(AM_V_GEN)rm -f $@-t && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - echo '#define PREFIX "$(prefix)"'; \ - echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ - echo '#define BINDIR "$(bindir)"'; \ - echo '#define SBINDIR "$(sbindir)"'; \ - echo '#define LIBEXECDIR "$(libexecdir)"'; \ - echo '#define DATAROOTDIR "$(datarootdir)"'; \ - echo '#define DATADIR "$(datadir)"'; \ - echo '#define SYSCONFDIR "$(sysconfdir)"'; \ - echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ - echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ - echo '#define INCLUDEDIR "$(includedir)"'; \ - echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ - echo '#define DOCDIR "$(docdir)"'; \ - echo '#define INFODIR "$(infodir)"'; \ - echo '#define HTMLDIR "$(htmldir)"'; \ - echo '#define DVIDIR "$(dvidir)"'; \ - echo '#define PDFDIR "$(pdfdir)"'; \ - echo '#define PSDIR "$(psdir)"'; \ - echo '#define LIBDIR "$(libdir)"'; \ - echo '#define LISPDIR "$(lispdir)"'; \ - echo '#define LOCALEDIR "$(localedir)"'; \ - echo '#define MANDIR "$(mandir)"'; \ - echo '#define MANEXT "$(manext)"'; \ - echo '#define PKGDATADIR "$(pkgdatadir)"'; \ - echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ - echo '#define PKGLIBDIR "$(pkglibdir)"'; \ - echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ - } | sed '/""/d' > $@-t && \ - mv -f $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ - -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ - -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/ctype.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that is POSIX compliant. -@GL_GENERATE_ERRNO_H_TRUE@errno.h: errno.in.h $(top_builddir)/config.status -@GL_GENERATE_ERRNO_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_ERRNO_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_ERRNO_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \ -@GL_GENERATE_ERRNO_H_TRUE@ < $(srcdir)/errno.in.h; \ -@GL_GENERATE_ERRNO_H_TRUE@ } > $@-t && \ -@GL_GENERATE_ERRNO_H_TRUE@ mv $@-t $@ -@GL_GENERATE_ERRNO_H_FALSE@errno.h: $(top_builddir)/config.status -@GL_GENERATE_ERRNO_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \ - -e 's/@''GNULIB_FCNTL''@/$(GNULIB_FCNTL)/g' \ - -e 's/@''GNULIB_NONBLOCKING''@/$(GNULIB_NONBLOCKING)/g' \ - -e 's/@''GNULIB_OPEN''@/$(GNULIB_OPEN)/g' \ - -e 's/@''GNULIB_OPENAT''@/$(GNULIB_OPENAT)/g' \ - -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \ - -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \ - -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \ - -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \ - -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/fcntl.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -@GL_GENERATE_FLOAT_H_TRUE@float.h: float.in.h $(top_builddir)/config.status -@GL_GENERATE_FLOAT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_FLOAT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_FLOAT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ -e 's|@''REPLACE_ITOLD''@|$(REPLACE_ITOLD)|g' \ -@GL_GENERATE_FLOAT_H_TRUE@ < $(srcdir)/float.in.h; \ -@GL_GENERATE_FLOAT_H_TRUE@ } > $@-t && \ -@GL_GENERATE_FLOAT_H_TRUE@ mv $@-t $@ -@GL_GENERATE_FLOAT_H_FALSE@float.h: $(top_builddir)/config.status -@GL_GENERATE_FLOAT_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that supports the required API. -@GL_GENERATE_FNMATCH_H_TRUE@fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) -@GL_GENERATE_FNMATCH_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_FNMATCH_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -@GL_GENERATE_FNMATCH_H_TRUE@ sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ -@GL_GENERATE_FNMATCH_H_TRUE@ < $(srcdir)/fnmatch.in.h; \ -@GL_GENERATE_FNMATCH_H_TRUE@ } > $@-t && \ -@GL_GENERATE_FNMATCH_H_TRUE@ mv -f $@-t $@ -@GL_GENERATE_FNMATCH_H_FALSE@fnmatch.h: $(top_builddir)/config.status -@GL_GENERATE_FNMATCH_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - < $(srcdir)/getopt.in.h; \ - } > $@-t && \ - mv -f $@-t $@ - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \ - -e 's/@''GNULIB_NL_LANGINFO''@/$(GNULIB_NL_LANGINFO)/g' \ - -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \ - -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \ - -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \ - -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \ - -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \ - -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/langinfo.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to install a simple file in $(libdir) -# which is shared with other installed packages. We use a list of referencing -# packages so that "make uninstall" will remove the file if and only if it -# is not used by another installed package. -# On systems with glibc-2.1 or newer, the file is redundant, therefore we -# avoid installing it. - -all-local: charset.alias ref-add.sed ref-del.sed -install-exec-local: install-exec-localcharset -install-exec-localcharset: all-local - if test $(GLIBC21) = no; then \ - case '$(host_os)' in \ - darwin[56]*) \ - need_charset_alias=true ;; \ - darwin* | cygwin* | mingw* | pw32* | cegcc*) \ - need_charset_alias=false ;; \ - *) \ - need_charset_alias=true ;; \ - esac ; \ - else \ - need_charset_alias=false ; \ - fi ; \ - if $$need_charset_alias; then \ - $(mkinstalldirs) $(DESTDIR)$(libdir) ; \ - fi ; \ - if test -f $(charset_alias); then \ - sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - else \ - if $$need_charset_alias; then \ - sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ - rm -f $(charset_tmp) ; \ - fi ; \ - fi - -uninstall-local: uninstall-localcharset -uninstall-localcharset: all-local - if test -f $(charset_alias); then \ - sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ - if grep '^# Packages using this file: $$' $(charset_tmp) \ - > /dev/null; then \ - rm -f $(charset_alias); \ - else \ - $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ - fi; \ - rm -f $(charset_tmp); \ - fi - -charset.alias: config.charset - $(AM_V_GEN)rm -f t-$@ $@ && \ - $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \ - mv t-$@ $@ -.sin.sed: - $(AM_V_GEN)rm -f t-$@ $@ && \ - sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \ - mv t-$@ $@ - -# We need the following in order to create when the system -# doesn't have one that provides all definitions. -locale.h: locale.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_LOCALE_H''@|$(NEXT_LOCALE_H)|g' \ - -e 's/@''GNULIB_LOCALECONV''@/$(GNULIB_LOCALECONV)/g' \ - -e 's/@''GNULIB_SETLOCALE''@/$(GNULIB_SETLOCALE)/g' \ - -e 's/@''GNULIB_DUPLOCALE''@/$(GNULIB_DUPLOCALE)/g' \ - -e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \ - -e 's|@''HAVE_XLOCALE_H''@|$(HAVE_XLOCALE_H)|g' \ - -e 's|@''REPLACE_LOCALECONV''@|$(REPLACE_LOCALECONV)|g' \ - -e 's|@''REPLACE_SETLOCALE''@|$(REPLACE_SETLOCALE)|g' \ - -e 's|@''REPLACE_DUPLOCALE''@|$(REPLACE_DUPLOCALE)|g' \ - -e 's|@''REPLACE_STRUCT_LCONV''@|$(REPLACE_STRUCT_LCONV)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/locale.in.h; \ - } > $@-t && \ - mv $@-t $@ -selinux/selinux.h: se-selinux.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) - $(AM_V_at)$(MKDIR_P) selinux - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SELINUX_SELINUX_H''@|$(NEXT_SELINUX_SELINUX_H)|g' \ - -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ - < $(srcdir)/se-selinux.in.h; \ - } > $@-t && \ - chmod a-x $@-t && \ - mv $@-t $@ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@selinux/context.h: se-context.in.h $(top_builddir)/config.status $(UNUSED_PARAMETER_H) -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_at)$(MKDIR_P) selinux -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ sed -e '/definition of _GL_UNUSED_PARAMETER/r $(UNUSED_PARAMETER_H)' \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ < $(srcdir)/se-context.in.h; \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ } > $@-t && \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ chmod a-x $@-t && \ -@GL_GENERATE_SELINUX_CONTEXT_H_TRUE@ mv $@-t $@ -@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@selinux/context.h: $(top_builddir)/config.status -@GL_GENERATE_SELINUX_CONTEXT_H_FALSE@ rm -f $@ -# The arg-nonnull.h that gets inserted into generated .h files is the same as -# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut -# off. -arg-nonnull.h: $(top_srcdir)/build/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/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. -@GL_GENERATE_STDBOOL_H_TRUE@stdbool.h: stdbool.in.h $(top_builddir)/config.status -@GL_GENERATE_STDBOOL_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_STDBOOL_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -@GL_GENERATE_STDBOOL_H_TRUE@ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \ -@GL_GENERATE_STDBOOL_H_TRUE@ } > $@-t && \ -@GL_GENERATE_STDBOOL_H_TRUE@ mv $@-t $@ -@GL_GENERATE_STDBOOL_H_FALSE@stdbool.h: $(top_builddir)/config.status -@GL_GENERATE_STDBOOL_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -@GL_GENERATE_STDDEF_H_TRUE@stddef.h: stddef.in.h $(top_builddir)/config.status -@GL_GENERATE_STDDEF_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_STDDEF_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ -@GL_GENERATE_STDDEF_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \ -@GL_GENERATE_STDDEF_H_TRUE@ < $(srcdir)/stddef.in.h; \ -@GL_GENERATE_STDDEF_H_TRUE@ } > $@-t && \ -@GL_GENERATE_STDDEF_H_TRUE@ mv $@-t $@ -@GL_GENERATE_STDDEF_H_FALSE@stddef.h: $(top_builddir)/config.status -@GL_GENERATE_STDDEF_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -@GL_GENERATE_STDINT_H_TRUE@stdint.h: stdint.in.h $(top_builddir)/config.status -@GL_GENERATE_STDINT_H_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \ -@GL_GENERATE_STDINT_H_TRUE@ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ -@GL_GENERATE_STDINT_H_TRUE@ sed -e 's|@''GUARD_PREFIX''@|GL|g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ -@GL_GENERATE_STDINT_H_TRUE@ < $(srcdir)/stdint.in.h; \ -@GL_GENERATE_STDINT_H_TRUE@ } > $@-t && \ -@GL_GENERATE_STDINT_H_TRUE@ mv $@-t $@ -@GL_GENERATE_STDINT_H_FALSE@stdint.h: $(top_builddir)/config.status -@GL_GENERATE_STDINT_H_FALSE@ rm -f $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \ - -e 's/@''GNULIB_DPRINTF''@/$(GNULIB_DPRINTF)/g' \ - -e 's/@''GNULIB_FCLOSE''@/$(GNULIB_FCLOSE)/g' \ - -e 's/@''GNULIB_FDOPEN''@/$(GNULIB_FDOPEN)/g' \ - -e 's/@''GNULIB_FFLUSH''@/$(GNULIB_FFLUSH)/g' \ - -e 's/@''GNULIB_FGETC''@/$(GNULIB_FGETC)/g' \ - -e 's/@''GNULIB_FGETS''@/$(GNULIB_FGETS)/g' \ - -e 's/@''GNULIB_FOPEN''@/$(GNULIB_FOPEN)/g' \ - -e 's/@''GNULIB_FPRINTF''@/$(GNULIB_FPRINTF)/g' \ - -e 's/@''GNULIB_FPRINTF_POSIX''@/$(GNULIB_FPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_FPURGE''@/$(GNULIB_FPURGE)/g' \ - -e 's/@''GNULIB_FPUTC''@/$(GNULIB_FPUTC)/g' \ - -e 's/@''GNULIB_FPUTS''@/$(GNULIB_FPUTS)/g' \ - -e 's/@''GNULIB_FREAD''@/$(GNULIB_FREAD)/g' \ - -e 's/@''GNULIB_FREOPEN''@/$(GNULIB_FREOPEN)/g' \ - -e 's/@''GNULIB_FSCANF''@/$(GNULIB_FSCANF)/g' \ - -e 's/@''GNULIB_FSEEK''@/$(GNULIB_FSEEK)/g' \ - -e 's/@''GNULIB_FSEEKO''@/$(GNULIB_FSEEKO)/g' \ - -e 's/@''GNULIB_FTELL''@/$(GNULIB_FTELL)/g' \ - -e 's/@''GNULIB_FTELLO''@/$(GNULIB_FTELLO)/g' \ - -e 's/@''GNULIB_FWRITE''@/$(GNULIB_FWRITE)/g' \ - -e 's/@''GNULIB_GETC''@/$(GNULIB_GETC)/g' \ - -e 's/@''GNULIB_GETCHAR''@/$(GNULIB_GETCHAR)/g' \ - -e 's/@''GNULIB_GETDELIM''@/$(GNULIB_GETDELIM)/g' \ - -e 's/@''GNULIB_GETLINE''@/$(GNULIB_GETLINE)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF''@/$(GNULIB_OBSTACK_PRINTF)/g' \ - -e 's/@''GNULIB_OBSTACK_PRINTF_POSIX''@/$(GNULIB_OBSTACK_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PCLOSE''@/$(GNULIB_PCLOSE)/g' \ - -e 's/@''GNULIB_PERROR''@/$(GNULIB_PERROR)/g' \ - -e 's/@''GNULIB_POPEN''@/$(GNULIB_POPEN)/g' \ - -e 's/@''GNULIB_PRINTF''@/$(GNULIB_PRINTF)/g' \ - -e 's/@''GNULIB_PRINTF_POSIX''@/$(GNULIB_PRINTF_POSIX)/g' \ - -e 's/@''GNULIB_PUTC''@/$(GNULIB_PUTC)/g' \ - -e 's/@''GNULIB_PUTCHAR''@/$(GNULIB_PUTCHAR)/g' \ - -e 's/@''GNULIB_PUTS''@/$(GNULIB_PUTS)/g' \ - -e 's/@''GNULIB_REMOVE''@/$(GNULIB_REMOVE)/g' \ - -e 's/@''GNULIB_RENAME''@/$(GNULIB_RENAME)/g' \ - -e 's/@''GNULIB_RENAMEAT''@/$(GNULIB_RENAMEAT)/g' \ - -e 's/@''GNULIB_SCANF''@/$(GNULIB_SCANF)/g' \ - -e 's/@''GNULIB_SNPRINTF''@/$(GNULIB_SNPRINTF)/g' \ - -e 's/@''GNULIB_SPRINTF_POSIX''@/$(GNULIB_SPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_STDIO_H_NONBLOCKING''@/$(GNULIB_STDIO_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_STDIO_H_SIGPIPE''@/$(GNULIB_STDIO_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_TMPFILE''@/$(GNULIB_TMPFILE)/g' \ - -e 's/@''GNULIB_VASPRINTF''@/$(GNULIB_VASPRINTF)/g' \ - -e 's/@''GNULIB_VDPRINTF''@/$(GNULIB_VDPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF''@/$(GNULIB_VFPRINTF)/g' \ - -e 's/@''GNULIB_VFPRINTF_POSIX''@/$(GNULIB_VFPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VFSCANF''@/$(GNULIB_VFSCANF)/g' \ - -e 's/@''GNULIB_VSCANF''@/$(GNULIB_VSCANF)/g' \ - -e 's/@''GNULIB_VPRINTF''@/$(GNULIB_VPRINTF)/g' \ - -e 's/@''GNULIB_VPRINTF_POSIX''@/$(GNULIB_VPRINTF_POSIX)/g' \ - -e 's/@''GNULIB_VSNPRINTF''@/$(GNULIB_VSNPRINTF)/g' \ - -e 's/@''GNULIB_VSPRINTF_POSIX''@/$(GNULIB_VSPRINTF_POSIX)/g' \ - < $(srcdir)/stdio.in.h | \ - sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \ - -e 's|@''HAVE_DECL_FSEEKO''@|$(HAVE_DECL_FSEEKO)|g' \ - -e 's|@''HAVE_DECL_FTELLO''@|$(HAVE_DECL_FTELLO)|g' \ - -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \ - -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \ - -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \ - -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \ - -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \ - -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \ - -e 's|@''HAVE_FSEEKO''@|$(HAVE_FSEEKO)|g' \ - -e 's|@''HAVE_FTELLO''@|$(HAVE_FTELLO)|g' \ - -e 's|@''HAVE_PCLOSE''@|$(HAVE_PCLOSE)|g' \ - -e 's|@''HAVE_POPEN''@|$(HAVE_POPEN)|g' \ - -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \ - -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \ - -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \ - -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \ - -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \ - -e 's|@''REPLACE_FDOPEN''@|$(REPLACE_FDOPEN)|g' \ - -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \ - -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \ - -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \ - -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \ - -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \ - -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \ - -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \ - -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \ - -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \ - -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \ - -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \ - -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \ - -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \ - -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \ - -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \ - -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \ - -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \ - -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \ - -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \ - -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \ - -e 's|@''REPLACE_STDIO_READ_FUNCS''@|$(REPLACE_STDIO_READ_FUNCS)|g' \ - -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \ - -e 's|@''REPLACE_TMPFILE''@|$(REPLACE_TMPFILE)|g' \ - -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \ - -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \ - -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \ - -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \ - -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \ - -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \ - -e 's|@''ASM_SYMBOL_PREFIX''@|$(ASM_SYMBOL_PREFIX)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \ - $(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \ - -e 's/@''GNULIB__EXIT''@/$(GNULIB__EXIT)/g' \ - -e 's/@''GNULIB_ATOLL''@/$(GNULIB_ATOLL)/g' \ - -e 's/@''GNULIB_CALLOC_POSIX''@/$(GNULIB_CALLOC_POSIX)/g' \ - -e 's/@''GNULIB_CANONICALIZE_FILE_NAME''@/$(GNULIB_CANONICALIZE_FILE_NAME)/g' \ - -e 's/@''GNULIB_GETLOADAVG''@/$(GNULIB_GETLOADAVG)/g' \ - -e 's/@''GNULIB_GETSUBOPT''@/$(GNULIB_GETSUBOPT)/g' \ - -e 's/@''GNULIB_GRANTPT''@/$(GNULIB_GRANTPT)/g' \ - -e 's/@''GNULIB_MALLOC_POSIX''@/$(GNULIB_MALLOC_POSIX)/g' \ - -e 's/@''GNULIB_MBTOWC''@/$(GNULIB_MBTOWC)/g' \ - -e 's/@''GNULIB_MKDTEMP''@/$(GNULIB_MKDTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMP''@/$(GNULIB_MKOSTEMP)/g' \ - -e 's/@''GNULIB_MKOSTEMPS''@/$(GNULIB_MKOSTEMPS)/g' \ - -e 's/@''GNULIB_MKSTEMP''@/$(GNULIB_MKSTEMP)/g' \ - -e 's/@''GNULIB_MKSTEMPS''@/$(GNULIB_MKSTEMPS)/g' \ - -e 's/@''GNULIB_POSIX_OPENPT''@/$(GNULIB_POSIX_OPENPT)/g' \ - -e 's/@''GNULIB_PTSNAME''@/$(GNULIB_PTSNAME)/g' \ - -e 's/@''GNULIB_PTSNAME_R''@/$(GNULIB_PTSNAME_R)/g' \ - -e 's/@''GNULIB_PUTENV''@/$(GNULIB_PUTENV)/g' \ - -e 's/@''GNULIB_RANDOM''@/$(GNULIB_RANDOM)/g' \ - -e 's/@''GNULIB_RANDOM_R''@/$(GNULIB_RANDOM_R)/g' \ - -e 's/@''GNULIB_REALLOC_POSIX''@/$(GNULIB_REALLOC_POSIX)/g' \ - -e 's/@''GNULIB_REALPATH''@/$(GNULIB_REALPATH)/g' \ - -e 's/@''GNULIB_RPMATCH''@/$(GNULIB_RPMATCH)/g' \ - -e 's/@''GNULIB_SETENV''@/$(GNULIB_SETENV)/g' \ - -e 's/@''GNULIB_STRTOD''@/$(GNULIB_STRTOD)/g' \ - -e 's/@''GNULIB_STRTOLL''@/$(GNULIB_STRTOLL)/g' \ - -e 's/@''GNULIB_STRTOULL''@/$(GNULIB_STRTOULL)/g' \ - -e 's/@''GNULIB_SYSTEM_POSIX''@/$(GNULIB_SYSTEM_POSIX)/g' \ - -e 's/@''GNULIB_UNLOCKPT''@/$(GNULIB_UNLOCKPT)/g' \ - -e 's/@''GNULIB_UNSETENV''@/$(GNULIB_UNSETENV)/g' \ - -e 's/@''GNULIB_WCTOMB''@/$(GNULIB_WCTOMB)/g' \ - < $(srcdir)/stdlib.in.h | \ - sed -e 's|@''HAVE__EXIT''@|$(HAVE__EXIT)|g' \ - -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \ - -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \ - -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \ - -e 's|@''HAVE_GRANTPT''@|$(HAVE_GRANTPT)|g' \ - -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \ - -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \ - -e 's|@''HAVE_MKSTEMP''@|$(HAVE_MKSTEMP)|g' \ - -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \ - -e 's|@''HAVE_POSIX_OPENPT''@|$(HAVE_POSIX_OPENPT)|g' \ - -e 's|@''HAVE_PTSNAME''@|$(HAVE_PTSNAME)|g' \ - -e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \ - -e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \ - -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \ - -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \ - -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \ - -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \ - -e 's|@''HAVE_DECL_SETENV''@|$(HAVE_DECL_SETENV)|g' \ - -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \ - -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \ - -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \ - -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \ - -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \ - -e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \ - -e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \ - -e 's|@''REPLACE_CALLOC''@|$(REPLACE_CALLOC)|g' \ - -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \ - -e 's|@''REPLACE_MALLOC''@|$(REPLACE_MALLOC)|g' \ - -e 's|@''REPLACE_MBTOWC''@|$(REPLACE_MBTOWC)|g' \ - -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \ - -e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \ - -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \ - -e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \ - -e 's|@''REPLACE_REALLOC''@|$(REPLACE_REALLOC)|g' \ - -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \ - -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \ - -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \ - -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \ - -e 's|@''REPLACE_WCTOMB''@|$(REPLACE_WCTOMB)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _Noreturn/r $(_NORETURN_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \ - -e 's/@''GNULIB_FFSL''@/$(GNULIB_FFSL)/g' \ - -e 's/@''GNULIB_FFSLL''@/$(GNULIB_FFSLL)/g' \ - -e 's/@''GNULIB_MBSLEN''@/$(GNULIB_MBSLEN)/g' \ - -e 's/@''GNULIB_MBSNLEN''@/$(GNULIB_MBSNLEN)/g' \ - -e 's/@''GNULIB_MBSCHR''@/$(GNULIB_MBSCHR)/g' \ - -e 's/@''GNULIB_MBSRCHR''@/$(GNULIB_MBSRCHR)/g' \ - -e 's/@''GNULIB_MBSSTR''@/$(GNULIB_MBSSTR)/g' \ - -e 's/@''GNULIB_MBSCASECMP''@/$(GNULIB_MBSCASECMP)/g' \ - -e 's/@''GNULIB_MBSNCASECMP''@/$(GNULIB_MBSNCASECMP)/g' \ - -e 's/@''GNULIB_MBSPCASECMP''@/$(GNULIB_MBSPCASECMP)/g' \ - -e 's/@''GNULIB_MBSCASESTR''@/$(GNULIB_MBSCASESTR)/g' \ - -e 's/@''GNULIB_MBSCSPN''@/$(GNULIB_MBSCSPN)/g' \ - -e 's/@''GNULIB_MBSPBRK''@/$(GNULIB_MBSPBRK)/g' \ - -e 's/@''GNULIB_MBSSPN''@/$(GNULIB_MBSSPN)/g' \ - -e 's/@''GNULIB_MBSSEP''@/$(GNULIB_MBSSEP)/g' \ - -e 's/@''GNULIB_MBSTOK_R''@/$(GNULIB_MBSTOK_R)/g' \ - -e 's/@''GNULIB_MEMCHR''@/$(GNULIB_MEMCHR)/g' \ - -e 's/@''GNULIB_MEMMEM''@/$(GNULIB_MEMMEM)/g' \ - -e 's/@''GNULIB_MEMPCPY''@/$(GNULIB_MEMPCPY)/g' \ - -e 's/@''GNULIB_MEMRCHR''@/$(GNULIB_MEMRCHR)/g' \ - -e 's/@''GNULIB_RAWMEMCHR''@/$(GNULIB_RAWMEMCHR)/g' \ - -e 's/@''GNULIB_STPCPY''@/$(GNULIB_STPCPY)/g' \ - -e 's/@''GNULIB_STPNCPY''@/$(GNULIB_STPNCPY)/g' \ - -e 's/@''GNULIB_STRCHRNUL''@/$(GNULIB_STRCHRNUL)/g' \ - -e 's/@''GNULIB_STRDUP''@/$(GNULIB_STRDUP)/g' \ - -e 's/@''GNULIB_STRNCAT''@/$(GNULIB_STRNCAT)/g' \ - -e 's/@''GNULIB_STRNDUP''@/$(GNULIB_STRNDUP)/g' \ - -e 's/@''GNULIB_STRNLEN''@/$(GNULIB_STRNLEN)/g' \ - -e 's/@''GNULIB_STRPBRK''@/$(GNULIB_STRPBRK)/g' \ - -e 's/@''GNULIB_STRSEP''@/$(GNULIB_STRSEP)/g' \ - -e 's/@''GNULIB_STRSTR''@/$(GNULIB_STRSTR)/g' \ - -e 's/@''GNULIB_STRCASESTR''@/$(GNULIB_STRCASESTR)/g' \ - -e 's/@''GNULIB_STRTOK_R''@/$(GNULIB_STRTOK_R)/g' \ - -e 's/@''GNULIB_STRERROR''@/$(GNULIB_STRERROR)/g' \ - -e 's/@''GNULIB_STRERROR_R''@/$(GNULIB_STRERROR_R)/g' \ - -e 's/@''GNULIB_STRSIGNAL''@/$(GNULIB_STRSIGNAL)/g' \ - -e 's/@''GNULIB_STRVERSCMP''@/$(GNULIB_STRVERSCMP)/g' \ - < $(srcdir)/string.in.h | \ - sed -e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \ - -e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \ - -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \ - -e 's|@''HAVE_MEMCHR''@|$(HAVE_MEMCHR)|g' \ - -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \ - -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \ - -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \ - -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \ - -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \ - -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \ - -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \ - -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \ - -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \ - -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \ - -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \ - -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \ - -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \ - -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \ - -e 's|@''HAVE_DECL_STRERROR_R''@|$(HAVE_DECL_STRERROR_R)|g' \ - -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \ - -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \ - -e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \ - -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \ - -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \ - -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \ - -e 's|@''REPLACE_STRCHRNUL''@|$(REPLACE_STRCHRNUL)|g' \ - -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \ - -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \ - -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \ - -e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \ - -e 's|@''REPLACE_STRNCAT''@|$(REPLACE_STRNCAT)|g' \ - -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \ - -e 's|@''REPLACE_STRNLEN''@|$(REPLACE_STRNLEN)|g' \ - -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \ - -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \ - -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - < $(srcdir)/string.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# has one that is incomplete. -sys/stat.h: sys_stat.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \ - -e 's|@''WINDOWS_64_BIT_ST_SIZE''@|$(WINDOWS_64_BIT_ST_SIZE)|g' \ - -e 's/@''GNULIB_FCHMODAT''@/$(GNULIB_FCHMODAT)/g' \ - -e 's/@''GNULIB_FSTAT''@/$(GNULIB_FSTAT)/g' \ - -e 's/@''GNULIB_FSTATAT''@/$(GNULIB_FSTATAT)/g' \ - -e 's/@''GNULIB_FUTIMENS''@/$(GNULIB_FUTIMENS)/g' \ - -e 's/@''GNULIB_LCHMOD''@/$(GNULIB_LCHMOD)/g' \ - -e 's/@''GNULIB_LSTAT''@/$(GNULIB_LSTAT)/g' \ - -e 's/@''GNULIB_MKDIRAT''@/$(GNULIB_MKDIRAT)/g' \ - -e 's/@''GNULIB_MKFIFO''@/$(GNULIB_MKFIFO)/g' \ - -e 's/@''GNULIB_MKFIFOAT''@/$(GNULIB_MKFIFOAT)/g' \ - -e 's/@''GNULIB_MKNOD''@/$(GNULIB_MKNOD)/g' \ - -e 's/@''GNULIB_MKNODAT''@/$(GNULIB_MKNODAT)/g' \ - -e 's/@''GNULIB_STAT''@/$(GNULIB_STAT)/g' \ - -e 's/@''GNULIB_UTIMENSAT''@/$(GNULIB_UTIMENSAT)/g' \ - -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \ - -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \ - -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \ - -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \ - -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \ - -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \ - -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \ - -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \ - -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \ - -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \ - -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \ - -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \ - -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \ - -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \ - -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \ - -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \ - -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \ - -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \ - -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \ - -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_stat.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/time.h: sys_time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \ - -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \ - -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \ - -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \ - -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \ - -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \ - -e 's/@''REPLACE_STRUCT_TIMEVAL''@/$(REPLACE_STRUCT_TIMEVAL)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_time.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -sys/types.h: sys_types.in.h $(top_builddir)/config.status - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - < $(srcdir)/sys_types.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# has one that is incomplete. -sys/wait.h: sys_wait.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_at)$(MKDIR_P) sys - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \ - -e 's/@''GNULIB_WAITPID''@/$(GNULIB_WAITPID)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/sys_wait.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -time.h: time.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \ - -e 's/@''GNULIB_MKTIME''@/$(GNULIB_MKTIME)/g' \ - -e 's/@''GNULIB_NANOSLEEP''@/$(GNULIB_NANOSLEEP)/g' \ - -e 's/@''GNULIB_STRPTIME''@/$(GNULIB_STRPTIME)/g' \ - -e 's/@''GNULIB_TIMEGM''@/$(GNULIB_TIMEGM)/g' \ - -e 's/@''GNULIB_TIME_R''@/$(GNULIB_TIME_R)/g' \ - -e 's|@''HAVE_DECL_LOCALTIME_R''@|$(HAVE_DECL_LOCALTIME_R)|g' \ - -e 's|@''HAVE_NANOSLEEP''@|$(HAVE_NANOSLEEP)|g' \ - -e 's|@''HAVE_STRPTIME''@|$(HAVE_STRPTIME)|g' \ - -e 's|@''HAVE_TIMEGM''@|$(HAVE_TIMEGM)|g' \ - -e 's|@''REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \ - -e 's|@''REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \ - -e 's|@''REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \ - -e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \ - -e 's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e 's|@''TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/time.in.h; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create an empty placeholder for -# when the system doesn't have one. -unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \ - -e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \ - -e 's/@''GNULIB_CHDIR''@/$(GNULIB_CHDIR)/g' \ - -e 's/@''GNULIB_CHOWN''@/$(GNULIB_CHOWN)/g' \ - -e 's/@''GNULIB_CLOSE''@/$(GNULIB_CLOSE)/g' \ - -e 's/@''GNULIB_DUP''@/$(GNULIB_DUP)/g' \ - -e 's/@''GNULIB_DUP2''@/$(GNULIB_DUP2)/g' \ - -e 's/@''GNULIB_DUP3''@/$(GNULIB_DUP3)/g' \ - -e 's/@''GNULIB_ENVIRON''@/$(GNULIB_ENVIRON)/g' \ - -e 's/@''GNULIB_EUIDACCESS''@/$(GNULIB_EUIDACCESS)/g' \ - -e 's/@''GNULIB_FACCESSAT''@/$(GNULIB_FACCESSAT)/g' \ - -e 's/@''GNULIB_FCHDIR''@/$(GNULIB_FCHDIR)/g' \ - -e 's/@''GNULIB_FCHOWNAT''@/$(GNULIB_FCHOWNAT)/g' \ - -e 's/@''GNULIB_FDATASYNC''@/$(GNULIB_FDATASYNC)/g' \ - -e 's/@''GNULIB_FSYNC''@/$(GNULIB_FSYNC)/g' \ - -e 's/@''GNULIB_FTRUNCATE''@/$(GNULIB_FTRUNCATE)/g' \ - -e 's/@''GNULIB_GETCWD''@/$(GNULIB_GETCWD)/g' \ - -e 's/@''GNULIB_GETDOMAINNAME''@/$(GNULIB_GETDOMAINNAME)/g' \ - -e 's/@''GNULIB_GETDTABLESIZE''@/$(GNULIB_GETDTABLESIZE)/g' \ - -e 's/@''GNULIB_GETGROUPS''@/$(GNULIB_GETGROUPS)/g' \ - -e 's/@''GNULIB_GETHOSTNAME''@/$(GNULIB_GETHOSTNAME)/g' \ - -e 's/@''GNULIB_GETLOGIN''@/$(GNULIB_GETLOGIN)/g' \ - -e 's/@''GNULIB_GETLOGIN_R''@/$(GNULIB_GETLOGIN_R)/g' \ - -e 's/@''GNULIB_GETPAGESIZE''@/$(GNULIB_GETPAGESIZE)/g' \ - -e 's/@''GNULIB_GETUSERSHELL''@/$(GNULIB_GETUSERSHELL)/g' \ - -e 's/@''GNULIB_GROUP_MEMBER''@/$(GNULIB_GROUP_MEMBER)/g' \ - -e 's/@''GNULIB_ISATTY''@/$(GNULIB_ISATTY)/g' \ - -e 's/@''GNULIB_LCHOWN''@/$(GNULIB_LCHOWN)/g' \ - -e 's/@''GNULIB_LINK''@/$(GNULIB_LINK)/g' \ - -e 's/@''GNULIB_LINKAT''@/$(GNULIB_LINKAT)/g' \ - -e 's/@''GNULIB_LSEEK''@/$(GNULIB_LSEEK)/g' \ - -e 's/@''GNULIB_PIPE''@/$(GNULIB_PIPE)/g' \ - -e 's/@''GNULIB_PIPE2''@/$(GNULIB_PIPE2)/g' \ - -e 's/@''GNULIB_PREAD''@/$(GNULIB_PREAD)/g' \ - -e 's/@''GNULIB_PWRITE''@/$(GNULIB_PWRITE)/g' \ - -e 's/@''GNULIB_READ''@/$(GNULIB_READ)/g' \ - -e 's/@''GNULIB_READLINK''@/$(GNULIB_READLINK)/g' \ - -e 's/@''GNULIB_READLINKAT''@/$(GNULIB_READLINKAT)/g' \ - -e 's/@''GNULIB_RMDIR''@/$(GNULIB_RMDIR)/g' \ - -e 's/@''GNULIB_SETHOSTNAME''@/$(GNULIB_SETHOSTNAME)/g' \ - -e 's/@''GNULIB_SLEEP''@/$(GNULIB_SLEEP)/g' \ - -e 's/@''GNULIB_SYMLINK''@/$(GNULIB_SYMLINK)/g' \ - -e 's/@''GNULIB_SYMLINKAT''@/$(GNULIB_SYMLINKAT)/g' \ - -e 's/@''GNULIB_TTYNAME_R''@/$(GNULIB_TTYNAME_R)/g' \ - -e 's/@''GNULIB_UNISTD_H_GETOPT''@/0$(GNULIB_GL_UNISTD_H_GETOPT)/g' \ - -e 's/@''GNULIB_UNISTD_H_NONBLOCKING''@/$(GNULIB_UNISTD_H_NONBLOCKING)/g' \ - -e 's/@''GNULIB_UNISTD_H_SIGPIPE''@/$(GNULIB_UNISTD_H_SIGPIPE)/g' \ - -e 's/@''GNULIB_UNLINK''@/$(GNULIB_UNLINK)/g' \ - -e 's/@''GNULIB_UNLINKAT''@/$(GNULIB_UNLINKAT)/g' \ - -e 's/@''GNULIB_USLEEP''@/$(GNULIB_USLEEP)/g' \ - -e 's/@''GNULIB_WRITE''@/$(GNULIB_WRITE)/g' \ - < $(srcdir)/unistd.in.h | \ - sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \ - -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \ - -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \ - -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \ - -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \ - -e 's|@''HAVE_FCHDIR''@|$(HAVE_FCHDIR)|g' \ - -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \ - -e 's|@''HAVE_FDATASYNC''@|$(HAVE_FDATASYNC)|g' \ - -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \ - -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \ - -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \ - -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \ - -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \ - -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \ - -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \ - -e 's|@''HAVE_GROUP_MEMBER''@|$(HAVE_GROUP_MEMBER)|g' \ - -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \ - -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \ - -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \ - -e 's|@''HAVE_PIPE''@|$(HAVE_PIPE)|g' \ - -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \ - -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \ - -e 's|@''HAVE_PWRITE''@|$(HAVE_PWRITE)|g' \ - -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \ - -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \ - -e 's|@''HAVE_SETHOSTNAME''@|$(HAVE_SETHOSTNAME)|g' \ - -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \ - -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \ - -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \ - -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \ - -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \ - -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \ - -e 's|@''HAVE_DECL_FCHDIR''@|$(HAVE_DECL_FCHDIR)|g' \ - -e 's|@''HAVE_DECL_FDATASYNC''@|$(HAVE_DECL_FDATASYNC)|g' \ - -e 's|@''HAVE_DECL_GETDOMAINNAME''@|$(HAVE_DECL_GETDOMAINNAME)|g' \ - -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \ - -e 's|@''HAVE_DECL_GETPAGESIZE''@|$(HAVE_DECL_GETPAGESIZE)|g' \ - -e 's|@''HAVE_DECL_GETUSERSHELL''@|$(HAVE_DECL_GETUSERSHELL)|g' \ - -e 's|@''HAVE_DECL_SETHOSTNAME''@|$(HAVE_DECL_SETHOSTNAME)|g' \ - -e 's|@''HAVE_DECL_TTYNAME_R''@|$(HAVE_DECL_TTYNAME_R)|g' \ - -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \ - -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \ - | \ - sed -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \ - -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \ - -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \ - -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \ - -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \ - -e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \ - -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \ - -e 's|@''REPLACE_GETDOMAINNAME''@|$(REPLACE_GETDOMAINNAME)|g' \ - -e 's|@''REPLACE_GETLOGIN_R''@|$(REPLACE_GETLOGIN_R)|g' \ - -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \ - -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \ - -e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \ - -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \ - -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \ - -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \ - -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \ - -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \ - -e 's|@''REPLACE_PWRITE''@|$(REPLACE_PWRITE)|g' \ - -e 's|@''REPLACE_READ''@|$(REPLACE_READ)|g' \ - -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \ - -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \ - -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \ - -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \ - -e 's|@''REPLACE_TTYNAME_R''@|$(REPLACE_TTYNAME_R)|g' \ - -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \ - -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \ - -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \ - -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \ - -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# version does not work standalone. -wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''HAVE_FEATURES_H''@|$(HAVE_FEATURES_H)|g' \ - -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \ - -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \ - -e 's/@''GNULIB_BTOWC''@/$(GNULIB_BTOWC)/g' \ - -e 's/@''GNULIB_WCTOB''@/$(GNULIB_WCTOB)/g' \ - -e 's/@''GNULIB_MBSINIT''@/$(GNULIB_MBSINIT)/g' \ - -e 's/@''GNULIB_MBRTOWC''@/$(GNULIB_MBRTOWC)/g' \ - -e 's/@''GNULIB_MBRLEN''@/$(GNULIB_MBRLEN)/g' \ - -e 's/@''GNULIB_MBSRTOWCS''@/$(GNULIB_MBSRTOWCS)/g' \ - -e 's/@''GNULIB_MBSNRTOWCS''@/$(GNULIB_MBSNRTOWCS)/g' \ - -e 's/@''GNULIB_WCRTOMB''@/$(GNULIB_WCRTOMB)/g' \ - -e 's/@''GNULIB_WCSRTOMBS''@/$(GNULIB_WCSRTOMBS)/g' \ - -e 's/@''GNULIB_WCSNRTOMBS''@/$(GNULIB_WCSNRTOMBS)/g' \ - -e 's/@''GNULIB_WCWIDTH''@/$(GNULIB_WCWIDTH)/g' \ - -e 's/@''GNULIB_WMEMCHR''@/$(GNULIB_WMEMCHR)/g' \ - -e 's/@''GNULIB_WMEMCMP''@/$(GNULIB_WMEMCMP)/g' \ - -e 's/@''GNULIB_WMEMCPY''@/$(GNULIB_WMEMCPY)/g' \ - -e 's/@''GNULIB_WMEMMOVE''@/$(GNULIB_WMEMMOVE)/g' \ - -e 's/@''GNULIB_WMEMSET''@/$(GNULIB_WMEMSET)/g' \ - -e 's/@''GNULIB_WCSLEN''@/$(GNULIB_WCSLEN)/g' \ - -e 's/@''GNULIB_WCSNLEN''@/$(GNULIB_WCSNLEN)/g' \ - -e 's/@''GNULIB_WCSCPY''@/$(GNULIB_WCSCPY)/g' \ - -e 's/@''GNULIB_WCPCPY''@/$(GNULIB_WCPCPY)/g' \ - -e 's/@''GNULIB_WCSNCPY''@/$(GNULIB_WCSNCPY)/g' \ - -e 's/@''GNULIB_WCPNCPY''@/$(GNULIB_WCPNCPY)/g' \ - -e 's/@''GNULIB_WCSCAT''@/$(GNULIB_WCSCAT)/g' \ - -e 's/@''GNULIB_WCSNCAT''@/$(GNULIB_WCSNCAT)/g' \ - -e 's/@''GNULIB_WCSCMP''@/$(GNULIB_WCSCMP)/g' \ - -e 's/@''GNULIB_WCSNCMP''@/$(GNULIB_WCSNCMP)/g' \ - -e 's/@''GNULIB_WCSCASECMP''@/$(GNULIB_WCSCASECMP)/g' \ - -e 's/@''GNULIB_WCSNCASECMP''@/$(GNULIB_WCSNCASECMP)/g' \ - -e 's/@''GNULIB_WCSCOLL''@/$(GNULIB_WCSCOLL)/g' \ - -e 's/@''GNULIB_WCSXFRM''@/$(GNULIB_WCSXFRM)/g' \ - -e 's/@''GNULIB_WCSDUP''@/$(GNULIB_WCSDUP)/g' \ - -e 's/@''GNULIB_WCSCHR''@/$(GNULIB_WCSCHR)/g' \ - -e 's/@''GNULIB_WCSRCHR''@/$(GNULIB_WCSRCHR)/g' \ - -e 's/@''GNULIB_WCSCSPN''@/$(GNULIB_WCSCSPN)/g' \ - -e 's/@''GNULIB_WCSSPN''@/$(GNULIB_WCSSPN)/g' \ - -e 's/@''GNULIB_WCSPBRK''@/$(GNULIB_WCSPBRK)/g' \ - -e 's/@''GNULIB_WCSSTR''@/$(GNULIB_WCSSTR)/g' \ - -e 's/@''GNULIB_WCSTOK''@/$(GNULIB_WCSTOK)/g' \ - -e 's/@''GNULIB_WCSWIDTH''@/$(GNULIB_WCSWIDTH)/g' \ - < $(srcdir)/wchar.in.h | \ - sed -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \ - -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \ - -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \ - -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \ - -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \ - -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \ - -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \ - -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \ - -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \ - -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \ - -e 's|@''HAVE_WMEMCHR''@|$(HAVE_WMEMCHR)|g' \ - -e 's|@''HAVE_WMEMCMP''@|$(HAVE_WMEMCMP)|g' \ - -e 's|@''HAVE_WMEMCPY''@|$(HAVE_WMEMCPY)|g' \ - -e 's|@''HAVE_WMEMMOVE''@|$(HAVE_WMEMMOVE)|g' \ - -e 's|@''HAVE_WMEMSET''@|$(HAVE_WMEMSET)|g' \ - -e 's|@''HAVE_WCSLEN''@|$(HAVE_WCSLEN)|g' \ - -e 's|@''HAVE_WCSNLEN''@|$(HAVE_WCSNLEN)|g' \ - -e 's|@''HAVE_WCSCPY''@|$(HAVE_WCSCPY)|g' \ - -e 's|@''HAVE_WCPCPY''@|$(HAVE_WCPCPY)|g' \ - -e 's|@''HAVE_WCSNCPY''@|$(HAVE_WCSNCPY)|g' \ - -e 's|@''HAVE_WCPNCPY''@|$(HAVE_WCPNCPY)|g' \ - -e 's|@''HAVE_WCSCAT''@|$(HAVE_WCSCAT)|g' \ - -e 's|@''HAVE_WCSNCAT''@|$(HAVE_WCSNCAT)|g' \ - -e 's|@''HAVE_WCSCMP''@|$(HAVE_WCSCMP)|g' \ - -e 's|@''HAVE_WCSNCMP''@|$(HAVE_WCSNCMP)|g' \ - -e 's|@''HAVE_WCSCASECMP''@|$(HAVE_WCSCASECMP)|g' \ - -e 's|@''HAVE_WCSNCASECMP''@|$(HAVE_WCSNCASECMP)|g' \ - -e 's|@''HAVE_WCSCOLL''@|$(HAVE_WCSCOLL)|g' \ - -e 's|@''HAVE_WCSXFRM''@|$(HAVE_WCSXFRM)|g' \ - -e 's|@''HAVE_WCSDUP''@|$(HAVE_WCSDUP)|g' \ - -e 's|@''HAVE_WCSCHR''@|$(HAVE_WCSCHR)|g' \ - -e 's|@''HAVE_WCSRCHR''@|$(HAVE_WCSRCHR)|g' \ - -e 's|@''HAVE_WCSCSPN''@|$(HAVE_WCSCSPN)|g' \ - -e 's|@''HAVE_WCSSPN''@|$(HAVE_WCSSPN)|g' \ - -e 's|@''HAVE_WCSPBRK''@|$(HAVE_WCSPBRK)|g' \ - -e 's|@''HAVE_WCSSTR''@|$(HAVE_WCSSTR)|g' \ - -e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \ - -e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \ - -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \ - -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \ - | \ - sed -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \ - -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \ - -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \ - -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \ - -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \ - -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \ - -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \ - -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \ - -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \ - -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \ - -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \ - -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \ - -e 's|@''REPLACE_WCSWIDTH''@|$(REPLACE_WCSWIDTH)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \ - } > $@-t && \ - mv $@-t $@ - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -wctype.h: wctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) - $(AM_V_GEN)rm -f $@-t $@ && \ - { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ - sed -e 's|@''GUARD_PREFIX''@|GL|g' \ - -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \ - -e 's/@''GNULIB_ISWBLANK''@/$(GNULIB_ISWBLANK)/g' \ - -e 's/@''GNULIB_WCTYPE''@/$(GNULIB_WCTYPE)/g' \ - -e 's/@''GNULIB_ISWCTYPE''@/$(GNULIB_ISWCTYPE)/g' \ - -e 's/@''GNULIB_WCTRANS''@/$(GNULIB_WCTRANS)/g' \ - -e 's/@''GNULIB_TOWCTRANS''@/$(GNULIB_TOWCTRANS)/g' \ - -e 's/@''HAVE_ISWBLANK''@/$(HAVE_ISWBLANK)/g' \ - -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \ - -e 's/@''HAVE_WCTYPE_T''@/$(HAVE_WCTYPE_T)/g' \ - -e 's/@''HAVE_WCTRANS_T''@/$(HAVE_WCTRANS_T)/g' \ - -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \ - -e 's/@''REPLACE_ISWBLANK''@/$(REPLACE_ISWBLANK)/g' \ - -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \ - -e 's/@''REPLACE_TOWLOWER''@/$(REPLACE_TOWLOWER)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - < $(srcdir)/wctype.in.h; \ - } > $@-t && \ - mv $@-t $@ - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gnulib/lib/alloca.c b/gnulib/lib/alloca.c deleted file mode 100644 index ee0f018..0000000 --- a/gnulib/lib/alloca.c +++ /dev/null @@ -1,478 +0,0 @@ -/* alloca.c -- allocate automatically reclaimed memory - (Mostly) portable public-domain implementation -- D A Gwyn - - This implementation of the PWB library alloca function, - which is used to allocate space off the run-time stack so - that it is automatically reclaimed upon procedure exit, - was inspired by discussions with J. Q. Johnson of Cornell. - J.Otto Tennant contributed the Cray support. - - There are some preprocessor constants that can - be defined when compiling for your specific system, for - improved efficiency; however, the defaults should be okay. - - The general concept of this implementation is to keep - track of all alloca-allocated blocks, and reclaim any - that are found to be deeper in the stack than the current - invocation. This heuristic does not reclaim storage as - soon as it becomes invalid, but it will do so eventually. - - As a special case, alloca(0) reclaims storage without - allocating any. It is a good idea to use alloca(0) in - your main control loop, etc. to force garbage collection. */ - -#include - -#include - -#include -#include - -#ifdef emacs -# include "lisp.h" -# include "blockinput.h" -# ifdef EMACS_FREE -# undef free -# define free EMACS_FREE -# endif -#else -# define memory_full() abort () -#endif - -/* If compiling with GCC 2, this file's not needed. */ -#if !defined (__GNUC__) || __GNUC__ < 2 - -/* If someone has defined alloca as a macro, - there must be some other way alloca is supposed to work. */ -# ifndef alloca - -# ifdef emacs -# ifdef static -/* actually, only want this if static is defined as "" - -- this is for usg, in which emacs must undefine static - in order to make unexec workable - */ -# ifndef STACK_DIRECTION -you -lose --- must know STACK_DIRECTION at compile-time -/* Using #error here is not wise since this file should work for - old and obscure compilers. */ -# endif /* STACK_DIRECTION undefined */ -# endif /* static */ -# endif /* emacs */ - -/* If your stack is a linked list of frames, you have to - provide an "address metric" ADDRESS_FUNCTION macro. */ - -# if defined (CRAY) && defined (CRAY_STACKSEG_END) -long i00afunc (); -# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg)) -# else -# define ADDRESS_FUNCTION(arg) &(arg) -# endif - -/* Define STACK_DIRECTION if you know the direction of stack - growth for your system; otherwise it will be automatically - deduced at run-time. - - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ - -# ifndef STACK_DIRECTION -# define STACK_DIRECTION 0 /* Direction unknown. */ -# endif - -# if STACK_DIRECTION != 0 - -# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */ - -# else /* STACK_DIRECTION == 0; need run-time code. */ - -static int stack_dir; /* 1 or -1 once known. */ -# define STACK_DIR stack_dir - -static int -find_stack_direction (int *addr, int depth) -{ - int dir, dummy = 0; - if (! addr) - addr = &dummy; - *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; - return dir + dummy; -} - -# endif /* STACK_DIRECTION == 0 */ - -/* An "alloca header" is used to: - (a) chain together all alloca'ed blocks; - (b) keep track of stack depth. - - It is very important that sizeof(header) agree with malloc - alignment chunk size. The following default should work okay. */ - -# ifndef ALIGN_SIZE -# define ALIGN_SIZE sizeof(double) -# endif - -typedef union hdr -{ - char align[ALIGN_SIZE]; /* To force sizeof(header). */ - struct - { - union hdr *next; /* For chaining headers. */ - char *deep; /* For stack depth measure. */ - } h; -} header; - -static header *last_alloca_header = NULL; /* -> last alloca header. */ - -/* Return a pointer to at least SIZE bytes of storage, - which will be automatically reclaimed upon exit from - the procedure that called alloca. Originally, this space - was supposed to be taken from the current stack frame of the - caller, but that method cannot be made to work for some - implementations of C, for example under Gould's UTX/32. */ - -void * -alloca (size_t size) -{ - auto char probe; /* Probes stack depth: */ - register char *depth = ADDRESS_FUNCTION (probe); - -# if STACK_DIRECTION == 0 - if (STACK_DIR == 0) /* Unknown growth direction. */ - STACK_DIR = find_stack_direction (NULL, (size & 1) + 20); -# endif - - /* Reclaim garbage, defined as all alloca'd storage that - was allocated from deeper in the stack than currently. */ - - { - register header *hp; /* Traverses linked list. */ - -# ifdef emacs - BLOCK_INPUT; -# endif - - for (hp = last_alloca_header; hp != NULL;) - if ((STACK_DIR > 0 && hp->h.deep > depth) - || (STACK_DIR < 0 && hp->h.deep < depth)) - { - register header *np = hp->h.next; - - free (hp); /* Collect garbage. */ - - hp = np; /* -> next header. */ - } - else - break; /* Rest are not deeper. */ - - last_alloca_header = hp; /* -> last valid storage. */ - -# ifdef emacs - UNBLOCK_INPUT; -# endif - } - - if (size == 0) - return NULL; /* No allocation required. */ - - /* Allocate combined header + user data storage. */ - - { - /* Address of header. */ - register header *new; - - size_t combined_size = sizeof (header) + size; - if (combined_size < sizeof (header)) - memory_full (); - - new = malloc (combined_size); - - if (! new) - memory_full (); - - new->h.next = last_alloca_header; - new->h.deep = depth; - - last_alloca_header = new; - - /* User storage begins just after header. */ - - return (void *) (new + 1); - } -} - -# if defined (CRAY) && defined (CRAY_STACKSEG_END) - -# ifdef DEBUG_I00AFUNC -# include -# endif - -# ifndef CRAY_STACK -# define CRAY_STACK -# ifndef CRAY2 -/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */ -struct stack_control_header - { - long shgrow:32; /* Number of times stack has grown. */ - long shaseg:32; /* Size of increments to stack. */ - long shhwm:32; /* High water mark of stack. */ - long shsize:32; /* Current size of stack (all segments). */ - }; - -/* The stack segment linkage control information occurs at - the high-address end of a stack segment. (The stack - grows from low addresses to high addresses.) The initial - part of the stack segment linkage control information is - 0200 (octal) words. This provides for register storage - for the routine which overflows the stack. */ - -struct stack_segment_linkage - { - long ss[0200]; /* 0200 overflow words. */ - long sssize:32; /* Number of words in this segment. */ - long ssbase:32; /* Offset to stack base. */ - long:32; - long sspseg:32; /* Offset to linkage control of previous - segment of stack. */ - long:32; - long sstcpt:32; /* Pointer to task common address block. */ - long sscsnm; /* Private control structure number for - microtasking. */ - long ssusr1; /* Reserved for user. */ - long ssusr2; /* Reserved for user. */ - long sstpid; /* Process ID for pid based multi-tasking. */ - long ssgvup; /* Pointer to multitasking thread giveup. */ - long sscray[7]; /* Reserved for Cray Research. */ - long ssa0; - long ssa1; - long ssa2; - long ssa3; - long ssa4; - long ssa5; - long ssa6; - long ssa7; - long sss0; - long sss1; - long sss2; - long sss3; - long sss4; - long sss5; - long sss6; - long sss7; - }; - -# else /* CRAY2 */ -/* The following structure defines the vector of words - returned by the STKSTAT library routine. */ -struct stk_stat - { - long now; /* Current total stack size. */ - long maxc; /* Amount of contiguous space which would - be required to satisfy the maximum - stack demand to date. */ - long high_water; /* Stack high-water mark. */ - long overflows; /* Number of stack overflow ($STKOFEN) calls. */ - long hits; /* Number of internal buffer hits. */ - long extends; /* Number of block extensions. */ - long stko_mallocs; /* Block allocations by $STKOFEN. */ - long underflows; /* Number of stack underflow calls ($STKRETN). */ - long stko_free; /* Number of deallocations by $STKRETN. */ - long stkm_free; /* Number of deallocations by $STKMRET. */ - long segments; /* Current number of stack segments. */ - long maxs; /* Maximum number of stack segments so far. */ - long pad_size; /* Stack pad size. */ - long current_address; /* Current stack segment address. */ - long current_size; /* Current stack segment size. This - number is actually corrupted by STKSTAT to - include the fifteen word trailer area. */ - long initial_address; /* Address of initial segment. */ - long initial_size; /* Size of initial segment. */ - }; - -/* The following structure describes the data structure which trails - any stack segment. I think that the description in 'asdef' is - out of date. I only describe the parts that I am sure about. */ - -struct stk_trailer - { - long this_address; /* Address of this block. */ - long this_size; /* Size of this block (does not include - this trailer). */ - long unknown2; - long unknown3; - long link; /* Address of trailer block of previous - segment. */ - long unknown5; - long unknown6; - long unknown7; - long unknown8; - long unknown9; - long unknown10; - long unknown11; - long unknown12; - long unknown13; - long unknown14; - }; - -# endif /* CRAY2 */ -# endif /* not CRAY_STACK */ - -# ifdef CRAY2 -/* Determine a "stack measure" for an arbitrary ADDRESS. - I doubt that "lint" will like this much. */ - -static long -i00afunc (long *address) -{ - struct stk_stat status; - struct stk_trailer *trailer; - long *block, size; - long result = 0; - - /* We want to iterate through all of the segments. The first - step is to get the stack status structure. We could do this - more quickly and more directly, perhaps, by referencing the - $LM00 common block, but I know that this works. */ - - STKSTAT (&status); - - /* Set up the iteration. */ - - trailer = (struct stk_trailer *) (status.current_address - + status.current_size - - 15); - - /* There must be at least one stack segment. Therefore it is - a fatal error if "trailer" is null. */ - - if (trailer == 0) - abort (); - - /* Discard segments that do not contain our argument address. */ - - while (trailer != 0) - { - block = (long *) trailer->this_address; - size = trailer->this_size; - if (block == 0 || size == 0) - abort (); - trailer = (struct stk_trailer *) trailer->link; - if ((block <= address) && (address < (block + size))) - break; - } - - /* Set the result to the offset in this segment and add the sizes - of all predecessor segments. */ - - result = address - block; - - if (trailer == 0) - { - return result; - } - - do - { - if (trailer->this_size <= 0) - abort (); - result += trailer->this_size; - trailer = (struct stk_trailer *) trailer->link; - } - while (trailer != 0); - - /* We are done. Note that if you present a bogus address (one - not in any segment), you will get a different number back, formed - from subtracting the address of the first block. This is probably - not what you want. */ - - return (result); -} - -# else /* not CRAY2 */ -/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP. - Determine the number of the cell within the stack, - given the address of the cell. The purpose of this - routine is to linearize, in some sense, stack addresses - for alloca. */ - -static long -i00afunc (long address) -{ - long stkl = 0; - - long size, pseg, this_segment, stack; - long result = 0; - - struct stack_segment_linkage *ssptr; - - /* Register B67 contains the address of the end of the - current stack segment. If you (as a subprogram) store - your registers on the stack and find that you are past - the contents of B67, you have overflowed the segment. - - B67 also points to the stack segment linkage control - area, which is what we are really interested in. */ - - stkl = CRAY_STACKSEG_END (); - ssptr = (struct stack_segment_linkage *) stkl; - - /* If one subtracts 'size' from the end of the segment, - one has the address of the first word of the segment. - - If this is not the first segment, 'pseg' will be - nonzero. */ - - pseg = ssptr->sspseg; - size = ssptr->sssize; - - this_segment = stkl - size; - - /* It is possible that calling this routine itself caused - a stack overflow. Discard stack segments which do not - contain the target address. */ - - while (!(this_segment <= address && address <= stkl)) - { -# ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl); -# endif - if (pseg == 0) - break; - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - this_segment = stkl - size; - } - - result = address - this_segment; - - /* If you subtract pseg from the current end of the stack, - you get the address of the previous stack segment's end. - This seems a little convoluted to me, but I'll bet you save - a cycle somewhere. */ - - while (pseg != 0) - { -# ifdef DEBUG_I00AFUNC - fprintf (stderr, "%011o %011o\n", pseg, size); -# endif - stkl = stkl - pseg; - ssptr = (struct stack_segment_linkage *) stkl; - size = ssptr->sssize; - pseg = ssptr->sspseg; - result += size; - } - return (result); -} - -# endif /* not CRAY2 */ -# endif /* CRAY */ - -# endif /* no alloca */ -#endif /* not GCC 2 */ diff --git a/gnulib/lib/alloca.in.h b/gnulib/lib/alloca.in.h deleted file mode 100644 index feafbc5..0000000 --- a/gnulib/lib/alloca.in.h +++ /dev/null @@ -1,63 +0,0 @@ -/* Memory allocation on the stack. - - 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 - 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 - . - */ - -/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H - means there is a real alloca function. */ -#ifndef _GL_ALLOCA_H -#define _GL_ALLOCA_H - -/* alloca (N) returns a pointer to N bytes of memory - allocated on the stack, which will last until the function returns. - Use of alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns, - - for huge N (say, N >= 65536) - you never know how large (or small) - the stack is, and when the stack cannot fulfill the memory allocation - request, the program just crashes. - */ - -#ifndef alloca -# ifdef __GNUC__ -# define alloca __builtin_alloca -# elif defined _AIX -# define alloca __alloca -# elif defined _MSC_VER -# include -# define alloca _alloca -# elif defined __DECC && defined __VMS -# define alloca __ALLOCA -# elif defined __TANDEM && defined _TNS_E_TARGET -# ifdef __cplusplus -extern "C" -# endif -void *_alloca (unsigned short); -# pragma intrinsic (_alloca) -# define alloca _alloca -# else -# include -# ifdef __cplusplus -extern "C" -# endif -void *alloca (size_t); -# endif -#endif - -#endif /* _GL_ALLOCA_H */ diff --git a/gnulib/lib/argz.c b/gnulib/lib/argz.c deleted file mode 100644 index 30bf9b8..0000000 --- a/gnulib/lib/argz.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Functions for dealing with '\0' separated arg vectors. - Copyright (C) 1995-1998, 2000-2002, 2006, 2008-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 - 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 . */ - -#include - -#include -#include -#include -#include - - - -/* Add BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ -error_t -argz_append (char **argz, size_t *argz_len, const char *buf, size_t buf_len) -{ - size_t new_argz_len = *argz_len + buf_len; - char *new_argz = realloc (*argz, new_argz_len); - if (new_argz) - { - memcpy (new_argz + *argz_len, buf, buf_len); - *argz = new_argz; - *argz_len = new_argz_len; - return 0; - } - else - return ENOMEM; -} - -/* Add STR to the argz vector in ARGZ & ARGZ_LEN. This should be moved into - argz.c in libshouldbelibc. */ -error_t -argz_add (char **argz, size_t *argz_len, const char *str) -{ - return argz_append (argz, argz_len, str, strlen (str) + 1); -} - - - -error_t -argz_add_sep (char **argz, size_t *argz_len, const char *string, int delim) -{ - size_t nlen = strlen (string) + 1; - - if (nlen > 1) - { - const char *rp; - char *wp; - - *argz = (char *) realloc (*argz, *argz_len + nlen); - if (*argz == NULL) - return ENOMEM; - - wp = *argz + *argz_len; - rp = string; - do - if (*rp == delim) - { - if (wp > *argz && wp[-1] != '\0') - *wp++ = '\0'; - else - --nlen; - } - else - *wp++ = *rp; - while (*rp++ != '\0'); - - *argz_len += nlen; - } - - return 0; -} - - - -error_t -argz_create_sep (const char *string, int delim, char **argz, size_t *len) -{ - size_t nlen = strlen (string) + 1; - - if (nlen > 1) - { - const char *rp; - char *wp; - - *argz = (char *) malloc (nlen); - if (*argz == NULL) - return ENOMEM; - - rp = string; - wp = *argz; - do - if (*rp == delim) - { - if (wp > *argz && wp[-1] != '\0') - *wp++ = '\0'; - else - --nlen; - } - else - *wp++ = *rp; - while (*rp++ != '\0'); - - if (nlen == 0) - { - free (*argz); - *argz = NULL; - *len = 0; - } - - *len = nlen; - } - else - { - *argz = NULL; - *len = 0; - } - - return 0; -} - - -/* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an - existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. - Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN, - ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not - in ARGZ, EINVAL is returned, else if memory can't be allocated for the new - ARGZ, ENOMEM is returned, else 0. */ -error_t -argz_insert (char **argz, size_t *argz_len, char *before, const char *entry) -{ - if (! before) - return argz_add (argz, argz_len, entry); - - if (before < *argz || before >= *argz + *argz_len) - return EINVAL; - - if (before > *argz) - /* Make sure before is actually the beginning of an entry. */ - while (before[-1]) - before--; - - { - size_t after_before = *argz_len - (before - *argz); - size_t entry_len = strlen (entry) + 1; - size_t new_argz_len = *argz_len + entry_len; - char *new_argz = realloc (*argz, new_argz_len); - - if (new_argz) - { - before = new_argz + (before - *argz); - memmove (before + entry_len, before, after_before); - memmove (before, entry, entry_len); - *argz = new_argz; - *argz_len = new_argz_len; - return 0; - } - else - return ENOMEM; - } -} - - -char * -argz_next (const char *argz, size_t argz_len, const char *entry) -{ - if (entry) - { - if (entry < argz + argz_len) - entry = strchr (entry, '\0') + 1; - - return entry >= argz + argz_len ? NULL : (char *) entry; - } - else - if (argz_len > 0) - return (char *) argz; - else - return NULL; -} - - -/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's - except the last into the character SEP. */ -void -argz_stringify (char *argz, size_t len, int sep) -{ - if (len > 0) - while (1) - { - size_t part_len = strnlen (argz, len); - argz += part_len; - len -= part_len; - if (len-- <= 1) /* includes final '\0' we want to stop at */ - break; - *argz++ = sep; - } -} - - -/* Returns the number of strings in ARGZ. */ -size_t -argz_count (const char *argz, size_t len) -{ - size_t count = 0; - while (len > 0) - { - size_t part_len = strlen (argz); - argz += part_len + 1; - len -= part_len + 1; - count++; - } - return count; -} - - -/* Puts pointers to each string in ARGZ, plus a terminating 0 element, into - ARGV, which must be large enough to hold them all. */ -void -argz_extract (const char *argz, size_t len, char **argv) -{ - while (len > 0) - { - size_t part_len = strlen (argz); - *argv++ = (char *) argz; - argz += part_len + 1; - len -= part_len + 1; - } - *argv = 0; -} - - -/* Make a '\0' separated arg vector from a unix argv vector, returning it in - ARGZ, and the total length in LEN. If a memory allocation error occurs, - ENOMEM is returned, otherwise 0. */ -error_t -argz_create (char *const argv[], char **argz, size_t *len) -{ - int argc; - size_t tlen = 0; - char *const *ap; - char *p; - - for (argc = 0; argv[argc] != NULL; ++argc) - tlen += strlen (argv[argc]) + 1; - - if (tlen == 0) - *argz = NULL; - else - { - *argz = malloc (tlen); - if (*argz == NULL) - return ENOMEM; - - for (p = *argz, ap = argv; *ap; ++ap, ++p) - p = stpcpy (p, *ap); - } - *len = tlen; - - return 0; -} - - -/* Delete ENTRY from ARGZ & ARGZ_LEN, if any. */ -void -argz_delete (char **argz, size_t *argz_len, char *entry) -{ - if (entry) - /* Get rid of the old value for NAME. */ - { - size_t entry_len = strlen (entry) + 1; - *argz_len -= entry_len; - memmove (entry, entry + entry_len, *argz_len - (entry - *argz)); - if (*argz_len == 0) - { - free (*argz); - *argz = 0; - } - } -} - - -/* Append BUF, of length BUF_LEN to *TO, of length *TO_LEN, reallocating and - updating *TO & *TO_LEN appropriately. If an allocation error occurs, - *TO's old value is freed, and *TO is set to 0. */ -static void -str_append (char **to, size_t *to_len, const char *buf, const size_t buf_len) -{ - size_t new_len = *to_len + buf_len; - char *new_to = realloc (*to, new_len + 1); - - if (new_to) - { - *((char *) mempcpy (new_to + *to_len, buf, buf_len)) = '\0'; - *to = new_to; - *to_len = new_len; - } - else - { - free (*to); - *to = 0; - } -} - -/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating - ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be - incremented by number of replacements performed. */ -error_t -argz_replace (char **argz, size_t *argz_len, const char *str, const char *with, - unsigned *replace_count) -{ - error_t err = 0; - - if (str && *str) - { - char *arg = 0; - char *src = *argz; - size_t src_len = *argz_len; - char *dst = 0; - size_t dst_len = 0; - int delayed_copy = 1; /* True while we've avoided copying anything. */ - size_t str_len = strlen (str), with_len = strlen (with); - - while (!err && (arg = argz_next (src, src_len, arg))) - { - char *match = strstr (arg, str); - if (match) - { - char *from = match + str_len; - size_t to_len = match - arg; - char *to = strndup (arg, to_len); - - while (to && from) - { - str_append (&to, &to_len, with, with_len); - if (to) - { - match = strstr (from, str); - if (match) - { - str_append (&to, &to_len, from, match - from); - from = match + str_len; - } - else - { - str_append (&to, &to_len, from, strlen (from)); - from = 0; - } - } - } - - if (to) - { - if (delayed_copy) - /* We avoided copying SRC to DST until we found a match; - now that we've done so, copy everything from the start - of SRC. */ - { - if (arg > src) - err = argz_append (&dst, &dst_len, src, (arg - src)); - delayed_copy = 0; - } - if (! err) - err = argz_add (&dst, &dst_len, to); - free (to); - } - else - err = ENOMEM; - - if (replace_count) - (*replace_count)++; - } - else if (! delayed_copy) - err = argz_add (&dst, &dst_len, arg); - } - - if (! err) - { - if (! delayed_copy) - /* We never found any instances of str. */ - { - free (src); - *argz = dst; - *argz_len = dst_len; - } - } - else if (dst_len > 0) - free (dst); - } - - return err; -} diff --git a/gnulib/lib/argz.in.h b/gnulib/lib/argz.in.h deleted file mode 100644 index 95ba6a1..0000000 --- a/gnulib/lib/argz.in.h +++ /dev/null @@ -1,160 +0,0 @@ -/* Routines for dealing with '\0' separated arg vectors. - Copyright (C) 1995-2000, 2004, 2007, 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 - 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 . */ - -#ifndef _ARGZ_H -#define _ARGZ_H 1 - - -#define __need_error_t -#include -#include /* Need size_t, and strchr is called below. */ - -#ifndef const -# define const const -#endif - -#ifndef __error_t_defined -typedef int error_t; -#endif - - - -/* Make a '\0' separated arg vector from a unix argv vector, returning it in - ARGZ, and the total length in LEN. If a memory allocation error occurs, - ENOMEM is returned, otherwise 0. The result can be destroyed using free. */ - -extern error_t argz_create (char *const __argv[], char **restrict __argz, - size_t *restrict __len); - -/* Make a '\0' separated arg vector from a SEP separated list in - STRING, returning it in ARGZ, and the total length in LEN. If a - memory allocation error occurs, ENOMEM is returned, otherwise 0. - The result can be destroyed using free. */ - -extern error_t argz_create_sep (const char *restrict string, - int __sep, char **restrict __argz, - size_t *restrict __len); - -/* Returns the number of strings in ARGZ. */ - -extern size_t argz_count (const char *__argz, size_t __len) -; - -/* Puts pointers to each string in ARGZ into ARGV, which must be large enough - to hold them all. */ - -extern void argz_extract (const char *restrict __argz, size_t __len, - char **restrict __argv); - -/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's - except the last into the character SEP. */ - -extern void argz_stringify (char *__argz, size_t __len, int __sep); - -/* Append BUF, of length BUF_LEN to the argz vector in ARGZ & ARGZ_LEN. */ - -extern error_t argz_append (char **restrict __argz, - size_t *restrict __argz_len, - const char *restrict __buf, size_t __buf_len) -; - -/* Append STR to the argz vector in ARGZ & ARGZ_LEN. */ - -extern error_t argz_add (char **restrict __argz, - size_t *restrict __argz_len, - const char *restrict str); - -/* Append SEP separated list in STRING to the argz vector in ARGZ & - ARGZ_LEN. */ - -extern error_t argz_add_sep (char **restrict __argz, - size_t *restrict __argz_len, - const char *restrict string, int __delim) -; - -/* Delete ENTRY from ARGZ & ARGZ_LEN, if it appears there. */ - -extern void argz_delete (char **restrict __argz, - size_t *restrict __argz_len, - char *restrict __entry); - -/* Insert ENTRY into ARGZ & ARGZ_LEN before BEFORE, which should be an - existing entry in ARGZ; if BEFORE is NULL, ENTRY is appended to the end. - Since ARGZ's first entry is the same as ARGZ, argz_insert (ARGZ, ARGZ_LEN, - ARGZ, ENTRY) will insert ENTRY at the beginning of ARGZ. If BEFORE is not - in ARGZ, EINVAL is returned, else if memory can't be allocated for the new - ARGZ, ENOMEM is returned, else 0. */ - -extern error_t argz_insert (char **restrict __argz, - size_t *restrict __argz_len, - char *restrict __before, - const char *restrict __entry); - -/* Replace any occurrences of the string STR in ARGZ with WITH, reallocating - ARGZ as necessary. If REPLACE_COUNT is non-zero, *REPLACE_COUNT will be - incremented by number of replacements performed. */ - -extern error_t argz_replace (char **restrict __argz, - size_t *restrict __argz_len, - const char *restrict str, - const char *restrict __with, - unsigned int *restrict __replace_count); - -/* Returns the next entry in ARGZ & ARGZ_LEN after ENTRY, or NULL if there - are no more. If entry is NULL, then the first entry is returned. This - behavior allows two convenient iteration styles: - - char *entry = 0; - while ((entry = argz_next (argz, argz_len, entry))) - ...; - - or - - char *entry; - for (entry = argz; entry; entry = argz_next (argz, argz_len, entry)) - ...; -*/ - -extern char *argz_next (const char *restrict __argz, size_t __argz_len, - const char *restrict __entry); - -#ifdef __USE_EXTERN_INLINES -__extern_inline char * -__NTH (argz_next (const char *__argz, size_t __argz_len, - const char *__entry)) -{ - if (__entry) - { - if (__entry < __argz + __argz_len) - __entry = strchr (__entry, '\0') + 1; - - return __entry >= __argz + __argz_len ? (char *) NULL : (char *) __entry; - } - else - return __argz_len > 0 ? (char *) __argz : 0; -} -__extern_inline char * -__NTH (argz_next (const char *__argz, size_t __argz_len, - const char *__entry)) -{ - return argz_next (__argz, __argz_len, __entry); -} -#endif /* Use extern inlines. */ - - -#endif /* argz.h */ diff --git a/gnulib/lib/asnprintf.c b/gnulib/lib/asnprintf.c deleted file mode 100644 index 2f0fd50..0000000 --- a/gnulib/lib/asnprintf.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Formatted output to strings. - 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 - 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 . */ - -#include - -/* Specification. */ -#include "vasnprintf.h" - -#include - -char * -asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -{ - va_list args; - char *result; - - va_start (args, format); - result = vasnprintf (resultbuf, lengthp, format, args); - va_end (args); - return result; -} diff --git a/gnulib/lib/asprintf.c b/gnulib/lib/asprintf.c deleted file mode 100644 index 42b5e0e..0000000 --- a/gnulib/lib/asprintf.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Formatted output to strings. - Copyright (C) 1999, 2002, 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 - 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 . */ - -#include - -/* Specification. */ -#ifdef IN_LIBASPRINTF -# include "vasprintf.h" -#else -# include -#endif - -#include - -int -asprintf (char **resultp, const char *format, ...) -{ - va_list args; - int result; - - va_start (args, format); - result = vasprintf (resultp, format, args); - va_end (args); - return result; -} diff --git a/gnulib/lib/btowc.c b/gnulib/lib/btowc.c deleted file mode 100644 index 7a96f7b..0000000 --- a/gnulib/lib/btowc.c +++ /dev/null @@ -1,39 +0,0 @@ -/* Convert unibyte character to wide character. - 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 - 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 - -#include -#include - -wint_t -btowc (int c) -{ - if (c != EOF) - { - char buf[1]; - wchar_t wc; - - buf[0] = c; - if (mbtowc (&wc, buf, 1) >= 0) - return wc; - } - return WEOF; -} diff --git a/gnulib/lib/canonicalize-lgpl.c b/gnulib/lib/canonicalize-lgpl.c deleted file mode 100644 index d43f17b..0000000 --- a/gnulib/lib/canonicalize-lgpl.c +++ /dev/null @@ -1,387 +0,0 @@ -/* Return the canonical absolute name of a given file. - 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 - 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 . */ - -#ifndef _LIBC -# define _GL_USE_STDLIB_ALLOC 1 -# include -#endif - -#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC - -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - -/* Specification. */ -#include - -#include -#include -#include -#include -#if HAVE_SYS_PARAM_H || defined _LIBC -# include -#endif -#include -#include -#include - -#ifdef _LIBC -# include -#else -# define SHLIB_COMPAT(lib, introduced, obsoleted) 0 -# define versioned_symbol(lib, local, symbol, version) extern int dummy -# define compat_symbol(lib, local, symbol, version) -# define weak_alias(local, symbol) -# define __canonicalize_file_name canonicalize_file_name -# define __realpath realpath -# include "pathmax.h" -# include "malloca.h" -# if HAVE_GETCWD -# if IN_RELOCWRAPPER - /* When building the relocatable program wrapper, use the system's getcwd - function, not the gnulib override, otherwise we would get a link error. - */ -# undef getcwd -# endif -# ifdef VMS - /* We want the directory in Unix syntax, not in VMS syntax. */ -# define __getcwd(buf, max) getcwd (buf, max, 0) -# else -# define __getcwd getcwd -# endif -# else -# define __getcwd(buf, max) getwd (buf) -# endif -# define __readlink readlink -# define __set_errno(e) errno = (e) -# ifndef MAXSYMLINKS -# ifdef SYMLOOP_MAX -# define MAXSYMLINKS SYMLOOP_MAX -# else -# define MAXSYMLINKS 20 -# endif -# endif -#endif - -#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT -# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0 -#endif - -#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 - 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' - 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 - that cannot be resolved. If the path can be resolved, RESOLVED - holds the same value as the value returned. */ - -char * -__realpath (const char *name, char *resolved) -{ - char *rpath, *dest, *extra_buf = NULL; - const char *start, *end, *rpath_limit; - long int path_max; - int num_links = 0; - - if (name == NULL) - { - /* As per Single Unix Specification V2 we must return an error if - either parameter is a null pointer. We extend this to allow - the RESOLVED parameter to be NULL in case the we are expected to - allocate the room for the return value. */ - __set_errno (EINVAL); - return NULL; - } - - if (name[0] == '\0') - { - /* As per Single Unix Specification V2 we must return an error if - the name argument points to an empty string. */ - __set_errno (ENOENT); - return NULL; - } - -#ifdef PATH_MAX - path_max = PATH_MAX; -#else - path_max = pathconf (name, _PC_PATH_MAX); - if (path_max <= 0) - path_max = 8192; -#endif - - if (resolved == NULL) - { - rpath = malloc (path_max); - if (rpath == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'malloc-posix' gnulib module. */ - errno = ENOMEM; - return NULL; - } - } - else - rpath = resolved; - rpath_limit = rpath + path_max; - - if (name[0] != '/') - { - if (!__getcwd (rpath, path_max)) - { - rpath[0] = '\0'; - goto error; - } - dest = strchr (rpath, '\0'); - } - else - { - rpath[0] = '/'; - dest = rpath + 1; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT) - { - if (name[1] == '/' && name[2] != '/') - *dest++ = '/'; - *dest = '\0'; - } - } - - for (start = end = name; *start; start = end) - { -#ifdef _LIBC - struct stat64 st; -#else - struct stat st; -#endif - int n; - - /* Skip sequence of multiple path-separators. */ - while (*start == '/') - ++start; - - /* Find end of path component. */ - for (end = start; *end && *end != '/'; ++end) - /* Nothing. */; - - if (end - start == 0) - break; - else if (end - start == 1 && start[0] == '.') - /* nothing */; - else if (end - start == 2 && start[0] == '.' && start[1] == '.') - { - /* Back up to previous component, ignore if at root already. */ - if (dest > rpath + 1) - while ((--dest)[-1] != '/'); - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 - && *dest == '/' && dest[1] != '/') - dest++; - } - else - { - size_t new_size; - - if (dest[-1] != '/') - *dest++ = '/'; - - if (dest + (end - start) >= rpath_limit) - { - ptrdiff_t dest_offset = dest - rpath; - char *new_rpath; - - if (resolved) - { - __set_errno (ENAMETOOLONG); - if (dest > rpath + 1) - dest--; - *dest = '\0'; - goto error; - } - new_size = rpath_limit - rpath; - if (end - start + 1 > path_max) - new_size += end - start + 1; - else - new_size += path_max; - new_rpath = (char *) realloc (rpath, new_size); - if (new_rpath == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'realloc-posix' gnulib module. */ - errno = ENOMEM; - goto error; - } - rpath = new_rpath; - rpath_limit = rpath + new_size; - - dest = rpath + dest_offset; - } - -#ifdef _LIBC - dest = __mempcpy (dest, start, end - start); -#else - memcpy (dest, start, end - start); - dest += end - start; -#endif - *dest = '\0'; - -#ifdef _LIBC - if (__lxstat64 (_STAT_VER, rpath, &st) < 0) -#else - if (lstat (rpath, &st) < 0) -#endif - goto error; - - if (S_ISLNK (st.st_mode)) - { - char *buf; - size_t len; - - if (++num_links > MAXSYMLINKS) - { - __set_errno (ELOOP); - goto error; - } - - buf = malloca (path_max); - if (!buf) - { - errno = ENOMEM; - goto error; - } - - n = __readlink (rpath, buf, path_max - 1); - if (n < 0) - { - int saved_errno = errno; - freea (buf); - errno = saved_errno; - goto error; - } - buf[n] = '\0'; - - if (!extra_buf) - { - extra_buf = malloca (path_max); - if (!extra_buf) - { - freea (buf); - errno = ENOMEM; - goto error; - } - } - - len = strlen (end); - if ((long int) (n + len) >= path_max) - { - freea (buf); - __set_errno (ENAMETOOLONG); - goto error; - } - - /* Careful here, end may be a pointer into extra_buf... */ - memmove (&extra_buf[n], end, len + 1); - name = end = memcpy (extra_buf, buf, n); - - if (buf[0] == '/') - { - dest = rpath + 1; /* It's an absolute symlink */ - if (DOUBLE_SLASH_IS_DISTINCT_ROOT) - { - if (buf[1] == '/' && buf[2] != '/') - *dest++ = '/'; - *dest = '\0'; - } - } - else - { - /* Back up to previous component, ignore if at root - already: */ - if (dest > rpath + 1) - while ((--dest)[-1] != '/'); - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 - && *dest == '/' && dest[1] != '/') - dest++; - } - } - else if (!S_ISDIR (st.st_mode) && *end != '\0') - { - __set_errno (ENOTDIR); - goto error; - } - } - } - if (dest > rpath + 1 && dest[-1] == '/') - --dest; - if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 - && *dest == '/' && dest[1] != '/') - dest++; - *dest = '\0'; - - if (extra_buf) - freea (extra_buf); - - return rpath; - -error: - { - int saved_errno = errno; - if (extra_buf) - freea (extra_buf); - if (resolved == NULL) - free (rpath); - errno = saved_errno; - } - return NULL; -} -versioned_symbol (libc, __realpath, realpath, GLIBC_2_3); -#endif /* !FUNC_REALPATH_WORKS || defined _LIBC */ - - -#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3) -char * -attribute_compat_text_section -__old_realpath (const char *name, char *resolved) -{ - if (resolved == NULL) - { - __set_errno (EINVAL); - return NULL; - } - - return __realpath (name, resolved); -} -compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0); -#endif - - -char * -__canonicalize_file_name (const char *name) -{ - return __realpath (name, NULL); -} -weak_alias (__canonicalize_file_name, canonicalize_file_name) - -#else - -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; - -#endif diff --git a/gnulib/lib/config.charset b/gnulib/lib/config.charset deleted file mode 100644 index ea44c6c..0000000 --- a/gnulib/lib/config.charset +++ /dev/null @@ -1,684 +0,0 @@ -#! /bin/sh -# Output a system dependent table of character encoding aliases. -# -# 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 -# 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 . -# -# The table consists of lines of the form -# ALIAS CANONICAL -# -# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)". -# ALIAS is compared in a case sensitive way. -# -# CANONICAL is the GNU canonical name for this character encoding. -# It must be an encoding supported by libiconv. Support by GNU libc is -# also desirable. CANONICAL is case insensitive. Usually an upper case -# MIME charset name is preferred. -# The current list of GNU canonical charset names is as follows. -# -# name MIME? used by which systems -# (darwin = Mac OS X, woe32 = native Windows) -# -# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin cygwin -# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-3 Y glibc solaris cygwin -# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin -# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin -# ISO-8859-6 Y glibc aix hpux solaris cygwin -# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin cygwin -# ISO-8859-8 Y glibc aix hpux osf solaris cygwin -# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin cygwin -# ISO-8859-13 glibc netbsd openbsd darwin cygwin -# ISO-8859-14 glibc cygwin -# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin cygwin -# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin -# KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin -# KOI8-T glibc -# CP437 dos -# CP775 dos -# CP850 aix osf dos -# CP852 dos -# CP855 dos -# CP856 aix -# CP857 dos -# CP861 dos -# CP862 dos -# CP864 dos -# CP865 dos -# CP866 freebsd netbsd openbsd darwin dos -# CP869 dos -# CP874 woe32 dos -# CP922 aix -# CP932 aix cygwin woe32 dos -# CP943 aix -# CP949 osf darwin woe32 dos -# CP950 woe32 dos -# CP1046 aix -# CP1124 aix -# CP1125 dos -# CP1129 aix -# CP1131 darwin -# CP1250 woe32 -# CP1251 glibc solaris netbsd openbsd darwin cygwin woe32 -# CP1252 aix woe32 -# CP1253 woe32 -# CP1254 woe32 -# CP1255 glibc woe32 -# CP1256 woe32 -# CP1257 woe32 -# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin -# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin -# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin -# EUC-TW glibc aix hpux irix osf solaris netbsd -# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin -# BIG5-HKSCS glibc solaris darwin -# GBK glibc aix osf solaris darwin cygwin woe32 dos -# GB18030 glibc solaris netbsd darwin -# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin -# JOHAB glibc solaris woe32 -# TIS-620 glibc aix hpux osf solaris cygwin -# VISCII Y glibc -# TCVN5712-1 glibc -# ARMSCII-8 glibc darwin -# GEORGIAN-PS glibc cygwin -# PT154 glibc -# HP-ROMAN8 hpux -# HP-ARABIC8 hpux -# HP-GREEK8 hpux -# HP-HEBREW8 hpux -# HP-TURKISH8 hpux -# HP-KANA8 hpux -# DEC-KANJI osf -# DEC-HANYU osf -# UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin -# -# Note: Names which are not marked as being a MIME name should not be used in -# Internet protocols for information interchange (mail, news, etc.). -# -# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications -# must understand both names and treat them as equivalent. -# -# The first argument passed to this file is the canonical host specification, -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM - -host="$1" -os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'` -echo "# This file contains a table of character encoding aliases," -echo "# suitable for operating system '${os}'." -echo "# It was automatically generated from config.charset." -# List of references, updated during installation: -echo "# Packages using this file: " -case "$os" in - linux-gnulibc1*) - # Linux libc5 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - echo "POSIX ASCII" - for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \ - en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \ - en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \ - es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \ - et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \ - fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \ - it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \ - sv_FI sv_SE; do - echo "$l ISO-8859-1" - echo "$l.iso-8859-1 ISO-8859-1" - echo "$l.iso-8859-15 ISO-8859-15" - echo "$l.iso-8859-15@euro ISO-8859-15" - echo "$l@euro ISO-8859-15" - echo "$l.cp-437 CP437" - echo "$l.cp-850 CP850" - echo "$l.cp-1252 CP1252" - echo "$l.cp-1252@euro CP1252" - #echo "$l.atari-st ATARI-ST" # not a commonly used encoding - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \ - sl_SI sr sr_CS sr_YU; do - echo "$l ISO-8859-2" - echo "$l.iso-8859-2 ISO-8859-2" - echo "$l.cp-852 CP852" - echo "$l.cp-1250 CP1250" - echo "$l.utf-8 UTF-8" - done - for l in mk mk_MK ru ru_RU; do - echo "$l ISO-8859-5" - echo "$l.iso-8859-5 ISO-8859-5" - echo "$l.koi8-r KOI8-R" - echo "$l.cp-866 CP866" - echo "$l.cp-1251 CP1251" - echo "$l.utf-8 UTF-8" - done - for l in ar ar_SA; do - echo "$l ISO-8859-6" - echo "$l.iso-8859-6 ISO-8859-6" - echo "$l.cp-864 CP864" - #echo "$l.cp-868 CP868" # not a commonly used encoding - echo "$l.cp-1256 CP1256" - echo "$l.utf-8 UTF-8" - done - for l in el el_GR gr gr_GR; do - echo "$l ISO-8859-7" - echo "$l.iso-8859-7 ISO-8859-7" - echo "$l.cp-869 CP869" - echo "$l.cp-1253 CP1253" - echo "$l.cp-1253@euro CP1253" - echo "$l.utf-8 UTF-8" - echo "$l.utf-8@euro UTF-8" - done - for l in he he_IL iw iw_IL; do - echo "$l ISO-8859-8" - echo "$l.iso-8859-8 ISO-8859-8" - echo "$l.cp-862 CP862" - echo "$l.cp-1255 CP1255" - echo "$l.utf-8 UTF-8" - done - for l in tr tr_TR; do - echo "$l ISO-8859-9" - echo "$l.iso-8859-9 ISO-8859-9" - echo "$l.cp-857 CP857" - echo "$l.cp-1254 CP1254" - echo "$l.utf-8 UTF-8" - done - for l in lt lt_LT lv lv_LV; do - #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name - echo "$l ISO-8859-13" - done - for l in ru_UA uk uk_UA; do - echo "$l KOI8-U" - done - for l in zh zh_CN; do - #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name - echo "$l GB2312" - done - for l in ja ja_JP ja_JP.EUC; do - echo "$l EUC-JP" - done - for l in ko ko_KR; do - echo "$l EUC-KR" - done - for l in th th_TH; do - echo "$l TIS-620" - done - for l in fa fa_IR; do - #echo "$l ISIRI-3342" # a broken encoding - echo "$l.utf-8 UTF-8" - done - ;; - linux* | *-gnu*) - # With glibc-2.1 or newer, we don't need any canonicalization, - # because glibc has iconv and both glibc and libiconv support all - # GNU canonical names directly. Therefore, the Makefile does not - # need to install the alias file at all. - # The following applies only to glibc-2.0.x and older libcs. - echo "ISO_646.IRV:1983 ASCII" - ;; - aix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "IBM-850 CP850" - echo "IBM-856 CP856" - echo "IBM-921 ISO-8859-13" - echo "IBM-922 CP922" - echo "IBM-932 CP932" - echo "IBM-943 CP943" - echo "IBM-1046 CP1046" - echo "IBM-1124 CP1124" - echo "IBM-1129 CP1129" - echo "IBM-1252 CP1252" - echo "IBM-eucCN GB2312" - echo "IBM-eucJP EUC-JP" - echo "IBM-eucKR EUC-KR" - echo "IBM-eucTW EUC-TW" - echo "big5 BIG5" - echo "GBK GBK" - echo "TIS-620 TIS-620" - echo "UTF-8 UTF-8" - ;; - hpux*) - echo "iso88591 ISO-8859-1" - echo "iso88592 ISO-8859-2" - echo "iso88595 ISO-8859-5" - echo "iso88596 ISO-8859-6" - echo "iso88597 ISO-8859-7" - echo "iso88598 ISO-8859-8" - echo "iso88599 ISO-8859-9" - echo "iso885915 ISO-8859-15" - echo "roman8 HP-ROMAN8" - echo "arabic8 HP-ARABIC8" - echo "greek8 HP-GREEK8" - echo "hebrew8 HP-HEBREW8" - echo "turkish8 HP-TURKISH8" - echo "kana8 HP-KANA8" - echo "tis620 TIS-620" - echo "big5 BIG5" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "hp15CN GB2312" - #echo "ccdc ?" # what is this? - echo "SJIS SHIFT_JIS" - echo "utf8 UTF-8" - ;; - irix*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - ;; - osf*) - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "cp850 CP850" - echo "big5 BIG5" - echo "dechanyu DEC-HANYU" - echo "dechanzi GB2312" - echo "deckanji DEC-KANJI" - echo "deckorean EUC-KR" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "GBK GBK" - echo "KSC5601 CP949" - echo "sdeckanji EUC-JP" - echo "SJIS SHIFT_JIS" - echo "TACTIS TIS-620" - echo "UTF-8 UTF-8" - ;; - solaris*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-3 ISO-8859-3" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-6 ISO-8859-6" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-8 ISO-8859-8" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-15 ISO-8859-15" - echo "koi8-r KOI8-R" - echo "ansi-1251 CP1251" - echo "BIG5 BIG5" - echo "Big5-HKSCS BIG5-HKSCS" - echo "gb2312 GB2312" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "cns11643 EUC-TW" - echo "5601 EUC-KR" - echo "ko_KR.johap92 JOHAB" - echo "eucJP EUC-JP" - echo "PCK SHIFT_JIS" - echo "TIS620.2533 TIS-620" - #echo "sun_eu_greek ?" # what is this? - echo "UTF-8 UTF-8" - ;; - freebsd* | os2*) - # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just - # reuse FreeBSD's locale data for OS/2. - echo "C ASCII" - echo "US-ASCII ASCII" - for l in la_LN lt_LN; do - echo "$l.ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \ - lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do - echo "$l.ISO_8859-1 ISO-8859-1" - echo "$l.DIS_8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do - echo "$l.ISO_8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO_8859-4 ISO-8859-4" - done - for l in ru_RU ru_SU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO_8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ja_JP.Shift_JIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - netbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "eucCN GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "eucTW EUC-TW" - echo "BIG5 BIG5" - echo "SJIS SHIFT_JIS" - ;; - openbsd*) - echo "646 ASCII" - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - ;; - darwin[56]*) - # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "C ASCII" - for l in en_AU en_CA en_GB en_US la_LN; do - echo "$l.US-ASCII ASCII" - done - for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \ - fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \ - nl_NL no_NO pt_PT sv_SE; do - echo "$l ISO-8859-1" - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in la_LN; do - echo "$l.ISO8859-1 ISO-8859-1" - echo "$l.ISO8859-15 ISO-8859-15" - done - for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do - echo "$l.ISO8859-2 ISO-8859-2" - done - for l in la_LN lt_LT; do - echo "$l.ISO8859-4 ISO-8859-4" - done - for l in ru_RU; do - echo "$l.KOI8-R KOI8-R" - echo "$l.ISO8859-5 ISO-8859-5" - echo "$l.CP866 CP866" - done - for l in bg_BG; do - echo "$l.CP1251 CP1251" - done - echo "uk_UA.KOI8-U KOI8-U" - echo "zh_TW.BIG5 BIG5" - echo "zh_TW.Big5 BIG5" - echo "zh_CN.EUC GB2312" - echo "ja_JP.EUC EUC-JP" - echo "ja_JP.SJIS SHIFT_JIS" - echo "ko_KR.EUC EUC-KR" - ;; - darwin*) - # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is - # useless: - # - It returns the empty string when LANG is set to a locale of the - # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8 - # LC_CTYPE file. - # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by - # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case. - # - The documentation says: - # "... all code that calls BSD system routines should ensure - # that the const *char parameters of these routines are in UTF-8 - # encoding. All BSD system functions expect their string - # parameters to be in UTF-8 encoding and nothing else." - # It also says - # "An additional caveat is that string parameters for files, - # paths, and other file-system entities must be in canonical - # UTF-8. In a canonical UTF-8 Unicode string, all decomposable - # characters are decomposed ..." - # but this is not true: You can pass non-decomposed UTF-8 strings - # to file system functions, and it is the OS which will convert - # them to decomposed UTF-8 before accessing the file system. - # - The Apple Terminal application displays UTF-8 by default. - # - However, other applications are free to use different encodings: - # - xterm uses ISO-8859-1 by default. - # - TextEdit uses MacRoman by default. - # We prefer UTF-8 over decomposed UTF-8-MAC because one should - # minimize the use of decomposed Unicode. Unfortunately, through the - # Darwin file system, decomposed UTF-8 strings are leaked into user - # space nevertheless. - # Then there are also the locales with encodings other than US-ASCII - # and UTF-8. These locales can be occasionally useful to users (e.g. - # when grepping through ISO-8859-1 encoded text files), when all their - # file names are in US-ASCII. - echo "ISO8859-1 ISO-8859-1" - echo "ISO8859-2 ISO-8859-2" - echo "ISO8859-4 ISO-8859-4" - echo "ISO8859-5 ISO-8859-5" - echo "ISO8859-7 ISO-8859-7" - echo "ISO8859-9 ISO-8859-9" - echo "ISO8859-13 ISO-8859-13" - echo "ISO8859-15 ISO-8859-15" - echo "KOI8-R KOI8-R" - echo "KOI8-U KOI8-U" - echo "CP866 CP866" - echo "CP949 CP949" - echo "CP1131 CP1131" - echo "CP1251 CP1251" - echo "eucCN GB2312" - echo "GB2312 GB2312" - echo "eucJP EUC-JP" - echo "eucKR EUC-KR" - echo "Big5 BIG5" - echo "Big5HKSCS BIG5-HKSCS" - echo "GBK GBK" - echo "GB18030 GB18030" - echo "SJIS SHIFT_JIS" - echo "ARMSCII-8 ARMSCII-8" - echo "PT154 PT154" - #echo "ISCII-DEV ?" - echo "* UTF-8" - ;; - beos* | haiku*) - # BeOS and Haiku have a single locale, and it has UTF-8 encoding. - echo "* UTF-8" - ;; - msdosdjgpp*) - # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore - # localcharset.c falls back to using the full locale name - # from the environment variables. - echo "#" - echo "# The encodings given here may not all be correct." - echo "# If you find that the encoding given for your language and" - echo "# country is not the one your DOS machine actually uses, just" - echo "# correct it in this file, and send a mail to" - echo "# Juan Manuel Guerrero " - echo "# and Bruno Haible ." - echo "#" - echo "C ASCII" - # ISO-8859-1 languages - echo "ca CP850" - echo "ca_ES CP850" - echo "da CP865" # not CP850 ?? - echo "da_DK CP865" # not CP850 ?? - echo "de CP850" - echo "de_AT CP850" - echo "de_CH CP850" - echo "de_DE CP850" - echo "en CP850" - echo "en_AU CP850" # not CP437 ?? - echo "en_CA CP850" - echo "en_GB CP850" - echo "en_NZ CP437" - echo "en_US CP437" - echo "en_ZA CP850" # not CP437 ?? - echo "es CP850" - echo "es_AR CP850" - echo "es_BO CP850" - echo "es_CL CP850" - echo "es_CO CP850" - echo "es_CR CP850" - echo "es_CU CP850" - echo "es_DO CP850" - echo "es_EC CP850" - echo "es_ES CP850" - echo "es_GT CP850" - echo "es_HN CP850" - echo "es_MX CP850" - echo "es_NI CP850" - echo "es_PA CP850" - echo "es_PY CP850" - echo "es_PE CP850" - echo "es_SV CP850" - echo "es_UY CP850" - echo "es_VE CP850" - echo "et CP850" - echo "et_EE CP850" - echo "eu CP850" - echo "eu_ES CP850" - echo "fi CP850" - echo "fi_FI CP850" - echo "fr CP850" - echo "fr_BE CP850" - echo "fr_CA CP850" - echo "fr_CH CP850" - echo "fr_FR CP850" - echo "ga CP850" - echo "ga_IE CP850" - echo "gd CP850" - echo "gd_GB CP850" - echo "gl CP850" - echo "gl_ES CP850" - echo "id CP850" # not CP437 ?? - echo "id_ID CP850" # not CP437 ?? - echo "is CP861" # not CP850 ?? - echo "is_IS CP861" # not CP850 ?? - echo "it CP850" - echo "it_CH CP850" - echo "it_IT CP850" - echo "lt CP775" - echo "lt_LT CP775" - echo "lv CP775" - echo "lv_LV CP775" - echo "nb CP865" # not CP850 ?? - echo "nb_NO CP865" # not CP850 ?? - echo "nl CP850" - echo "nl_BE CP850" - echo "nl_NL CP850" - echo "nn CP865" # not CP850 ?? - echo "nn_NO CP865" # not CP850 ?? - echo "no CP865" # not CP850 ?? - echo "no_NO CP865" # not CP850 ?? - echo "pt CP850" - echo "pt_BR CP850" - echo "pt_PT CP850" - echo "sv CP850" - echo "sv_SE CP850" - # ISO-8859-2 languages - echo "cs CP852" - echo "cs_CZ CP852" - echo "hr CP852" - echo "hr_HR CP852" - echo "hu CP852" - echo "hu_HU CP852" - echo "pl CP852" - echo "pl_PL CP852" - echo "ro CP852" - echo "ro_RO CP852" - echo "sk CP852" - echo "sk_SK CP852" - echo "sl CP852" - echo "sl_SI CP852" - echo "sq CP852" - echo "sq_AL CP852" - echo "sr CP852" # CP852 or CP866 or CP855 ?? - echo "sr_CS CP852" # CP852 or CP866 or CP855 ?? - echo "sr_YU CP852" # CP852 or CP866 or CP855 ?? - # ISO-8859-3 languages - echo "mt CP850" - echo "mt_MT CP850" - # ISO-8859-5 languages - echo "be CP866" - echo "be_BE CP866" - echo "bg CP866" # not CP855 ?? - echo "bg_BG CP866" # not CP855 ?? - echo "mk CP866" # not CP855 ?? - echo "mk_MK CP866" # not CP855 ?? - echo "ru CP866" - echo "ru_RU CP866" - echo "uk CP1125" - echo "uk_UA CP1125" - # ISO-8859-6 languages - echo "ar CP864" - echo "ar_AE CP864" - echo "ar_DZ CP864" - echo "ar_EG CP864" - echo "ar_IQ CP864" - echo "ar_IR CP864" - echo "ar_JO CP864" - echo "ar_KW CP864" - echo "ar_MA CP864" - echo "ar_OM CP864" - echo "ar_QA CP864" - echo "ar_SA CP864" - echo "ar_SY CP864" - # ISO-8859-7 languages - echo "el CP869" - echo "el_GR CP869" - # ISO-8859-8 languages - echo "he CP862" - echo "he_IL CP862" - # ISO-8859-9 languages - echo "tr CP857" - echo "tr_TR CP857" - # Japanese - echo "ja CP932" - echo "ja_JP CP932" - # Chinese - echo "zh_CN GBK" - echo "zh_TW CP950" # not CP938 ?? - # Korean - echo "kr CP949" # not CP934 ?? - echo "kr_KR CP949" # not CP934 ?? - # Thai - echo "th CP874" - echo "th_TH CP874" - # Other - echo "eo CP850" - echo "eo_EO CP850" - ;; -esac diff --git a/gnulib/lib/ctype.in.h b/gnulib/lib/ctype.in.h deleted file mode 100644 index 86f4edb..0000000 --- a/gnulib/lib/ctype.in.h +++ /dev/null @@ -1,57 +0,0 @@ -/* A substitute for ISO C99 , for platforms on which it is incomplete. - - 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 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 Bruno Haible. */ - -/* - * ISO C 99 for platforms on which it is incomplete. - * - */ - -#ifndef _@GUARD_PREFIX@_CTYPE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Include the original . */ -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_CTYPE_H@ - -#ifndef _@GUARD_PREFIX@_CTYPE_H -#define _@GUARD_PREFIX@_CTYPE_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Return non-zero if c is a blank, i.e. a space or tab character. */ -#if @GNULIB_ISBLANK@ -# if !@HAVE_ISBLANK@ -_GL_EXTERN_C int isblank (int c); -# endif -#elif defined GNULIB_POSIXCHECK -# undef isblank -# if HAVE_RAW_DECL_ISBLANK -_GL_WARN_ON_USE (isblank, "isblank is unportable - " - "use gnulib module isblank for portability"); -# endif -#endif - -#endif /* _@GUARD_PREFIX@_CTYPE_H */ -#endif /* _@GUARD_PREFIX@_CTYPE_H */ diff --git a/gnulib/lib/dosname.h b/gnulib/lib/dosname.h deleted file mode 100644 index 08c0c68..0000000 --- a/gnulib/lib/dosname.h +++ /dev/null @@ -1,53 +0,0 @@ -/* File names on MS-DOS/Windows systems. - - Copyright (C) 2000-2001, 2004-2006, 2009-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 . - - From Paul Eggert and Jim Meyering. */ - -#ifndef _DOSNAME_H -#define _DOSNAME_H - -#if (defined _WIN32 || defined __WIN32__ || \ - defined __MSDOS__ || defined __CYGWIN__ || \ - defined __EMX__ || defined __DJGPP__) - /* This internal macro assumes ASCII, but all hosts that support drive - letters use ASCII. */ -# define _IS_DRIVE_LETTER(C) (((unsigned int) (C) | ('a' - 'A')) - 'a' \ - <= 'z' - 'a') -# define FILE_SYSTEM_PREFIX_LEN(Filename) \ - (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0) -# ifndef __CYGWIN__ -# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 1 -# endif -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#else -# define FILE_SYSTEM_PREFIX_LEN(Filename) 0 -# define ISSLASH(C) ((C) == '/') -#endif - -#ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE -# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0 -#endif - -#if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE -# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)]) -# else -# define IS_ABSOLUTE_FILE_NAME(F) \ - (ISSLASH ((F)[0]) || FILE_SYSTEM_PREFIX_LEN (F) != 0) -#endif -#define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F)) - -#endif /* DOSNAME_H_ */ diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h deleted file mode 100644 index a7df255..0000000 --- a/gnulib/lib/errno.in.h +++ /dev/null @@ -1,274 +0,0 @@ -/* A POSIX-like . - - 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, or (at your option) - any later version. - - This program is distributed in the hope that 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 . */ - -#ifndef _@GUARD_PREFIX@_ERRNO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_ERRNO_H@ - -#ifndef _@GUARD_PREFIX@_ERRNO_H -#define _@GUARD_PREFIX@_ERRNO_H - - -/* On native Windows platforms, many macros are not defined. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* These are the same values as defined by MSVC 10, for interoperability. */ - -# ifndef ENOMSG -# define ENOMSG 122 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 111 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 121 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 134 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 104 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 132 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 129 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ENETRESET -# define ENETRESET 117 -# define GNULIB_defined_ENETRESET 1 -# endif - -# ifndef ECONNABORTED -# define ECONNABORTED 106 -# define GNULIB_defined_ECONNABORTED 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 105 -# define GNULIB_defined_ECANCELED 1 -# endif - -# ifndef EOWNERDEAD -# define EOWNERDEAD 133 -# define GNULIB_defined_EOWNERDEAD 1 -# endif - -# ifndef ENOTRECOVERABLE -# define ENOTRECOVERABLE 127 -# define GNULIB_defined_ENOTRECOVERABLE 1 -# endif - -# ifndef EINPROGRESS -# define EINPROGRESS 112 -# define EALREADY 103 -# define ENOTSOCK 128 -# define EDESTADDRREQ 109 -# define EMSGSIZE 115 -# define EPROTOTYPE 136 -# define ENOPROTOOPT 123 -# define EPROTONOSUPPORT 135 -# define EOPNOTSUPP 130 -# define EAFNOSUPPORT 102 -# define EADDRINUSE 100 -# define EADDRNOTAVAIL 101 -# define ENETDOWN 116 -# define ENETUNREACH 118 -# define ECONNRESET 108 -# define ENOBUFS 119 -# define EISCONN 113 -# define ENOTCONN 126 -# define ETIMEDOUT 138 -# define ECONNREFUSED 107 -# define ELOOP 114 -# define EHOSTUNREACH 110 -# define EWOULDBLOCK 140 -# define GNULIB_defined_ESOCK 1 -# endif - -# ifndef ETXTBSY -# define ETXTBSY 139 -# define ENODATA 120 /* not required by POSIX */ -# define ENOSR 124 /* not required by POSIX */ -# define ENOSTR 125 /* not required by POSIX */ -# define ETIME 137 /* not required by POSIX */ -# define EOTHER 131 /* not required by POSIX */ -# define GNULIB_defined_ESTREAMS 1 -# endif - -/* These are intentionally the same values as the WSA* error numbers, defined - in . */ -# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */ -# define EPFNOSUPPORT 10046 /* not required by POSIX */ -# define ESHUTDOWN 10058 /* not required by POSIX */ -# define ETOOMANYREFS 10059 /* not required by POSIX */ -# define EHOSTDOWN 10064 /* not required by POSIX */ -# define EPROCLIM 10067 /* not required by POSIX */ -# define EUSERS 10068 /* not required by POSIX */ -# define EDQUOT 10069 -# define ESTALE 10070 -# define EREMOTE 10071 /* not required by POSIX */ -# define GNULIB_defined_EWINSOCK 1 - -# endif - - -/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros - EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */ -# if @EMULTIHOP_HIDDEN@ -# define EMULTIHOP @EMULTIHOP_VALUE@ -# define GNULIB_defined_EMULTIHOP 1 -# endif -# if @ENOLINK_HIDDEN@ -# define ENOLINK @ENOLINK_VALUE@ -# define GNULIB_defined_ENOLINK 1 -# endif -# if @EOVERFLOW_HIDDEN@ -# define EOVERFLOW @EOVERFLOW_VALUE@ -# define GNULIB_defined_EOVERFLOW 1 -# endif - - -/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, - EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. - Likewise, on NonStop Kernel, EDQUOT is not defined. - Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, - HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. - - Note: When one of these systems defines some of these macros some day, - binaries will have to be recompiled so that they recognizes the new - errno values from the system. */ - -# ifndef ENOMSG -# define ENOMSG 2000 -# define GNULIB_defined_ENOMSG 1 -# endif - -# ifndef EIDRM -# define EIDRM 2001 -# define GNULIB_defined_EIDRM 1 -# endif - -# ifndef ENOLINK -# define ENOLINK 2002 -# define GNULIB_defined_ENOLINK 1 -# endif - -# ifndef EPROTO -# define EPROTO 2003 -# define GNULIB_defined_EPROTO 1 -# endif - -# ifndef EMULTIHOP -# define EMULTIHOP 2004 -# define GNULIB_defined_EMULTIHOP 1 -# endif - -# ifndef EBADMSG -# define EBADMSG 2005 -# define GNULIB_defined_EBADMSG 1 -# endif - -# ifndef EOVERFLOW -# define EOVERFLOW 2006 -# define GNULIB_defined_EOVERFLOW 1 -# endif - -# ifndef ENOTSUP -# define ENOTSUP 2007 -# define GNULIB_defined_ENOTSUP 1 -# endif - -# ifndef ENETRESET -# define ENETRESET 2011 -# define GNULIB_defined_ENETRESET 1 -# endif - -# ifndef ECONNABORTED -# define ECONNABORTED 2012 -# define GNULIB_defined_ECONNABORTED 1 -# endif - -# ifndef ESTALE -# define ESTALE 2009 -# define GNULIB_defined_ESTALE 1 -# endif - -# ifndef EDQUOT -# define EDQUOT 2010 -# define GNULIB_defined_EDQUOT 1 -# endif - -# ifndef ECANCELED -# define ECANCELED 2008 -# define GNULIB_defined_ECANCELED 1 -# endif - -/* On many platforms, the macros EOWNERDEAD and ENOTRECOVERABLE are not - defined. */ - -# ifndef EOWNERDEAD -# if defined __sun - /* Use the same values as defined for Solaris >= 8, for - interoperability. */ -# define EOWNERDEAD 58 -# define ENOTRECOVERABLE 59 -# elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* We have a conflict here: pthreads-win32 defines these values - differently than MSVC 10. It's hairy to decide which one to use. */ -# if defined __MINGW32__ && !defined USE_WINDOWS_THREADS - /* Use the same values as defined by pthreads-win32, for - interoperability. */ -# define EOWNERDEAD 43 -# define ENOTRECOVERABLE 44 -# else - /* Use the same values as defined by MSVC 10, for - interoperability. */ -# define EOWNERDEAD 133 -# define ENOTRECOVERABLE 127 -# endif -# else -# define EOWNERDEAD 2013 -# define ENOTRECOVERABLE 2014 -# endif -# define GNULIB_defined_EOWNERDEAD 1 -# define GNULIB_defined_ENOTRECOVERABLE 1 -# endif - -#endif /* _@GUARD_PREFIX@_ERRNO_H */ -#endif /* _@GUARD_PREFIX@_ERRNO_H */ diff --git a/gnulib/lib/fcntl.in.h b/gnulib/lib/fcntl.in.h deleted file mode 100644 index 14e5780..0000000 --- a/gnulib/lib/fcntl.in.h +++ /dev/null @@ -1,335 +0,0 @@ -/* Like , but with non-working flags defined to 0. - - 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 - 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 . */ - -/* written by Paul Eggert */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_fcntl_h -/* Special invocation convention. */ - -/* Needed before . - May also define off_t to a 64-bit type on native Windows. */ -#include -/* On some systems other than glibc, is a prerequisite of - . On glibc systems, we would like to avoid namespace pollution. - But on glibc systems, includes inside an - extern "C" { ... } block, which leads to errors in C++ mode with the - overridden from gnulib. These errors are known to be gone - with g++ version >= 4.3. */ -#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) -# include -#endif -#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_FCNTL_H - -/* Needed before . - May also define off_t to a 64-bit type on native Windows. */ -#include -/* On some systems other than glibc, is a prerequisite of - . On glibc systems, we would like to avoid namespace pollution. - But on glibc systems, includes inside an - extern "C" { ... } block, which leads to errors in C++ mode with the - overridden from gnulib. These errors are known to be gone - with g++ version >= 4.3. */ -#if !(defined __GLIBC__ || defined __UCLIBC__) || (defined __cplusplus && defined GNULIB_NAMESPACE && !(__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))) -# include -#endif -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_FCNTL_H@ - -#ifndef _@GUARD_PREFIX@_FCNTL_H -#define _@GUARD_PREFIX@_FCNTL_H - -#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */ -# include -#endif - -/* Native Windows platforms declare open(), creat() in . */ -#if (@GNULIB_OPEN@ || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Declare overridden functions. */ - -#if @GNULIB_FCNTL@ -# if @REPLACE_FCNTL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fcntl -# define fcntl rpl_fcntl -# endif -_GL_FUNCDECL_RPL (fcntl, int, (int fd, int action, ...)); -_GL_CXXALIAS_RPL (fcntl, int, (int fd, int action, ...)); -# else -# if !@HAVE_FCNTL@ -_GL_FUNCDECL_SYS (fcntl, int, (int fd, int action, ...)); -# endif -_GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...)); -# endif -_GL_CXXALIASWARN (fcntl); -#elif defined GNULIB_POSIXCHECK -# undef fcntl -# if HAVE_RAW_DECL_FCNTL -_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - " - "use gnulib module fcntl for portability"); -# endif -#endif - -#if @GNULIB_OPEN@ -# if @REPLACE_OPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef open -# define open rpl_open -# endif -_GL_FUNCDECL_RPL (open, int, (const char *filename, int flags, ...) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (open, int, (const char *filename, int flags, ...)); -# else -_GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...)); -# endif -/* On HP-UX 11, in C++ mode, open() is defined as an inline function with a - default argument. _GL_CXXALIASWARN does not work in this case. */ -# if !defined __hpux -_GL_CXXALIASWARN (open); -# endif -#elif defined GNULIB_POSIXCHECK -# undef open -/* Assume open is always declared. */ -_GL_WARN_ON_USE (open, "open is not always POSIX compliant - " - "use gnulib module open for portability"); -#endif - -#if @GNULIB_OPENAT@ -# if @REPLACE_OPENAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef openat -# define openat rpl_openat -# endif -_GL_FUNCDECL_RPL (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...)); -# else -# if !@HAVE_OPENAT@ -_GL_FUNCDECL_SYS (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (openat, int, - (int fd, char const *file, int flags, /* mode_t mode */ ...)); -# endif -_GL_CXXALIASWARN (openat); -#elif defined GNULIB_POSIXCHECK -# undef openat -# if HAVE_RAW_DECL_OPENAT -_GL_WARN_ON_USE (openat, "openat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -/* Fix up the FD_* macros, only known to be missing on mingw. */ - -#ifndef FD_CLOEXEC -# define FD_CLOEXEC 1 -#endif - -/* Fix up the supported F_* macros. Intentionally leave other F_* - macros undefined. Only known to be missing on mingw. */ - -#ifndef F_DUPFD_CLOEXEC -# define F_DUPFD_CLOEXEC 0x40000000 -/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */ -# define GNULIB_defined_F_DUPFD_CLOEXEC 1 -#else -# define GNULIB_defined_F_DUPFD_CLOEXEC 0 -#endif - -#ifndef F_DUPFD -# define F_DUPFD 1 -#endif - -#ifndef F_GETFD -# define F_GETFD 2 -#endif - -/* Fix up the O_* macros. */ - -#if !defined O_DIRECT && defined O_DIRECTIO -/* Tru64 spells it 'O_DIRECTIO'. */ -# define O_DIRECT O_DIRECTIO -#endif - -#if !defined O_CLOEXEC && defined O_NOINHERIT -/* Mingw spells it 'O_NOINHERIT'. */ -# define O_CLOEXEC O_NOINHERIT -#endif - -#ifndef O_CLOEXEC -# define O_CLOEXEC 0 -#endif - -#ifndef O_DIRECT -# define O_DIRECT 0 -#endif - -#ifndef O_DIRECTORY -# define O_DIRECTORY 0 -#endif - -#ifndef O_DSYNC -# define O_DSYNC 0 -#endif - -#ifndef O_EXEC -# define O_EXEC O_RDONLY /* This is often close enough in older systems. */ -#endif - -#ifndef O_NDELAY -# define O_NDELAY 0 -#endif - -#ifndef O_NOATIME -# define O_NOATIME 0 -#endif - -#ifndef O_NONBLOCK -# define O_NONBLOCK O_NDELAY -#endif - -/* If the gnulib module 'nonblocking' is in use, guarantee a working non-zero - value of O_NONBLOCK. Otherwise, O_NONBLOCK is defined (above) to O_NDELAY - or to 0 as fallback. */ -#if @GNULIB_NONBLOCKING@ -# if O_NONBLOCK -# define GNULIB_defined_O_NONBLOCK 0 -# else -# define GNULIB_defined_O_NONBLOCK 1 -# undef O_NONBLOCK -# define O_NONBLOCK 0x40000000 -# endif -#endif - -#ifndef O_NOCTTY -# define O_NOCTTY 0 -#endif - -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - -#ifndef O_NOLINKS -# define O_NOLINKS 0 -#endif - -#ifndef O_RSYNC -# define O_RSYNC 0 -#endif - -#ifndef O_SEARCH -# define O_SEARCH O_RDONLY /* This is often close enough in older systems. */ -#endif - -#ifndef O_SYNC -# define O_SYNC 0 -#endif - -#ifndef O_TTY_INIT -# define O_TTY_INIT 0 -#endif - -#if O_ACCMODE != (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) -# undef O_ACCMODE -# define O_ACCMODE (O_RDONLY | O_WRONLY | O_RDWR | O_EXEC | O_SEARCH) -#endif - -/* For systems that distinguish between text and binary I/O. - O_BINARY is usually declared in fcntl.h */ -#if !defined O_BINARY && defined _O_BINARY - /* For MSC-compatible compilers. */ -# define O_BINARY _O_BINARY -# define O_TEXT _O_TEXT -#endif - -#if defined __BEOS__ || defined __HAIKU__ - /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */ -# undef O_BINARY -# undef O_TEXT -#endif - -#ifndef O_BINARY -# define O_BINARY 0 -# define O_TEXT 0 -#endif - -/* Fix up the AT_* macros. */ - -/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its - value exceeds INT_MAX, so its use as an int doesn't conform to the - C standard, and GCC and Sun C complain in some cases. If the bug - is present, undef AT_FDCWD here, so it can be redefined below. */ -#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553 -# undef AT_FDCWD -#endif - -/* Use the same bit pattern as Solaris 9, but with the proper - signedness. The bit pattern is important, in case this actually is - Solaris with the above workaround. */ -#ifndef AT_FDCWD -# define AT_FDCWD (-3041965) -#endif - -/* Use the same values as Solaris 9. This shouldn't matter, but - there's no real reason to differ. */ -#ifndef AT_SYMLINK_NOFOLLOW -# define AT_SYMLINK_NOFOLLOW 4096 -#endif - -#ifndef AT_REMOVEDIR -# define AT_REMOVEDIR 1 -#endif - -/* Solaris 9 lacks these two, so just pick unique values. */ -#ifndef AT_SYMLINK_FOLLOW -# define AT_SYMLINK_FOLLOW 2 -#endif - -#ifndef AT_EACCESS -# define AT_EACCESS 4 -#endif - - -#endif /* _@GUARD_PREFIX@_FCNTL_H */ -#endif /* _@GUARD_PREFIX@_FCNTL_H */ -#endif diff --git a/gnulib/lib/float+.h b/gnulib/lib/float+.h deleted file mode 100644 index 6933c4a..0000000 --- a/gnulib/lib/float+.h +++ /dev/null @@ -1,147 +0,0 @@ -/* Supplemental information about the floating-point formats. - 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 - 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 . */ - -#ifndef _FLOATPLUS_H -#define _FLOATPLUS_H - -#include -#include - -/* Number of bits in the mantissa of a floating-point number, including the - "hidden bit". */ -#if FLT_RADIX == 2 -# define FLT_MANT_BIT FLT_MANT_DIG -# define DBL_MANT_BIT DBL_MANT_DIG -# define LDBL_MANT_BIT LDBL_MANT_DIG -#elif FLT_RADIX == 4 -# define FLT_MANT_BIT (FLT_MANT_DIG * 2) -# define DBL_MANT_BIT (DBL_MANT_DIG * 2) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2) -#elif FLT_RADIX == 16 -# define FLT_MANT_BIT (FLT_MANT_DIG * 4) -# define DBL_MANT_BIT (DBL_MANT_DIG * 4) -# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4) -#endif - -/* Bit mask that can be used to mask the exponent, as an unsigned number. */ -#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7) -#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) -#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7) - -/* Number of bits used for the exponent of a floating-point number, including - the exponent's sign. */ -#define FLT_EXP_BIT \ - (FLT_EXP_MASK < 0x100 ? 8 : \ - FLT_EXP_MASK < 0x200 ? 9 : \ - FLT_EXP_MASK < 0x400 ? 10 : \ - FLT_EXP_MASK < 0x800 ? 11 : \ - FLT_EXP_MASK < 0x1000 ? 12 : \ - FLT_EXP_MASK < 0x2000 ? 13 : \ - FLT_EXP_MASK < 0x4000 ? 14 : \ - FLT_EXP_MASK < 0x8000 ? 15 : \ - FLT_EXP_MASK < 0x10000 ? 16 : \ - FLT_EXP_MASK < 0x20000 ? 17 : \ - FLT_EXP_MASK < 0x40000 ? 18 : \ - FLT_EXP_MASK < 0x80000 ? 19 : \ - FLT_EXP_MASK < 0x100000 ? 20 : \ - FLT_EXP_MASK < 0x200000 ? 21 : \ - FLT_EXP_MASK < 0x400000 ? 22 : \ - FLT_EXP_MASK < 0x800000 ? 23 : \ - FLT_EXP_MASK < 0x1000000 ? 24 : \ - FLT_EXP_MASK < 0x2000000 ? 25 : \ - FLT_EXP_MASK < 0x4000000 ? 26 : \ - FLT_EXP_MASK < 0x8000000 ? 27 : \ - FLT_EXP_MASK < 0x10000000 ? 28 : \ - FLT_EXP_MASK < 0x20000000 ? 29 : \ - FLT_EXP_MASK < 0x40000000 ? 30 : \ - FLT_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define DBL_EXP_BIT \ - (DBL_EXP_MASK < 0x100 ? 8 : \ - DBL_EXP_MASK < 0x200 ? 9 : \ - DBL_EXP_MASK < 0x400 ? 10 : \ - DBL_EXP_MASK < 0x800 ? 11 : \ - DBL_EXP_MASK < 0x1000 ? 12 : \ - DBL_EXP_MASK < 0x2000 ? 13 : \ - DBL_EXP_MASK < 0x4000 ? 14 : \ - DBL_EXP_MASK < 0x8000 ? 15 : \ - DBL_EXP_MASK < 0x10000 ? 16 : \ - DBL_EXP_MASK < 0x20000 ? 17 : \ - DBL_EXP_MASK < 0x40000 ? 18 : \ - DBL_EXP_MASK < 0x80000 ? 19 : \ - DBL_EXP_MASK < 0x100000 ? 20 : \ - DBL_EXP_MASK < 0x200000 ? 21 : \ - DBL_EXP_MASK < 0x400000 ? 22 : \ - DBL_EXP_MASK < 0x800000 ? 23 : \ - DBL_EXP_MASK < 0x1000000 ? 24 : \ - DBL_EXP_MASK < 0x2000000 ? 25 : \ - DBL_EXP_MASK < 0x4000000 ? 26 : \ - DBL_EXP_MASK < 0x8000000 ? 27 : \ - DBL_EXP_MASK < 0x10000000 ? 28 : \ - DBL_EXP_MASK < 0x20000000 ? 29 : \ - DBL_EXP_MASK < 0x40000000 ? 30 : \ - DBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) -#define LDBL_EXP_BIT \ - (LDBL_EXP_MASK < 0x100 ? 8 : \ - LDBL_EXP_MASK < 0x200 ? 9 : \ - LDBL_EXP_MASK < 0x400 ? 10 : \ - LDBL_EXP_MASK < 0x800 ? 11 : \ - LDBL_EXP_MASK < 0x1000 ? 12 : \ - LDBL_EXP_MASK < 0x2000 ? 13 : \ - LDBL_EXP_MASK < 0x4000 ? 14 : \ - LDBL_EXP_MASK < 0x8000 ? 15 : \ - LDBL_EXP_MASK < 0x10000 ? 16 : \ - LDBL_EXP_MASK < 0x20000 ? 17 : \ - LDBL_EXP_MASK < 0x40000 ? 18 : \ - LDBL_EXP_MASK < 0x80000 ? 19 : \ - LDBL_EXP_MASK < 0x100000 ? 20 : \ - LDBL_EXP_MASK < 0x200000 ? 21 : \ - LDBL_EXP_MASK < 0x400000 ? 22 : \ - LDBL_EXP_MASK < 0x800000 ? 23 : \ - LDBL_EXP_MASK < 0x1000000 ? 24 : \ - LDBL_EXP_MASK < 0x2000000 ? 25 : \ - LDBL_EXP_MASK < 0x4000000 ? 26 : \ - LDBL_EXP_MASK < 0x8000000 ? 27 : \ - LDBL_EXP_MASK < 0x10000000 ? 28 : \ - LDBL_EXP_MASK < 0x20000000 ? 29 : \ - LDBL_EXP_MASK < 0x40000000 ? 30 : \ - LDBL_EXP_MASK <= 0x7fffffff ? 31 : \ - 32) - -/* Number of bits used for a floating-point number: the mantissa (not - counting the "hidden bit", since it may or may not be explicit), the - exponent, and the sign. */ -#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1) -#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1) -#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1) - -/* Number of bytes used for a floating-point number. - This can be smaller than the 'sizeof'. For example, on i386 systems, - 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence - LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but - sizeof (long double) = 12 or = 16. */ -#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) -#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT) - -/* Verify that SIZEOF_FLT <= sizeof (float) etc. */ -typedef int verify_sizeof_flt[SIZEOF_FLT <= sizeof (float) ? 1 : -1]; -typedef int verify_sizeof_dbl[SIZEOF_DBL <= sizeof (double) ? 1 : - 1]; -typedef int verify_sizeof_ldbl[SIZEOF_LDBL <= sizeof (long double) ? 1 : - 1]; - -#endif /* _FLOATPLUS_H */ diff --git a/gnulib/lib/float.c b/gnulib/lib/float.c deleted file mode 100644 index 50276a5..0000000 --- a/gnulib/lib/float.c +++ /dev/null @@ -1,33 +0,0 @@ -/* 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 deleted file mode 100644 index a769007..0000000 --- a/gnulib/lib/float.in.h +++ /dev/null @@ -1,188 +0,0 @@ -/* A correct . - - 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 of the License, or - (at your option) any later version. - - This program is distributed in the hope that 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 . */ - -#ifndef _@GUARD_PREFIX@_FLOAT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_FLOAT_H@ - -#ifndef _@GUARD_PREFIX@_FLOAT_H -#define _@GUARD_PREFIX@_FLOAT_H - -/* 'long double' properties. */ - -#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) -/* Number of mantissa units, in base FLT_RADIX. */ -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 64 -/* Number of decimal digits that is sufficient for representing a number. */ -# undef LDBL_DIG -# define LDBL_DIG 18 -/* x-1 where x is the smallest representable number > 1. */ -# undef LDBL_EPSILON -# define LDBL_EPSILON 1.0842021724855044340E-19L -/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ -# undef LDBL_MAX_EXP -# define LDBL_MAX_EXP 16384 -/* Minimum positive normalized number. */ -# undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935063E-4932L -/* Maximum representable finite number. */ -# undef LDBL_MAX -# define LDBL_MAX 1.1897314953572317650E+4932L -/* Minimum e such that 10^e is in the range of normalized numbers. */ -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP (-4931) -/* Maximum e such that 10^e is in the range of representable finite numbers. */ -# undef LDBL_MAX_10_EXP -# define LDBL_MAX_10_EXP 4932 -#endif - -/* On FreeBSD/x86 6.4, the 'long double' type really has only 53 bits of - precision in the compiler but 64 bits of precision at runtime. See - . */ -#if defined __i386__ && defined __FreeBSD__ -/* Number of mantissa units, in base FLT_RADIX. */ -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 64 -/* Number of decimal digits that is sufficient for representing a number. */ -# undef LDBL_DIG -# define LDBL_DIG 18 -/* x-1 where x is the smallest representable number > 1. */ -# undef LDBL_EPSILON -# define LDBL_EPSILON 1.084202172485504434007452800869941711426e-19L /* 2^-63 */ -/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP (-16381) -/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */ -# undef LDBL_MAX_EXP -# define LDBL_MAX_EXP 16384 -/* Minimum positive normalized number. */ -# undef LDBL_MIN -# define LDBL_MIN 3.3621031431120935E-4932L /* = 0x1p-16382L */ -/* Maximum representable finite number. */ -# undef LDBL_MAX -/* LDBL_MAX is represented as { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }. - But the largest literal that GCC allows us to write is - 0x0.fffffffffffff8p16384L = { 0xFFFFF800, 0xFFFFFFFF, 32766 }. - So, define it like this through a reference to an external variable - - const unsigned int LDBL_MAX[3] = { 0xFFFFFFFF, 0xFFFFFFFF, 32766 }; - extern const long double LDBL_MAX; - - Unfortunately, this is not a constant expression. */ -union gl_long_double_union - { - struct { unsigned int lo; unsigned int hi; unsigned int exponent; } xd; - long double ld; - }; -extern const union gl_long_double_union gl_LDBL_MAX; -# define LDBL_MAX (gl_LDBL_MAX.ld) -/* Minimum e such that 10^e is in the range of normalized numbers. */ -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP (-4931) -/* Maximum e such that 10^e is in the range of representable finite numbers. */ -# undef LDBL_MAX_10_EXP -# define LDBL_MAX_10_EXP 4932 -#endif - -/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are - wrong. - On Linux/PowerPC with gcc 4.4, the value of LDBL_MAX is wrong. */ -#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP DBL_MIN_EXP -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP DBL_MIN_10_EXP -# undef LDBL_MIN -# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ -#endif -#if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__ -# undef LDBL_MAX -/* LDBL_MAX is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xFFFFFFFF }. - It is not easy to define: - #define LDBL_MAX 1.79769313486231580793728971405302307166e308L - is too small, whereas - #define LDBL_MAX 1.79769313486231580793728971405302307167e308L - is too large. Apparently a bug in GCC decimal-to-binary conversion. - Also, I can't get values larger than - #define LDBL63 ((long double) (1ULL << 63)) - #define LDBL882 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) - #define LDBL945 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) - #define LDBL1008 (LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63 * LDBL63) - #define LDBL_MAX (LDBL1008 * 65535.0L + LDBL945 * (long double) 9223372036821221375ULL + LDBL882 * (long double) 4611686018427387904ULL) - which is represented as { 0x7FEFFFFF, 0xFFFFFFFF, 0x7C8FFFFF, 0xF8000000 }. - So, define it like this through a reference to an external variable - - const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }; - extern const long double LDBL_MAX; - - or through a pointer cast - - #define LDBL_MAX \ - (*(const long double *) (double[]) { DBL_MAX, DBL_MAX / (double)134217728UL / (double)134217728UL }) - - Unfortunately, this is not a constant expression, and the latter expression - does not work well when GCC is optimizing.. */ -union gl_long_double_union - { - struct { double hi; double lo; } dd; - long double ld; - }; -extern const union gl_long_double_union gl_LDBL_MAX; -# define LDBL_MAX (gl_LDBL_MAX.ld) -#endif - -/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong. - On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON - are wrong. */ -#if defined __sgi && (LDBL_MANT_DIG >= 106) -# undef LDBL_MANT_DIG -# define LDBL_MANT_DIG 106 -# if defined __GNUC__ -# undef LDBL_MIN_EXP -# define LDBL_MIN_EXP DBL_MIN_EXP -# undef LDBL_MIN_10_EXP -# define LDBL_MIN_10_EXP DBL_MIN_10_EXP -# undef LDBL_MIN -# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */ -# undef LDBL_EPSILON -# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */ -# endif -#endif - -#if @REPLACE_ITOLD@ -/* Pull in a function that fixes the 'int' to 'long double' conversion - of glibc 2.7. */ -extern -# ifdef __cplusplus -"C" -# endif -void _Qp_itoq (long double *, int); -static void (*_gl_float_fix_itold) (long double *, int) = _Qp_itoq; -#endif - -#endif /* _@GUARD_PREFIX@_FLOAT_H */ -#endif /* _@GUARD_PREFIX@_FLOAT_H */ diff --git a/gnulib/lib/fnmatch.c b/gnulib/lib/fnmatch.c deleted file mode 100644 index 444b6d8..0000000 --- a/gnulib/lib/fnmatch.c +++ /dev/null @@ -1,350 +0,0 @@ -/* 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 - 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 . */ - -#ifndef _LIBC -# include -#endif - -/* Enable GNU extensions in fnmatch.h. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -#if ! defined __builtin_expect && __GNUC__ < 3 -# define __builtin_expect(expr, expected) (expr) -#endif - -#include - -#include -#include -#include -#include -#include -#include -#include -#include - -#define WIDE_CHAR_SUPPORT \ - (HAVE_WCTYPE_H && HAVE_BTOWC && HAVE_ISWCTYPE \ - && HAVE_WMEMCHR && (HAVE_WMEMCPY || HAVE_WMEMPCPY)) - -/* For platform which support the ISO C amendment 1 functionality we - support user defined character classes. */ -#if defined _LIBC || WIDE_CHAR_SUPPORT -# include -# include -#endif - -/* We need some of the locale data (the collation sequence information) - but there is no interface to get this information in general. Therefore - we support a correct implementation only in glibc. */ -#ifdef _LIBC -# include "../locale/localeinfo.h" -# include "../locale/elem-hash.h" -# include "../locale/coll-lookup.h" -# include - -# define CONCAT(a,b) __CONCAT(a,b) -# define mbsrtowcs __mbsrtowcs -# define fnmatch __fnmatch -extern int fnmatch (const char *pattern, const char *string, int flags); -#endif - -#ifndef SIZE_MAX -# define SIZE_MAX ((size_t) -1) -#endif - -/* We often have to test for FNM_FILE_NAME and FNM_PERIOD being both set. */ -#define NO_LEADING_PERIOD(flags) \ - ((flags & (FNM_FILE_NAME | FNM_PERIOD)) == (FNM_FILE_NAME | FNM_PERIOD)) - -/* Comment out all this code if we are using the GNU C Library, and are not - actually compiling the library itself, and have not detected a bug - in the library. This code is part of the GNU C - Library, but also included in many other GNU distributions. Compiling - and linking in this code is a waste when using the GNU C library - (especially if it is a shared library). Rather than having every GNU - program understand 'configure --with-gnu-libc' and omit the object files, - it is simpler to just do this in the source for each such file. */ - -#if defined _LIBC || !defined __GNU_LIBRARY__ || !HAVE_FNMATCH_GNU - - -# if ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) -# define isblank(c) ((c) == ' ' || (c) == '\t') -# endif - -# define STREQ(s1, s2) (strcmp (s1, s2) == 0) - -# if defined _LIBC || WIDE_CHAR_SUPPORT -/* The GNU C library provides support for user-defined character classes - and the functions from ISO C amendment 1. */ -# ifdef CHARCLASS_NAME_MAX -# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX -# else -/* This shouldn't happen but some implementation might still have this - problem. Use a reasonable default value. */ -# define CHAR_CLASS_MAX_LENGTH 256 -# endif - -# ifdef _LIBC -# define IS_CHAR_CLASS(string) __wctype (string) -# else -# define IS_CHAR_CLASS(string) wctype (string) -# endif - -# ifdef _LIBC -# define ISWCTYPE(WC, WT) __iswctype (WC, WT) -# else -# define ISWCTYPE(WC, WT) iswctype (WC, WT) -# endif - -# if (HAVE_MBSTATE_T && HAVE_MBSRTOWCS) || _LIBC -/* In this case we are implementing the multibyte character handling. */ -# define HANDLE_MULTIBYTE 1 -# endif - -# else -# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, 'xdigit'. */ - -# define IS_CHAR_CLASS(string) \ - (STREQ (string, "alpha") || STREQ (string, "upper") \ - || STREQ (string, "lower") || STREQ (string, "digit") \ - || STREQ (string, "alnum") || STREQ (string, "xdigit") \ - || STREQ (string, "space") || STREQ (string, "print") \ - || STREQ (string, "punct") || STREQ (string, "graph") \ - || STREQ (string, "cntrl") || STREQ (string, "blank")) -# endif - -/* Avoid depending on library functions or files - whose names are inconsistent. */ - -/* Global variable. */ -static int posixly_correct; - -# ifndef internal_function -/* Inside GNU libc we mark some function in a special way. In other - environments simply ignore the marking. */ -# define internal_function -# endif - -/* Note that this evaluates C many times. */ -# define FOLD(c) ((flags & FNM_CASEFOLD) ? tolower (c) : (c)) -# define CHAR char -# define UCHAR unsigned char -# define INT int -# define FCT internal_fnmatch -# define EXT ext_match -# define END end_pattern -# define L_(CS) CS -# ifdef _LIBC -# define BTOWC(C) __btowc (C) -# else -# define BTOWC(C) btowc (C) -# endif -# define STRLEN(S) strlen (S) -# define STRCAT(D, S) strcat (D, S) -# ifdef _LIBC -# define MEMPCPY(D, S, N) __mempcpy (D, S, N) -# else -# if HAVE_MEMPCPY -# define MEMPCPY(D, S, N) mempcpy (D, S, N) -# else -# define MEMPCPY(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N))) -# endif -# endif -# define MEMCHR(S, C, N) memchr (S, C, N) -# include "fnmatch_loop.c" - - -# if HANDLE_MULTIBYTE -# define FOLD(c) ((flags & FNM_CASEFOLD) ? towlower (c) : (c)) -# define CHAR wchar_t -# define UCHAR wint_t -# define INT wint_t -# define FCT internal_fnwmatch -# define EXT ext_wmatch -# define END end_wpattern -# define L_(CS) L##CS -# define BTOWC(C) (C) -# ifdef _LIBC -# define STRLEN(S) __wcslen (S) -# define STRCAT(D, S) __wcscat (D, S) -# define MEMPCPY(D, S, N) __wmempcpy (D, S, N) -# else -# define STRLEN(S) wcslen (S) -# define STRCAT(D, S) wcscat (D, S) -# if HAVE_WMEMPCPY -# define MEMPCPY(D, S, N) wmempcpy (D, S, N) -# else -# define MEMPCPY(D, S, N) (wmemcpy (D, S, N) + (N)) -# endif -# endif -# define MEMCHR(S, C, N) wmemchr (S, C, N) -# define WIDE_CHAR_VERSION 1 - -# undef IS_CHAR_CLASS -/* We have to convert the wide character string in a multibyte string. But - we know that the character class names consist of alphanumeric characters - from the portable character set, and since the wide character encoding - for a member of the portable character set is the same code point as - its single-byte encoding, we can use a simplified method to convert the - string to a multibyte character string. */ -static wctype_t -is_char_class (const wchar_t *wcs) -{ - char s[CHAR_CLASS_MAX_LENGTH + 1]; - char *cp = s; - - do - { - /* Test for a printable character from the portable character set. */ -# ifdef _LIBC - if (*wcs < 0x20 || *wcs > 0x7e - || *wcs == 0x24 || *wcs == 0x40 || *wcs == 0x60) - return (wctype_t) 0; -# else - switch (*wcs) - { - case L' ': case L'!': case L'"': case L'#': case L'%': - case L'&': case L'\'': case L'(': case L')': case L'*': - case L'+': case L',': case L'-': case L'.': case L'/': - case L'0': case L'1': case L'2': case L'3': case L'4': - case L'5': case L'6': case L'7': case L'8': case L'9': - case L':': case L';': case L'<': case L'=': case L'>': - case L'?': - case L'A': case L'B': case L'C': case L'D': case L'E': - case L'F': case L'G': case L'H': case L'I': case L'J': - case L'K': case L'L': case L'M': case L'N': case L'O': - case L'P': case L'Q': case L'R': case L'S': case L'T': - case L'U': case L'V': case L'W': case L'X': case L'Y': - case L'Z': - case L'[': case L'\\': case L']': case L'^': case L'_': - case L'a': case L'b': case L'c': case L'd': case L'e': - case L'f': case L'g': case L'h': case L'i': case L'j': - case L'k': case L'l': case L'm': case L'n': case L'o': - case L'p': case L'q': case L'r': case L's': case L't': - case L'u': case L'v': case L'w': case L'x': case L'y': - case L'z': case L'{': case L'|': case L'}': case L'~': - break; - default: - return (wctype_t) 0; - } -# endif - - /* Avoid overrunning the buffer. */ - if (cp == s + CHAR_CLASS_MAX_LENGTH) - return (wctype_t) 0; - - *cp++ = (char) *wcs++; - } - while (*wcs != L'\0'); - - *cp = '\0'; - -# ifdef _LIBC - return __wctype (s); -# else - return wctype (s); -# endif -} -# define IS_CHAR_CLASS(string) is_char_class (string) - -# include "fnmatch_loop.c" -# endif - - -int -fnmatch (const char *pattern, const char *string, int flags) -{ -# if HANDLE_MULTIBYTE -# define ALLOCA_LIMIT 2000 - if (__builtin_expect (MB_CUR_MAX, 1) != 1) - { - mbstate_t ps; - size_t patsize; - size_t strsize; - size_t totsize; - wchar_t *wpattern; - wchar_t *wstring; - int res; - - /* Calculate the size needed to convert the strings to - wide characters. */ - memset (&ps, '\0', sizeof (ps)); - patsize = mbsrtowcs (NULL, &pattern, 0, &ps) + 1; - if (__builtin_expect (patsize != 0, 1)) - { - assert (mbsinit (&ps)); - strsize = mbsrtowcs (NULL, &string, 0, &ps) + 1; - if (__builtin_expect (strsize != 0, 1)) - { - assert (mbsinit (&ps)); - totsize = patsize + strsize; - if (__builtin_expect (! (patsize <= totsize - && totsize <= SIZE_MAX / sizeof (wchar_t)), - 0)) - { - errno = ENOMEM; - return -1; - } - - /* Allocate room for the wide characters. */ - if (__builtin_expect (totsize < ALLOCA_LIMIT, 1)) - wpattern = (wchar_t *) alloca (totsize * sizeof (wchar_t)); - else - { - wpattern = malloc (totsize * sizeof (wchar_t)); - if (__builtin_expect (! wpattern, 0)) - { - errno = ENOMEM; - return -1; - } - } - wstring = wpattern + patsize; - - /* Convert the strings into wide characters. */ - mbsrtowcs (wpattern, &pattern, patsize, &ps); - assert (mbsinit (&ps)); - mbsrtowcs (wstring, &string, strsize, &ps); - - res = internal_fnwmatch (wpattern, wstring, wstring + strsize - 1, - flags & FNM_PERIOD, flags); - - if (__builtin_expect (! (totsize < ALLOCA_LIMIT), 0)) - free (wpattern); - return res; - } - } - } - -# endif /* HANDLE_MULTIBYTE */ - - return internal_fnmatch (pattern, string, string + strlen (string), - flags & FNM_PERIOD, flags); -} - -# ifdef _LIBC -# undef fnmatch -versioned_symbol (libc, __fnmatch, fnmatch, GLIBC_2_2_3); -# if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_2_3) -strong_alias (__fnmatch, __fnmatch_old) -compat_symbol (libc, __fnmatch_old, fnmatch, GLIBC_2_0); -# endif -libc_hidden_ver (__fnmatch, fnmatch) -# endif - -#endif /* _LIBC or not __GNU_LIBRARY__. */ diff --git a/gnulib/lib/fnmatch.in.h b/gnulib/lib/fnmatch.in.h deleted file mode 100644 index 0fcf991..0000000 --- a/gnulib/lib/fnmatch.in.h +++ /dev/null @@ -1,67 +0,0 @@ -/* 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. - - 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 . */ - -#ifndef _FNMATCH_H -#define _FNMATCH_H 1 - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* We #undef these before defining them because some losing systems - (HP-UX A.08.07 for example) define these in . */ -#undef FNM_PATHNAME -#undef FNM_NOESCAPE -#undef FNM_PERIOD - -/* Bits set in the FLAGS argument to 'fnmatch'. */ -#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match '/'. */ -#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */ -#define FNM_PERIOD (1 << 2) /* Leading '.' is matched only explicitly. */ - -#if !defined _POSIX_C_SOURCE || _POSIX_C_SOURCE < 2 || defined _GNU_SOURCE -# define FNM_FILE_NAME FNM_PATHNAME /* Preferred GNU name. */ -# define FNM_LEADING_DIR (1 << 3) /* Ignore '/...' after a match. */ -# define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */ -# define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */ -#endif - -/* Value returned by 'fnmatch' if STRING does not match PATTERN. */ -#define FNM_NOMATCH 1 - -/* This value is returned if the implementation does not support - 'fnmatch'. Since this is not the case here it will never be - returned but the conformance test suites still require the symbol - to be defined. */ -#ifdef _XOPEN_SOURCE -# define FNM_NOSYS (-1) -#endif - -/* Match NAME against the file name pattern PATTERN, - returning zero if it matches, FNM_NOMATCH if not. */ -extern int fnmatch (const char *__pattern, const char *__name, - int __flags) - _GL_ARG_NONNULL ((1, 2)); - -#ifdef __cplusplus -} -#endif - -#endif /* fnmatch.h */ diff --git a/gnulib/lib/fnmatch_loop.c b/gnulib/lib/fnmatch_loop.c deleted file mode 100644 index 580a320..0000000 --- a/gnulib/lib/fnmatch_loop.c +++ /dev/null @@ -1,1219 +0,0 @@ -/* 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 - 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 . */ - -/* Match STRING against the file name pattern PATTERN, returning zero if - it matches, nonzero if not. */ -static int EXT (INT opt, const CHAR *pattern, const CHAR *string, - const CHAR *string_end, bool no_leading_period, int flags) - internal_function; -static const CHAR *END (const CHAR *patternp) internal_function; - -static int -internal_function -FCT (const CHAR *pattern, const CHAR *string, const CHAR *string_end, - bool no_leading_period, int flags) -{ - register const CHAR *p = pattern, *n = string; - register UCHAR c; -#ifdef _LIBC -# if WIDE_CHAR_VERSION - const char *collseq = (const char *) - _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC); -# else - const UCHAR *collseq = (const UCHAR *) - _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQMB); -# endif -#endif - - while ((c = *p++) != L_('\0')) - { - bool new_no_leading_period = false; - c = FOLD (c); - - switch (c) - { - case L_('?'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, - flags); - if (res != -1) - return res; - } - - if (n == string_end) - return FNM_NOMATCH; - else if (*n == L_('/') && (flags & FNM_FILE_NAME)) - return FNM_NOMATCH; - else if (*n == L_('.') && no_leading_period) - return FNM_NOMATCH; - break; - - case L_('\\'): - if (!(flags & FNM_NOESCAPE)) - { - c = *p++; - if (c == L_('\0')) - /* Trailing \ loses. */ - return FNM_NOMATCH; - c = FOLD (c); - } - if (n == string_end || FOLD ((UCHAR) *n) != c) - return FNM_NOMATCH; - break; - - case L_('*'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, - flags); - if (res != -1) - return res; - } - - if (n != string_end && *n == L_('.') && no_leading_period) - return FNM_NOMATCH; - - for (c = *p++; c == L_('?') || c == L_('*'); c = *p++) - { - if (*p == L_('(') && (flags & FNM_EXTMATCH) != 0) - { - const CHAR *endp = END (p); - if (endp != p) - { - /* This is a pattern. Skip over it. */ - p = endp; - continue; - } - } - - if (c == L_('?')) - { - /* A ? needs to match one character. */ - if (n == string_end) - /* There isn't another character; no match. */ - return FNM_NOMATCH; - else if (*n == L_('/') - && __builtin_expect (flags & FNM_FILE_NAME, 0)) - /* A slash does not match a wildcard under - FNM_FILE_NAME. */ - return FNM_NOMATCH; - else - /* One character of the string is consumed in matching - this ? wildcard, so *??? won't match if there are - less than three characters. */ - ++n; - } - } - - if (c == L_('\0')) - /* The wildcard(s) is/are the last element of the pattern. - If the name is a file name and contains another slash - this means it cannot match, unless the FNM_LEADING_DIR - flag is set. */ - { - int result = (flags & FNM_FILE_NAME) == 0 ? 0 : FNM_NOMATCH; - - if (flags & FNM_FILE_NAME) - { - if (flags & FNM_LEADING_DIR) - result = 0; - else - { - if (MEMCHR (n, L_('/'), string_end - n) == NULL) - result = 0; - } - } - - return result; - } - else - { - const CHAR *endp; - - endp = MEMCHR (n, (flags & FNM_FILE_NAME) ? L_('/') : L_('\0'), - string_end - n); - if (endp == NULL) - endp = string_end; - - if (c == L_('[') - || (__builtin_expect (flags & FNM_EXTMATCH, 0) != 0 - && (c == L_('@') || c == L_('+') || c == L_('!')) - && *p == L_('('))) - { - int flags2 = ((flags & FNM_FILE_NAME) - ? flags : (flags & ~FNM_PERIOD)); - bool no_leading_period2 = no_leading_period; - - for (--p; n < endp; ++n, no_leading_period2 = false) - if (FCT (p, n, string_end, no_leading_period2, flags2) - == 0) - return 0; - } - else if (c == L_('/') && (flags & FNM_FILE_NAME)) - { - while (n < string_end && *n != L_('/')) - ++n; - if (n < string_end && *n == L_('/') - && (FCT (p, n + 1, string_end, flags & FNM_PERIOD, flags) - == 0)) - return 0; - } - else - { - int flags2 = ((flags & FNM_FILE_NAME) - ? flags : (flags & ~FNM_PERIOD)); - int no_leading_period2 = no_leading_period; - - if (c == L_('\\') && !(flags & FNM_NOESCAPE)) - c = *p; - c = FOLD (c); - for (--p; n < endp; ++n, no_leading_period2 = false) - if (FOLD ((UCHAR) *n) == c - && (FCT (p, n, string_end, no_leading_period2, flags2) - == 0)) - return 0; - } - } - - /* If we come here no match is possible with the wildcard. */ - return FNM_NOMATCH; - - case L_('['): - { - /* Nonzero if the sense of the character class is inverted. */ - const CHAR *p_init = p; - const CHAR *n_init = n; - register bool not; - CHAR cold; - UCHAR fn; - - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - if (n == string_end) - return FNM_NOMATCH; - - if (*n == L_('.') && no_leading_period) - return FNM_NOMATCH; - - if (*n == L_('/') && (flags & FNM_FILE_NAME)) - /* '/' cannot be matched. */ - return FNM_NOMATCH; - - not = (*p == L_('!') || (posixly_correct < 0 && *p == L_('^'))); - if (not) - ++p; - - fn = FOLD ((UCHAR) *n); - - c = *p++; - for (;;) - { - if (!(flags & FNM_NOESCAPE) && c == L_('\\')) - { - if (*p == L_('\0')) - return FNM_NOMATCH; - c = FOLD ((UCHAR) *p); - ++p; - - goto normal_bracket; - } - else if (c == L_('[') && *p == L_(':')) - { - /* Leave room for the null. */ - CHAR str[CHAR_CLASS_MAX_LENGTH + 1]; - size_t c1 = 0; -#if defined _LIBC || WIDE_CHAR_SUPPORT - wctype_t wt; -#endif - const CHAR *startp = p; - - for (;;) - { - if (c1 == CHAR_CLASS_MAX_LENGTH) - /* The name is too long and therefore the pattern - is ill-formed. */ - return FNM_NOMATCH; - - c = *++p; - if (c == L_(':') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c < L_('a') || c >= L_('z')) - { - /* This cannot possibly be a character class name. - Match it as a normal range. */ - p = startp; - c = L_('['); - goto normal_bracket; - } - str[c1++] = c; - } - str[c1] = L_('\0'); - -#if defined _LIBC || WIDE_CHAR_SUPPORT - wt = IS_CHAR_CLASS (str); - if (wt == 0) - /* Invalid character class name. */ - return FNM_NOMATCH; - -# if defined _LIBC && ! WIDE_CHAR_VERSION - /* The following code is glibc specific but does - there a good job in speeding up the code since - we can avoid the btowc() call. */ - if (_ISCTYPE ((UCHAR) *n, wt)) - goto matched; -# else - if (ISWCTYPE (BTOWC ((UCHAR) *n), wt)) - goto matched; -# endif -#else - if ((STREQ (str, L_("alnum")) && isalnum ((UCHAR) *n)) - || (STREQ (str, L_("alpha")) && isalpha ((UCHAR) *n)) - || (STREQ (str, L_("blank")) && isblank ((UCHAR) *n)) - || (STREQ (str, L_("cntrl")) && iscntrl ((UCHAR) *n)) - || (STREQ (str, L_("digit")) && isdigit ((UCHAR) *n)) - || (STREQ (str, L_("graph")) && isgraph ((UCHAR) *n)) - || (STREQ (str, L_("lower")) && islower ((UCHAR) *n)) - || (STREQ (str, L_("print")) && isprint ((UCHAR) *n)) - || (STREQ (str, L_("punct")) && ispunct ((UCHAR) *n)) - || (STREQ (str, L_("space")) && isspace ((UCHAR) *n)) - || (STREQ (str, L_("upper")) && isupper ((UCHAR) *n)) - || (STREQ (str, L_("xdigit")) && isxdigit ((UCHAR) *n))) - goto matched; -#endif - c = *p++; - } -#ifdef _LIBC - else if (c == L_('[') && *p == L_('=')) - { - UCHAR str[1]; - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - const CHAR *startp = p; - - c = *++p; - if (c == L_('\0')) - { - p = startp; - c = L_('['); - goto normal_bracket; - } - str[0] = c; - - c = *++p; - if (c != L_('=') || p[1] != L_(']')) - { - p = startp; - c = L_('['); - goto normal_bracket; - } - p += 2; - - if (nrules == 0) - { - if ((UCHAR) *n == str[0]) - goto matched; - } - else - { - const int32_t *table; -# if WIDE_CHAR_VERSION - const int32_t *weights; - const int32_t *extra; -# else - const unsigned char *weights; - const unsigned char *extra; -# endif - const int32_t *indirect; - int32_t idx; - const UCHAR *cp = (const UCHAR *) str; - - /* This #include defines a local function! */ -# if WIDE_CHAR_VERSION -# include -# else -# include -# endif - -# if WIDE_CHAR_VERSION - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC); - weights = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC); - extra = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC); -# else - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); -# endif - - idx = findidx (&cp); - if (idx != 0) - { - /* We found a table entry. Now see whether the - character we are currently at has the same - equivalence class value. */ - int len = weights[idx & 0xffffff]; - int32_t idx2; - const UCHAR *np = (const UCHAR *) n; - - idx2 = findidx (&np); - if (idx2 != 0 - && (idx >> 24) == (idx2 >> 24) - && len == weights[idx2 & 0xffffff]) - { - int cnt = 0; - - idx &= 0xffffff; - idx2 &= 0xffffff; - - while (cnt < len - && (weights[idx + 1 + cnt] - == weights[idx2 + 1 + cnt])) - ++cnt; - - if (cnt == len) - goto matched; - } - } - } - - c = *p++; - } -#endif - else if (c == L_('\0')) - { - /* [ unterminated, treat as normal character. */ - p = p_init; - n = n_init; - c = L_('['); - goto normal_match; - } - else - { - bool is_range = false; - -#ifdef _LIBC - bool is_seqval = false; - - if (c == L_('[') && *p == L_('.')) - { - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - const CHAR *startp = p; - size_t c1 = 0; - - while (1) - { - c = *++p; - if (c == L_('.') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c == '\0') - return FNM_NOMATCH; - ++c1; - } - - /* We have to handling the symbols differently in - ranges since then the collation sequence is - important. */ - is_range = *p == L_('-') && p[1] != L_('\0'); - - if (nrules == 0) - { - /* There are no names defined in the collation - data. Therefore we only accept the trivial - names consisting of the character itself. */ - if (c1 != 1) - return FNM_NOMATCH; - - if (!is_range && *n == startp[1]) - goto matched; - - cold = startp[1]; - c = *p++; - } - else - { - int32_t table_size; - const int32_t *symb_table; -# ifdef WIDE_CHAR_VERSION - char str[c1]; - size_t strcnt; -# else -# define str (startp + 1) -# endif - const unsigned char *extra; - int32_t idx; - int32_t elem; - int32_t second; - int32_t hash; - -# ifdef WIDE_CHAR_VERSION - /* We have to convert the name to a single-byte - string. This is possible since the names - consist of ASCII characters and the internal - representation is UCS4. */ - for (strcnt = 0; strcnt < c1; ++strcnt) - str[strcnt] = startp[1 + strcnt]; -# endif - - table_size = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - - /* Locate the character in the hashing table. */ - hash = elem_hash (str, c1); - - idx = 0; - elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && (c1 - == extra[symb_table[2 * elem + 1]]) - && memcmp (str, - &extra[symb_table[2 * elem - + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - - if (symb_table[2 * elem] != 0) - { - /* Compare the byte sequence but only if - this is not part of a range. */ -# ifdef WIDE_CHAR_VERSION - int32_t *wextra; - - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - - wextra = (int32_t *) &extra[idx + 4]; -# endif - - if (! is_range) - { -# ifdef WIDE_CHAR_VERSION - for (c1 = 0; - (int32_t) c1 < wextra[idx]; - ++c1) - if (n[c1] != wextra[1 + c1]) - break; - - if ((int32_t) c1 == wextra[idx]) - goto matched; -# else - for (c1 = 0; c1 < extra[idx]; ++c1) - if (n[c1] != extra[1 + c1]) - break; - - if (c1 == extra[idx]) - goto matched; -# endif - } - - /* Get the collation sequence value. */ - is_seqval = true; -# ifdef WIDE_CHAR_VERSION - cold = wextra[1 + wextra[idx]]; -# else - /* Adjust for the alignment. */ - idx += 1 + extra[idx]; - idx = (idx + 3) & ~4; - cold = *((int32_t *) &extra[idx]); -# endif - - c = *p++; - } - else if (c1 == 1) - { - /* No valid character. Match it as a - single byte. */ - if (!is_range && *n == str[0]) - goto matched; - - cold = str[0]; - c = *p++; - } - else - return FNM_NOMATCH; - } - } - else -# undef str -#endif - { - c = FOLD (c); - normal_bracket: - - /* We have to handling the symbols differently in - ranges since then the collation sequence is - important. */ - is_range = (*p == L_('-') && p[1] != L_('\0') - && p[1] != L_(']')); - - if (!is_range && c == fn) - goto matched; - -#if _LIBC - /* This is needed if we goto normal_bracket; from - outside of is_seqval's scope. */ - is_seqval = false; -#endif - - cold = c; - c = *p++; - } - - if (c == L_('-') && *p != L_(']')) - { -#if _LIBC - /* We have to find the collation sequence - value for C. Collation sequence is nothing - we can regularly access. The sequence - value is defined by the order in which the - definitions of the collation values for the - various characters appear in the source - file. A strange concept, nowhere - documented. */ - uint32_t fcollseq; - uint32_t lcollseq; - UCHAR cend = *p++; - -# ifdef WIDE_CHAR_VERSION - /* Search in the 'names' array for the characters. */ - fcollseq = __collseq_table_lookup (collseq, fn); - if (fcollseq == ~((uint32_t) 0)) - /* XXX We don't know anything about the character - we are supposed to match. This means we are - failing. */ - goto range_not_matched; - - if (is_seqval) - lcollseq = cold; - else - lcollseq = __collseq_table_lookup (collseq, cold); -# else - fcollseq = collseq[fn]; - lcollseq = is_seqval ? cold : collseq[(UCHAR) cold]; -# endif - - is_seqval = false; - if (cend == L_('[') && *p == L_('.')) - { - uint32_t nrules = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_NRULES); - const CHAR *startp = p; - size_t c1 = 0; - - while (1) - { - c = *++p; - if (c == L_('.') && p[1] == L_(']')) - { - p += 2; - break; - } - if (c == '\0') - return FNM_NOMATCH; - ++c1; - } - - if (nrules == 0) - { - /* There are no names defined in the - collation data. Therefore we only - accept the trivial names consisting - of the character itself. */ - if (c1 != 1) - return FNM_NOMATCH; - - cend = startp[1]; - } - else - { - int32_t table_size; - const int32_t *symb_table; -# ifdef WIDE_CHAR_VERSION - char str[c1]; - size_t strcnt; -# else -# define str (startp + 1) -# endif - const unsigned char *extra; - int32_t idx; - int32_t elem; - int32_t second; - int32_t hash; - -# ifdef WIDE_CHAR_VERSION - /* We have to convert the name to a single-byte - string. This is possible since the names - consist of ASCII characters and the internal - representation is UCS4. */ - for (strcnt = 0; strcnt < c1; ++strcnt) - str[strcnt] = startp[1 + strcnt]; -# endif - - table_size = - _NL_CURRENT_WORD (LC_COLLATE, - _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - - /* Locate the character in the hashing - table. */ - hash = elem_hash (str, c1); - - idx = 0; - elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - && (c1 - == extra[symb_table[2 * elem + 1]]) - && memcmp (str, - &extra[symb_table[2 * elem + 1] - + 1], c1) == 0) - { - /* Yep, this is the entry. */ - idx = symb_table[2 * elem + 1]; - idx += 1 + extra[idx]; - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - - if (symb_table[2 * elem] != 0) - { - /* Compare the byte sequence but only if - this is not part of a range. */ -# ifdef WIDE_CHAR_VERSION - int32_t *wextra; - - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~4; - - wextra = (int32_t *) &extra[idx + 4]; -# endif - /* Get the collation sequence value. */ - is_seqval = true; -# ifdef WIDE_CHAR_VERSION - cend = wextra[1 + wextra[idx]]; -# else - /* Adjust for the alignment. */ - idx += 1 + extra[idx]; - idx = (idx + 3) & ~4; - cend = *((int32_t *) &extra[idx]); -# endif - } - else if (symb_table[2 * elem] != 0 && c1 == 1) - { - cend = str[0]; - c = *p++; - } - else - return FNM_NOMATCH; - } -# undef str - } - else - { - if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) - cend = *p++; - if (cend == L_('\0')) - return FNM_NOMATCH; - cend = FOLD (cend); - } - - /* XXX It is not entirely clear to me how to handle - characters which are not mentioned in the - collation specification. */ - if ( -# ifdef WIDE_CHAR_VERSION - lcollseq == 0xffffffff || -# endif - lcollseq <= fcollseq) - { - /* We have to look at the upper bound. */ - uint32_t hcollseq; - - if (is_seqval) - hcollseq = cend; - else - { -# ifdef WIDE_CHAR_VERSION - hcollseq = - __collseq_table_lookup (collseq, cend); - if (hcollseq == ~((uint32_t) 0)) - { - /* Hum, no information about the upper - bound. The matching succeeds if the - lower bound is matched exactly. */ - if (lcollseq != fcollseq) - goto range_not_matched; - - goto matched; - } -# else - hcollseq = collseq[cend]; -# endif - } - - if (lcollseq <= hcollseq && fcollseq <= hcollseq) - goto matched; - } -# ifdef WIDE_CHAR_VERSION - range_not_matched: -# endif -#else - /* We use a boring value comparison of the character - values. This is better than comparing using - 'strcoll' since the latter would have surprising - and sometimes fatal consequences. */ - UCHAR cend = *p++; - - if (!(flags & FNM_NOESCAPE) && cend == L_('\\')) - cend = *p++; - if (cend == L_('\0')) - return FNM_NOMATCH; - - /* It is a range. */ - if (cold <= fn && fn <= cend) - goto matched; -#endif - - c = *p++; - } - } - - if (c == L_(']')) - break; - } - - if (!not) - return FNM_NOMATCH; - break; - - matched: - /* Skip the rest of the [...] that already matched. */ - do - { - ignore_next: - c = *p++; - - if (c == L_('\0')) - /* [... (unterminated) loses. */ - return FNM_NOMATCH; - - if (!(flags & FNM_NOESCAPE) && c == L_('\\')) - { - if (*p == L_('\0')) - return FNM_NOMATCH; - /* XXX 1003.2d11 is unclear if this is right. */ - ++p; - } - else if (c == L_('[') && *p == L_(':')) - { - int c1 = 0; - const CHAR *startp = p; - - while (1) - { - c = *++p; - if (++c1 == CHAR_CLASS_MAX_LENGTH) - return FNM_NOMATCH; - - if (*p == L_(':') && p[1] == L_(']')) - break; - - if (c < L_('a') || c >= L_('z')) - { - p = startp; - goto ignore_next; - } - } - p += 2; - c = *p++; - } - else if (c == L_('[') && *p == L_('=')) - { - c = *++p; - if (c == L_('\0')) - return FNM_NOMATCH; - c = *++p; - if (c != L_('=') || p[1] != L_(']')) - return FNM_NOMATCH; - p += 2; - c = *p++; - } - else if (c == L_('[') && *p == L_('.')) - { - ++p; - while (1) - { - c = *++p; - if (c == '\0') - return FNM_NOMATCH; - - if (*p == L_('.') && p[1] == L_(']')) - break; - } - p += 2; - c = *p++; - } - } - while (c != L_(']')); - if (not) - return FNM_NOMATCH; - } - break; - - case L_('+'): - case L_('@'): - case L_('!'): - if (__builtin_expect (flags & FNM_EXTMATCH, 0) && *p == '(') - { - int res; - - res = EXT (c, p, n, string_end, no_leading_period, flags); - if (res != -1) - return res; - } - goto normal_match; - - case L_('/'): - if (NO_LEADING_PERIOD (flags)) - { - if (n == string_end || c != (UCHAR) *n) - return FNM_NOMATCH; - - new_no_leading_period = true; - break; - } - /* FALLTHROUGH */ - default: - normal_match: - if (n == string_end || c != FOLD ((UCHAR) *n)) - return FNM_NOMATCH; - } - - no_leading_period = new_no_leading_period; - ++n; - } - - if (n == string_end) - return 0; - - if ((flags & FNM_LEADING_DIR) && n != string_end && *n == L_('/')) - /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */ - return 0; - - return FNM_NOMATCH; -} - - -static const CHAR * -internal_function -END (const CHAR *pattern) -{ - const CHAR *p = pattern; - - while (1) - if (*++p == L_('\0')) - /* This is an invalid pattern. */ - return pattern; - else if (*p == L_('[')) - { - /* Handle brackets special. */ - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - /* Skip the not sign. We have to recognize it because of a possibly - following ']'. */ - if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) - ++p; - /* A leading ']' is recognized as such. */ - if (*p == L_(']')) - ++p; - /* Skip over all characters of the list. */ - while (*p != L_(']')) - if (*p++ == L_('\0')) - /* This is no valid pattern. */ - return pattern; - } - else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') - || *p == L_('!')) && p[1] == L_('(')) - p = END (p + 1); - else if (*p == L_(')')) - break; - - return p + 1; -} - - -static int -internal_function -EXT (INT opt, const CHAR *pattern, const CHAR *string, const CHAR *string_end, - bool no_leading_period, int flags) -{ - const CHAR *startp; - size_t level; - struct patternlist - { - struct patternlist *next; - CHAR str[1]; - } *list = NULL; - struct patternlist **lastp = &list; - size_t pattern_len = STRLEN (pattern); - const CHAR *p; - const CHAR *rs; - enum { ALLOCA_LIMIT = 8000 }; - - /* Parse the pattern. Store the individual parts in the list. */ - level = 0; - for (startp = p = pattern + 1; ; ++p) - if (*p == L_('\0')) - /* This is an invalid pattern. */ - return -1; - else if (*p == L_('[')) - { - /* Handle brackets special. */ - if (posixly_correct == 0) - posixly_correct = getenv ("POSIXLY_CORRECT") != NULL ? 1 : -1; - - /* Skip the not sign. We have to recognize it because of a possibly - following ']'. */ - if (*++p == L_('!') || (posixly_correct < 0 && *p == L_('^'))) - ++p; - /* A leading ']' is recognized as such. */ - if (*p == L_(']')) - ++p; - /* Skip over all characters of the list. */ - while (*p != L_(']')) - if (*p++ == L_('\0')) - /* This is no valid pattern. */ - return -1; - } - else if ((*p == L_('?') || *p == L_('*') || *p == L_('+') || *p == L_('@') - || *p == L_('!')) && p[1] == L_('(')) - /* Remember the nesting level. */ - ++level; - else if (*p == L_(')')) - { - if (level-- == 0) - { - /* This means we found the end of the pattern. */ -#define NEW_PATTERN \ - struct patternlist *newp; \ - size_t plen; \ - size_t plensize; \ - size_t newpsize; \ - \ - plen = (opt == L_('?') || opt == L_('@') \ - ? pattern_len \ - : p - startp + 1UL); \ - plensize = plen * sizeof (CHAR); \ - newpsize = offsetof (struct patternlist, str) + plensize; \ - if ((size_t) -1 / sizeof (CHAR) < plen \ - || newpsize < offsetof (struct patternlist, str) \ - || ALLOCA_LIMIT <= newpsize) \ - return -1; \ - newp = (struct patternlist *) alloca (newpsize); \ - *((CHAR *) MEMPCPY (newp->str, startp, p - startp)) = L_('\0'); \ - newp->next = NULL; \ - *lastp = newp; \ - lastp = &newp->next - NEW_PATTERN; - break; - } - } - else if (*p == L_('|')) - { - if (level == 0) - { - NEW_PATTERN; - startp = p + 1; - } - } - assert (list != NULL); - assert (p[-1] == L_(')')); -#undef NEW_PATTERN - - switch (opt) - { - case L_('*'): - if (FCT (p, string, string_end, no_leading_period, flags) == 0) - return 0; - /* FALLTHROUGH */ - - case L_('+'): - do - { - for (rs = string; rs <= string_end; ++rs) - /* First match the prefix with the current pattern with the - current pattern. */ - if (FCT (list->str, string, rs, no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0 - /* This was successful. Now match the rest with the rest - of the pattern. */ - && (FCT (p, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME - ? flags : flags & ~FNM_PERIOD) == 0 - /* This didn't work. Try the whole pattern. */ - || (rs != string - && FCT (pattern - 1, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME - ? flags : flags & ~FNM_PERIOD) == 0))) - /* It worked. Signal success. */ - return 0; - } - while ((list = list->next) != NULL); - - /* None of the patterns lead to a match. */ - return FNM_NOMATCH; - - case L_('?'): - if (FCT (p, string, string_end, no_leading_period, flags) == 0) - return 0; - /* FALLTHROUGH */ - - case L_('@'): - do - /* I cannot believe it but 'strcat' is actually acceptable - here. Match the entire string with the prefix from the - pattern list and the rest of the pattern following the - pattern list. */ - if (FCT (STRCAT (list->str, p), string, string_end, - no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) - /* It worked. Signal success. */ - return 0; - while ((list = list->next) != NULL); - - /* None of the patterns lead to a match. */ - return FNM_NOMATCH; - - case L_('!'): - for (rs = string; rs <= string_end; ++rs) - { - struct patternlist *runp; - - for (runp = list; runp != NULL; runp = runp->next) - if (FCT (runp->str, string, rs, no_leading_period, - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) == 0) - break; - - /* If none of the patterns matched see whether the rest does. */ - if (runp == NULL - && (FCT (p, rs, string_end, - rs == string - ? no_leading_period - : rs[-1] == '/' && NO_LEADING_PERIOD (flags), - flags & FNM_FILE_NAME ? flags : flags & ~FNM_PERIOD) - == 0)) - /* This is successful. */ - return 0; - } - - /* None of the patterns together with the rest of the pattern - lead to a match. */ - return FNM_NOMATCH; - - default: - assert (! "Invalid extended matching operator"); - break; - } - - return -1; -} - - -#undef FOLD -#undef CHAR -#undef UCHAR -#undef INT -#undef FCT -#undef EXT -#undef END -#undef MEMPCPY -#undef MEMCHR -#undef STRLEN -#undef STRCAT -#undef L_ -#undef BTOWC diff --git a/gnulib/lib/getdelim.c b/gnulib/lib/getdelim.c deleted file mode 100644 index 5ac31f4..0000000 --- a/gnulib/lib/getdelim.c +++ /dev/null @@ -1,135 +0,0 @@ -/* getdelim.c --- Implementation of replacement getdelim function. - Copyright (C) 1994, 1996-1998, 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 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 . */ - -/* Ported from glibc by Simon Josefsson. */ - -#include - -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the lineptr == NULL || n == NULL || fp == NULL tests below. */ -#define _GL_ARG_NONNULL(params) - -#include - -#include -#include -#include -#include - -#ifndef SSIZE_MAX -# define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) -#endif - -#if USE_UNLOCKED_IO -# include "unlocked-io.h" -# define getc_maybe_unlocked(fp) getc(fp) -#elif !HAVE_FLOCKFILE || !HAVE_FUNLOCKFILE || !HAVE_DECL_GETC_UNLOCKED -# undef flockfile -# undef funlockfile -# define flockfile(x) ((void) 0) -# define funlockfile(x) ((void) 0) -# define getc_maybe_unlocked(fp) getc(fp) -#else -# define getc_maybe_unlocked(fp) getc_unlocked(fp) -#endif - -/* Read up to (and including) a DELIMITER from FP into *LINEPTR (and - NUL-terminate it). *LINEPTR is a pointer returned from malloc (or - NULL), pointing to *N characters of space. It is realloc'ed as - necessary. Returns the number of characters read (not including - the null terminator), or -1 on error or EOF. */ - -ssize_t -getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp) -{ - ssize_t result; - size_t cur_len = 0; - - if (lineptr == NULL || n == NULL || fp == NULL) - { - errno = EINVAL; - return -1; - } - - flockfile (fp); - - if (*lineptr == NULL || *n == 0) - { - char *new_lineptr; - *n = 120; - new_lineptr = (char *) realloc (*lineptr, *n); - if (new_lineptr == NULL) - { - result = -1; - goto unlock_return; - } - *lineptr = new_lineptr; - } - - for (;;) - { - int i; - - i = getc_maybe_unlocked (fp); - if (i == EOF) - { - result = -1; - break; - } - - /* Make enough space for len+1 (for final NUL) bytes. */ - if (cur_len + 1 >= *n) - { - size_t needed_max = - SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX; - size_t needed = 2 * *n + 1; /* Be generous. */ - char *new_lineptr; - - if (needed_max < needed) - needed = needed_max; - if (cur_len + 1 >= needed) - { - result = -1; - errno = EOVERFLOW; - goto unlock_return; - } - - new_lineptr = (char *) realloc (*lineptr, needed); - if (new_lineptr == NULL) - { - result = -1; - goto unlock_return; - } - - *lineptr = new_lineptr; - *n = needed; - } - - (*lineptr)[cur_len] = i; - cur_len++; - - if (i == delimiter) - break; - } - (*lineptr)[cur_len] = '\0'; - result = cur_len ? cur_len : result; - - unlock_return: - funlockfile (fp); /* doesn't set errno */ - - return result; -} diff --git a/gnulib/lib/getfilecon.c b/gnulib/lib/getfilecon.c deleted file mode 100644 index 968915a..0000000 --- a/gnulib/lib/getfilecon.c +++ /dev/null @@ -1,86 +0,0 @@ -/* wrap getfilecon, lgetfilecon, and fgetfilecon - 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 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 - -#include - -#include -#include -#include - -/* FIXME: remove this once there is an errno-gnu module - that guarantees the definition of ENODATA. */ -#ifndef ENODATA -# define ENODATA ENOTSUP -#endif - -#undef getfilecon -#undef lgetfilecon -#undef fgetfilecon -int getfilecon (char const *file, security_context_t *con); -int lgetfilecon (char const *file, security_context_t *con); -int fgetfilecon (int fd, security_context_t *con); - -/* getfilecon, lgetfilecon, and fgetfilecon can all misbehave, be it - via an old version of libselinux where these would return 0 and set the - result context to NULL, or via a modern kernel+lib operating on a file - from a disk whose attributes were set by a kernel from around 2006. - In that latter case, the functions return a length of 10 for the - "unlabeled" context. Map both failures to a return value of -1, and - set errno to ENOTSUP in the first case, and ENODATA in the latter. */ - -static inline int -map_to_failure (int ret, security_context_t *con) -{ - if (ret == 0) - { - errno = ENOTSUP; - return -1; - } - - if (ret == 10 && strcmp (*con, "unlabeled") == 0) - { - freecon (*con); - errno = ENODATA; - return -1; - } - - return ret; -} - -int -rpl_getfilecon (char const *file, security_context_t *con) -{ - int ret = getfilecon (file, con); - return map_to_failure (ret, con); -} - -int -rpl_lgetfilecon (char const *file, security_context_t *con) -{ - int ret = lgetfilecon (file, con); - return map_to_failure (ret, con); -} - -int -rpl_fgetfilecon (int fd, security_context_t *con) -{ - int ret = fgetfilecon (fd, con); - return map_to_failure (ret, con); -} diff --git a/gnulib/lib/getline.c b/gnulib/lib/getline.c deleted file mode 100644 index d29b929..0000000 --- a/gnulib/lib/getline.c +++ /dev/null @@ -1,27 +0,0 @@ -/* getline.c --- Implementation of replacement getline function. - 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 - 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 Simon Josefsson. */ - -#include - -#include - -ssize_t -getline (char **lineptr, size_t *n, FILE *stream) -{ - return getdelim (lineptr, n, '\n', stream); -} diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c deleted file mode 100644 index bf570fb..0000000 --- a/gnulib/lib/getopt.c +++ /dev/null @@ -1,1245 +0,0 @@ -/* Getopt for GNU. - NOTE: getopt is part of the C library, so if you don't know what - "Keep this file name-space clean" means, talk to drepper@gnu.org - before changing it! - Copyright (C) 1987-1996, 1998-2004, 2006, 2008-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 - 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 . */ - -#ifndef _LIBC -# include -#endif - -#include "getopt.h" - -#include -#include -#include -#include - -#ifdef _LIBC -# include -#else -# include "gettext.h" -# define _(msgid) gettext (msgid) -#endif - -#if defined _LIBC && defined USE_IN_LIBIO -# include -#endif - -/* This version of 'getopt' appears to the caller like standard Unix 'getopt' - but it behaves differently for the user, since it allows the user - to intersperse the options with the other arguments. - - As 'getopt_long' works, it permutes the elements of ARGV so that, - when it is done, all the options precede everything else. Thus - all application programs are extended to handle flexible argument order. - - Using 'getopt' or setting the environment variable POSIXLY_CORRECT - disables permutation. - Then the behavior is completely standard. - - GNU application programs can use a third alternative mode in which - they can distinguish the relative order of options and other arguments. */ - -#include "getopt_int.h" - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -/* 1003.2 says this must be 1 before any call. */ -int optind = 1; - -/* Callers store zero here to inhibit the error message - for unrecognized options. */ - -int opterr = 1; - -/* Set to an option character which was unrecognized. - This must be initialized on some systems to avoid linking in the - system's own getopt implementation. */ - -int optopt = '?'; - -/* Keep a global copy of all internal members of getopt_data. */ - -static struct _getopt_data getopt_data; - - -#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV -extern char *getenv (); -#endif - -#ifdef _LIBC -/* Stored original parameters. - XXX This is no good solution. We should rather copy the args so - that we can compare them later. But we must not use malloc(3). */ -extern int __libc_argc; -extern char **__libc_argv; - -/* Bash 2.0 gives us an environment variable containing flags - indicating ARGV elements that should not be considered arguments. */ - -# ifdef USE_NONOPTION_FLAGS -/* Defined in getopt_init.c */ -extern char *__getopt_nonoption_flags; -# endif - -# ifdef USE_NONOPTION_FLAGS -# define SWAP_FLAGS(ch1, ch2) \ - if (d->__nonoption_flags_len > 0) \ - { \ - char __tmp = __getopt_nonoption_flags[ch1]; \ - __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ - __getopt_nonoption_flags[ch2] = __tmp; \ - } -# else -# define SWAP_FLAGS(ch1, ch2) -# endif -#else /* !_LIBC */ -# define SWAP_FLAGS(ch1, ch2) -#endif /* _LIBC */ - -/* Exchange two adjacent subsequences of ARGV. - One subsequence is elements [first_nonopt,last_nonopt) - which contains all the non-options that have been skipped so far. - The other is elements [last_nonopt,optind), which contains all - the options processed since those non-options were skipped. - - 'first_nonopt' and 'last_nonopt' are relocated so that they describe - the new indices of the non-options in ARGV after they are moved. */ - -static void -exchange (char **argv, struct _getopt_data *d) -{ - int bottom = d->__first_nonopt; - int middle = d->__last_nonopt; - int top = d->optind; - char *tem; - - /* Exchange the shorter segment with the far end of the longer segment. - That puts the shorter segment into the right place. - It leaves the longer segment in the right place overall, - but it consists of two parts that need to be swapped next. */ - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - /* First make sure the handling of the '__getopt_nonoption_flags' - string can work normally. Our top argument must be in the range - of the string. */ - if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len) - { - /* We must extend the array. The user plays games with us and - presents new arguments. */ - char *new_str = malloc (top + 1); - if (new_str == NULL) - d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0; - else - { - memset (__mempcpy (new_str, __getopt_nonoption_flags, - d->__nonoption_flags_max_len), - '\0', top + 1 - d->__nonoption_flags_max_len); - d->__nonoption_flags_max_len = top + 1; - __getopt_nonoption_flags = new_str; - } - } -#endif - - while (top > middle && middle > bottom) - { - if (top - middle > middle - bottom) - { - /* Bottom segment is the short one. */ - int len = middle - bottom; - register int i; - - /* Swap it with the top part of the top segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[top - (middle - bottom) + i]; - argv[top - (middle - bottom) + i] = tem; - SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); - } - /* Exclude the moved bottom segment from further swapping. */ - top -= len; - } - else - { - /* Top segment is the short one. */ - int len = top - middle; - register int i; - - /* Swap it with the bottom part of the bottom segment. */ - for (i = 0; i < len; i++) - { - tem = argv[bottom + i]; - argv[bottom + i] = argv[middle + i]; - argv[middle + i] = tem; - SWAP_FLAGS (bottom + i, middle + i); - } - /* Exclude the moved top segment from further swapping. */ - bottom += len; - } - } - - /* Update records for the slots the non-options now occupy. */ - - d->__first_nonopt += (d->optind - d->__last_nonopt); - d->__last_nonopt = d->optind; -} - -/* Initialize the internal data when the first call is made. */ - -static const char * -_getopt_initialize (int argc _GL_UNUSED, - char **argv _GL_UNUSED, const char *optstring, - struct _getopt_data *d, int posixly_correct) -{ - /* Start processing options with ARGV-element 1 (since ARGV-element 0 - is the program name); the sequence of previously skipped - non-option ARGV-elements is empty. */ - - d->__first_nonopt = d->__last_nonopt = d->optind; - - d->__nextchar = NULL; - - d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT"); - - /* Determine how to handle the ordering of options and nonoptions. */ - - if (optstring[0] == '-') - { - d->__ordering = RETURN_IN_ORDER; - ++optstring; - } - else if (optstring[0] == '+') - { - d->__ordering = REQUIRE_ORDER; - ++optstring; - } - else if (d->__posixly_correct) - d->__ordering = REQUIRE_ORDER; - else - d->__ordering = PERMUTE; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - if (!d->__posixly_correct - && argc == __libc_argc && argv == __libc_argv) - { - if (d->__nonoption_flags_max_len == 0) - { - if (__getopt_nonoption_flags == NULL - || __getopt_nonoption_flags[0] == '\0') - d->__nonoption_flags_max_len = -1; - else - { - const char *orig_str = __getopt_nonoption_flags; - int len = d->__nonoption_flags_max_len = strlen (orig_str); - if (d->__nonoption_flags_max_len < argc) - d->__nonoption_flags_max_len = argc; - __getopt_nonoption_flags = - (char *) malloc (d->__nonoption_flags_max_len); - if (__getopt_nonoption_flags == NULL) - d->__nonoption_flags_max_len = -1; - else - memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), - '\0', d->__nonoption_flags_max_len - len); - } - } - d->__nonoption_flags_len = d->__nonoption_flags_max_len; - } - else - d->__nonoption_flags_len = 0; -#endif - - return optstring; -} - -/* Scan elements of ARGV (whose length is ARGC) for option characters - given in OPTSTRING. - - If an element of ARGV starts with '-', and is not exactly "-" or "--", - then it is an option element. The characters of this element - (aside from the initial '-') are option characters. If 'getopt' - is called repeatedly, it returns successively each of the option characters - from each of the option elements. - - If 'getopt' finds another option character, it returns that character, - updating 'optind' and 'nextchar' so that the next call to 'getopt' can - resume the scan with the following option character or ARGV-element. - - If there are no more option characters, 'getopt' returns -1. - Then 'optind' is the index in ARGV of the first ARGV-element - that is not an option. (The ARGV-elements have been permuted - so that those that are not options now come last.) - - OPTSTRING is a string containing the legitimate option characters. - If an option character is seen that is not listed in OPTSTRING, - return '?' after printing an error message. If you set 'opterr' to - zero, the error message is suppressed but we still return '?'. - - If a char in OPTSTRING is followed by a colon, that means it wants an arg, - so the following text in the same ARGV-element, or the text of the following - ARGV-element, is returned in 'optarg'. Two colons mean an option that - wants an optional arg; if there is text in the current ARGV-element, - it is returned in 'optarg', otherwise 'optarg' is set to zero. - - If OPTSTRING starts with '-' or '+', it requests different methods of - handling the non-option ARGV-elements. - See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. - - Long-named options begin with '--' instead of '-'. - Their names may be abbreviated as long as the abbreviation is unique - or is an exact match for some defined option. If they have an - argument, it follows the option name in the same ARGV-element, separated - from the option name by a '=', or else the in next ARGV-element. - When 'getopt' finds a long-named option, it returns 0 if that option's - 'flag' field is nonzero, the value of the option's 'val' field - if the 'flag' field is zero. - - The elements of ARGV aren't really const, because we permute them. - But we pretend they're const in the prototype to be compatible - with other systems. - - LONGOPTS is a vector of 'struct option' terminated by an - element containing a name which is zero. - - LONGIND returns the index in LONGOPT of the long-named option found. - It is only valid when a long-named option has been found by the most - recent call. - - If LONG_ONLY is nonzero, '-' as well as '--' can introduce - long-named options. */ - -int -_getopt_internal_r (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, - int long_only, struct _getopt_data *d, int posixly_correct) -{ - int print_errors = d->opterr; - - if (argc < 1) - return -1; - - d->optarg = NULL; - - if (d->optind == 0 || !d->__initialized) - { - if (d->optind == 0) - d->optind = 1; /* Don't scan ARGV[0], the program name. */ - optstring = _getopt_initialize (argc, argv, optstring, d, - posixly_correct); - d->__initialized = 1; - } - else if (optstring[0] == '-' || optstring[0] == '+') - optstring++; - if (optstring[0] == ':') - print_errors = 0; - - /* Test whether ARGV[optind] points to a non-option argument. - Either it does not have option syntax, or there is an environment flag - from the shell indicating it is not an option. The later information - is only used when the used in the GNU libc. */ -#if defined _LIBC && defined USE_NONOPTION_FLAGS -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \ - || (d->optind < d->__nonoption_flags_len \ - && __getopt_nonoption_flags[d->optind] == '1')) -#else -# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0') -#endif - - if (d->__nextchar == NULL || *d->__nextchar == '\0') - { - /* Advance to the next ARGV-element. */ - - /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been - moved back by the user (who may also have changed the arguments). */ - if (d->__last_nonopt > d->optind) - d->__last_nonopt = d->optind; - if (d->__first_nonopt > d->optind) - d->__first_nonopt = d->optind; - - if (d->__ordering == PERMUTE) - { - /* If we have just processed some options following some non-options, - exchange them so that the options come first. */ - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__last_nonopt != d->optind) - d->__first_nonopt = d->optind; - - /* Skip any additional non-options - and extend the range of non-options previously skipped. */ - - while (d->optind < argc && NONOPTION_P) - d->optind++; - d->__last_nonopt = d->optind; - } - - /* The special ARGV-element '--' means premature end of options. - Skip it like a null option, - then exchange with previous non-options as if it were an option, - then skip everything else like a non-option. */ - - if (d->optind != argc && !strcmp (argv[d->optind], "--")) - { - d->optind++; - - if (d->__first_nonopt != d->__last_nonopt - && d->__last_nonopt != d->optind) - exchange ((char **) argv, d); - else if (d->__first_nonopt == d->__last_nonopt) - d->__first_nonopt = d->optind; - d->__last_nonopt = argc; - - d->optind = argc; - } - - /* If we have done all the ARGV-elements, stop the scan - and back over any non-options that we skipped and permuted. */ - - if (d->optind == argc) - { - /* Set the next-arg-index to point at the non-options - that we previously skipped, so the caller will digest them. */ - if (d->__first_nonopt != d->__last_nonopt) - d->optind = d->__first_nonopt; - return -1; - } - - /* If we have come to a non-option and did not permute it, - either stop the scan or describe it to the caller and pass it by. */ - - if (NONOPTION_P) - { - if (d->__ordering == REQUIRE_ORDER) - return -1; - d->optarg = argv[d->optind++]; - return 1; - } - - /* We have found another option-ARGV-element. - Skip the initial punctuation. */ - - d->__nextchar = (argv[d->optind] + 1 - + (longopts != NULL && argv[d->optind][1] == '-')); - } - - /* Decode the current option-ARGV-element. */ - - /* Check whether the ARGV-element is a long option. - - If long_only and the ARGV-element has the form "-f", where f is - a valid short option, don't consider it an abbreviated form of - a long option that starts with f. Otherwise there would be no - way to give the -f short option. - - On the other hand, if there's a long option "fubar" and - the ARGV-element is "-fu", do consider that an abbreviation of - the long option, just like "--fu", and not "-f" with arg "u". - - This distinction seems to be the most useful approach. */ - - if (longopts != NULL - && (argv[d->optind][1] == '-' - || (long_only && (argv[d->optind][2] - || !strchr (optstring, argv[d->optind][1]))))) - { - char *nameend; - unsigned int namelen; - const struct option *p; - const struct option *pfound = NULL; - struct option_list - { - const struct option *p; - struct option_list *next; - } *ambig_list = NULL; - int exact = 0; - int indfound = -1; - int option_index; - - for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++) - /* Do nothing. */ ; - namelen = nameend - d->__nextchar; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, namelen)) - { - if (namelen == (unsigned int) strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - { - /* Second or later nonexact match found. */ - struct option_list *newp = malloc (sizeof (*newp)); - newp->p = p; - newp->next = ambig_list; - ambig_list = newp; - } - } - - if (ambig_list != NULL && !exact) - { - if (print_errors) - { - struct option_list first; - first.p = pfound; - first.next = ambig_list; - ambig_list = &first; - -#if defined _LIBC && defined USE_IN_LIBIO - char *buf = NULL; - size_t buflen = 0; - - FILE *fp = open_memstream (&buf, &buflen); - if (fp != NULL) - { - fprintf (fp, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - - do - { - fprintf (fp, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc_unlocked ('\n', fp); - - if (__builtin_expect (fclose (fp) != EOF, 1)) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } - } -#else - fprintf (stderr, - _("%s: option '%s' is ambiguous; possibilities:"), - argv[0], argv[d->optind]); - do - { - fprintf (stderr, " '--%s'", ambig_list->p->name); - ambig_list = ambig_list->next; - } - while (ambig_list != NULL); - - fputc ('\n', stderr); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - d->optopt = 0; - return '?'; - } - - while (ambig_list != NULL) - { - struct option_list *pn = ambig_list->next; - free (ambig_list); - ambig_list = pn; - } - - if (pfound != NULL) - { - option_index = indfound; - d->optind++; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind - 1][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#else - fprintf (stderr, _("\ -%s: option '--%s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#else - fprintf (stderr, _("\ -%s: option '%c%s' doesn't allow an argument\n"), - argv[0], argv[d->optind - 1][0], - pfound->name); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - - d->__nextchar += strlen (d->__nextchar); - - d->optopt = pfound->val; - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '--%s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option '--%s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optopt = pfound->val; - return optstring[0] == ':' ? ':' : '?'; - } - } - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - /* Can't find it as a long option. If this is not getopt_long_only, - or the option starts with '--' or is not a valid short - option, then it's an error. - Otherwise interpret it as a short option. */ - if (!long_only || argv[d->optind][1] == '-' - || strchr (optstring, *d->__nextchar) == NULL) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - - if (argv[d->optind][1] == '-') - { - /* --option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '--%s'\n"), - argv[0], d->__nextchar); -#endif - } - else - { - /* +option or -option */ -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#else - fprintf (stderr, _("%s: unrecognized option '%c%s'\n"), - argv[0], argv[d->optind][0], d->__nextchar); -#endif - } - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->__nextchar = (char *) ""; - d->optind++; - d->optopt = 0; - return '?'; - } - } - - /* Look at and handle the next short option-character. */ - - { - char c = *d->__nextchar++; - const char *temp = strchr (optstring, c); - - /* Increment 'optind' when we start to process its last character. */ - if (*d->__nextchar == '\0') - ++d->optind; - - if (temp == NULL || c == ':' || c == ';') - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - int n; -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"), - argv[0], c); -#else - fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c); -#endif - -#if defined _LIBC && defined USE_IN_LIBIO - if (n >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#endif - } - d->optopt = c; - return '?'; - } - /* Convenience. Treat POSIX -W foo same as long option --foo */ - if (temp[0] == 'W' && temp[1] == ';') - { - char *nameend; - const struct option *p; - const struct option *pfound = NULL; - int exact = 0; - int ambig = 0; - int indfound = 0; - int option_index; - - if (longopts == NULL) - goto no_longs; - - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - return c; - } - else - /* We already incremented 'd->optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - - /* optarg is now the argument, see if it's in the - table of longopts. */ - - for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '='; - nameend++) - /* Do nothing. */ ; - - /* Test all long options for either exact match - or abbreviated matches. */ - for (p = longopts, option_index = 0; p->name; p++, option_index++) - if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar)) - { - if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name)) - { - /* Exact match found. */ - pfound = p; - indfound = option_index; - exact = 1; - break; - } - else if (pfound == NULL) - { - /* First nonexact match found. */ - pfound = p; - indfound = option_index; - } - else if (long_only - || pfound->has_arg != p->has_arg - || pfound->flag != p->flag - || pfound->val != p->val) - /* Second or later nonexact match found. */ - ambig = 1; - } - if (ambig && !exact) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"), - argv[0], d->optarg); -#endif - } - d->__nextchar += strlen (d->__nextchar); - d->optind++; - return '?'; - } - if (pfound != NULL) - { - option_index = indfound; - if (*nameend) - { - /* Don't test has_arg with >, because some C compilers don't - allow it to be used on enums. */ - if (pfound->has_arg) - d->optarg = nameend + 1; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' doesn't allow an argument\n"), - argv[0], pfound->name); -#endif - } - - d->__nextchar += strlen (d->__nextchar); - return '?'; - } - } - else if (pfound->has_arg == 1) - { - if (d->optind < argc) - d->optarg = argv[d->optind++]; - else - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 - |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, _("\ -%s: option '-W %s' requires an argument\n"), - argv[0], pfound->name); -#endif - } - d->__nextchar += strlen (d->__nextchar); - return optstring[0] == ':' ? ':' : '?'; - } - } - else - d->optarg = NULL; - d->__nextchar += strlen (d->__nextchar); - if (longind != NULL) - *longind = option_index; - if (pfound->flag) - { - *(pfound->flag) = pfound->val; - return 0; - } - return pfound->val; - } - - no_longs: - d->__nextchar = NULL; - return 'W'; /* Let the application handle it. */ - } - if (temp[1] == ':') - { - if (temp[2] == ':') - { - /* This is an option that accepts an argument optionally. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - d->optind++; - } - else - d->optarg = NULL; - d->__nextchar = NULL; - } - else - { - /* This is an option that requires an argument. */ - if (*d->__nextchar != '\0') - { - d->optarg = d->__nextchar; - /* If we end this ARGV-element by taking the rest as an arg, - we must advance to the next element now. */ - d->optind++; - } - else if (d->optind == argc) - { - if (print_errors) - { -#if defined _LIBC && defined USE_IN_LIBIO - char *buf; - - if (__asprintf (&buf, _("\ -%s: option requires an argument -- '%c'\n"), - argv[0], c) >= 0) - { - _IO_flockfile (stderr); - - int old_flags2 = ((_IO_FILE *) stderr)->_flags2; - ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL; - - __fxprintf (NULL, "%s", buf); - - ((_IO_FILE *) stderr)->_flags2 = old_flags2; - _IO_funlockfile (stderr); - - free (buf); - } -#else - fprintf (stderr, - _("%s: option requires an argument -- '%c'\n"), - argv[0], c); -#endif - } - d->optopt = c; - if (optstring[0] == ':') - c = ':'; - else - c = '?'; - } - else - /* We already incremented 'optind' once; - increment it again when taking next ARGV-elt as argument. */ - d->optarg = argv[d->optind++]; - d->__nextchar = NULL; - } - } - return c; - } -} - -int -_getopt_internal (int argc, char **argv, const char *optstring, - const struct option *longopts, int *longind, int long_only, - int posixly_correct) -{ - int result; - - getopt_data.optind = optind; - getopt_data.opterr = opterr; - - result = _getopt_internal_r (argc, argv, optstring, longopts, - longind, long_only, &getopt_data, - posixly_correct); - - optind = getopt_data.optind; - optarg = getopt_data.optarg; - optopt = getopt_data.optopt; - - return result; -} - -/* glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if _LIBC -enum { POSIXLY_CORRECT = 0 }; -#else -enum { POSIXLY_CORRECT = 1 }; -#endif - -int -getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, (char **) argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, POSIXLY_CORRECT); -} - -#ifdef _LIBC -int -__posix_getopt (int argc, char *const *argv, const char *optstring) -{ - return _getopt_internal (argc, argv, optstring, - (const struct option *) 0, - (int *) 0, - 0, 1); -} -#endif - - -#ifdef TEST - -/* Compile with -DTEST to make an executable for use in testing - the above definition of 'getopt'. */ - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - - c = getopt (argc, argv, "abc:d:0123456789"); - if (c == -1) - break; - - switch (c) - { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gnulib/lib/getopt.in.h b/gnulib/lib/getopt.in.h deleted file mode 100644 index 09c0a12..0000000 --- a/gnulib/lib/getopt.in.h +++ /dev/null @@ -1,253 +0,0 @@ -/* Declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-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 - 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 . */ - -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. We must - also inform the replacement unistd.h to not recursively use - ; our definitions will be present soon enough. */ -#if @HAVE_GETOPT_H@ -# define _GL_SYSTEM_GETOPT -# @INCLUDE_NEXT@ @NEXT_GETOPT_H@ -# undef _GL_SYSTEM_GETOPT -#endif - -#ifndef _@GUARD_PREFIX@_GETOPT_H - -#ifndef __need_getopt -# define _@GUARD_PREFIX@_GETOPT_H 1 -#endif - -/* Standalone applications should #define __GETOPT_PREFIX to an - identifier that prefixes the external functions and variables - defined in this header. When this happens, include the - headers that might declare getopt so that they will not cause - confusion if included after this file (if the system had , - we have already included it). Then systematically rename - identifiers so that they do not collide with the system functions - and variables. Renaming avoids problems with some compilers and - linkers. */ -#if defined __GETOPT_PREFIX && !defined __need_getopt -# if !@HAVE_GETOPT_H@ -# include -# include -# include -# endif -# undef __need_getopt -# undef getopt -# undef getopt_long -# undef getopt_long_only -# undef optarg -# undef opterr -# undef optind -# undef optopt -# undef option -# define __GETOPT_CONCAT(x, y) x ## y -# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y) -# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y) -# define getopt __GETOPT_ID (getopt) -# define getopt_long __GETOPT_ID (getopt_long) -# define getopt_long_only __GETOPT_ID (getopt_long_only) -# define optarg __GETOPT_ID (optarg) -# define opterr __GETOPT_ID (opterr) -# define optind __GETOPT_ID (optind) -# define optopt __GETOPT_ID (optopt) -# define option __GETOPT_ID (option) -# define _getopt_internal __GETOPT_ID (getopt_internal) -#endif - -/* Standalone applications get correct prototypes for getopt_long and - getopt_long_only; they declare "char **argv". libc uses prototypes - with "char *const *argv" that are incorrect because getopt_long and - getopt_long_only can permute argv; this is required for backward - compatibility (e.g., for LSB 2.0.1). - - This used to be '#if defined __GETOPT_PREFIX && !defined __need_getopt', - but it caused redefinition warnings if both unistd.h and getopt.h were - included, since unistd.h includes getopt.h having previously defined - __need_getopt. - - The only place where __getopt_argv_const is used is in definitions - of getopt_long and getopt_long_only below, but these are visible - only if __need_getopt is not defined, so it is quite safe to rewrite - the conditional as follows: -*/ -#if !defined __need_getopt -# if defined __GETOPT_PREFIX -# define __getopt_argv_const /* empty */ -# else -# define __getopt_argv_const const -# endif -#endif - -/* If __GNU_LIBRARY__ is not already defined, either we are being used - standalone, or this is the first header included in the source file. - If we are being used with glibc, we need to include , but - that does not exist if we are standalone. So: if __GNU_LIBRARY__ is - not defined, include , which will pull in for us - if it's from glibc. (Why ctype.h? It's guaranteed to exist and it - doesn't flood the namespace with stuff the way some other headers do.) */ -#if !defined __GNU_LIBRARY__ -# include -#endif - -#ifndef __THROW -# ifndef __GNUC_PREREQ -# define __GNUC_PREREQ(maj, min) (0) -# endif -# if defined __cplusplus && __GNUC_PREREQ (2,8) -# define __THROW throw () -# else -# define __THROW -# endif -#endif - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -#ifdef __cplusplus -extern "C" { -#endif - -/* For communication from 'getopt' to the caller. - When 'getopt' finds an option that takes an argument, - the argument value is returned here. - Also, when 'ordering' is RETURN_IN_ORDER, - each non-option ARGV-element is returned here. */ - -extern char *optarg; - -/* Index in ARGV of the next element to be scanned. - This is used for communication to and from the caller - and for communication between successive calls to 'getopt'. - - On entry to 'getopt', zero means this is the first call; initialize. - - When 'getopt' returns -1, this is the index of the first of the - non-option elements that the caller should itself scan. - - Otherwise, 'optind' communicates from one call to the next - how much of ARGV has been scanned so far. */ - -extern int optind; - -/* Callers store zero here to inhibit the error message 'getopt' prints - for unrecognized options. */ - -extern int opterr; - -/* Set to an option character which was unrecognized. */ - -extern int optopt; - -#ifndef __need_getopt -/* Describe the long-named options requested by the application. - The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector - of 'struct option' terminated by an element containing a name which is - zero. - - The field 'has_arg' is: - no_argument (or 0) if the option does not take an argument, - required_argument (or 1) if the option requires an argument, - optional_argument (or 2) if the option takes an optional argument. - - If the field 'flag' is not NULL, it points to a variable that is set - to the value given in the field 'val' when the option is found, but - left unchanged if the option is not found. - - To have a long-named option do something other than set an 'int' to - a compiled-in constant, such as set a value from 'optarg', set the - option's 'flag' field to zero and its 'val' field to a nonzero - value (the equivalent single-letter option character, if there is - one). For long options that have a zero 'flag' field, 'getopt' - returns the contents of the 'val' field. */ - -# if !GNULIB_defined_struct_option -struct option -{ - const char *name; - /* has_arg can't be an enum because some compilers complain about - type mismatches in all the code that assumes it is an int. */ - int has_arg; - int *flag; - int val; -}; -# define GNULIB_defined_struct_option 1 -# endif - -/* Names for the values of the 'has_arg' field of 'struct option'. */ - -# define no_argument 0 -# define required_argument 1 -# define optional_argument 2 -#endif /* need getopt */ - - -/* Get definitions and prototypes for functions to process the - arguments in ARGV (ARGC of them, minus the program name) for - options given in OPTS. - - Return the option character from OPTS just read. Return -1 when - there are no more options. For unrecognized options, or options - missing arguments, 'optopt' is set to the option letter, and '?' is - returned. - - The OPTS string is a list of characters which are recognized option - letters, optionally followed by colons, specifying that that letter - takes an argument, to be placed in 'optarg'. - - If a letter in OPTS is followed by two colons, its argument is - optional. This behavior is specific to the GNU 'getopt'. - - The argument '--' causes premature termination of argument - scanning, explicitly telling 'getopt' that there are no more - options. - - If OPTS begins with '-', then non-option arguments are treated as - arguments to the option '\1'. This behavior is specific to the GNU - 'getopt'. If OPTS begins with '+', or POSIXLY_CORRECT is set in - the environment, then do not permute arguments. */ - -extern int getopt (int ___argc, char *const *___argv, const char *__shortopts) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#ifndef __need_getopt -extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); -extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind) - __THROW _GL_ARG_NONNULL ((2, 3)); - -#endif - -#ifdef __cplusplus -} -#endif - -/* Make sure we later can get all the definitions and declarations. */ -#undef __need_getopt - -#endif /* _@GUARD_PREFIX@_GETOPT_H */ -#endif /* _@GUARD_PREFIX@_GETOPT_H */ diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c deleted file mode 100644 index cd053bd..0000000 --- a/gnulib/lib/getopt1.c +++ /dev/null @@ -1,170 +0,0 @@ -/* getopt_long and getopt_long_only entry points for GNU getopt. - Copyright (C) 1987-1994, 1996-1998, 2004, 2006, 2009-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 - 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 . */ - -#ifdef _LIBC -# include -#else -# include -# include "getopt.h" -#endif -#include "getopt_int.h" - -#include - -/* This needs to come after some library #include - to get __GNU_LIBRARY__ defined. */ -#ifdef __GNU_LIBRARY__ -#include -#endif - -#ifndef NULL -#define NULL 0 -#endif - -int -getopt_long (int argc, char *__getopt_argv_const *argv, const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 0, 0); -} - -int -_getopt_long_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 0, d, 0); -} - -/* Like getopt_long, but '-' as well as '--' can indicate a long option. - If an option that starts with '-' (not '--') doesn't match a long option, - but does match a short option, it is parsed as a short option - instead. */ - -int -getopt_long_only (int argc, char *__getopt_argv_const *argv, - const char *options, - const struct option *long_options, int *opt_index) -{ - return _getopt_internal (argc, (char **) argv, options, long_options, - opt_index, 1, 0); -} - -int -_getopt_long_only_r (int argc, char **argv, const char *options, - const struct option *long_options, int *opt_index, - struct _getopt_data *d) -{ - return _getopt_internal_r (argc, argv, options, long_options, opt_index, - 1, d, 0); -} - - -#ifdef TEST - -#include - -int -main (int argc, char **argv) -{ - int c; - int digit_optind = 0; - - while (1) - { - int this_option_optind = optind ? optind : 1; - int option_index = 0; - static const struct option long_options[] = - { - {"add", 1, 0, 0}, - {"append", 0, 0, 0}, - {"delete", 1, 0, 0}, - {"verbose", 0, 0, 0}, - {"create", 0, 0, 0}, - {"file", 1, 0, 0}, - {0, 0, 0, 0} - }; - - c = getopt_long (argc, argv, "abc:d:0123456789", - long_options, &option_index); - if (c == -1) - break; - - switch (c) - { - case 0: - printf ("option %s", long_options[option_index].name); - if (optarg) - printf (" with arg %s", optarg); - printf ("\n"); - break; - - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - if (digit_optind != 0 && digit_optind != this_option_optind) - printf ("digits occur in two different argv-elements.\n"); - digit_optind = this_option_optind; - printf ("option %c\n", c); - break; - - case 'a': - printf ("option a\n"); - break; - - case 'b': - printf ("option b\n"); - break; - - case 'c': - printf ("option c with value '%s'\n", optarg); - break; - - case 'd': - printf ("option d with value '%s'\n", optarg); - break; - - case '?': - break; - - default: - printf ("?? getopt returned character code 0%o ??\n", c); - } - } - - if (optind < argc) - { - printf ("non-option ARGV-elements: "); - while (optind < argc) - printf ("%s ", argv[optind++]); - printf ("\n"); - } - - exit (0); -} - -#endif /* TEST */ diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h deleted file mode 100644 index ce0853d..0000000 --- a/gnulib/lib/getopt_int.h +++ /dev/null @@ -1,135 +0,0 @@ -/* Internal declarations for getopt. - Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-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 - 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 . */ - -#ifndef _GETOPT_INT_H -#define _GETOPT_INT_H 1 - -#include - -extern int _getopt_internal (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, int __posixly_correct); - - -/* Reentrant versions which can handle parsing multiple argument - vectors at the same time. */ - -/* Describe how to deal with options that follow non-option ARGV-elements. - - If the caller did not specify anything, - the default is REQUIRE_ORDER if the environment variable - POSIXLY_CORRECT is defined, PERMUTE otherwise. - - REQUIRE_ORDER means don't recognize them as options; - stop option processing when the first non-option is seen. - This is what Unix does. - This mode of operation is selected by either setting the environment - variable POSIXLY_CORRECT, or using '+' as the first character - of the list of option characters, or by calling getopt. - - PERMUTE is the default. We permute the contents of ARGV as we - scan, so that eventually all the non-options are at the end. - This allows options to be given in any order, even with programs - that were not written to expect this. - - RETURN_IN_ORDER is an option available to programs that were - written to expect options and other ARGV-elements in any order - and that care about the ordering of the two. We describe each - non-option ARGV-element as if it were the argument of an option - with character code 1. Using '-' as the first character of the - list of option characters selects this mode of operation. - - The special argument '--' forces an end of option-scanning regardless - of the value of 'ordering'. In the case of RETURN_IN_ORDER, only - '--' can cause 'getopt' to return -1 with 'optind' != ARGC. */ - -enum __ord - { - REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER - }; - -/* Data type for reentrant functions. */ -struct _getopt_data -{ - /* These have exactly the same meaning as the corresponding global - variables, except that they are used for the reentrant - versions of getopt. */ - int optind; - int opterr; - int optopt; - char *optarg; - - /* Internal members. */ - - /* True if the internal members have been initialized. */ - int __initialized; - - /* The next char to be scanned in the option-element - in which the last option character we returned was found. - This allows us to pick up the scan where we left off. - - If this is zero, or a null string, it means resume the scan - by advancing to the next ARGV-element. */ - char *__nextchar; - - /* See __ord above. */ - enum __ord __ordering; - - /* If the POSIXLY_CORRECT environment variable is set - or getopt was called. */ - int __posixly_correct; - - - /* Handle permutation of arguments. */ - - /* Describe the part of ARGV that contains non-options that have - been skipped. 'first_nonopt' is the index in ARGV of the first - of them; 'last_nonopt' is the index after the last of them. */ - - int __first_nonopt; - int __last_nonopt; - -#if defined _LIBC && defined USE_NONOPTION_FLAGS - int __nonoption_flags_max_len; - int __nonoption_flags_len; -#endif -}; - -/* The initializer is necessary to set OPTIND and OPTERR to their - default values and to clear the initialization flag. */ -#define _GETOPT_DATA_INITIALIZER { 1, 1 } - -extern int _getopt_internal_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - int __long_only, struct _getopt_data *__data, - int __posixly_correct); - -extern int _getopt_long_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, int *__longind, - struct _getopt_data *__data); - -extern int _getopt_long_only_r (int ___argc, char **___argv, - const char *__shortopts, - const struct option *__longopts, - int *__longind, - struct _getopt_data *__data); - -#endif /* getopt_int.h */ diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h deleted file mode 100644 index 151ba4f..0000000 --- a/gnulib/lib/gettext.h +++ /dev/null @@ -1,288 +0,0 @@ -/* Convenience header for conditional use of GNU . - 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 - 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 . */ - -#ifndef _LIBGETTEXT_H -#define _LIBGETTEXT_H 1 - -/* NLS can be disabled through the configure --disable-nls option. */ -#if ENABLE_NLS - -/* Get declarations of GNU message catalog functions. */ -# include - -/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by - the gettext() and ngettext() macros. This is an alternative to calling - textdomain(), and is useful for libraries. */ -# ifdef DEFAULT_TEXT_DOMAIN -# undef gettext -# define gettext(Msgid) \ - dgettext (DEFAULT_TEXT_DOMAIN, Msgid) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) -# endif - -#else - -/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which - chokes if dcgettext is defined as a macro. So include it now, to make - later inclusions of a NOP. We don't include - as well because people using "gettext.h" will not include , - and also including would fail on SunOS 4, whereas - is OK. */ -#if defined(__sun) -# include -#endif - -/* Many header files from the libstdc++ coming with g++ 3.3 or newer include - , which chokes if dcgettext is defined as a macro. So include - it now, to make later inclusions of a NOP. */ -#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) -# include -# if (__GLIBC__ >= 2 && !defined __UCLIBC__) || _GLIBCXX_HAVE_LIBINTL_H -# include -# endif -#endif - -/* Disabled NLS. - The casts to 'const char *' serve the purpose of producing warnings - for invalid uses of the value returned from these functions. - On pre-ANSI systems without 'const', the config.h file is supposed to - contain "#define const". */ -# undef gettext -# define gettext(Msgid) ((const char *) (Msgid)) -# undef dgettext -# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) -# undef dcgettext -# define dcgettext(Domainname, Msgid, Category) \ - ((void) (Category), dgettext (Domainname, Msgid)) -# undef ngettext -# define ngettext(Msgid1, Msgid2, N) \ - ((N) == 1 \ - ? ((void) (Msgid2), (const char *) (Msgid1)) \ - : ((void) (Msgid1), (const char *) (Msgid2))) -# undef dngettext -# define dngettext(Domainname, Msgid1, Msgid2, N) \ - ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) -# undef dcngettext -# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ - ((void) (Category), dngettext (Domainname, Msgid1, Msgid2, N)) -# undef textdomain -# define textdomain(Domainname) ((const char *) (Domainname)) -# undef bindtextdomain -# define bindtextdomain(Domainname, Dirname) \ - ((void) (Domainname), (const char *) (Dirname)) -# undef bind_textdomain_codeset -# define bind_textdomain_codeset(Domainname, Codeset) \ - ((void) (Domainname), (const char *) (Codeset)) - -#endif - -/* Prefer gnulib's setlocale override over libintl's setlocale override. */ -#ifdef GNULIB_defined_setlocale -# undef setlocale -# define setlocale rpl_setlocale -#endif - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - -/* The separator between msgctxt and msgid in a .mo file. */ -#define GETTEXT_CONTEXT_GLUE "\004" - -/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a - MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be - short and rarely need to change. - The letter 'p' stands for 'particular' or 'special'. */ -#ifdef DEFAULT_TEXT_DOMAIN -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#else -# define pgettext(Msgctxt, Msgid) \ - pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#endif -#define dpgettext(Domainname, Msgctxt, Msgid) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) -#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ - pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) -#ifdef DEFAULT_TEXT_DOMAIN -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#else -# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#endif -#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ - npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -pgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - int category) -{ - const char *translation = dcgettext (domain, msg_ctxt_id, category); - if (translation == msg_ctxt_id) - return msgid; - else - return translation; -} - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -npgettext_aux (const char *domain, - const char *msg_ctxt_id, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - const char *translation = - dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); - if (translation == msg_ctxt_id || translation == msgid_plural) - return (n == 1 ? msgid : msgid_plural); - else - return translation; -} - -/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID - can be arbitrary expressions. But for string literals these macros are - less efficient than those above. */ - -#include - -#if (((__GNUC__ >= 3 || __GNUG__ >= 2) && !defined __STRICT_ANSI__) \ - /* || __STDC_VERSION__ >= 199901L */ ) -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 1 -#else -# define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS 0 -#endif - -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS -#include -#endif - -#define pgettext_expr(Msgctxt, Msgid) \ - dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) -#define dpgettext_expr(Domainname, Msgctxt, Msgid) \ - dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcgettext (domain, msg_ctxt_id, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (translation != msg_ctxt_id) - return translation; - } - return msgid; -} - -#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) -#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ - dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) - -#ifdef __GNUC__ -__inline -#else -#ifdef __cplusplus -inline -#endif -#endif -static const char * -dcnpgettext_expr (const char *domain, - const char *msgctxt, const char *msgid, - const char *msgid_plural, unsigned long int n, - int category) -{ - size_t msgctxt_len = strlen (msgctxt) + 1; - size_t msgid_len = strlen (msgid) + 1; - const char *translation; -#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - char msg_ctxt_id[msgctxt_len + msgid_len]; -#else - char buf[1024]; - char *msg_ctxt_id = - (msgctxt_len + msgid_len <= sizeof (buf) - ? buf - : (char *) malloc (msgctxt_len + msgid_len)); - if (msg_ctxt_id != NULL) -#endif - { - memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); - msg_ctxt_id[msgctxt_len - 1] = '\004'; - memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); - translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); -#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS - if (msg_ctxt_id != buf) - free (msg_ctxt_id); -#endif - if (!(translation == msg_ctxt_id || translation == msgid_plural)) - return translation; - } - return (n == 1 ? msgid : msgid_plural); -} - -#endif /* _LIBGETTEXT_H */ diff --git a/gnulib/lib/gettimeofday.c b/gnulib/lib/gettimeofday.c deleted file mode 100644 index 17fcd43..0000000 --- a/gnulib/lib/gettimeofday.c +++ /dev/null @@ -1,154 +0,0 @@ -/* 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 deleted file mode 100644 index cc7fefa..0000000 --- a/gnulib/lib/isblank.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Test whether a character is a blank. - - 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 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 - -int -isblank (int c) -{ - /* On all known platforms, in all predefined locales, isblank(c) is likely - equivalent with (c == ' ' || c == '\t'). Look at the glibc definition - (in glibc/localedata/locales/i18n): The "blank" characters are '\t', ' ', - U+1680, U+180E, U+2000..U+2006, U+2008..U+200A, U+205F, U+3000, and none - except the first two is present in a common 8-bit encoding. Therefore - the substitute for other platforms is not more complicated than this. */ - return (c == ' ' || c == '\t'); -} diff --git a/gnulib/lib/itold.c b/gnulib/lib/itold.c deleted file mode 100644 index 8bc02ff..0000000 --- a/gnulib/lib/itold.c +++ /dev/null @@ -1,28 +0,0 @@ -/* 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 deleted file mode 100644 index 30b5560..0000000 --- a/gnulib/lib/langinfo.in.h +++ /dev/null @@ -1,176 +0,0 @@ -/* Substitute for and wrapper around . - 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 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 . */ - -/* - * POSIX for platforms that lack it or have an incomplete one. - * - */ - -#ifndef _@GUARD_PREFIX@_LANGINFO_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_LANGINFO_H@ -# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@ -#endif - -#ifndef _@GUARD_PREFIX@_LANGINFO_H -#define _@GUARD_PREFIX@_LANGINFO_H - - -#if !@HAVE_LANGINFO_H@ - -/* A platform that lacks . */ - -/* Assume that it also lacks and the nl_item type. */ -# if !GNULIB_defined_nl_item -typedef int nl_item; -# define GNULIB_defined_nl_item 1 -# endif - -/* nl_langinfo items of the LC_CTYPE category */ -# define CODESET 10000 -/* nl_langinfo items of the LC_NUMERIC category */ -# define RADIXCHAR 10001 -# define THOUSEP 10002 -/* nl_langinfo items of the LC_TIME category */ -# define D_T_FMT 10003 -# define D_FMT 10004 -# define T_FMT 10005 -# define T_FMT_AMPM 10006 -# define AM_STR 10007 -# define PM_STR 10008 -# define DAY_1 10009 -# define DAY_2 (DAY_1 + 1) -# define DAY_3 (DAY_1 + 2) -# define DAY_4 (DAY_1 + 3) -# define DAY_5 (DAY_1 + 4) -# define DAY_6 (DAY_1 + 5) -# define DAY_7 (DAY_1 + 6) -# define ABDAY_1 10016 -# define ABDAY_2 (ABDAY_1 + 1) -# define ABDAY_3 (ABDAY_1 + 2) -# define ABDAY_4 (ABDAY_1 + 3) -# define ABDAY_5 (ABDAY_1 + 4) -# define ABDAY_6 (ABDAY_1 + 5) -# define ABDAY_7 (ABDAY_1 + 6) -# define MON_1 10023 -# define MON_2 (MON_1 + 1) -# define MON_3 (MON_1 + 2) -# define MON_4 (MON_1 + 3) -# define MON_5 (MON_1 + 4) -# define MON_6 (MON_1 + 5) -# define MON_7 (MON_1 + 6) -# define MON_8 (MON_1 + 7) -# define MON_9 (MON_1 + 8) -# define MON_10 (MON_1 + 9) -# define MON_11 (MON_1 + 10) -# define MON_12 (MON_1 + 11) -# define ABMON_1 10035 -# define ABMON_2 (ABMON_1 + 1) -# define ABMON_3 (ABMON_1 + 2) -# define ABMON_4 (ABMON_1 + 3) -# define ABMON_5 (ABMON_1 + 4) -# define ABMON_6 (ABMON_1 + 5) -# define ABMON_7 (ABMON_1 + 6) -# define ABMON_8 (ABMON_1 + 7) -# define ABMON_9 (ABMON_1 + 8) -# define ABMON_10 (ABMON_1 + 9) -# define ABMON_11 (ABMON_1 + 10) -# define ABMON_12 (ABMON_1 + 11) -# define ERA 10047 -# define ERA_D_FMT 10048 -# define ERA_D_T_FMT 10049 -# define ERA_T_FMT 10050 -# define ALT_DIGITS 10051 -/* nl_langinfo items of the LC_MONETARY category */ -# define CRNCYSTR 10052 -/* nl_langinfo items of the LC_MESSAGES category */ -# define YESEXPR 10053 -# define NOEXPR 10054 - -#else - -/* A platform that has . */ - -# if !@HAVE_LANGINFO_CODESET@ -# define CODESET 10000 -# define GNULIB_defined_CODESET 1 -# endif - -# if !@HAVE_LANGINFO_T_FMT_AMPM@ -# define T_FMT_AMPM 10006 -# define GNULIB_defined_T_FMT_AMPM 1 -# endif - -# if !@HAVE_LANGINFO_ERA@ -# define ERA 10047 -# define ERA_D_FMT 10048 -# define ERA_D_T_FMT 10049 -# define ERA_T_FMT 10050 -# define ALT_DIGITS 10051 -# define GNULIB_defined_ERA 1 -# endif - -# if !@HAVE_LANGINFO_YESEXPR@ -# define YESEXPR 10053 -# define NOEXPR 10054 -# define GNULIB_defined_YESEXPR 1 -# endif - -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Declare overridden functions. */ - - -/* Return a piece of locale dependent information. - Note: The difference between nl_langinfo (CODESET) and locale_charset () - is that the latter normalizes the encoding names to GNU conventions. */ - -#if @GNULIB_NL_LANGINFO@ -# if @REPLACE_NL_LANGINFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef nl_langinfo -# define nl_langinfo rpl_nl_langinfo -# endif -_GL_FUNCDECL_RPL (nl_langinfo, char *, (nl_item item)); -_GL_CXXALIAS_RPL (nl_langinfo, char *, (nl_item item)); -# else -# if !@HAVE_NL_LANGINFO@ -_GL_FUNCDECL_SYS (nl_langinfo, char *, (nl_item item)); -# endif -_GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item)); -# endif -_GL_CXXALIASWARN (nl_langinfo); -#elif defined GNULIB_POSIXCHECK -# undef nl_langinfo -# if HAVE_RAW_DECL_NL_LANGINFO -_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - " - "use gnulib module nl_langinfo for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_LANGINFO_H */ -#endif /* _@GUARD_PREFIX@_LANGINFO_H */ diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c deleted file mode 100644 index 48e8a48..0000000 --- a/gnulib/lib/localcharset.c +++ /dev/null @@ -1,546 +0,0 @@ -/* Determine a canonical name for the current locale's character encoding. - - 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 - 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 Bruno Haible . */ - -#include - -/* Specification. */ -#include "localcharset.h" - -#include -#include -#include -#include -#include - -#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET -# define DARWIN7 /* Darwin 7 or newer, i.e. Mac OS X 10.3 or newer */ -#endif - -#if defined _WIN32 || defined __WIN32__ -# define WINDOWS_NATIVE -#endif - -#if defined __EMX__ -/* Assume EMX program runs on OS/2, even if compiled under DOS. */ -# ifndef OS2 -# define OS2 -# endif -#endif - -#if !defined WINDOWS_NATIVE -# include -# if HAVE_LANGINFO_CODESET -# include -# else -# if 0 /* see comment below */ -# include -# endif -# endif -# ifdef __CYGWIN__ -# define WIN32_LEAN_AND_MEAN -# include -# endif -#elif defined WINDOWS_NATIVE -# define WIN32_LEAN_AND_MEAN -# include -#endif -#if defined OS2 -# define INCL_DOS -# include -#endif - -#if ENABLE_RELOCATABLE -# include "relocatable.h" -#else -# define relocate(pathname) (pathname) -#endif - -/* Get LIBDIR. */ -#ifndef LIBDIR -# include "configmake.h" -#endif - -/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */ -#ifndef O_NOFOLLOW -# define O_NOFOLLOW 0 -#endif - -#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ - /* Native Windows, Cygwin, OS/2, DOS */ -# define ISSLASH(C) ((C) == '/' || (C) == '\\') -#endif - -#ifndef DIRECTORY_SEPARATOR -# define DIRECTORY_SEPARATOR '/' -#endif - -#ifndef ISSLASH -# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR) -#endif - -#if HAVE_DECL_GETC_UNLOCKED -# undef getc -# define getc getc_unlocked -#endif - -/* The following static variable is declared 'volatile' to avoid a - possible multithread problem in the function get_charset_aliases. If we - are running in a threaded environment, and if two threads initialize - 'charset_aliases' simultaneously, both will produce the same value, - and everything will be ok if the two assignments to 'charset_aliases' - are atomic. But I don't know what will happen if the two assignments mix. */ -#if __STDC__ != 1 -# define volatile /* empty */ -#endif -/* Pointer to the contents of the charset.alias file, if it has already been - read, else NULL. Its format is: - ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */ -static const char * volatile charset_aliases; - -/* Return a pointer to the contents of the charset.alias file. */ -static const char * -get_charset_aliases (void) -{ - const char *cp; - - cp = charset_aliases; - if (cp == NULL) - { -#if !(defined DARWIN7 || defined VMS || defined WINDOWS_NATIVE || defined __CYGWIN__) - const char *dir; - const char *base = "charset.alias"; - char *file_name; - - /* Make it possible to override the charset.alias location. This is - necessary for running the testsuite before "make install". */ - dir = getenv ("CHARSETALIASDIR"); - if (dir == NULL || dir[0] == '\0') - dir = relocate (LIBDIR); - - /* Concatenate dir and base into freshly allocated file_name. */ - { - size_t dir_len = strlen (dir); - size_t base_len = strlen (base); - int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1])); - file_name = (char *) malloc (dir_len + add_slash + base_len + 1); - if (file_name != NULL) - { - memcpy (file_name, dir, dir_len); - if (add_slash) - file_name[dir_len] = DIRECTORY_SEPARATOR; - memcpy (file_name + dir_len + add_slash, base, base_len + 1); - } - } - - if (file_name == NULL) - /* Out of memory. Treat the file as empty. */ - cp = ""; - else - { - int fd; - - /* Open the file. Reject symbolic links on platforms that support - O_NOFOLLOW. This is a security feature. Without it, an attacker - could retrieve parts of the contents (namely, the tail of the - first line that starts with "* ") of an arbitrary file by placing - a symbolic link to that file under the name "charset.alias" in - some writable directory and defining the environment variable - CHARSETALIASDIR to point to that directory. */ - fd = open (file_name, - O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0)); - if (fd < 0) - /* File not found. Treat it as empty. */ - cp = ""; - else - { - FILE *fp; - - fp = fdopen (fd, "r"); - if (fp == NULL) - { - /* Out of memory. Treat the file as empty. */ - close (fd); - cp = ""; - } - else - { - /* Parse the file's contents. */ - char *res_ptr = NULL; - size_t res_size = 0; - - for (;;) - { - int c; - char buf1[50+1]; - char buf2[50+1]; - size_t l1, l2; - char *old_res_ptr; - - c = getc (fp); - if (c == EOF) - break; - if (c == '\n' || c == ' ' || c == '\t') - continue; - if (c == '#') - { - /* Skip comment, to end of line. */ - do - c = getc (fp); - while (!(c == EOF || c == '\n')); - if (c == EOF) - break; - continue; - } - ungetc (c, fp); - if (fscanf (fp, "%50s %50s", buf1, buf2) < 2) - break; - l1 = strlen (buf1); - l2 = strlen (buf2); - old_res_ptr = res_ptr; - if (res_size == 0) - { - res_size = l1 + 1 + l2 + 1; - res_ptr = (char *) malloc (res_size + 1); - } - else - { - res_size += l1 + 1 + l2 + 1; - res_ptr = (char *) realloc (res_ptr, res_size + 1); - } - if (res_ptr == NULL) - { - /* Out of memory. */ - res_size = 0; - free (old_res_ptr); - break; - } - strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1); - strcpy (res_ptr + res_size - (l2 + 1), buf2); - } - fclose (fp); - if (res_size == 0) - cp = ""; - else - { - *(res_ptr + res_size) = '\0'; - cp = res_ptr; - } - } - } - - free (file_name); - } - -#else - -# if defined DARWIN7 - /* To avoid the trouble of installing a file that is shared by many - GNU packages -- many packaging systems have problems with this --, - simply inline the aliases here. */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-4" "\0" "ISO-8859-4" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - "ISO8859-13" "\0" "ISO-8859-13" "\0" - "ISO8859-15" "\0" "ISO-8859-15" "\0" - "KOI8-R" "\0" "KOI8-R" "\0" - "KOI8-U" "\0" "KOI8-U" "\0" - "CP866" "\0" "CP866" "\0" - "CP949" "\0" "CP949" "\0" - "CP1131" "\0" "CP1131" "\0" - "CP1251" "\0" "CP1251" "\0" - "eucCN" "\0" "GB2312" "\0" - "GB2312" "\0" "GB2312" "\0" - "eucJP" "\0" "EUC-JP" "\0" - "eucKR" "\0" "EUC-KR" "\0" - "Big5" "\0" "BIG5" "\0" - "Big5HKSCS" "\0" "BIG5-HKSCS" "\0" - "GBK" "\0" "GBK" "\0" - "GB18030" "\0" "GB18030" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "ARMSCII-8" "\0" "ARMSCII-8" "\0" - "PT154" "\0" "PT154" "\0" - /*"ISCII-DEV" "\0" "?" "\0"*/ - "*" "\0" "UTF-8" "\0"; -# endif - -# if defined VMS - /* To avoid the troubles of an extra file charset.alias_vms in the - sources of many GNU packages, simply inline the aliases here. */ - /* The list of encodings is taken from the OpenVMS 7.3-1 documentation - "Compaq C Run-Time Library Reference Manual for OpenVMS systems" - section 10.7 "Handling Different Character Sets". */ - cp = "ISO8859-1" "\0" "ISO-8859-1" "\0" - "ISO8859-2" "\0" "ISO-8859-2" "\0" - "ISO8859-5" "\0" "ISO-8859-5" "\0" - "ISO8859-7" "\0" "ISO-8859-7" "\0" - "ISO8859-8" "\0" "ISO-8859-8" "\0" - "ISO8859-9" "\0" "ISO-8859-9" "\0" - /* Japanese */ - "eucJP" "\0" "EUC-JP" "\0" - "SJIS" "\0" "SHIFT_JIS" "\0" - "DECKANJI" "\0" "DEC-KANJI" "\0" - "SDECKANJI" "\0" "EUC-JP" "\0" - /* Chinese */ - "eucTW" "\0" "EUC-TW" "\0" - "DECHANYU" "\0" "DEC-HANYU" "\0" - "DECHANZI" "\0" "GB2312" "\0" - /* Korean */ - "DECKOREAN" "\0" "EUC-KR" "\0"; -# endif - -# if defined WINDOWS_NATIVE || defined __CYGWIN__ - /* To avoid the troubles of installing a separate file in the same - directory as the DLL and of retrieving the DLL's directory at - runtime, simply inline the aliases here. */ - - cp = "CP936" "\0" "GBK" "\0" - "CP1361" "\0" "JOHAB" "\0" - "CP20127" "\0" "ASCII" "\0" - "CP20866" "\0" "KOI8-R" "\0" - "CP20936" "\0" "GB2312" "\0" - "CP21866" "\0" "KOI8-RU" "\0" - "CP28591" "\0" "ISO-8859-1" "\0" - "CP28592" "\0" "ISO-8859-2" "\0" - "CP28593" "\0" "ISO-8859-3" "\0" - "CP28594" "\0" "ISO-8859-4" "\0" - "CP28595" "\0" "ISO-8859-5" "\0" - "CP28596" "\0" "ISO-8859-6" "\0" - "CP28597" "\0" "ISO-8859-7" "\0" - "CP28598" "\0" "ISO-8859-8" "\0" - "CP28599" "\0" "ISO-8859-9" "\0" - "CP28605" "\0" "ISO-8859-15" "\0" - "CP38598" "\0" "ISO-8859-8" "\0" - "CP51932" "\0" "EUC-JP" "\0" - "CP51936" "\0" "GB2312" "\0" - "CP51949" "\0" "EUC-KR" "\0" - "CP51950" "\0" "EUC-TW" "\0" - "CP54936" "\0" "GB18030" "\0" - "CP65001" "\0" "UTF-8" "\0"; -# endif -#endif - - charset_aliases = cp; - } - - return cp; -} - -/* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. - The result must not be freed; it is statically allocated. - If the canonical name cannot be determined, the result is a non-canonical - name. */ - -#ifdef STATIC -STATIC -#endif -const char * -locale_charset (void) -{ - const char *codeset; - const char *aliases; - -#if !(defined WINDOWS_NATIVE || defined OS2) - -# if HAVE_LANGINFO_CODESET - - /* Most systems support nl_langinfo (CODESET) nowadays. */ - codeset = nl_langinfo (CODESET); - -# ifdef __CYGWIN__ - /* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always - returns "US-ASCII". Return the suffix of the locale name from the - environment variables (if present) or the codepage as a number. */ - if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0) - { - const char *locale; - static char buf[2 + 10 + 1]; - - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return - it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - } - - /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). This encoding is used by Cygwin, unless the user - has set the environment variable CYGWIN=codepage:oem (which very few - people do). - Output directed to console windows needs to be converted (to - GetOEMCP() if the console is using a raster font, or to - GetConsoleOutputCP() if it is using a TrueType font). Cygwin does - this conversion transparently (see winsup/cygwin/fhandler_console.cc), - converting to GetConsoleOutputCP(). This leads to correct results, - except when SetConsoleOutputCP has been called and a raster font is - in use. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; - } -# endif - -# else - - /* On old systems which lack it, use setlocale or getenv. */ - const char *locale = NULL; - - /* But most old systems don't have a complete set of locales. Some - (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't - use setlocale here; it would return "C" when it doesn't support the - locale name the user has set. */ -# if 0 - locale = setlocale (LC_CTYPE, NULL); -# endif - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - } - - /* On some old systems, one used to set locale = "iso8859_1". On others, - you set it to "language_COUNTRY.charset". In any case, we resolve it - through the charset.alias file. */ - codeset = locale; - -# endif - -#elif defined WINDOWS_NATIVE - - static char buf[2 + 10 + 1]; - - /* The Windows API has a function returning the locale's codepage as a - number: GetACP(). - When the output goes to a console window, it needs to be provided in - GetOEMCP() encoding if the console is using a raster font, or in - GetConsoleOutputCP() encoding if it is using a TrueType font. - But in GUI programs and for output sent to files and pipes, GetACP() - encoding is the best bet. */ - sprintf (buf, "CP%u", GetACP ()); - codeset = buf; - -#elif defined OS2 - - const char *locale; - static char buf[2 + 10 + 1]; - ULONG cp[3]; - ULONG cplen; - - /* Allow user to override the codeset, as set in the operating system, - with standard language environment variables. */ - locale = getenv ("LC_ALL"); - if (locale == NULL || locale[0] == '\0') - { - locale = getenv ("LC_CTYPE"); - if (locale == NULL || locale[0] == '\0') - locale = getenv ("LANG"); - } - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - - /* Resolve through the charset.alias file. */ - codeset = locale; - } - else - { - /* OS/2 has a function returning the locale's codepage as a number. */ - if (DosQueryCp (sizeof (cp), cp, &cplen)) - codeset = ""; - else - { - sprintf (buf, "CP%u", cp[0]); - codeset = buf; - } - } - -#endif - - if (codeset == NULL) - /* The canonical name cannot be determined. */ - codeset = ""; - - /* Resolve alias. */ - for (aliases = get_charset_aliases (); - *aliases != '\0'; - aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1) - if (strcmp (codeset, aliases) == 0 - || (aliases[0] == '*' && aliases[1] == '\0')) - { - codeset = aliases + strlen (aliases) + 1; - break; - } - - /* Don't return an empty string. GNU libc and GNU libiconv interpret - the empty string as denoting "the locale's character encoding", - thus GNU libiconv would call this function a second time. */ - if (codeset[0] == '\0') - codeset = "ASCII"; - - return codeset; -} diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h deleted file mode 100644 index 7c30e69..0000000 --- a/gnulib/lib/localcharset.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Determine a canonical name for the current locale's character encoding. - 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 - 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 . */ - -#ifndef _LOCALCHARSET_H -#define _LOCALCHARSET_H - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Determine the current locale's character encoding, and canonicalize it - into one of the canonical names listed in config.charset. - The result must not be freed; it is statically allocated. - If the canonical name cannot be determined, the result is a non-canonical - name. */ -extern const char * locale_charset (void); - - -#ifdef __cplusplus -} -#endif - - -#endif /* _LOCALCHARSET_H */ diff --git a/gnulib/lib/locale.in.h b/gnulib/lib/locale.in.h deleted file mode 100644 index 605b3fe..0000000 --- a/gnulib/lib/locale.in.h +++ /dev/null @@ -1,201 +0,0 @@ -/* A POSIX . - 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 of the License, or - (at your option) any later version. - - This program is distributed in the hope that 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 . */ - -#ifndef _@GUARD_PREFIX@_LOCALE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_LOCALE_H@ - -#ifndef _@GUARD_PREFIX@_LOCALE_H -#define _@GUARD_PREFIX@_LOCALE_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* Mac OS X 10.5 defines the locale_t type in . */ -#if @HAVE_XLOCALE_H@ -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* The LC_MESSAGES locale category is specified in POSIX, but not in ISO C. - On systems that don't define it, use the same value as GNU libintl. */ -#if !defined LC_MESSAGES -# define LC_MESSAGES 1729 -#endif - -/* Bionic libc's 'struct lconv' is just a dummy. */ -#if @REPLACE_STRUCT_LCONV@ -# define lconv rpl_lconv -struct lconv -{ - /* All 'char *' are actually 'const char *'. */ - - /* Members that depend on the LC_NUMERIC category of the locale. See - */ - - /* Symbol used as decimal point. */ - char *decimal_point; - /* Symbol used to separate groups of digits to the left of the decimal - point. */ - char *thousands_sep; - /* Definition of the size of groups of digits to the left of the decimal - point. */ - char *grouping; - - /* Members that depend on the LC_MONETARY category of the locale. See - */ - - /* Symbol used as decimal point. */ - char *mon_decimal_point; - /* Symbol used to separate groups of digits to the left of the decimal - point. */ - char *mon_thousands_sep; - /* Definition of the size of groups of digits to the left of the decimal - point. */ - char *mon_grouping; - /* Sign used to indicate a value >= 0. */ - char *positive_sign; - /* Sign used to indicate a value < 0. */ - char *negative_sign; - - /* For formatting local currency. */ - /* Currency symbol (3 characters) followed by separator (1 character). */ - char *currency_symbol; - /* Number of digits after the decimal point. */ - char frac_digits; - /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it - comes after the number. */ - char p_cs_precedes; - /* For values >= 0: Position of the sign. */ - char p_sign_posn; - /* For values >= 0: Placement of spaces between currency symbol, sign, and - number. */ - char p_sep_by_space; - /* For values < 0: 1 if the currency symbol precedes the number, 0 if it - comes after the number. */ - char n_cs_precedes; - /* For values < 0: Position of the sign. */ - char n_sign_posn; - /* For values < 0: Placement of spaces between currency symbol, sign, and - number. */ - char n_sep_by_space; - - /* For formatting international currency. */ - /* Currency symbol (3 characters) followed by separator (1 character). */ - char *int_curr_symbol; - /* Number of digits after the decimal point. */ - char int_frac_digits; - /* For values >= 0: 1 if the currency symbol precedes the number, 0 if it - comes after the number. */ - char int_p_cs_precedes; - /* For values >= 0: Position of the sign. */ - char int_p_sign_posn; - /* For values >= 0: Placement of spaces between currency symbol, sign, and - number. */ - char int_p_sep_by_space; - /* For values < 0: 1 if the currency symbol precedes the number, 0 if it - comes after the number. */ - char int_n_cs_precedes; - /* For values < 0: Position of the sign. */ - char int_n_sign_posn; - /* For values < 0: Placement of spaces between currency symbol, sign, and - number. */ - char int_n_sep_by_space; -}; -#endif - -#if @GNULIB_LOCALECONV@ -# if @REPLACE_LOCALECONV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localeconv -# define localeconv rpl_localeconv -# endif -_GL_FUNCDECL_RPL (localeconv, struct lconv *, (void)); -_GL_CXXALIAS_RPL (localeconv, struct lconv *, (void)); -# else -_GL_CXXALIAS_SYS (localeconv, struct lconv *, (void)); -# endif -_GL_CXXALIASWARN (localeconv); -#elif @REPLACE_STRUCT_LCONV@ -# undef localeconv -# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv -#elif defined GNULIB_POSIXCHECK -# undef localeconv -# if HAVE_RAW_DECL_LOCALECONV -_GL_WARN_ON_USE (localeconv, - "localeconv returns too few information on some platforms - " - "use gnulib module localeconv for portability"); -# endif -#endif - -#if @GNULIB_SETLOCALE@ -# if @REPLACE_SETLOCALE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setlocale -# define setlocale rpl_setlocale -# define GNULIB_defined_setlocale 1 -# endif -_GL_FUNCDECL_RPL (setlocale, char *, (int category, const char *locale)); -_GL_CXXALIAS_RPL (setlocale, char *, (int category, const char *locale)); -# else -_GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale)); -# endif -_GL_CXXALIASWARN (setlocale); -#elif defined GNULIB_POSIXCHECK -# undef setlocale -# if HAVE_RAW_DECL_SETLOCALE -_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - " - "use gnulib module setlocale for portability"); -# endif -#endif - -#if @GNULIB_DUPLOCALE@ -# if @REPLACE_DUPLOCALE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef duplocale -# define duplocale rpl_duplocale -# endif -_GL_FUNCDECL_RPL (duplocale, locale_t, (locale_t locale) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (duplocale, locale_t, (locale_t locale)); -# else -# if @HAVE_DUPLOCALE@ -_GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale)); -# endif -# endif -# if @HAVE_DUPLOCALE@ -_GL_CXXALIASWARN (duplocale); -# endif -#elif defined GNULIB_POSIXCHECK -# undef duplocale -# if HAVE_RAW_DECL_DUPLOCALE -_GL_WARN_ON_USE (duplocale, "duplocale is buggy on some glibc systems - " - "use gnulib module duplocale for portability"); -# endif -#endif - -#endif /* _@GUARD_PREFIX@_LOCALE_H */ -#endif /* _@GUARD_PREFIX@_LOCALE_H */ diff --git a/gnulib/lib/localeconv.c b/gnulib/lib/localeconv.c deleted file mode 100644 index 1e1640f..0000000 --- a/gnulib/lib/localeconv.c +++ /dev/null @@ -1,103 +0,0 @@ -/* 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 deleted file mode 100644 index cee2649..0000000 --- a/gnulib/lib/lstat.c +++ /dev/null @@ -1,97 +0,0 @@ -/* Work around a bug of lstat on some systems - - 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 - 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 . */ - -/* written by Jim Meyering */ - -/* If the user's config.h happens to include , let it include only - the system's here, so that orig_lstat doesn't recurse to - rpl_lstat. */ -#define __need_system_sys_stat_h -#include - -#if !HAVE_LSTAT -/* On systems that lack symlinks, our replacement already - defined lstat as stat, so there is nothing further to do other than - avoid an empty file. */ -typedef int dummy; -#else /* HAVE_LSTAT */ - -/* Get the original definition of lstat. It might be defined as a macro. */ -# include -# include -# undef __need_system_sys_stat_h - -static inline int -orig_lstat (const char *filename, struct stat *buf) -{ - return lstat (filename, buf); -} - -/* Specification. */ -/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc - eliminates this include because of the preliminary #include - above. */ -# include "sys/stat.h" - -# include -# include - -/* lstat works differently on Linux and Solaris systems. POSIX (see - "pathname resolution" in the glossary) requires that programs like - 'ls' take into consideration the fact that FILE has a trailing slash - when FILE is a symbolic link. On Linux and Solaris 10 systems, the - lstat function already has the desired semantics (in treating - 'lstat ("symlink/", sbuf)' just like 'lstat ("symlink/.", sbuf)', - but on Solaris 9 and earlier it does not. - - If FILE has a trailing slash and specifies a symbolic link, - then use stat() to get more info on the referent of FILE. - If the referent is a non-directory, then set errno to ENOTDIR - and return -1. Otherwise, return stat's result. */ - -int -rpl_lstat (const char *file, struct stat *sbuf) -{ - size_t len; - int lstat_result = orig_lstat (file, sbuf); - - if (lstat_result != 0) - return lstat_result; - - /* This replacement file can blindly check against '/' rather than - using the ISSLASH macro, because all platforms with '\\' either - lack symlinks (mingw) or have working lstat (cygwin) and thus do - not compile this file. 0 len should have already been filtered - out above, with a failure return of ENOENT. */ - len = strlen (file); - if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode)) - return 0; - - /* At this point, a trailing slash is only permitted on - symlink-to-dir; but it should have found information on the - directory, not the symlink. Call stat() to get info about the - link's referent. Our replacement stat guarantees valid results, - even if the symlink is not pointing to a directory. */ - if (!S_ISLNK (sbuf->st_mode)) - { - errno = ENOTDIR; - return -1; - } - return stat (file, sbuf); -} - -#endif /* HAVE_LSTAT */ diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c deleted file mode 100644 index 1edf22d..0000000 --- a/gnulib/lib/malloc.c +++ /dev/null @@ -1,56 +0,0 @@ -/* malloc() function that is glibc compatible. - - 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 - 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 and Bruno Haible */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include -/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */ -#ifdef malloc -# define NEED_MALLOC_GNU 1 -# undef malloc -/* Whereas the gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#elif GNULIB_MALLOC_GNU && !HAVE_MALLOC_GNU -# define NEED_MALLOC_GNU 1 -#endif - -#include - -#include - -/* Allocate an N-byte block of memory from the heap. - If N is zero, allocate a 1-byte block. */ - -void * -rpl_malloc (size_t n) -{ - void *result; - -#if NEED_MALLOC_GNU - if (n == 0) - n = 1; -#endif - - result = malloc (n); - -#if !HAVE_MALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c deleted file mode 100644 index c80c3a2..0000000 --- a/gnulib/lib/malloca.c +++ /dev/null @@ -1,140 +0,0 @@ -/* Safe automatic memory allocation. - 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 - 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 . */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include - -/* Specification. */ -#include "malloca.h" - -#include - -#include "verify.h" - -/* The speed critical point in this file is freea() applied to an alloca() - result: it must be fast, to match the speed of alloca(). The speed of - mmalloca() and freea() in the other case are not critical, because they - are only invoked for big memory sizes. */ - -#if HAVE_ALLOCA - -/* Store the mmalloca() results in a hash table. This is needed to reliably - distinguish a mmalloca() result and an alloca() result. - - Although it is possible that the same pointer is returned by alloca() and - by mmalloca() at different times in the same application, it does not lead - to a bug in freea(), because: - - Before a pointer returned by alloca() can point into malloc()ed memory, - the function must return, and once this has happened the programmer must - not call freea() on it anyway. - - Before a pointer returned by mmalloca() can point into the stack, it - must be freed. The only function that can free it is freea(), and - when freea() frees it, it also removes it from the hash table. */ - -#define MAGIC_NUMBER 0x1415fb4a -#define MAGIC_SIZE sizeof (int) -/* This is how the header info would look like without any alignment - considerations. */ -struct preliminary_header { void *next; char room[MAGIC_SIZE]; }; -/* But the header's size must be a multiple of sa_alignment_max. */ -#define HEADER_SIZE \ - (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max) -struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; }; -verify (HEADER_SIZE == sizeof (struct header)); -/* We make the hash table quite big, so that during lookups the probability - of empty hash buckets is quite high. There is no need to make the hash - table resizable, because when the hash table gets filled so much that the - lookup becomes slow, it means that the application has memory leaks. */ -#define HASH_TABLE_SIZE 257 -static void * mmalloca_results[HASH_TABLE_SIZE]; - -#endif - -void * -mmalloca (size_t n) -{ -#if HAVE_ALLOCA - /* Allocate one more word, that serves as an indicator for malloc()ed - memory, so that freea() of an alloca() result is fast. */ - size_t nplus = n + HEADER_SIZE; - - if (nplus >= n) - { - char *p = (char *) malloc (nplus); - - if (p != NULL) - { - size_t slot; - - p += HEADER_SIZE; - - /* Put a magic number into the indicator word. */ - ((int *) p)[-1] = MAGIC_NUMBER; - - /* Enter p into the hash table. */ - slot = (uintptr_t) p % HASH_TABLE_SIZE; - ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot]; - mmalloca_results[slot] = p; - - return p; - } - } - /* Out of memory. */ - return NULL; -#else -# if !MALLOC_0_IS_NONNULL - if (n == 0) - n = 1; -# endif - return malloc (n); -#endif -} - -#if HAVE_ALLOCA -void -freea (void *p) -{ - /* mmalloca() may have returned NULL. */ - if (p != NULL) - { - /* Attempt to quickly distinguish the mmalloca() result - which has - a magic indicator word - and the alloca() result - which has an - uninitialized indicator word. It is for this test that sa_increment - additional bytes are allocated in the alloca() case. */ - if (((int *) p)[-1] == MAGIC_NUMBER) - { - /* Looks like a mmalloca() result. To see whether it really is one, - perform a lookup in the hash table. */ - size_t slot = (uintptr_t) p % HASH_TABLE_SIZE; - void **chain = &mmalloca_results[slot]; - for (; *chain != NULL;) - { - if (*chain == p) - { - /* Found it. Remove it from the hash table and free it. */ - char *p_begin = (char *) p - HEADER_SIZE; - *chain = ((struct header *) p_begin)->next; - free (p_begin); - return; - } - chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next; - } - } - /* At this point, we know it was not a mmalloca() result. */ - } -} -#endif diff --git a/gnulib/lib/malloca.h b/gnulib/lib/malloca.h deleted file mode 100644 index 160f146..0000000 --- a/gnulib/lib/malloca.h +++ /dev/null @@ -1,133 +0,0 @@ -/* Safe automatic memory allocation. - 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 - 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 . */ - -#ifndef _MALLOCA_H -#define _MALLOCA_H - -#include -#include -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call - alloca(N); otherwise it returns NULL. It either returns N bytes of - memory allocated on the stack, that lasts until the function returns, - or NULL. - Use of safe_alloca should be avoided: - - inside arguments of function calls - undefined behaviour, - - in inline functions - the allocation may actually last until the - calling function returns. -*/ -#if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - allocate anything larger than 4096 bytes. Also care for the possibility - of a few compiler-allocated temporary stack slots. - This must be a macro, not an inline function. */ -# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL) -#else -# define safe_alloca(N) ((void) (N), NULL) -#endif - -/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of - memory allocated on the stack, that must be freed using freea() before - the function returns. Upon failure, it returns NULL. */ -#if HAVE_ALLOCA -# define malloca(N) \ - ((N) < 4032 - sa_increment \ - ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \ - : mmalloca (N)) -#else -# define malloca(N) \ - mmalloca (N) -#endif -extern void * mmalloca (size_t n); - -/* Free a block of memory allocated through malloca(). */ -#if HAVE_ALLOCA -extern void freea (void *p); -#else -# define freea free -#endif - -/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S). - It allocates an array of N objects, each with S bytes of memory, - on the stack. S must be positive and N must be nonnegative. - The array must be freed using freea() before the function returns. */ -#if 1 -/* Cf. the definition of xalloc_oversized. */ -# define nmalloca(n, s) \ - ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \ - ? NULL \ - : malloca ((n) * (s))) -#else -extern void * nmalloca (size_t n, size_t s); -#endif - - -#ifdef __cplusplus -} -#endif - - -/* ------------------- Auxiliary, non-public definitions ------------------- */ - -/* Determine the alignment of a type at compile time. */ -#if defined __GNUC__ -# define sa_alignof __alignof__ -#elif defined __cplusplus - template struct sa_alignof_helper { char __slot1; type __slot2; }; -# define sa_alignof(type) offsetof (sa_alignof_helper, __slot2) -#elif defined __hpux - /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof - values. */ -# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) -#elif defined _AIX - /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof - values. */ -# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8) -#else -# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2) -#endif - -enum -{ -/* The desired alignment of memory allocations is the maximum alignment - among all elementary types. */ - sa_alignment_long = sa_alignof (long), - sa_alignment_double = sa_alignof (double), -#if HAVE_LONG_LONG_INT - sa_alignment_longlong = sa_alignof (long long), -#endif - sa_alignment_longdouble = sa_alignof (long double), - sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1) -#if HAVE_LONG_LONG_INT - | (sa_alignment_longlong - 1) -#endif - | (sa_alignment_longdouble - 1) - ) + 1, -/* The increment that guarantees room for a magic word must be >= sizeof (int) - and a multiple of sa_alignment_max. */ - sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max -}; - -#endif /* _MALLOCA_H */ diff --git a/gnulib/lib/malloca.valgrind b/gnulib/lib/malloca.valgrind deleted file mode 100644 index 52f0a50..0000000 --- a/gnulib/lib/malloca.valgrind +++ /dev/null @@ -1,7 +0,0 @@ -# Suppress a valgrind message about use of uninitialized memory in freea(). -# This use is OK because it provides only a speedup. -{ - freea - Memcheck:Cond - fun:freea -} diff --git a/gnulib/lib/mbrtowc.c b/gnulib/lib/mbrtowc.c deleted file mode 100644 index ad53b4c..0000000 --- a/gnulib/lib/mbrtowc.c +++ /dev/null @@ -1,402 +0,0 @@ -/* Convert multibyte character to wide character. - 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 - 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 GNULIB_defined_mbstate_t -/* Implement mbrtowc() on top of mbtowc(). */ - -# include -# include - -# include "localcharset.h" -# include "streq.h" -# include "verify.h" - - -verify (sizeof (mbstate_t) >= 4); - -static char internal_state[4]; - -size_t -mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ - char *pstate = (char *)ps; - - if (s == NULL) - { - pwc = NULL; - s = ""; - n = 1; - } - - if (n == 0) - return (size_t)(-2); - - /* Here n > 0. */ - - if (pstate == NULL) - pstate = internal_state; - - { - size_t nstate = pstate[0]; - char buf[4]; - const char *p; - size_t m; - - switch (nstate) - { - case 0: - p = s; - m = n; - break; - case 3: - buf[2] = pstate[3]; - /*FALLTHROUGH*/ - case 2: - buf[1] = pstate[2]; - /*FALLTHROUGH*/ - case 1: - buf[0] = pstate[1]; - p = buf; - m = nstate; - buf[m++] = s[0]; - if (n >= 2 && m < 4) - { - buf[m++] = s[1]; - if (n >= 3 && m < 4) - buf[m++] = s[2]; - } - break; - default: - errno = EINVAL; - return (size_t)(-1); - } - - /* Here m > 0. */ - -# if __GLIBC__ || defined __UCLIBC__ - /* Work around bug */ - mbtowc (NULL, NULL, 0); -# endif - { - int res = mbtowc (pwc, p, m); - - if (res >= 0) - { - if (pwc != NULL && ((*pwc == 0) != (res == 0))) - abort (); - if (nstate >= (res > 0 ? res : 1)) - abort (); - res -= nstate; - pstate[0] = 0; - return res; - } - - /* mbtowc does not distinguish between invalid and incomplete multibyte - sequences. But mbrtowc needs to make this distinction. - There are two possible approaches: - - Use iconv() and its return value. - - Use built-in knowledge about the possible encodings. - Given the low quality of implementation of iconv() on the systems that - lack mbrtowc(), we use the second approach. - The possible encodings are: - - 8-bit encodings, - - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS, - - UTF-8. - Use specialized code for each. */ - if (m >= 4 || m >= MB_CUR_MAX) - goto invalid; - /* Here MB_CUR_MAX > 1 and 0 < m < 4. */ - { - const char *encoding = locale_charset (); - - if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0)) - { - /* Cf. unistr/u8-mblen.c. */ - unsigned char c = (unsigned char) p[0]; - - if (c >= 0xc2) - { - if (c < 0xe0) - { - if (m == 1) - goto incomplete; - } - else if (c < 0xf0) - { - if (m == 1) - goto incomplete; - if (m == 2) - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xe1 || c2 >= 0xa0) - && (c != 0xed || c2 < 0xa0)) - goto incomplete; - } - } - else if (c <= 0xf4) - { - if (m == 1) - goto incomplete; - else /* m == 2 || m == 3 */ - { - unsigned char c2 = (unsigned char) p[1]; - - if ((c2 ^ 0x80) < 0x40 - && (c >= 0xf1 || c2 >= 0x90) - && (c < 0xf4 || (c == 0xf4 && c2 < 0x90))) - { - if (m == 2) - goto incomplete; - else /* m == 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if ((c3 ^ 0x80) < 0x40) - goto incomplete; - } - } - } - } - } - goto invalid; - } - - /* As a reference for this code, you can use the GNU libiconv - implementation. Look for uses of the RET_TOOFEW macro. */ - - if (STREQ_OPT (encoding, - "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f) - goto incomplete; - } - if (m == 2) - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8f) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0xa1 && c2 < 0xff) - goto incomplete; - } - } - goto invalid; - } - if (STREQ_OPT (encoding, - "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - || STREQ_OPT (encoding, - "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0) - || STREQ_OPT (encoding, - "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0xa1 && c < 0xff) - goto incomplete; - } - goto invalid; - } - if (STREQ_OPT (encoding, - "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0xa1 && c < 0xff) || c == 0x8e) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c == 0x8e) - goto incomplete; - } - goto invalid; - } - if (STREQ_OPT (encoding, - "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe)) - goto incomplete; - } - else /* m == 2 || m == 3 */ - { - unsigned char c = (unsigned char) p[0]; - - if (c >= 0x90 && c <= 0xe3) - { - unsigned char c2 = (unsigned char) p[1]; - - if (c2 >= 0x30 && c2 <= 0x39) - { - if (m == 2) - goto incomplete; - else /* m == 3 */ - { - unsigned char c3 = (unsigned char) p[2]; - - if (c3 >= 0x81 && c3 <= 0xfe) - goto incomplete; - } - } - } - } - goto invalid; - } - if (STREQ_OPT (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0)) - { - if (m == 1) - { - unsigned char c = (unsigned char) p[0]; - - if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea) - || (c >= 0xf0 && c <= 0xf9)) - goto incomplete; - } - goto invalid; - } - - /* An unknown multibyte encoding. */ - goto incomplete; - } - - incomplete: - { - size_t k = nstate; - /* Here 0 <= k < m < 4. */ - pstate[++k] = s[0]; - if (k < m) - { - pstate[++k] = s[1]; - if (k < m) - pstate[++k] = s[2]; - } - if (k != m) - abort (); - } - pstate[0] = m; - return (size_t)(-2); - - invalid: - errno = EILSEQ; - /* The conversion state is undefined, says POSIX. */ - return (size_t)(-1); - } - } -} - -#else -/* Override the system's mbrtowc() function. */ - -# undef mbrtowc - -size_t -rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) -{ -# if MBRTOWC_NULL_ARG2_BUG || MBRTOWC_RETVAL_BUG - if (s == NULL) - { - pwc = NULL; - s = ""; - n = 1; - } -# endif - -# if MBRTOWC_RETVAL_BUG - { - static mbstate_t internal_state; - - /* Override mbrtowc's internal state. We cannot call mbsinit() on the - hidden internal state, but we can call it on our variable. */ - if (ps == NULL) - ps = &internal_state; - - if (!mbsinit (ps)) - { - /* Parse the rest of the multibyte character byte for byte. */ - size_t count = 0; - for (; n > 0; s++, n--) - { - wchar_t wc; - size_t ret = mbrtowc (&wc, s, 1, ps); - - if (ret == (size_t)(-1)) - return (size_t)(-1); - count++; - if (ret != (size_t)(-2)) - { - /* The multibyte character has been completed. */ - if (pwc != NULL) - *pwc = wc; - return (wc == 0 ? 0 : count); - } - } - return (size_t)(-2); - } - } -# endif - -# if MBRTOWC_NUL_RETVAL_BUG - { - wchar_t wc; - size_t ret = mbrtowc (&wc, s, n, ps); - - if (ret != (size_t)(-1) && ret != (size_t)(-2)) - { - if (pwc != NULL) - *pwc = wc; - if (wc == 0) - ret = 0; - } - return ret; - } -# else - { -# if MBRTOWC_NULL_ARG1_BUG - wchar_t dummy; - - if (pwc == NULL) - pwc = &dummy; -# endif - - return mbrtowc (pwc, s, n, ps); - } -# endif -} - -#endif diff --git a/gnulib/lib/mbsinit.c b/gnulib/lib/mbsinit.c deleted file mode 100644 index ff1b230..0000000 --- a/gnulib/lib/mbsinit.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Test for initial conversion state. - 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 - 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 - -#include "verify.h" - -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - -/* On native Windows, 'mbstate_t' is defined as 'int'. */ - -int -mbsinit (const mbstate_t *ps) -{ - return ps == NULL || *ps == 0; -} - -#else - -/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs() - and wcrtomb(), wcsrtombs(). - We assume that - - sizeof (mbstate_t) >= 4, - - only stateless encodings are supported (such as UTF-8 and EUC-JP, but - not ISO-2022 variants), - - for each encoding, the number of bytes for a wide character is <= 4. - (This maximum is attained for UTF-8, GB18030, EUC-TW.) - We define the meaning of mbstate_t as follows: - - In mb -> wc direction, mbstate_t's first byte contains the number of - buffered bytes (in the range 0..3), followed by up to 3 buffered bytes. - - In wc -> mb direction, mbstate_t contains no information. In other - words, it is always in the initial state. */ - -verify (sizeof (mbstate_t) >= 4); - -int -mbsinit (const mbstate_t *ps) -{ - const char *pstate = (const char *)ps; - - return pstate == NULL || pstate[0] == 0; -} - -#endif diff --git a/gnulib/lib/mbsrtowcs-impl.h b/gnulib/lib/mbsrtowcs-impl.h deleted file mode 100644 index 0585291..0000000 --- a/gnulib/lib/mbsrtowcs-impl.h +++ /dev/null @@ -1,122 +0,0 @@ -/* Convert string to wide string. - 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 - 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 . */ - -size_t -mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) -{ - if (ps == NULL) - ps = &_gl_mbsrtowcs_state; - { - const char *src = *srcp; - - if (dest != NULL) - { - wchar_t *destptr = dest; - - for (; len > 0; destptr++, len--) - { - size_t src_avail; - size_t ret; - - /* An optimized variant of - src_avail = strnlen1 (src, MB_LEN_MAX); */ - if (src[0] == '\0') - src_avail = 1; - else if (src[1] == '\0') - src_avail = 2; - else if (src[2] == '\0') - src_avail = 3; - else if (MB_LEN_MAX <= 4 || src[3] == '\0') - src_avail = 4; - else - src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); - - /* Parse the next multibyte character. */ - ret = mbrtowc (destptr, src, src_avail, ps); - - if (ret == (size_t)(-2)) - /* Encountered a multibyte character that extends past a '\0' byte - or that is longer than MB_LEN_MAX bytes. Cannot happen. */ - abort (); - - if (ret == (size_t)(-1)) - goto bad_input; - if (ret == 0) - { - src = NULL; - /* Here mbsinit (ps). */ - break; - } - src += ret; - } - - *srcp = src; - return destptr - dest; - } - else - { - /* Ignore dest and len, don't store *srcp at the end, and - don't clobber *ps. */ - mbstate_t state = *ps; - size_t totalcount = 0; - - for (;; totalcount++) - { - size_t src_avail; - size_t ret; - - /* An optimized variant of - src_avail = strnlen1 (src, MB_LEN_MAX); */ - if (src[0] == '\0') - src_avail = 1; - else if (src[1] == '\0') - src_avail = 2; - else if (src[2] == '\0') - src_avail = 3; - else if (MB_LEN_MAX <= 4 || src[3] == '\0') - src_avail = 4; - else - src_avail = 4 + strnlen1 (src + 4, MB_LEN_MAX - 4); - - /* Parse the next multibyte character. */ - ret = mbrtowc (NULL, src, src_avail, &state); - - if (ret == (size_t)(-2)) - /* Encountered a multibyte character that extends past a '\0' byte - or that is longer than MB_LEN_MAX bytes. Cannot happen. */ - abort (); - - if (ret == (size_t)(-1)) - goto bad_input2; - if (ret == 0) - { - /* Here mbsinit (&state). */ - break; - } - src += ret; - } - - return totalcount; - } - - bad_input: - *srcp = src; - bad_input2: - errno = EILSEQ; - return (size_t)(-1); - } -} diff --git a/gnulib/lib/mbsrtowcs-state.c b/gnulib/lib/mbsrtowcs-state.c deleted file mode 100644 index b4c67cb..0000000 --- a/gnulib/lib/mbsrtowcs-state.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Convert string to wide string. - 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 - 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 - -#include - -/* Internal state used by the functions mbsrtowcs() and mbsnrtowcs(). */ -mbstate_t _gl_mbsrtowcs_state -/* The state must initially be in the "initial state"; so, zero-initialize it. - On most systems, putting it into BSS is sufficient. Not so on Mac OS X 10.3, - see . - When it needs an initializer, use 0 or {0} as initializer? 0 only works - when mbstate_t is a scalar type (such as when gnulib defines it, or on - AIX, IRIX, mingw). {0} works as an initializer in all cases: for a struct - or union type, but also for a scalar type (ISO C 99, 6.7.8.(11)). */ -#if defined __ELF__ - /* On ELF systems, variables in BSS behave well. */ -#else - /* Use braces, to be on the safe side. */ - = { 0 } -#endif - ; diff --git a/gnulib/lib/mbsrtowcs.c b/gnulib/lib/mbsrtowcs.c deleted file mode 100644 index 03f5077..0000000 --- a/gnulib/lib/mbsrtowcs.c +++ /dev/null @@ -1,32 +0,0 @@ -/* Convert string to wide string. - 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 - 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 - -#include -#include -#include - -#include "strnlen1.h" - - -extern mbstate_t _gl_mbsrtowcs_state; - -#include "mbsrtowcs-impl.h" diff --git a/gnulib/lib/mbtowc-impl.h b/gnulib/lib/mbtowc-impl.h deleted file mode 100644 index 6a859bc..0000000 --- a/gnulib/lib/mbtowc-impl.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Convert multibyte character to wide character. - 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 . */ - -/* We don't need a static internal state, because the encoding is not state - dependent, and when mbrtowc returns (size_t)(-2). we throw the result - away. */ - -int -mbtowc (wchar_t *pwc, const char *s, size_t n) -{ - if (s == NULL) - return 0; - else - { - mbstate_t state; - wchar_t wc; - size_t result; - - memset (&state, 0, sizeof (mbstate_t)); - result = mbrtowc (&wc, s, n, &state); - if (result == (size_t)-1 || result == (size_t)-2) - { - errno = EILSEQ; - return -1; - } - if (pwc != NULL) - *pwc = wc; - return (wc == 0 ? 0 : result); - } -} diff --git a/gnulib/lib/mbtowc.c b/gnulib/lib/mbtowc.c deleted file mode 100644 index 744954b..0000000 --- a/gnulib/lib/mbtowc.c +++ /dev/null @@ -1,26 +0,0 @@ -/* Convert multibyte character to wide character. - 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 - -#include - -#include -#include -#include - -#include "mbtowc-impl.h" diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c deleted file mode 100644 index e7d5b10..0000000 --- a/gnulib/lib/memchr.c +++ /dev/null @@ -1,172 +0,0 @@ -/* 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), - with help from Dan Sahlin (dan@sics.se) and - commentary by Jim Blandy (jimb@ai.mit.edu); - adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu), - and implemented by Roland McGrath (roland@ai.mit.edu). - -NOTE: The canonical source of this file is maintained with the GNU C Library. -Bugs can be reported to bug-glibc@prep.ai.mit.edu. - -This program is free software: you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as published by the -Free Software Foundation; either version 2.1 of the License, or any -later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU 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 . */ - -#ifndef _LIBC -# include -#endif - -#include - -#include - -#if defined _LIBC -# include -#else -# define reg_char char -#endif - -#include - -#if HAVE_BP_SYM_H || defined _LIBC -# include -#else -# define BP_SYM(sym) sym -#endif - -#undef __memchr -#ifdef _LIBC -# undef memchr -#endif - -#ifndef weak_alias -# define __memchr memchr -#endif - -/* Search no more than N bytes of S for C. */ -void * -__memchr (void const *s, int c_in, size_t n) -{ - /* On 32-bit hardware, choosing longword to be a 32-bit unsigned - long instead of a 64-bit uintmax_t tends to give better - performance. On 64-bit hardware, unsigned long is generally 64 - bits already. Change this typedef to experiment with - performance. */ - typedef unsigned long int longword; - - const unsigned char *char_ptr; - const longword *longword_ptr; - longword repeated_one; - longword repeated_c; - unsigned reg_char c; - - c = (unsigned char) c_in; - - /* Handle the first few bytes by reading one byte at a time. - Do this until CHAR_PTR is aligned on a longword boundary. */ - for (char_ptr = (const unsigned char *) s; - n > 0 && (size_t) char_ptr % sizeof (longword) != 0; - --n, ++char_ptr) - if (*char_ptr == c) - return (void *) char_ptr; - - longword_ptr = (const longword *) char_ptr; - - /* All these elucidatory comments refer to 4-byte longwords, - but the theory applies equally well to any size longwords. */ - - /* Compute auxiliary longword values: - repeated_one is a value which has a 1 in every byte. - repeated_c has c in every byte. */ - repeated_one = 0x01010101; - repeated_c = c | (c << 8); - repeated_c |= repeated_c << 16; - if (0xffffffffU < (longword) -1) - { - repeated_one |= repeated_one << 31 << 1; - repeated_c |= repeated_c << 31 << 1; - if (8 < sizeof (longword)) - { - size_t i; - - for (i = 64; i < sizeof (longword) * 8; i *= 2) - { - repeated_one |= repeated_one << i; - repeated_c |= repeated_c << i; - } - } - } - - /* Instead of the traditional loop which tests each byte, we will test a - longword at a time. The tricky part is testing if *any of the four* - bytes in the longword in question are equal to c. We first use an xor - with repeated_c. This reduces the task to testing whether *any of the - four* bytes in longword1 is zero. - - We compute tmp = - ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7). - That is, we perform the following operations: - 1. Subtract repeated_one. - 2. & ~longword1. - 3. & a mask consisting of 0x80 in every byte. - Consider what happens in each byte: - - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff, - and step 3 transforms it into 0x80. A carry can also be propagated - to more significant bytes. - - If a byte of longword1 is nonzero, let its lowest 1 bit be at - position k (0 <= k <= 7); so the lowest k bits are 0. After step 1, - the byte ends in a single bit of value 0 and k bits of value 1. - After step 2, the result is just k bits of value 1: 2^k - 1. After - step 3, the result is 0. And no carry is produced. - So, if longword1 has only non-zero bytes, tmp is zero. - Whereas if longword1 has a zero byte, call j the position of the least - significant zero byte. Then the result has a zero at positions 0, ..., - j-1 and a 0x80 at position j. We cannot predict the result at the more - significant bytes (positions j+1..3), but it does not matter since we - already have a non-zero bit at position 8*j+7. - - So, the test whether any byte in longword1 is zero is equivalent to - testing whether tmp is nonzero. */ - - while (n >= sizeof (longword)) - { - longword longword1 = *longword_ptr ^ repeated_c; - - if ((((longword1 - repeated_one) & ~longword1) - & (repeated_one << 7)) != 0) - break; - longword_ptr++; - n -= sizeof (longword); - } - - char_ptr = (const unsigned char *) longword_ptr; - - /* At this point, we know that either n < sizeof (longword), or one of the - sizeof (longword) bytes starting at char_ptr is == c. On little-endian - machines, we could determine the first such byte without any further - memory accesses, just by looking at the tmp result from the last loop - iteration. But this does not work on big-endian machines. Choose code - that works in both cases. */ - - for (; n > 0; --n, ++char_ptr) - { - if (*char_ptr == c) - return (void *) char_ptr; - } - - return NULL; -} -#ifdef weak_alias -weak_alias (__memchr, BP_SYM (memchr)) -#endif diff --git a/gnulib/lib/memchr.valgrind b/gnulib/lib/memchr.valgrind deleted file mode 100644 index 60f247e..0000000 --- a/gnulib/lib/memchr.valgrind +++ /dev/null @@ -1,14 +0,0 @@ -# Suppress a valgrind message about use of uninitialized memory in memchr(). -# POSIX states that when the character is found, memchr must not read extra -# bytes in an overestimated length (for example, where memchr is used to -# implement strnlen). However, we use a safe word read to provide a speedup. -{ - memchr-value4 - Memcheck:Value4 - fun:rpl_memchr -} -{ - memchr-value8 - Memcheck:Value8 - fun:rpl_memchr -} diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c deleted file mode 100644 index c68331a..0000000 --- a/gnulib/lib/mempcpy.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copy memory area and return pointer after last written byte. - 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 - 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 . */ - -#include - -/* Specification. */ -#include - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -void * -mempcpy (void *dest, const void *src, size_t n) -{ - return (char *) memcpy (dest, src, n) + n; -} diff --git a/gnulib/lib/mkstemp.c b/gnulib/lib/mkstemp.c deleted file mode 100644 index 541425f..0000000 --- a/gnulib/lib/mkstemp.c +++ /dev/null @@ -1,50 +0,0 @@ -/* 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 deleted file mode 100644 index d4e4173..0000000 --- a/gnulib/lib/nl_langinfo.c +++ /dev/null @@ -1,271 +0,0 @@ -/* nl_langinfo() replacement: query locale dependent information. - - 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 of the License, or - (at your option) any later version. - - This program is distributed in the hope that 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 REPLACE_NL_LANGINFO - -/* Override nl_langinfo with support for added nl_item values. */ - -# include -# include - -# undef nl_langinfo - -char * -rpl_nl_langinfo (nl_item item) -{ - switch (item) - { -# if GNULIB_defined_CODESET - case CODESET: - { - const char *locale; - static char buf[2 + 10 + 1]; - - locale = setlocale (LC_CTYPE, NULL); - if (locale != NULL && locale[0] != '\0') - { - /* If the locale name contains an encoding after the dot, return - it. */ - const char *dot = strchr (locale, '.'); - - if (dot != NULL) - { - const char *modifier; - - dot++; - /* Look for the possible @... trailer and remove it, if any. */ - modifier = strchr (dot, '@'); - if (modifier == NULL) - return dot; - if (modifier - dot < sizeof (buf)) - { - memcpy (buf, dot, modifier - dot); - buf [modifier - dot] = '\0'; - return buf; - } - } - } - return ""; - } -# endif -# if GNULIB_defined_T_FMT_AMPM - case T_FMT_AMPM: - return "%I:%M:%S %p"; -# endif -# if GNULIB_defined_ERA - case ERA: - /* The format is not standardized. In glibc it is a sequence of strings - of the form "direction:offset:start_date:end_date:era_name:era_format" - with an empty string at the end. */ - return ""; - case ERA_D_FMT: - /* The %Ex conversion in strftime behaves like %x if the locale does not - have an alternative time format. */ - item = D_FMT; - break; - case ERA_D_T_FMT: - /* The %Ec conversion in strftime behaves like %c if the locale does not - have an alternative time format. */ - item = D_T_FMT; - break; - case ERA_T_FMT: - /* The %EX conversion in strftime behaves like %X if the locale does not - have an alternative time format. */ - item = T_FMT; - break; - case ALT_DIGITS: - /* The format is not standardized. In glibc it is a sequence of 10 - strings, appended in memory. */ - return "\0\0\0\0\0\0\0\0\0\0"; -# endif -# if GNULIB_defined_YESEXPR || !FUNC_NL_LANGINFO_YESEXPR_WORKS - case YESEXPR: - return "^[yY]"; - case NOEXPR: - return "^[nN]"; -# endif - default: - break; - } - return nl_langinfo (item); -} - -#else - -/* Provide nl_langinfo from scratch. */ - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* Native Windows platforms. */ - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# include - -# else - -/* An old Unix platform without locales, such as Linux libc5 or BeOS. */ - -# endif - -# include - -char * -nl_langinfo (nl_item item) -{ - switch (item) - { - /* nl_langinfo items of the LC_CTYPE category */ - case CODESET: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { - static char buf[2 + 10 + 1]; - - /* The Windows API has a function returning the locale's codepage as - a number. */ - sprintf (buf, "CP%u", GetACP ()); - return buf; - } -# elif defined __BEOS__ - return "UTF-8"; -# else - return "ISO-8859-1"; -# endif - /* nl_langinfo items of the LC_NUMERIC category */ - case RADIXCHAR: - return localeconv () ->decimal_point; - case THOUSEP: - return localeconv () ->thousands_sep; - /* nl_langinfo items of the LC_TIME category. - TODO: Really use the locale. */ - case D_T_FMT: - case ERA_D_T_FMT: - return "%a %b %e %H:%M:%S %Y"; - case D_FMT: - case ERA_D_FMT: - return "%m/%d/%y"; - case T_FMT: - case ERA_T_FMT: - return "%H:%M:%S"; - case T_FMT_AMPM: - return "%I:%M:%S %p"; - case AM_STR: - return "AM"; - case PM_STR: - return "PM"; - case DAY_1: - return "Sunday"; - case DAY_2: - return "Monday"; - case DAY_3: - return "Tuesday"; - case DAY_4: - return "Wednesday"; - case DAY_5: - return "Thursday"; - case DAY_6: - return "Friday"; - case DAY_7: - return "Saturday"; - case ABDAY_1: - return "Sun"; - case ABDAY_2: - return "Mon"; - case ABDAY_3: - return "Tue"; - case ABDAY_4: - return "Wed"; - case ABDAY_5: - return "Thu"; - case ABDAY_6: - return "Fri"; - case ABDAY_7: - return "Sat"; - case MON_1: - return "January"; - case MON_2: - return "February"; - case MON_3: - return "March"; - case MON_4: - return "April"; - case MON_5: - return "May"; - case MON_6: - return "June"; - case MON_7: - return "July"; - case MON_8: - return "August"; - case MON_9: - return "September"; - case MON_10: - return "October"; - case MON_11: - return "November"; - case MON_12: - return "December"; - case ABMON_1: - return "Jan"; - case ABMON_2: - return "Feb"; - case ABMON_3: - return "Mar"; - case ABMON_4: - return "Apr"; - case ABMON_5: - return "May"; - case ABMON_6: - return "Jun"; - case ABMON_7: - return "Jul"; - case ABMON_8: - return "Aug"; - case ABMON_9: - return "Sep"; - case ABMON_10: - return "Oct"; - case ABMON_11: - return "Nov"; - case ABMON_12: - return "Dec"; - case ERA: - return ""; - case ALT_DIGITS: - return "\0\0\0\0\0\0\0\0\0\0"; - /* nl_langinfo items of the LC_MONETARY category - TODO: Really use the locale. */ - case CRNCYSTR: - return "-"; - /* nl_langinfo items of the LC_MESSAGES category - TODO: Really use the locale. */ - case YESEXPR: - return "^[yY]"; - case NOEXPR: - return "^[nN]"; - default: - return ""; - } -} - -#endif diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h deleted file mode 100644 index c16bbf6..0000000 --- a/gnulib/lib/pathmax.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Define PATH_MAX somehow. Requires sys/types.h. - 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 - 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 . */ - -#ifndef _PATHMAX_H -# define _PATHMAX_H - -/* POSIX:2008 defines PATH_MAX to be the maximum number of bytes in a filename, - including the terminating NUL byte. - - PATH_MAX is not defined on systems which have no limit on filename length, - such as GNU/Hurd. - - This file does *not* define PATH_MAX always. Programs that use this file - can handle the GNU/Hurd case in several ways: - - Either with a package-wide handling, or with a per-file handling, - - Either through a - #ifdef PATH_MAX - or through a fallback like - #ifndef PATH_MAX - # define PATH_MAX 8192 - #endif - or through a fallback like - #ifndef PATH_MAX - # define PATH_MAX pathconf ("/", _PC_PATH_MAX) - #endif - */ - -# include - -# include - -# ifndef _POSIX_PATH_MAX -# define _POSIX_PATH_MAX 256 -# endif - -/* Don't include sys/param.h if it already has been. */ -# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN -# include -# endif - -# if !defined PATH_MAX && defined MAXPATHLEN -# define PATH_MAX MAXPATHLEN -# endif - -# ifdef __hpux -/* On HP-UX, PATH_MAX designates the maximum number of bytes in a filename, - *not* including the terminating NUL byte, and is set to 1023. - Additionally, when _XOPEN_SOURCE is defined to 500 or more, PATH_MAX is - not defined at all any more. */ -# undef PATH_MAX -# define PATH_MAX 1024 -# endif - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* The page "Naming Files, Paths, and Namespaces" on msdn.microsoft.com, - section "Maximum Path Length Limitation", - - explains that the maximum size of a filename, including the terminating - NUL byte, is 260 = 3 + 256 + 1. - This is the same value as - - FILENAME_MAX in , - - _MAX_PATH in , - - MAX_PATH in . - Undefine the original value, because mingw's gets it wrong. */ -# undef PATH_MAX -# define PATH_MAX 260 -# endif - -#endif /* _PATHMAX_H */ diff --git a/gnulib/lib/printf-args.c b/gnulib/lib/printf-args.c deleted file mode 100644 index d40ef25..0000000 --- a/gnulib/lib/printf-args.c +++ /dev/null @@ -1,187 +0,0 @@ -/* Decomposed printf argument list. - 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 - 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 . */ - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be defined. - STATIC Set to 'static' to declare the function static. */ - -#ifndef PRINTF_FETCHARGS -# include -#endif - -/* Specification. */ -#ifndef PRINTF_FETCHARGS -# include "printf-args.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_FETCHARGS (va_list args, arguments *a) -{ - size_t i; - argument *ap; - - for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++) - switch (ap->type) - { - case TYPE_SCHAR: - ap->a.a_schar = va_arg (args, /*signed char*/ int); - break; - case TYPE_UCHAR: - ap->a.a_uchar = va_arg (args, /*unsigned char*/ int); - break; - case TYPE_SHORT: - ap->a.a_short = va_arg (args, /*short*/ int); - break; - case TYPE_USHORT: - ap->a.a_ushort = va_arg (args, /*unsigned short*/ int); - break; - case TYPE_INT: - ap->a.a_int = va_arg (args, int); - break; - case TYPE_UINT: - ap->a.a_uint = va_arg (args, unsigned int); - break; - case TYPE_LONGINT: - ap->a.a_longint = va_arg (args, long int); - break; - case TYPE_ULONGINT: - ap->a.a_ulongint = va_arg (args, unsigned long int); - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - ap->a.a_longlongint = va_arg (args, long long int); - break; - case TYPE_ULONGLONGINT: - ap->a.a_ulonglongint = va_arg (args, unsigned long long int); - break; -#endif - case TYPE_DOUBLE: - ap->a.a_double = va_arg (args, double); - break; - case TYPE_LONGDOUBLE: - ap->a.a_longdouble = va_arg (args, long double); - break; - case TYPE_CHAR: - ap->a.a_char = va_arg (args, int); - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by - default argument promotions", this is not the case in mingw32, - where wint_t is 'unsigned short'. */ - ap->a.a_wide_char = - (sizeof (wint_t) < sizeof (int) - ? (wint_t) va_arg (args, int) - : va_arg (args, wint_t)); - break; -#endif - case TYPE_STRING: - ap->a.a_string = va_arg (args, const char *); - /* A null pointer is an invalid argument for "%s", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_string == NULL) - ap->a.a_string = "(NULL)"; - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - ap->a.a_wide_string = va_arg (args, const wchar_t *); - /* A null pointer is an invalid argument for "%ls", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_wide_string == NULL) - { - static const wchar_t wide_null_string[] = - { - (wchar_t)'(', - (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L', - (wchar_t)')', - (wchar_t)0 - }; - ap->a.a_wide_string = wide_null_string; - } - break; -#endif - case TYPE_POINTER: - ap->a.a_pointer = va_arg (args, void *); - break; - case TYPE_COUNT_SCHAR_POINTER: - ap->a.a_count_schar_pointer = va_arg (args, signed char *); - break; - case TYPE_COUNT_SHORT_POINTER: - ap->a.a_count_short_pointer = va_arg (args, short *); - break; - case TYPE_COUNT_INT_POINTER: - ap->a.a_count_int_pointer = va_arg (args, int *); - break; - case TYPE_COUNT_LONGINT_POINTER: - ap->a.a_count_longint_pointer = va_arg (args, long int *); - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - ap->a.a_count_longlongint_pointer = va_arg (args, long long int *); - break; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case TYPE_U8_STRING: - ap->a.a_u8_string = va_arg (args, const uint8_t *); - /* A null pointer is an invalid argument for "%U", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u8_string == NULL) - { - static const uint8_t u8_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u8_string = u8_null_string; - } - break; - case TYPE_U16_STRING: - ap->a.a_u16_string = va_arg (args, const uint16_t *); - /* A null pointer is an invalid argument for "%lU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u16_string == NULL) - { - static const uint16_t u16_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u16_string = u16_null_string; - } - break; - case TYPE_U32_STRING: - ap->a.a_u32_string = va_arg (args, const uint32_t *); - /* A null pointer is an invalid argument for "%llU", but in practice - it occurs quite frequently in printf statements that produce - debug output. Use a fallback in this case. */ - if (ap->a.a_u32_string == NULL) - { - static const uint32_t u32_null_string[] = - { '(', 'N', 'U', 'L', 'L', ')', 0 }; - ap->a.a_u32_string = u32_null_string; - } - break; -#endif - default: - /* Unknown type. */ - return -1; - } - return 0; -} diff --git a/gnulib/lib/printf-args.h b/gnulib/lib/printf-args.h deleted file mode 100644 index 3e192a1..0000000 --- a/gnulib/lib/printf-args.h +++ /dev/null @@ -1,158 +0,0 @@ -/* Decomposed printf argument list. - 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 - 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 . */ - -#ifndef _PRINTF_ARGS_H -#define _PRINTF_ARGS_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - PRINTF_FETCHARGS Name of the function to be declared. - STATIC Set to 'static' to declare the function static. */ - -/* Default parameters. */ -#ifndef PRINTF_FETCHARGS -# define PRINTF_FETCHARGS printf_fetchargs -#endif - -/* Get size_t. */ -#include - -/* Get wchar_t. */ -#if HAVE_WCHAR_T -# include -#endif - -/* Get wint_t. */ -#if HAVE_WINT_T -# include -#endif - -/* Get va_list. */ -#include - - -/* Argument types */ -typedef enum -{ - TYPE_NONE, - TYPE_SCHAR, - TYPE_UCHAR, - TYPE_SHORT, - TYPE_USHORT, - TYPE_INT, - TYPE_UINT, - TYPE_LONGINT, - TYPE_ULONGINT, -#if HAVE_LONG_LONG_INT - TYPE_LONGLONGINT, - TYPE_ULONGLONGINT, -#endif - TYPE_DOUBLE, - TYPE_LONGDOUBLE, - TYPE_CHAR, -#if HAVE_WINT_T - TYPE_WIDE_CHAR, -#endif - TYPE_STRING, -#if HAVE_WCHAR_T - TYPE_WIDE_STRING, -#endif - TYPE_POINTER, - TYPE_COUNT_SCHAR_POINTER, - TYPE_COUNT_SHORT_POINTER, - TYPE_COUNT_INT_POINTER, - TYPE_COUNT_LONGINT_POINTER -#if HAVE_LONG_LONG_INT -, TYPE_COUNT_LONGLONGINT_POINTER -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ -, TYPE_U8_STRING -, TYPE_U16_STRING -, TYPE_U32_STRING -#endif -} arg_type; - -/* Polymorphic argument */ -typedef struct -{ - arg_type type; - union - { - signed char a_schar; - unsigned char a_uchar; - short a_short; - unsigned short a_ushort; - int a_int; - unsigned int a_uint; - long int a_longint; - unsigned long int a_ulongint; -#if HAVE_LONG_LONG_INT - long long int a_longlongint; - unsigned long long int a_ulonglongint; -#endif - float a_float; - double a_double; - long double a_longdouble; - int a_char; -#if HAVE_WINT_T - wint_t a_wide_char; -#endif - const char* a_string; -#if HAVE_WCHAR_T - const wchar_t* a_wide_string; -#endif - void* a_pointer; - signed char * a_count_schar_pointer; - short * a_count_short_pointer; - int * a_count_int_pointer; - long int * a_count_longint_pointer; -#if HAVE_LONG_LONG_INT - long long int * a_count_longlongint_pointer; -#endif -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - const uint8_t * a_u8_string; - const uint16_t * a_u16_string; - const uint32_t * a_u32_string; -#endif - } - a; -} -argument; - -/* Number of directly allocated arguments (no malloc() needed). */ -#define N_DIRECT_ALLOC_ARGUMENTS 7 - -typedef struct -{ - size_t count; - argument *arg; - argument direct_alloc_arg[N_DIRECT_ALLOC_ARGUMENTS]; -} -arguments; - - -/* Fetch the arguments, putting them into a. */ -#ifdef STATIC -STATIC -#else -extern -#endif -int PRINTF_FETCHARGS (va_list args, arguments *a); - -#endif /* _PRINTF_ARGS_H */ diff --git a/gnulib/lib/printf-parse.c b/gnulib/lib/printf-parse.c deleted file mode 100644 index 5bc6ef6..0000000 --- a/gnulib/lib/printf-parse.c +++ /dev/null @@ -1,638 +0,0 @@ -/* Formatted output to strings. - 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 - 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 . */ - -/* This file can be parametrized with the following macros: - CHAR_T The element type of the format string. - CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. - DIRECTIVE Structure denoting a format directive. - Depends on CHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on CHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on CHAR_T. - STATIC Set to 'static' to declare the function static. - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */ - -#ifndef PRINTF_PARSE -# include -#endif - -/* Specification. */ -#ifndef PRINTF_PARSE -# include "printf-parse.h" -#endif - -/* Default parameters. */ -#ifndef PRINTF_PARSE -# define PRINTF_PARSE printf_parse -# define CHAR_T char -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -#endif - -/* Get size_t, NULL. */ -#include - -/* Get intmax_t. */ -#if defined IN_LIBINTL || defined IN_LIBASPRINTF -# if HAVE_STDINT_H_WITH_UINTMAX -# include -# endif -# if HAVE_INTTYPES_H_WITH_UINTMAX -# include -# endif -#else -# include -#endif - -/* malloc(), realloc(), free(). */ -#include - -/* memcpy(). */ -#include - -/* errno. */ -#include - -/* Checked size_t computations. */ -#include "xsize.h" - -#if CHAR_T_ONLY_ASCII -/* c_isascii(). */ -# include "c-ctype.h" -#endif - -#ifdef STATIC -STATIC -#endif -int -PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a) -{ - const CHAR_T *cp = format; /* pointer into format */ - size_t arg_posn = 0; /* number of regular arguments consumed */ - size_t d_allocated; /* allocated elements of d->dir */ - size_t a_allocated; /* allocated elements of a->arg */ - size_t max_width_length = 0; - size_t max_precision_length = 0; - - d->count = 0; - d_allocated = N_DIRECT_ALLOC_DIRECTIVES; - d->dir = d->direct_alloc_dir; - - a->count = 0; - a_allocated = N_DIRECT_ALLOC_ARGUMENTS; - a->arg = a->direct_alloc_arg; - -#define REGISTER_ARG(_index_,_type_) \ - { \ - size_t n = (_index_); \ - if (n >= a_allocated) \ - { \ - size_t memory_size; \ - argument *memory; \ - \ - a_allocated = xtimes (a_allocated, 2); \ - if (a_allocated <= n) \ - a_allocated = xsum (n, 1); \ - memory_size = xtimes (a_allocated, sizeof (argument)); \ - if (size_overflow_p (memory_size)) \ - /* Overflow, would lead to out of memory. */ \ - goto out_of_memory; \ - memory = (argument *) (a->arg != a->direct_alloc_arg \ - ? realloc (a->arg, memory_size) \ - : malloc (memory_size)); \ - if (memory == NULL) \ - /* Out of memory. */ \ - goto out_of_memory; \ - if (a->arg == a->direct_alloc_arg) \ - memcpy (memory, a->arg, a->count * sizeof (argument)); \ - a->arg = memory; \ - } \ - while (a->count <= n) \ - a->arg[a->count++].type = TYPE_NONE; \ - if (a->arg[n].type == TYPE_NONE) \ - a->arg[n].type = (_type_); \ - else if (a->arg[n].type != (_type_)) \ - /* Ambiguous type for positional argument. */ \ - goto error; \ - } - - while (*cp != '\0') - { - CHAR_T c = *cp++; - if (c == '%') - { - size_t arg_index = ARG_NONE; - DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */ - - /* Initialize the next directive. */ - dp->dir_start = cp - 1; - dp->flags = 0; - dp->width_start = NULL; - dp->width_end = NULL; - dp->width_arg_index = ARG_NONE; - dp->precision_start = NULL; - dp->precision_end = NULL; - dp->precision_arg_index = ARG_NONE; - dp->arg_index = ARG_NONE; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - arg_index = n - 1; - cp = np + 1; - } - } - - /* Read the flags. */ - for (;;) - { - if (*cp == '\'') - { - dp->flags |= FLAG_GROUP; - cp++; - } - else if (*cp == '-') - { - dp->flags |= FLAG_LEFT; - cp++; - } - else if (*cp == '+') - { - dp->flags |= FLAG_SHOWSIGN; - cp++; - } - else if (*cp == ' ') - { - dp->flags |= FLAG_SPACE; - cp++; - } - else if (*cp == '#') - { - dp->flags |= FLAG_ALT; - cp++; - } - else if (*cp == '0') - { - dp->flags |= FLAG_ZERO; - cp++; - } -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - else if (*cp == 'I') - { - dp->flags |= FLAG_LOCALIZED; - cp++; - } -#endif - else - break; - } - - /* Parse the field width. */ - if (*cp == '*') - { - dp->width_start = cp; - cp++; - dp->width_end = cp; - if (max_width_length < 1) - max_width_length = 1; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory later. */ - goto error; - dp->width_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->width_arg_index == ARG_NONE) - { - dp->width_arg_index = arg_posn++; - if (dp->width_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->width_arg_index, TYPE_INT); - } - else if (*cp >= '0' && *cp <= '9') - { - size_t width_length; - - dp->width_start = cp; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->width_end = cp; - width_length = dp->width_end - dp->width_start; - if (max_width_length < width_length) - max_width_length = width_length; - } - - /* Parse the precision. */ - if (*cp == '.') - { - cp++; - if (*cp == '*') - { - dp->precision_start = cp - 1; - cp++; - dp->precision_end = cp; - if (max_precision_length < 2) - max_precision_length = 2; - - /* Test for positional argument. */ - if (*cp >= '0' && *cp <= '9') - { - const CHAR_T *np; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - ; - if (*np == '$') - { - size_t n = 0; - - for (np = cp; *np >= '0' && *np <= '9'; np++) - n = xsum (xtimes (n, 10), *np - '0'); - if (n == 0) - /* Positional argument 0. */ - goto error; - if (size_overflow_p (n)) - /* n too large, would lead to out of memory - later. */ - goto error; - dp->precision_arg_index = n - 1; - cp = np + 1; - } - } - if (dp->precision_arg_index == ARG_NONE) - { - dp->precision_arg_index = arg_posn++; - if (dp->precision_arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->precision_arg_index, TYPE_INT); - } - else - { - size_t precision_length; - - dp->precision_start = cp - 1; - for (; *cp >= '0' && *cp <= '9'; cp++) - ; - dp->precision_end = cp; - precision_length = dp->precision_end - dp->precision_start; - if (max_precision_length < precision_length) - max_precision_length = precision_length; - } - } - - { - arg_type type; - - /* Parse argument type/size specifiers. */ - { - int flags = 0; - - for (;;) - { - if (*cp == 'h') - { - flags |= (1 << (flags & 1)); - cp++; - } - else if (*cp == 'L') - { - flags |= 4; - cp++; - } - else if (*cp == 'l') - { - flags += 8; - cp++; - } - else if (*cp == 'j') - { - if (sizeof (intmax_t) > sizeof (long)) - { - /* intmax_t = long long */ - flags += 16; - } - else if (sizeof (intmax_t) > sizeof (int)) - { - /* intmax_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 'z' || *cp == 'Z') - { - /* 'z' is standardized in ISO C 99, but glibc uses 'Z' - because the warning facility in gcc-2.95.2 understands - only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */ - if (sizeof (size_t) > sizeof (long)) - { - /* size_t = long long */ - flags += 16; - } - else if (sizeof (size_t) > sizeof (int)) - { - /* size_t = long */ - flags += 8; - } - cp++; - } - else if (*cp == 't') - { - if (sizeof (ptrdiff_t) > sizeof (long)) - { - /* ptrdiff_t = long long */ - flags += 16; - } - else if (sizeof (ptrdiff_t) > sizeof (int)) - { - /* ptrdiff_t = long */ - flags += 8; - } - cp++; - } -#if defined __APPLE__ && defined __MACH__ - /* On Mac OS X 10.3, PRIdMAX is defined as "qd". - We cannot change it to "lld" because PRIdMAX must also - be understood by the system's printf routines. */ - else if (*cp == 'q') - { - if (64 / 8 > sizeof (long)) - { - /* int64_t = long long */ - flags += 16; - } - else - { - /* int64_t = long */ - flags += 8; - } - cp++; - } -#endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Windows, PRIdMAX is defined as "I64d". - We cannot change it to "lld" because PRIdMAX must also - be understood by the system's printf routines. */ - else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4') - { - if (64 / 8 > sizeof (long)) - { - /* __int64 = long long */ - flags += 16; - } - else - { - /* __int64 = long */ - flags += 8; - } - cp += 3; - } -#endif - else - break; - } - - /* Read the conversion character. */ - c = *cp++; - switch (c) - { - case 'd': case 'i': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGLONGINT; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lld" into TYPE_LONGINT. */ - if (flags >= 8) - type = TYPE_LONGINT; - else if (flags & 2) - type = TYPE_SCHAR; - else if (flags & 1) - type = TYPE_SHORT; - else - type = TYPE_INT; - break; - case 'o': case 'u': case 'x': case 'X': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_ULONGLONGINT; - else -#endif - /* If 'unsigned long long' exists and is the same as - 'unsigned long', we parse "llu" into TYPE_ULONGINT. */ - if (flags >= 8) - type = TYPE_ULONGINT; - else if (flags & 2) - type = TYPE_UCHAR; - else if (flags & 1) - type = TYPE_USHORT; - else - type = TYPE_UINT; - break; - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': - if (flags >= 16 || (flags & 4)) - type = TYPE_LONGDOUBLE; - else - type = TYPE_DOUBLE; - break; - case 'c': - if (flags >= 8) -#if HAVE_WINT_T - type = TYPE_WIDE_CHAR; -#else - goto error; -#endif - else - type = TYPE_CHAR; - break; -#if HAVE_WINT_T - case 'C': - type = TYPE_WIDE_CHAR; - c = 'c'; - break; -#endif - case 's': - if (flags >= 8) -#if HAVE_WCHAR_T - type = TYPE_WIDE_STRING; -#else - goto error; -#endif - else - type = TYPE_STRING; - break; -#if HAVE_WCHAR_T - case 'S': - type = TYPE_WIDE_STRING; - c = 's'; - break; -#endif - case 'p': - type = TYPE_POINTER; - break; - case 'n': -#if HAVE_LONG_LONG_INT - /* If 'long long' exists and is larger than 'long': */ - if (flags >= 16 || (flags & 4)) - type = TYPE_COUNT_LONGLONGINT_POINTER; - else -#endif - /* If 'long long' exists and is the same as 'long', we parse - "lln" into TYPE_COUNT_LONGINT_POINTER. */ - if (flags >= 8) - type = TYPE_COUNT_LONGINT_POINTER; - else if (flags & 2) - type = TYPE_COUNT_SCHAR_POINTER; - else if (flags & 1) - type = TYPE_COUNT_SHORT_POINTER; - else - type = TYPE_COUNT_INT_POINTER; - break; -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - case 'U': - if (flags >= 16) - type = TYPE_U32_STRING; - else if (flags >= 8) - type = TYPE_U16_STRING; - else - type = TYPE_U8_STRING; - break; -#endif - case '%': - type = TYPE_NONE; - break; - default: - /* Unknown conversion character. */ - goto error; - } - } - - if (type != TYPE_NONE) - { - dp->arg_index = arg_index; - if (dp->arg_index == ARG_NONE) - { - dp->arg_index = arg_posn++; - if (dp->arg_index == ARG_NONE) - /* arg_posn wrapped around. */ - goto error; - } - REGISTER_ARG (dp->arg_index, type); - } - dp->conversion = c; - dp->dir_end = cp; - } - - d->count++; - if (d->count >= d_allocated) - { - size_t memory_size; - DIRECTIVE *memory; - - d_allocated = xtimes (d_allocated, 2); - memory_size = xtimes (d_allocated, sizeof (DIRECTIVE)); - if (size_overflow_p (memory_size)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - memory = (DIRECTIVE *) (d->dir != d->direct_alloc_dir - ? realloc (d->dir, memory_size) - : malloc (memory_size)); - if (memory == NULL) - /* Out of memory. */ - goto out_of_memory; - if (d->dir == d->direct_alloc_dir) - memcpy (memory, d->dir, d->count * sizeof (DIRECTIVE)); - d->dir = memory; - } - } -#if CHAR_T_ONLY_ASCII - else if (!c_isascii (c)) - { - /* Non-ASCII character. Not supported. */ - goto error; - } -#endif - } - d->dir[d->count].dir_start = cp; - - d->max_width_length = max_width_length; - d->max_precision_length = max_precision_length; - return 0; - -error: - if (a->arg != a->direct_alloc_arg) - free (a->arg); - if (d->dir != d->direct_alloc_dir) - free (d->dir); - errno = EINVAL; - return -1; - -out_of_memory: - if (a->arg != a->direct_alloc_arg) - free (a->arg); - if (d->dir != d->direct_alloc_dir) - free (d->dir); - errno = ENOMEM; - return -1; -} - -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef CHAR_T_ONLY_ASCII -#undef CHAR_T diff --git a/gnulib/lib/printf-parse.h b/gnulib/lib/printf-parse.h deleted file mode 100644 index 627bb98..0000000 --- a/gnulib/lib/printf-parse.h +++ /dev/null @@ -1,193 +0,0 @@ -/* Parse printf format string. - 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 - 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 . */ - -#ifndef _PRINTF_PARSE_H -#define _PRINTF_PARSE_H - -/* This file can be parametrized with the following macros: - ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. - STATIC Set to 'static' to declare the function static. */ - -#if HAVE_FEATURES_H -# include /* for __GLIBC__, __UCLIBC__ */ -#endif - -#include "printf-args.h" - - -/* Flags */ -#define FLAG_GROUP 1 /* ' flag */ -#define FLAG_LEFT 2 /* - flag */ -#define FLAG_SHOWSIGN 4 /* + flag */ -#define FLAG_SPACE 8 /* space flag */ -#define FLAG_ALT 16 /* # flag */ -#define FLAG_ZERO 32 -#if __GLIBC__ >= 2 && !defined __UCLIBC__ -# define FLAG_LOCALIZED 64 /* I flag, uses localized digits */ -#endif - -/* arg_index value indicating that no argument is consumed. */ -#define ARG_NONE (~(size_t)0) - -/* xxx_directive: A parsed directive. - xxx_directives: A parsed format string. */ - -/* Number of directly allocated directives (no malloc() needed). */ -#define N_DIRECT_ALLOC_DIRECTIVES 7 - -/* A parsed directive. */ -typedef struct -{ - const char* dir_start; - const char* dir_end; - int flags; - const char* width_start; - const char* width_end; - size_t width_arg_index; - const char* precision_start; - const char* precision_end; - size_t precision_arg_index; - char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -char_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - char_directive *dir; - size_t max_width_length; - size_t max_precision_length; - char_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -char_directives; - -#if ENABLE_UNISTDIO - -/* A parsed directive. */ -typedef struct -{ - const uint8_t* dir_start; - const uint8_t* dir_end; - int flags; - const uint8_t* width_start; - const uint8_t* width_end; - size_t width_arg_index; - const uint8_t* precision_start; - const uint8_t* precision_end; - size_t precision_arg_index; - uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u8_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u8_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u8_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u8_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint16_t* dir_start; - const uint16_t* dir_end; - int flags; - const uint16_t* width_start; - const uint16_t* width_end; - size_t width_arg_index; - const uint16_t* precision_start; - const uint16_t* precision_end; - size_t precision_arg_index; - uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u16_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u16_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u16_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u16_directives; - -/* A parsed directive. */ -typedef struct -{ - const uint32_t* dir_start; - const uint32_t* dir_end; - int flags; - const uint32_t* width_start; - const uint32_t* width_end; - size_t width_arg_index; - const uint32_t* precision_start; - const uint32_t* precision_end; - size_t precision_arg_index; - uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */ - size_t arg_index; -} -u32_directive; - -/* A parsed format string. */ -typedef struct -{ - size_t count; - u32_directive *dir; - size_t max_width_length; - size_t max_precision_length; - u32_directive direct_alloc_dir[N_DIRECT_ALLOC_DIRECTIVES]; -} -u32_directives; - -#endif - - -/* Parses the format string. Fills in the number N of directives, and fills - in directives[0], ..., directives[N-1], and sets directives[N].dir_start - to the end of the format string. Also fills in the arg_type fields of the - arguments and the needed count of arguments. */ -#if ENABLE_UNISTDIO -extern int - ulc_printf_parse (const char *format, char_directives *d, arguments *a); -extern int - u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a); -extern int - u16_printf_parse (const uint16_t *format, u16_directives *d, - arguments *a); -extern int - u32_printf_parse (const uint32_t *format, u32_directives *d, - arguments *a); -#else -# ifdef STATIC -STATIC -# else -extern -# endif -int printf_parse (const char *format, char_directives *d, arguments *a); -#endif - -#endif /* _PRINTF_PARSE_H */ diff --git a/gnulib/lib/rawmemchr.c b/gnulib/lib/rawmemchr.c deleted file mode 100644 index f7416ca..0000000 --- a/gnulib/lib/rawmemchr.c +++ /dev/null @@ -1,136 +0,0 @@ -/* 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 deleted file mode 100644 index 6363923..0000000 --- a/gnulib/lib/rawmemchr.valgrind +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 1e58aa8..0000000 --- a/gnulib/lib/readlink.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Stub for readlink(). - 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 - 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 - -#include -#include -#include - -#if !HAVE_READLINK - -/* readlink() substitute for systems that don't have a readlink() function, - such as DJGPP 2.03 and mingw32. */ - -ssize_t -readlink (const char *name, char *buf _GL_UNUSED, - size_t bufsize _GL_UNUSED) -{ - struct stat statbuf; - - /* In general we should use lstat() here, not stat(). But on platforms - without symbolic links, lstat() - if it exists - would be equivalent to - stat(), therefore we can use stat(). This saves us a configure check. */ - if (stat (name, &statbuf) >= 0) - errno = EINVAL; - return -1; -} - -#else /* HAVE_READLINK */ - -# undef readlink - -/* readlink() wrapper that uses correct types, for systems like cygwin - 1.5.x where readlink returns int, and which rejects trailing slash, - for Solaris 9. */ - -ssize_t -rpl_readlink (const char *name, char *buf, size_t bufsize) -{ -# if READLINK_TRAILING_SLASH_BUG - size_t len = strlen (name); - if (len && name[len - 1] == '/') - { - /* Even if name without the slash is a symlink to a directory, - both lstat() and stat() must resolve the trailing slash to - the directory rather than the symlink. We can therefore - safely use stat() to distinguish between EINVAL and - ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */ - struct stat st; - if (stat (name, &st) == 0) - errno = EINVAL; - return -1; - } -# endif /* READLINK_TRAILING_SLASH_BUG */ - return readlink (name, buf, bufsize); -} - -#endif /* HAVE_READLINK */ diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c deleted file mode 100644 index 6e9a51e..0000000 --- a/gnulib/lib/realloc.c +++ /dev/null @@ -1,79 +0,0 @@ -/* realloc() function that is glibc compatible. - - 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 - 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 . */ - -/* written by Jim Meyering and Bruno Haible */ - -#define _GL_USE_STDLIB_ALLOC 1 -#include - -/* Only the AC_FUNC_REALLOC macro defines 'realloc' already in config.h. */ -#ifdef realloc -# define NEED_REALLOC_GNU 1 -/* Whereas the gnulib module 'realloc-gnu' defines HAVE_REALLOC_GNU. */ -#elif GNULIB_REALLOC_GNU && !HAVE_REALLOC_GNU -# define NEED_REALLOC_GNU 1 -#endif - -/* Infer the properties of the system's malloc function. - The gnulib module 'malloc-gnu' defines HAVE_MALLOC_GNU. */ -#if GNULIB_MALLOC_GNU && HAVE_MALLOC_GNU -# define SYSTEM_MALLOC_GLIBC_COMPATIBLE 1 -#endif - -#include - -#include - -/* Change the size of an allocated block of memory P to N bytes, - with error checking. If N is zero, change it to 1. If P is NULL, - use malloc. */ - -void * -rpl_realloc (void *p, size_t n) -{ - void *result; - -#if NEED_REALLOC_GNU - if (n == 0) - { - n = 1; - - /* In theory realloc might fail, so don't rely on it to free. */ - free (p); - p = NULL; - } -#endif - - if (p == NULL) - { -#if GNULIB_REALLOC_GNU && !NEED_REALLOC_GNU && !SYSTEM_MALLOC_GLIBC_COMPATIBLE - if (n == 0) - n = 1; -#endif - result = malloc (n); - } - else - result = realloc (p, n); - -#if !HAVE_REALLOC_POSIX - if (result == NULL) - errno = ENOMEM; -#endif - - return result; -} diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin deleted file mode 100644 index e4e6c79..0000000 --- a/gnulib/lib/ref-add.sin +++ /dev/null @@ -1,29 +0,0 @@ -# Add this package to a list of references stored in a text file. -# -# 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 -# 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 Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - ta - :a - s/ @PACKAGE@ / @PACKAGE@ / - tb - s/ $/ @PACKAGE@ / - :b - s/^/# Packages using this file:/ -} diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin deleted file mode 100644 index 73d01d5..0000000 --- a/gnulib/lib/ref-del.sin +++ /dev/null @@ -1,24 +0,0 @@ -# Remove this package from a list of references stored in a text file. -# -# 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 -# 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 Bruno Haible . -# -/^# Packages using this file: / { - s/# Packages using this file:// - s/ @PACKAGE@ / / - s/^/# Packages using this file:/ -} diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c deleted file mode 100644 index 707b123..0000000 --- a/gnulib/lib/regcomp.c +++ /dev/null @@ -1,3939 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 . */ - -static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern, - size_t length, reg_syntax_t syntax); -static void re_compile_fastmap_iter (regex_t *bufp, - const re_dfastate_t *init_state, - char *fastmap); -static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len); -#ifdef RE_ENABLE_I18N -static void free_charset (re_charset_t *cset); -#endif /* RE_ENABLE_I18N */ -static void free_workarea_compile (regex_t *preg); -static reg_errcode_t create_initial_state (re_dfa_t *dfa); -#ifdef RE_ENABLE_I18N -static void optimize_utf8 (re_dfa_t *dfa); -#endif -static reg_errcode_t analyze (regex_t *preg); -static reg_errcode_t preorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t postorder (bin_tree_t *root, - reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra); -static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node); -static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node); -static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg, - bin_tree_t *node); -static reg_errcode_t calc_first (void *extra, bin_tree_t *node); -static reg_errcode_t calc_next (void *extra, bin_tree_t *node); -static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node); -static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint); -static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node, - unsigned int constraint); -static reg_errcode_t calc_eclosure (re_dfa_t *dfa); -static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, - Idx node, bool root); -static reg_errcode_t calc_inveclosure (re_dfa_t *dfa); -static Idx fetch_number (re_string_t *input, re_token_t *token, - reg_syntax_t syntax); -static int peek_token (re_token_t *token, re_string_t *input, - reg_syntax_t syntax) internal_function; -static bin_tree_t *parse (re_string_t *regexp, regex_t *preg, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg, - re_token_t *token, reg_syntax_t syntax, - Idx nest, reg_errcode_t *err); -static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp, - re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err); -static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, - re_token_t *token, reg_syntax_t syntax, - reg_errcode_t *err); -static reg_errcode_t parse_bracket_element (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token, int token_len, - re_dfa_t *dfa, - reg_syntax_t syntax, - bool accept_hyphen); -static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem, - re_string_t *regexp, - re_token_t *token); -#ifdef RE_ENABLE_I18N -static reg_errcode_t build_equiv_class (bitset_t sbcset, - re_charset_t *mbcset, - Idx *equiv_class_alloc, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - re_charset_t *mbcset, - Idx *char_class_alloc, - const unsigned char *class_name, - reg_syntax_t syntax); -#else /* not RE_ENABLE_I18N */ -static reg_errcode_t build_equiv_class (bitset_t sbcset, - const unsigned char *name); -static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans, - bitset_t sbcset, - const unsigned char *class_name, - reg_syntax_t syntax); -#endif /* not RE_ENABLE_I18N */ -static bin_tree_t *build_charclass_op (re_dfa_t *dfa, - RE_TRANSLATE_TYPE trans, - const unsigned char *class_name, - const unsigned char *extra, - bool non_match, reg_errcode_t *err); -static bin_tree_t *create_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - re_token_type_t type); -static bin_tree_t *create_token_tree (re_dfa_t *dfa, - bin_tree_t *left, bin_tree_t *right, - const re_token_t *token); -static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa); -static void free_token (re_token_t *node); -static reg_errcode_t free_tree (void *extra, bin_tree_t *node); -static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node); - -/* This table gives an error message for each of the error codes listed - in regex.h. Obviously the order here has to be same as there. - POSIX doesn't require that we do anything for REG_NOERROR, - but why not be nice? */ - -static const char __re_error_msgid[] = - { -#define REG_NOERROR_IDX 0 - gettext_noop ("Success") /* REG_NOERROR */ - "\0" -#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success") - gettext_noop ("No match") /* REG_NOMATCH */ - "\0" -#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match") - gettext_noop ("Invalid regular expression") /* REG_BADPAT */ - "\0" -#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression") - gettext_noop ("Invalid collation character") /* REG_ECOLLATE */ - "\0" -#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character") - gettext_noop ("Invalid character class name") /* REG_ECTYPE */ - "\0" -#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name") - gettext_noop ("Trailing backslash") /* REG_EESCAPE */ - "\0" -#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash") - gettext_noop ("Invalid back reference") /* REG_ESUBREG */ - "\0" -#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference") - gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */ - "\0" -#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^") - gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */ - "\0" -#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(") - gettext_noop ("Unmatched \\{") /* REG_EBRACE */ - "\0" -#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{") - gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */ - "\0" -#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}") - gettext_noop ("Invalid range end") /* REG_ERANGE */ - "\0" -#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end") - gettext_noop ("Memory exhausted") /* REG_ESPACE */ - "\0" -#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted") - gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */ - "\0" -#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression") - gettext_noop ("Premature end of regular expression") /* REG_EEND */ - "\0" -#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression") - gettext_noop ("Regular expression too big") /* REG_ESIZE */ - "\0" -#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big") - gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */ - }; - -static const size_t __re_error_msgid_idx[] = - { - REG_NOERROR_IDX, - REG_NOMATCH_IDX, - REG_BADPAT_IDX, - REG_ECOLLATE_IDX, - REG_ECTYPE_IDX, - REG_EESCAPE_IDX, - REG_ESUBREG_IDX, - REG_EBRACK_IDX, - REG_EPAREN_IDX, - REG_EBRACE_IDX, - REG_BADBR_IDX, - REG_ERANGE_IDX, - REG_ESPACE_IDX, - REG_BADRPT_IDX, - REG_EEND_IDX, - REG_ESIZE_IDX, - REG_ERPAREN_IDX - }; - -/* Entry points for GNU code. */ - -/* re_compile_pattern is the GNU regular expression compiler: it - compiles PATTERN (of length LENGTH) and puts the result in BUFP. - Returns 0 if the pattern was valid, otherwise an error string. - - Assumes the 'allocated' (and perhaps 'buffer') and 'translate' fields - are set in BUFP on entry. */ - -#ifdef _LIBC -const char * -re_compile_pattern (pattern, length, bufp) - const char *pattern; - size_t length; - struct re_pattern_buffer *bufp; -#else /* size_t might promote */ -const char * -re_compile_pattern (const char *pattern, size_t length, - struct re_pattern_buffer *bufp) -#endif -{ - reg_errcode_t ret; - - /* And GNU code determines whether or not to get register information - by passing null for the REGS argument to re_match, etc., not by - setting no_sub, unless RE_NO_SUB is set. */ - bufp->no_sub = !!(re_syntax_options & RE_NO_SUB); - - /* Match anchors at newline. */ - bufp->newline_anchor = 1; - - ret = re_compile_internal (bufp, pattern, length, re_syntax_options); - - if (!ret) - return NULL; - return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} -#ifdef _LIBC -weak_alias (__re_compile_pattern, re_compile_pattern) -#endif - -/* Set by 're_set_syntax' to the current regexp syntax to recognize. Can - also be assigned to arbitrarily: each pattern buffer stores its own - syntax, so it can be changed between regex compilations. */ -/* This has no initializer because initialized variables in Emacs - become read-only after dumping. */ -reg_syntax_t re_syntax_options; - - -/* Specify the precise syntax of regexps for compilation. This provides - for compatibility for various utilities which historically have - different, incompatible syntaxes. - - The argument SYNTAX is a bit mask comprised of the various bits - defined in regex.h. We return the old syntax. */ - -reg_syntax_t -re_set_syntax (syntax) - reg_syntax_t syntax; -{ - reg_syntax_t ret = re_syntax_options; - - re_syntax_options = syntax; - return ret; -} -#ifdef _LIBC -weak_alias (__re_set_syntax, re_set_syntax) -#endif - -int -re_compile_fastmap (bufp) - struct re_pattern_buffer *bufp; -{ - re_dfa_t *dfa = bufp->buffer; - char *fastmap = bufp->fastmap; - - memset (fastmap, '\0', sizeof (char) * SBC_MAX); - re_compile_fastmap_iter (bufp, dfa->init_state, fastmap); - if (dfa->init_state != dfa->init_state_word) - re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap); - if (dfa->init_state != dfa->init_state_nl) - re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap); - if (dfa->init_state != dfa->init_state_begbuf) - re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap); - bufp->fastmap_accurate = 1; - return 0; -} -#ifdef _LIBC -weak_alias (__re_compile_fastmap, re_compile_fastmap) -#endif - -static inline void -__attribute ((always_inline)) -re_set_fastmap (char *fastmap, bool icase, int ch) -{ - fastmap[ch] = 1; - if (icase) - fastmap[tolower (ch)] = 1; -} - -/* Helper function for re_compile_fastmap. - Compile fastmap for the initial_state INIT_STATE. */ - -static void -re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state, - char *fastmap) -{ - re_dfa_t *dfa = bufp->buffer; - Idx node_cnt; - bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE)); - for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt) - { - Idx node = init_state->nodes.elems[node_cnt]; - re_token_type_t type = dfa->nodes[node].type; - - if (type == CHARACTER) - { - re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c); -#ifdef RE_ENABLE_I18N - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - unsigned char buf[MB_LEN_MAX]; - unsigned char *p; - wchar_t wc; - mbstate_t state; - - p = buf; - *p++ = dfa->nodes[node].opr.c; - while (++node < dfa->nodes_len - && dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].mb_partial) - *p++ = dfa->nodes[node].opr.c; - memset (&state, '\0', sizeof (state)); - if (__mbrtowc (&wc, (const char *) buf, p - buf, - &state) == p - buf - && (__wcrtomb ((char *) buf, towlower (wc), &state) - != (size_t) -1)) - re_set_fastmap (fastmap, false, buf[0]); - } -#endif - } - else if (type == SIMPLE_BRACKET) - { - int i, ch; - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - { - int j; - bitset_word_t w = dfa->nodes[node].opr.sbcset[i]; - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - if (w & ((bitset_word_t) 1 << j)) - re_set_fastmap (fastmap, icase, ch); - } - } -#ifdef RE_ENABLE_I18N - else if (type == COMPLEX_BRACKET) - { - re_charset_t *cset = dfa->nodes[node].opr.mbcset; - Idx i; - -# ifdef _LIBC - /* See if we have to try all bytes which start multiple collation - elements. - e.g. In da_DK, we want to catch 'a' since "aa" is a valid - collation element, and don't catch 'b' since 'b' is - the only collation element which starts from 'b' (and - it is caught by SIMPLE_BRACKET). */ - if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0 - && (cset->ncoll_syms || cset->nranges)) - { - const int32_t *table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - for (i = 0; i < SBC_MAX; ++i) - if (table[i] < 0) - re_set_fastmap (fastmap, icase, i); - } -# endif /* _LIBC */ - - /* See if we have to start the match at all multibyte characters, - i.e. where we would not find an invalid sequence. This only - applies to multibyte character sets; for single byte character - sets, the SIMPLE_BRACKET again suffices. */ - if (dfa->mb_cur_max > 1 - && (cset->nchar_classes || cset->non_match || cset->nranges -# ifdef _LIBC - || cset->nequiv_classes -# endif /* _LIBC */ - )) - { - unsigned char c = 0; - do - { - mbstate_t mbs; - memset (&mbs, 0, sizeof (mbs)); - if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2) - re_set_fastmap (fastmap, false, (int) c); - } - while (++c != 0); - } - - else - { - /* ... Else catch all bytes which can start the mbchars. */ - for (i = 0; i < cset->nmbchars; ++i) - { - char buf[256]; - mbstate_t state; - memset (&state, '\0', sizeof (state)); - if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1) - re_set_fastmap (fastmap, icase, *(unsigned char *) buf); - if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1) - { - if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state) - != (size_t) -1) - re_set_fastmap (fastmap, false, *(unsigned char *) buf); - } - } - } - } -#endif /* RE_ENABLE_I18N */ - else if (type == OP_PERIOD -#ifdef RE_ENABLE_I18N - || type == OP_UTF8_PERIOD -#endif /* RE_ENABLE_I18N */ - || type == END_OF_RE) - { - memset (fastmap, '\1', sizeof (char) * SBC_MAX); - if (type == END_OF_RE) - bufp->can_be_null = 1; - return; - } - } -} - -/* Entry point for POSIX code. */ -/* regcomp takes a regular expression as a string and compiles it. - - PREG is a regex_t *. We do not expect any fields to be initialized, - since POSIX says we shouldn't. Thus, we set - - 'buffer' to the compiled pattern; - 'used' to the length of the compiled pattern; - 'syntax' to RE_SYNTAX_POSIX_EXTENDED if the - REG_EXTENDED bit in CFLAGS is set; otherwise, to - RE_SYNTAX_POSIX_BASIC; - 'newline_anchor' to REG_NEWLINE being set in CFLAGS; - 'fastmap' to an allocated space for the fastmap; - 'fastmap_accurate' to zero; - 're_nsub' to the number of subexpressions in PATTERN. - - PATTERN is the address of the pattern string. - - CFLAGS is a series of bits which affect compilation. - - If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we - use POSIX basic syntax. - - If REG_NEWLINE is set, then . and [^...] don't match newline. - Also, regexec will try a match beginning after every newline. - - If REG_ICASE is set, then we considers upper- and lowercase - versions of letters to be equivalent when matching. - - If REG_NOSUB is set, then when PREG is passed to regexec, that - routine will report only success or failure, and nothing about the - registers. - - It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for - the return codes and their meanings.) */ - -int -regcomp (preg, pattern, cflags) - regex_t *_Restrict_ preg; - const char *_Restrict_ pattern; - int cflags; -{ - reg_errcode_t ret; - reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED - : RE_SYNTAX_POSIX_BASIC); - - preg->buffer = NULL; - preg->allocated = 0; - preg->used = 0; - - /* Try to allocate space for the fastmap. */ - preg->fastmap = re_malloc (char, SBC_MAX); - if (BE (preg->fastmap == NULL, 0)) - return REG_ESPACE; - - syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0; - - /* If REG_NEWLINE is set, newlines are treated differently. */ - if (cflags & REG_NEWLINE) - { /* REG_NEWLINE implies neither . nor [^...] match newline. */ - syntax &= ~RE_DOT_NEWLINE; - syntax |= RE_HAT_LISTS_NOT_NEWLINE; - /* It also changes the matching behavior. */ - preg->newline_anchor = 1; - } - else - preg->newline_anchor = 0; - preg->no_sub = !!(cflags & REG_NOSUB); - preg->translate = NULL; - - ret = re_compile_internal (preg, pattern, strlen (pattern), syntax); - - /* POSIX doesn't distinguish between an unmatched open-group and an - unmatched close-group: both are REG_EPAREN. */ - if (ret == REG_ERPAREN) - ret = REG_EPAREN; - - /* We have already checked preg->fastmap != NULL. */ - if (BE (ret == REG_NOERROR, 1)) - /* Compute the fastmap now, since regexec cannot modify the pattern - buffer. This function never fails in this implementation. */ - (void) re_compile_fastmap (preg); - else - { - /* Some error occurred while compiling the expression. */ - re_free (preg->fastmap); - preg->fastmap = NULL; - } - - return (int) ret; -} -#ifdef _LIBC -weak_alias (__regcomp, regcomp) -#endif - -/* Returns a message corresponding to an error code, ERRCODE, returned - from either regcomp or regexec. We don't use PREG here. */ - -#ifdef _LIBC -size_t -regerror (errcode, preg, errbuf, errbuf_size) - int errcode; - const regex_t *_Restrict_ preg; - char *_Restrict_ errbuf; - size_t errbuf_size; -#else /* size_t might promote */ -size_t -regerror (int errcode, const regex_t *_Restrict_ preg, - char *_Restrict_ errbuf, size_t errbuf_size) -#endif -{ - const char *msg; - size_t msg_size; - - if (BE (errcode < 0 - || errcode >= (int) (sizeof (__re_error_msgid_idx) - / sizeof (__re_error_msgid_idx[0])), 0)) - /* Only error codes returned by the rest of the code should be passed - to this routine. If we are given anything else, or if other regex - code generates an invalid error code, then the program has a bug. - Dump core so we can fix it. */ - abort (); - - msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]); - - msg_size = strlen (msg) + 1; /* Includes the null. */ - - if (BE (errbuf_size != 0, 1)) - { - size_t cpy_size = msg_size; - if (BE (msg_size > errbuf_size, 0)) - { - cpy_size = errbuf_size - 1; - errbuf[cpy_size] = '\0'; - } - memcpy (errbuf, msg, cpy_size); - } - - return msg_size; -} -#ifdef _LIBC -weak_alias (__regerror, regerror) -#endif - - -#ifdef RE_ENABLE_I18N -/* This static array is used for the map to single-byte characters when - UTF-8 is used. Otherwise we would allocate memory just to initialize - it the same all the time. UTF-8 is the preferred encoding so this is - a worthwhile optimization. */ -static const bitset_t utf8_sb_map = -{ - /* Set the first 128 bits. */ -# 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 - BITSET_WORD_MAX, BITSET_WORD_MAX, -# elif 1 * BITSET_WORD_BITS < ASCII_CHARS - BITSET_WORD_MAX, -# endif - (BITSET_WORD_MAX - >> (SBC_MAX % BITSET_WORD_BITS == 0 - ? 0 - : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS)) -# endif -}; -#endif - - -static void -free_dfa_content (re_dfa_t *dfa) -{ - Idx i, j; - - if (dfa->nodes) - for (i = 0; i < dfa->nodes_len; ++i) - free_token (dfa->nodes + i); - re_free (dfa->nexts); - for (i = 0; i < dfa->nodes_len; ++i) - { - if (dfa->eclosures != NULL) - re_node_set_free (dfa->eclosures + i); - if (dfa->inveclosures != NULL) - re_node_set_free (dfa->inveclosures + i); - if (dfa->edests != NULL) - re_node_set_free (dfa->edests + i); - } - re_free (dfa->edests); - re_free (dfa->eclosures); - re_free (dfa->inveclosures); - re_free (dfa->nodes); - - if (dfa->state_table) - for (i = 0; i <= dfa->state_hash_mask; ++i) - { - struct re_state_table_entry *entry = dfa->state_table + i; - for (j = 0; j < entry->num; ++j) - { - re_dfastate_t *state = entry->array[j]; - free_state (state); - } - re_free (entry->array); - } - re_free (dfa->state_table); -#ifdef RE_ENABLE_I18N - if (dfa->sb_char != utf8_sb_map) - re_free (dfa->sb_char); -#endif - re_free (dfa->subexp_map); -#ifdef DEBUG - re_free (dfa->re_str); -#endif - - re_free (dfa); -} - - -/* Free dynamically allocated space used by PREG. */ - -void -regfree (preg) - regex_t *preg; -{ - re_dfa_t *dfa = preg->buffer; - if (BE (dfa != NULL, 1)) - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - - re_free (preg->fastmap); - preg->fastmap = NULL; - - re_free (preg->translate); - preg->translate = NULL; -} -#ifdef _LIBC -weak_alias (__regfree, regfree) -#endif - -/* Entry points compatible with 4.2 BSD regex library. We don't define - them unless specifically requested. */ - -#if defined _REGEX_RE_COMP || defined _LIBC - -/* BSD has one and only one pattern buffer. */ -static struct re_pattern_buffer re_comp_buf; - -char * -# ifdef _LIBC -/* Make these definitions weak in libc, so POSIX programs can redefine - these names if they don't use our functions, and still use - regcomp/regexec above without link errors. */ -weak_function -# endif -re_comp (s) - const char *s; -{ - reg_errcode_t ret; - char *fastmap; - - if (!s) - { - if (!re_comp_buf.buffer) - return gettext ("No previous regular expression"); - return 0; - } - - if (re_comp_buf.buffer) - { - fastmap = re_comp_buf.fastmap; - re_comp_buf.fastmap = NULL; - __regfree (&re_comp_buf); - memset (&re_comp_buf, '\0', sizeof (re_comp_buf)); - re_comp_buf.fastmap = fastmap; - } - - if (re_comp_buf.fastmap == NULL) - { - re_comp_buf.fastmap = (char *) malloc (SBC_MAX); - if (re_comp_buf.fastmap == NULL) - return (char *) gettext (__re_error_msgid - + __re_error_msgid_idx[(int) REG_ESPACE]); - } - - /* Since 're_exec' always passes NULL for the 'regs' argument, we - don't need to initialize the pattern buffer fields which affect it. */ - - /* Match anchors at newlines. */ - re_comp_buf.newline_anchor = 1; - - ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options); - - if (!ret) - return NULL; - - /* Yes, we're discarding 'const' here if !HAVE_LIBINTL. */ - return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]); -} - -#ifdef _LIBC -libc_freeres_fn (free_mem) -{ - __regfree (&re_comp_buf); -} -#endif - -#endif /* _REGEX_RE_COMP */ - -/* Internal entry point. - Compile the regular expression PATTERN, whose length is LENGTH. - SYNTAX indicate regular expression's syntax. */ - -static reg_errcode_t -re_compile_internal (regex_t *preg, const char * pattern, size_t length, - reg_syntax_t syntax) -{ - reg_errcode_t err = REG_NOERROR; - re_dfa_t *dfa; - re_string_t regexp; - - /* Initialize the pattern buffer. */ - preg->fastmap_accurate = 0; - preg->syntax = syntax; - preg->not_bol = preg->not_eol = 0; - preg->used = 0; - preg->re_nsub = 0; - preg->can_be_null = 0; - preg->regs_allocated = REGS_UNALLOCATED; - - /* Initialize the dfa. */ - dfa = preg->buffer; - if (BE (preg->allocated < sizeof (re_dfa_t), 0)) - { - /* If zero allocated, but buffer is non-null, try to realloc - enough space. This loses if buffer's address is bogus, but - that is the user's responsibility. If ->buffer is NULL this - is a simple allocation. */ - dfa = re_realloc (preg->buffer, re_dfa_t, 1); - if (dfa == NULL) - return REG_ESPACE; - preg->allocated = sizeof (re_dfa_t); - preg->buffer = dfa; - } - preg->used = sizeof (re_dfa_t); - - err = init_dfa (dfa, length); - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } -#ifdef DEBUG - /* Note: length+1 will not overflow since it is checked in init_dfa. */ - dfa->re_str = re_malloc (char, length + 1); - strncpy (dfa->re_str, pattern, length + 1); -#endif - - __libc_lock_init (dfa->lock); - - err = re_string_construct (®exp, pattern, length, preg->translate, - (syntax & RE_ICASE) != 0, dfa); - if (BE (err != REG_NOERROR, 0)) - { - re_compile_internal_free_return: - free_workarea_compile (preg); - re_string_destruct (®exp); - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - return err; - } - - /* Parse the regular expression, and build a structure tree. */ - preg->re_nsub = 0; - dfa->str_tree = parse (®exp, preg, syntax, &err); - if (BE (dfa->str_tree == NULL, 0)) - goto re_compile_internal_free_return; - - /* Analyze the tree and create the nfa. */ - err = analyze (preg); - if (BE (err != REG_NOERROR, 0)) - goto re_compile_internal_free_return; - -#ifdef RE_ENABLE_I18N - /* If possible, do searching in single byte encoding to speed things up. */ - if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL) - optimize_utf8 (dfa); -#endif - - /* Then create the initial state of the dfa. */ - err = create_initial_state (dfa); - - /* Release work areas. */ - free_workarea_compile (preg); - re_string_destruct (®exp); - - if (BE (err != REG_NOERROR, 0)) - { - free_dfa_content (dfa); - preg->buffer = NULL; - preg->allocated = 0; - } - - return err; -} - -/* Initialize DFA. We use the length of the regular expression PAT_LEN - as the initial length of some arrays. */ - -static reg_errcode_t -init_dfa (re_dfa_t *dfa, size_t pat_len) -{ - __re_size_t table_size; -#ifndef _LIBC - const char *codeset_name; -#endif -#ifdef RE_ENABLE_I18N - size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); -#else - size_t max_i18n_object_size = 0; -#endif - size_t max_object_size = - MAX (sizeof (struct re_state_table_entry), - MAX (sizeof (re_token_t), - MAX (sizeof (re_node_set), - MAX (sizeof (regmatch_t), - max_i18n_object_size)))); - - memset (dfa, '\0', sizeof (re_dfa_t)); - - /* Force allocation of str_tree_storage the first time. */ - dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; - - /* Avoid overflows. The extra "/ 2" is for the table_size doubling - calculation below, and for similar doubling calculations - elsewhere. And it's <= rather than <, because some of the - doubling calculations add 1 afterwards. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) / 2 <= pat_len, 0)) - return REG_ESPACE; - - dfa->nodes_alloc = pat_len + 1; - dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc); - - /* table_size = 2 ^ ceil(log pat_len) */ - for (table_size = 1; ; table_size <<= 1) - if (table_size > pat_len) - break; - - dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size); - dfa->state_hash_mask = table_size - 1; - - dfa->mb_cur_max = MB_CUR_MAX; -#ifdef _LIBC - if (dfa->mb_cur_max == 6 - && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0) - dfa->is_utf8 = 1; - dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII) - != 0); -#else - codeset_name = nl_langinfo (CODESET); - if ((codeset_name[0] == 'U' || codeset_name[0] == 'u') - && (codeset_name[1] == 'T' || codeset_name[1] == 't') - && (codeset_name[2] == 'F' || codeset_name[2] == 'f') - && strcmp (codeset_name + 3 + (codeset_name[3] == '-'), "8") == 0) - dfa->is_utf8 = 1; - - /* We check exhaustively in the loop below if this charset is a - superset of ASCII. */ - dfa->map_notascii = 0; -#endif - -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - if (dfa->is_utf8) - dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map; - else - { - int i, j, ch; - - dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); - if (BE (dfa->sb_char == NULL, 0)) - return REG_ESPACE; - - /* Set the bits corresponding to single byte chars. */ - for (i = 0, ch = 0; i < BITSET_WORDS; ++i) - for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch) - { - wint_t wch = __btowc (ch); - if (wch != WEOF) - dfa->sb_char[i] |= (bitset_word_t) 1 << j; -# ifndef _LIBC - if (isascii (ch) && wch != ch) - dfa->map_notascii = 1; -# endif - } - } - } -#endif - - if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0)) - return REG_ESPACE; - return REG_NOERROR; -} - -/* Initialize WORD_CHAR table, which indicate which character is - "word". In this case "word" means that it is the word construction - character used by some operators like "\<", "\>", etc. */ - -static void -internal_function -init_word_char (re_dfa_t *dfa) -{ - dfa->word_ops_used = 1; - 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; -} - -/* Free the work area which are only used while compiling. */ - -static void -free_workarea_compile (regex_t *preg) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_storage_t *storage, *next; - for (storage = dfa->str_tree_storage; storage; storage = next) - { - next = storage->next; - re_free (storage); - } - dfa->str_tree_storage = NULL; - dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE; - dfa->str_tree = NULL; - re_free (dfa->org_indices); - dfa->org_indices = NULL; -} - -/* Create initial states for all contexts. */ - -static reg_errcode_t -create_initial_state (re_dfa_t *dfa) -{ - Idx first, i; - reg_errcode_t err; - re_node_set init_nodes; - - /* Initial states have the epsilon closure of the node which is - the first node of the regular expression. */ - first = dfa->str_tree->first->node_idx; - dfa->init_node = first; - err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* The back-references which are in initial states can epsilon transit, - since in this case all of the subexpressions can be null. - Then we add epsilon closures of the nodes which are the next nodes of - the back-references. */ - if (dfa->nbackref > 0) - for (i = 0; i < init_nodes.nelem; ++i) - { - Idx node_idx = init_nodes.elems[i]; - re_token_type_t type = dfa->nodes[node_idx].type; - - Idx clexp_idx; - if (type != OP_BACK_REF) - continue; - for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx) - { - re_token_t *clexp_node; - clexp_node = dfa->nodes + init_nodes.elems[clexp_idx]; - if (clexp_node->type == OP_CLOSE_SUBEXP - && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx) - break; - } - if (clexp_idx == init_nodes.nelem) - continue; - - if (type == OP_BACK_REF) - { - Idx dest_idx = dfa->edests[node_idx].elems[0]; - if (!re_node_set_contains (&init_nodes, dest_idx)) - { - reg_errcode_t merge_err - = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx); - if (merge_err != REG_NOERROR) - return merge_err; - i = 0; - } - } - } - - /* It must be the first time to invoke acquire_state. */ - dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0); - /* We don't check ERR here, since the initial state must not be NULL. */ - if (BE (dfa->init_state == NULL, 0)) - return err; - if (dfa->init_state->has_constraint) - { - dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes, - CONTEXT_WORD); - dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes, - CONTEXT_NEWLINE); - dfa->init_state_begbuf = re_acquire_state_context (&err, dfa, - &init_nodes, - CONTEXT_NEWLINE - | CONTEXT_BEGBUF); - if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) - return err; - } - else - dfa->init_state_word = dfa->init_state_nl - = dfa->init_state_begbuf = dfa->init_state; - - re_node_set_free (&init_nodes); - return REG_NOERROR; -} - -#ifdef RE_ENABLE_I18N -/* If it is possible to do searching in single byte encoding instead of UTF-8 - to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change - DFA nodes where needed. */ - -static void -optimize_utf8 (re_dfa_t *dfa) -{ - Idx node; - int i; - bool mb_chars = false; - bool has_period = false; - - for (node = 0; node < dfa->nodes_len; ++node) - switch (dfa->nodes[node].type) - { - case CHARACTER: - if (dfa->nodes[node].opr.c >= ASCII_CHARS) - mb_chars = true; - break; - case ANCHOR: - switch (dfa->nodes[node].opr.ctx_type) - { - case LINE_FIRST: - case LINE_LAST: - case BUF_FIRST: - case BUF_LAST: - break; - default: - /* Word anchors etc. cannot be handled. It's okay to test - opr.ctx_type since constraints (for all DFA nodes) are - created by ORing one or more opr.ctx_type values. */ - return; - } - break; - case OP_PERIOD: - has_period = true; - break; - case OP_BACK_REF: - case OP_ALT: - case END_OF_RE: - case OP_DUP_ASTERISK: - case OP_OPEN_SUBEXP: - case OP_CLOSE_SUBEXP: - break; - case COMPLEX_BRACKET: - return; - case SIMPLE_BRACKET: - /* Just double check. */ - { - int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0 - ? 0 - : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS); - for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i) - { - if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0) - return; - rshift = 0; - } - } - break; - default: - abort (); - } - - if (mb_chars || has_period) - for (node = 0; node < dfa->nodes_len; ++node) - { - if (dfa->nodes[node].type == CHARACTER - && dfa->nodes[node].opr.c >= ASCII_CHARS) - dfa->nodes[node].mb_partial = 0; - else if (dfa->nodes[node].type == OP_PERIOD) - dfa->nodes[node].type = OP_UTF8_PERIOD; - } - - /* The search can be in single byte locale. */ - dfa->mb_cur_max = 1; - dfa->is_utf8 = 0; - dfa->has_mb_node = dfa->nbackref > 0 || has_period; -} -#endif - -/* Analyze the structure tree, and calculate "first", "next", "edest", - "eclosure", and "inveclosure". */ - -static reg_errcode_t -analyze (regex_t *preg) -{ - re_dfa_t *dfa = preg->buffer; - reg_errcode_t ret; - - /* Allocate arrays. */ - dfa->nexts = re_malloc (Idx, dfa->nodes_alloc); - dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc); - dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc); - dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc); - if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL - || dfa->eclosures == NULL, 0)) - return REG_ESPACE; - - dfa->subexp_map = re_malloc (Idx, preg->re_nsub); - if (dfa->subexp_map != NULL) - { - Idx i; - for (i = 0; i < preg->re_nsub; i++) - dfa->subexp_map[i] = i; - preorder (dfa->str_tree, optimize_subexps, dfa); - for (i = 0; i < preg->re_nsub; i++) - if (dfa->subexp_map[i] != i) - break; - if (i == preg->re_nsub) - { - free (dfa->subexp_map); - dfa->subexp_map = NULL; - } - } - - ret = postorder (dfa->str_tree, lower_subexps, preg); - if (BE (ret != REG_NOERROR, 0)) - return ret; - ret = postorder (dfa->str_tree, calc_first, dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - preorder (dfa->str_tree, calc_next, dfa); - ret = preorder (dfa->str_tree, link_nfa_nodes, dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - ret = calc_eclosure (dfa); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - /* We only need this during the prune_impossible_nodes pass in regexec.c; - skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */ - if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match) - || dfa->nbackref) - { - dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len); - if (BE (dfa->inveclosures == NULL, 0)) - return REG_ESPACE; - ret = calc_inveclosure (dfa); - } - - return ret; -} - -/* Our parse trees are very unbalanced, so we cannot use a stack to - implement parse tree visits. Instead, we use parent pointers and - some hairy code in these two functions. */ -static reg_errcode_t -postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra) -{ - bin_tree_t *node, *prev; - - for (node = root; ; ) - { - /* Descend down the tree, preferably to the left (or to the right - if that's the only child). */ - while (node->left || node->right) - if (node->left) - node = node->left; - else - node = node->right; - - do - { - reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) - return err; - if (node->parent == NULL) - return REG_NOERROR; - prev = node; - node = node->parent; - } - /* Go up while we have a node that is reached from the right. */ - while (node->right == prev || node->right == NULL); - node = node->right; - } -} - -static reg_errcode_t -preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)), - void *extra) -{ - bin_tree_t *node; - - for (node = root; ; ) - { - reg_errcode_t err = fn (extra, node); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* Go to the left node, or up and to the right. */ - if (node->left) - node = node->left; - else - { - bin_tree_t *prev = NULL; - while (node->right == prev || node->right == NULL) - { - prev = node; - node = node->parent; - if (!node) - return REG_NOERROR; - } - node = node->right; - } - } -} - -/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell - re_search_internal to map the inner one's opr.idx to this one's. Adjust - backreferences as well. Requires a preorder visit. */ -static reg_errcode_t -optimize_subexps (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - - if (node->token.type == OP_BACK_REF && dfa->subexp_map) - { - int idx = node->token.opr.idx; - node->token.opr.idx = dfa->subexp_map[idx]; - dfa->used_bkref_map |= 1 << node->token.opr.idx; - } - - else if (node->token.type == SUBEXP - && node->left && node->left->token.type == SUBEXP) - { - Idx other_idx = node->left->token.opr.idx; - - node->left = node->left->left; - if (node->left) - node->left->parent = node; - - dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx]; - if (other_idx < BITSET_WORD_BITS) - dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx); - } - - return REG_NOERROR; -} - -/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation - of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */ -static reg_errcode_t -lower_subexps (void *extra, bin_tree_t *node) -{ - regex_t *preg = (regex_t *) extra; - reg_errcode_t err = REG_NOERROR; - - if (node->left && node->left->token.type == SUBEXP) - { - node->left = lower_subexp (&err, preg, node->left); - if (node->left) - node->left->parent = node; - } - if (node->right && node->right->token.type == SUBEXP) - { - node->right = lower_subexp (&err, preg, node->right); - if (node->right) - node->right->parent = node; - } - - return err; -} - -static bin_tree_t * -lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_t *body = node->left; - bin_tree_t *op, *cls, *tree1, *tree; - - if (preg->no_sub - /* We do not optimize empty subexpressions, because otherwise we may - have bad CONCAT nodes with NULL children. This is obviously not - very common, so we do not lose much. An example that triggers - this case is the sed "script" /\(\)/x. */ - && node->left != NULL - && (node->token.opr.idx >= BITSET_WORD_BITS - || !(dfa->used_bkref_map - & ((bitset_word_t) 1 << node->token.opr.idx)))) - return node->left; - - /* Convert the SUBEXP node to the concatenation of an - OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */ - op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP); - cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP); - tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls; - tree = create_tree (dfa, op, tree1, CONCAT); - if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - - op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx; - op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp; - return tree; -} - -/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton - nodes. Requires a postorder visit. */ -static reg_errcode_t -calc_first (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - if (node->token.type == CONCAT) - { - node->first = node->left->first; - node->node_idx = node->left->node_idx; - } - else - { - node->first = node; - node->node_idx = re_dfa_add_node (dfa, node->token); - if (BE (node->node_idx == REG_MISSING, 0)) - return REG_ESPACE; - if (node->token.type == ANCHOR) - dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type; - } - return REG_NOERROR; -} - -/* Pass 2: compute NEXT on the tree. Preorder visit. */ -static reg_errcode_t -calc_next (void *extra, bin_tree_t *node) -{ - switch (node->token.type) - { - case OP_DUP_ASTERISK: - node->left->next = node; - break; - case CONCAT: - node->left->next = node->right->first; - node->right->next = node->next; - break; - default: - if (node->left) - node->left->next = node->next; - if (node->right) - node->right->next = node->next; - break; - } - return REG_NOERROR; -} - -/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */ -static reg_errcode_t -link_nfa_nodes (void *extra, bin_tree_t *node) -{ - re_dfa_t *dfa = (re_dfa_t *) extra; - Idx idx = node->node_idx; - reg_errcode_t err = REG_NOERROR; - - switch (node->token.type) - { - case CONCAT: - break; - - case END_OF_RE: - assert (node->next == NULL); - break; - - case OP_DUP_ASTERISK: - case OP_ALT: - { - Idx left, right; - dfa->has_plural_match = 1; - if (node->left != NULL) - left = node->left->first->node_idx; - else - left = node->next->node_idx; - if (node->right != NULL) - right = node->right->first->node_idx; - else - right = node->next->node_idx; - assert (REG_VALID_INDEX (left)); - assert (REG_VALID_INDEX (right)); - err = re_node_set_init_2 (dfa->edests + idx, left, right); - } - break; - - case ANCHOR: - case OP_OPEN_SUBEXP: - case OP_CLOSE_SUBEXP: - err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx); - break; - - case OP_BACK_REF: - dfa->nexts[idx] = node->next->node_idx; - if (node->token.type == OP_BACK_REF) - err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]); - break; - - default: - assert (!IS_EPSILON_NODE (node->token.type)); - dfa->nexts[idx] = node->next->node_idx; - break; - } - - return err; -} - -/* Duplicate the epsilon closure of the node ROOT_NODE. - Note that duplicated nodes have constraint INIT_CONSTRAINT in addition - to their own constraint. */ - -static reg_errcode_t -internal_function -duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node, - Idx root_node, unsigned int init_constraint) -{ - Idx org_node, clone_node; - bool ok; - unsigned int constraint = init_constraint; - for (org_node = top_org_node, clone_node = top_clone_node;;) - { - Idx org_dest, clone_dest; - if (dfa->nodes[org_node].type == OP_BACK_REF) - { - /* If the back reference epsilon-transit, its destination must - also have the constraint. Then duplicate the epsilon closure - of the destination of the back reference, and store it in - edests of the back reference. */ - org_dest = dfa->nexts[org_node]; - re_node_set_empty (dfa->edests + clone_node); - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - dfa->nexts[clone_node] = dfa->nexts[org_node]; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - else if (dfa->edests[org_node].nelem == 0) - { - /* In case of the node can't epsilon-transit, don't duplicate the - destination and store the original destination as the - destination of the node. */ - dfa->nexts[clone_node] = dfa->nexts[org_node]; - break; - } - else if (dfa->edests[org_node].nelem == 1) - { - /* In case of the node can epsilon-transit, and it has only one - destination. */ - org_dest = dfa->edests[org_node].elems[0]; - re_node_set_empty (dfa->edests + clone_node); - /* If the node is root_node itself, it means the epsilon closure - has a loop. Then tie it to the destination of the root_node. */ - if (org_node == root_node && clone_node != org_node) - { - ok = re_node_set_insert (dfa->edests + clone_node, org_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - break; - } - /* In case the node has another constraint, append it. */ - constraint |= dfa->nodes[org_node].constraint; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - else /* dfa->edests[org_node].nelem == 2 */ - { - /* In case of the node can epsilon-transit, and it has two - destinations. In the bin_tree_t and DFA, that's '|' and '*'. */ - org_dest = dfa->edests[org_node].elems[0]; - re_node_set_empty (dfa->edests + clone_node); - /* Search for a duplicated node which satisfies the constraint. */ - clone_dest = search_duplicated_node (dfa, org_dest, constraint); - if (clone_dest == REG_MISSING) - { - /* There is no such duplicated node, create a new one. */ - reg_errcode_t err; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - err = duplicate_node_closure (dfa, org_dest, clone_dest, - root_node, constraint); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - { - /* There is a duplicated node which satisfies the constraint, - use it to avoid infinite loop. */ - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - - org_dest = dfa->edests[org_node].elems[1]; - clone_dest = duplicate_node (dfa, org_dest, constraint); - if (BE (clone_dest == REG_MISSING, 0)) - return REG_ESPACE; - ok = re_node_set_insert (dfa->edests + clone_node, clone_dest); - if (BE (! ok, 0)) - return REG_ESPACE; - } - org_node = org_dest; - clone_node = clone_dest; - } - return REG_NOERROR; -} - -/* Search for a node which is duplicated from the node ORG_NODE, and - satisfies the constraint CONSTRAINT. */ - -static Idx -search_duplicated_node (const re_dfa_t *dfa, Idx org_node, - unsigned int constraint) -{ - Idx idx; - for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx) - { - if (org_node == dfa->org_indices[idx] - && constraint == dfa->nodes[idx].constraint) - return idx; /* Found. */ - } - return REG_MISSING; /* Not found. */ -} - -/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT. - Return the index of the new node, or REG_MISSING if insufficient storage is - available. */ - -static Idx -duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint) -{ - Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]); - if (BE (dup_idx != REG_MISSING, 1)) - { - dfa->nodes[dup_idx].constraint = constraint; - dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint; - dfa->nodes[dup_idx].duplicated = 1; - - /* Store the index of the original node. */ - dfa->org_indices[dup_idx] = org_idx; - } - return dup_idx; -} - -static reg_errcode_t -calc_inveclosure (re_dfa_t *dfa) -{ - Idx src, idx; - bool ok; - for (idx = 0; idx < dfa->nodes_len; ++idx) - re_node_set_init_empty (dfa->inveclosures + idx); - - for (src = 0; src < dfa->nodes_len; ++src) - { - Idx *elems = dfa->eclosures[src].elems; - for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx) - { - ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src); - if (BE (! ok, 0)) - return REG_ESPACE; - } - } - - return REG_NOERROR; -} - -/* Calculate "eclosure" for all the node in DFA. */ - -static reg_errcode_t -calc_eclosure (re_dfa_t *dfa) -{ - Idx node_idx; - bool incomplete; -#ifdef DEBUG - assert (dfa->nodes_len > 0); -#endif - incomplete = false; - /* For each nodes, calculate epsilon closure. */ - for (node_idx = 0; ; ++node_idx) - { - reg_errcode_t err; - re_node_set eclosure_elem; - if (node_idx == dfa->nodes_len) - { - if (!incomplete) - break; - incomplete = false; - node_idx = 0; - } - -#ifdef DEBUG - assert (dfa->eclosures[node_idx].nelem != REG_MISSING); -#endif - - /* If we have already calculated, skip it. */ - if (dfa->eclosures[node_idx].nelem != 0) - continue; - /* Calculate epsilon closure of 'node_idx'. */ - err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (dfa->eclosures[node_idx].nelem == 0) - { - incomplete = true; - re_node_set_free (&eclosure_elem); - } - } - return REG_NOERROR; -} - -/* Calculate epsilon closure of NODE. */ - -static reg_errcode_t -calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root) -{ - reg_errcode_t err; - Idx i; - re_node_set eclosure; - bool ok; - bool incomplete = false; - err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* This indicates that we are calculating this node now. - We reference this value to avoid infinite loop. */ - dfa->eclosures[node].nelem = REG_MISSING; - - /* If the current node has constraints, duplicate all nodes - since they must inherit the constraints. */ - if (dfa->nodes[node].constraint - && dfa->edests[node].nelem - && !dfa->nodes[dfa->edests[node].elems[0]].duplicated) - { - err = duplicate_node_closure (dfa, node, node, node, - dfa->nodes[node].constraint); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - /* Expand each epsilon destination nodes. */ - if (IS_EPSILON_NODE(dfa->nodes[node].type)) - for (i = 0; i < dfa->edests[node].nelem; ++i) - { - re_node_set eclosure_elem; - Idx edest = dfa->edests[node].elems[i]; - /* If calculating the epsilon closure of 'edest' is in progress, - return intermediate result. */ - if (dfa->eclosures[edest].nelem == REG_MISSING) - { - incomplete = true; - continue; - } - /* If we haven't calculated the epsilon closure of 'edest' yet, - calculate now. Otherwise use calculated epsilon closure. */ - if (dfa->eclosures[edest].nelem == 0) - { - err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - eclosure_elem = dfa->eclosures[edest]; - /* Merge the epsilon closure of 'edest'. */ - err = re_node_set_merge (&eclosure, &eclosure_elem); - if (BE (err != REG_NOERROR, 0)) - return err; - /* If the epsilon closure of 'edest' is incomplete, - the epsilon closure of this node is also incomplete. */ - if (dfa->eclosures[edest].nelem == 0) - { - incomplete = true; - re_node_set_free (&eclosure_elem); - } - } - - /* An epsilon closure includes itself. */ - ok = re_node_set_insert (&eclosure, node); - if (BE (! ok, 0)) - return REG_ESPACE; - if (incomplete && !root) - dfa->eclosures[node].nelem = 0; - else - dfa->eclosures[node] = eclosure; - *new_set = eclosure; - return REG_NOERROR; -} - -/* Functions for token which are used in the parser. */ - -/* Fetch a token from INPUT. - We must not use this function inside bracket expressions. */ - -static void -internal_function -fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax) -{ - re_string_skip_bytes (input, peek_token (result, input, syntax)); -} - -/* Peek a token from INPUT, and return the length of the token. - We must not use this function inside bracket expressions. */ - -static int -internal_function -peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax) -{ - unsigned char c; - - if (re_string_eoi (input)) - { - token->type = END_OF_RE; - return 0; - } - - c = re_string_peek_byte (input, 0); - token->opr.c = c; - - token->word_char = 0; -#ifdef RE_ENABLE_I18N - token->mb_partial = 0; - if (input->mb_cur_max > 1 && - !re_string_first_byte (input, re_string_cur_idx (input))) - { - token->type = CHARACTER; - token->mb_partial = 1; - return 1; - } -#endif - if (c == '\\') - { - unsigned char c2; - if (re_string_cur_idx (input) + 1 >= re_string_length (input)) - { - token->type = BACK_SLASH; - return 1; - } - - c2 = re_string_peek_byte_case (input, 1); - token->opr.c = c2; - token->type = CHARACTER; -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc = re_string_wchar_at (input, - re_string_cur_idx (input) + 1); - token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; - } - else -#endif - token->word_char = IS_WORD_CHAR (c2) != 0; - - switch (c2) - { - case '|': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR)) - token->type = OP_ALT; - break; - case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - if (!(syntax & RE_NO_BK_REFS)) - { - token->type = OP_BACK_REF; - token->opr.idx = c2 - '1'; - } - break; - case '<': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_FIRST; - } - break; - case '>': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_LAST; - } - break; - case 'b': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = WORD_DELIM; - } - break; - case 'B': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = NOT_WORD_DELIM; - } - break; - case 'w': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_WORD; - break; - case 'W': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_NOTWORD; - break; - case 's': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_SPACE; - break; - case 'S': - if (!(syntax & RE_NO_GNU_OPS)) - token->type = OP_NOTSPACE; - break; - case '`': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = BUF_FIRST; - } - break; - case '\'': - if (!(syntax & RE_NO_GNU_OPS)) - { - token->type = ANCHOR; - token->opr.ctx_type = BUF_LAST; - } - break; - case '(': - if (!(syntax & RE_NO_BK_PARENS)) - token->type = OP_OPEN_SUBEXP; - break; - case ')': - if (!(syntax & RE_NO_BK_PARENS)) - token->type = OP_CLOSE_SUBEXP; - break; - case '+': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_PLUS; - break; - case '?': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_QUESTION; - break; - case '{': - if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) - token->type = OP_OPEN_DUP_NUM; - break; - case '}': - if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES))) - token->type = OP_CLOSE_DUP_NUM; - break; - default: - break; - } - return 2; - } - - token->type = CHARACTER; -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input)); - token->word_char = IS_WIDE_WORD_CHAR (wc) != 0; - } - else -#endif - token->word_char = IS_WORD_CHAR (token->opr.c); - - switch (c) - { - case '\n': - if (syntax & RE_NEWLINE_ALT) - token->type = OP_ALT; - break; - case '|': - if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR)) - token->type = OP_ALT; - break; - case '*': - token->type = OP_DUP_ASTERISK; - break; - case '+': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_PLUS; - break; - case '?': - if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM)) - token->type = OP_DUP_QUESTION; - break; - case '{': - if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) - token->type = OP_OPEN_DUP_NUM; - break; - case '}': - if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) - token->type = OP_CLOSE_DUP_NUM; - break; - case '(': - if (syntax & RE_NO_BK_PARENS) - token->type = OP_OPEN_SUBEXP; - break; - case ')': - if (syntax & RE_NO_BK_PARENS) - token->type = OP_CLOSE_SUBEXP; - break; - case '[': - token->type = OP_OPEN_BRACKET; - break; - case '.': - token->type = OP_PERIOD; - break; - case '^': - if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) && - re_string_cur_idx (input) != 0) - { - char prev = re_string_peek_byte (input, -1); - if (!(syntax & RE_NEWLINE_ALT) || prev != '\n') - break; - } - token->type = ANCHOR; - token->opr.ctx_type = LINE_FIRST; - break; - case '$': - if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) && - re_string_cur_idx (input) + 1 != re_string_length (input)) - { - re_token_t next; - re_string_skip_bytes (input, 1); - peek_token (&next, input, syntax); - re_string_skip_bytes (input, -1); - if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP) - break; - } - token->type = ANCHOR; - token->opr.ctx_type = LINE_LAST; - break; - default: - break; - } - return 1; -} - -/* Peek a token from INPUT, and return the length of the token. - We must not use this function out of bracket expressions. */ - -static int -internal_function -peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax) -{ - unsigned char c; - if (re_string_eoi (input)) - { - token->type = END_OF_RE; - return 0; - } - c = re_string_peek_byte (input, 0); - token->opr.c = c; - -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1 && - !re_string_first_byte (input, re_string_cur_idx (input))) - { - token->type = CHARACTER; - return 1; - } -#endif /* RE_ENABLE_I18N */ - - if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) - && re_string_cur_idx (input) + 1 < re_string_length (input)) - { - /* In this case, '\' escape a character. */ - unsigned char c2; - re_string_skip_bytes (input, 1); - c2 = re_string_peek_byte (input, 0); - token->opr.c = c2; - token->type = CHARACTER; - return 1; - } - if (c == '[') /* '[' is a special char in a bracket exps. */ - { - unsigned char c2; - int token_len; - if (re_string_cur_idx (input) + 1 < re_string_length (input)) - c2 = re_string_peek_byte (input, 1); - else - c2 = 0; - token->opr.c = c2; - token_len = 2; - switch (c2) - { - case '.': - token->type = OP_OPEN_COLL_ELEM; - break; - case '=': - token->type = OP_OPEN_EQUIV_CLASS; - break; - case ':': - if (syntax & RE_CHAR_CLASSES) - { - token->type = OP_OPEN_CHAR_CLASS; - break; - } - /* else fall through. */ - default: - token->type = CHARACTER; - token->opr.c = c; - token_len = 1; - break; - } - return token_len; - } - switch (c) - { - case '-': - token->type = OP_CHARSET_RANGE; - break; - case ']': - token->type = OP_CLOSE_BRACKET; - break; - case '^': - token->type = OP_NON_MATCH_LIST; - break; - default: - token->type = CHARACTER; - } - return 1; -} - -/* Functions for parser. */ - -/* Entry point of the parser. - Parse the regular expression REGEXP and return the structure tree. - If an error occurs, ERR is set by error code, and return NULL. - This function build the following tree, from regular expression : - CAT - / \ - / \ - EOR - - CAT means concatenation. - EOR means end of regular expression. */ - -static bin_tree_t * -parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax, - reg_errcode_t *err) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_t *tree, *eor, *root; - re_token_t current_token; - dfa->syntax = syntax; - fetch_token (¤t_token, regexp, syntax | RE_CARET_ANCHORS_HERE); - tree = parse_reg_exp (regexp, preg, ¤t_token, syntax, 0, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - eor = create_tree (dfa, NULL, NULL, END_OF_RE); - if (tree != NULL) - root = create_tree (dfa, tree, eor, CONCAT); - else - root = eor; - if (BE (eor == NULL || root == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - return root; -} - -/* This function build the following tree, from regular expression - |: - ALT - / \ - / \ - - - ALT means alternative, which represents the operator '|'. */ - -static bin_tree_t * -parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_t *tree, *branch = NULL; - tree = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - - while (token->type == OP_ALT) - { - fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); - if (token->type != OP_ALT && token->type != END_OF_RE - && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) - { - branch = parse_branch (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && branch == NULL, 0)) - return NULL; - } - else - branch = NULL; - tree = create_tree (dfa, tree, branch, OP_ALT); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - return tree; -} - -/* This function build the following tree, from regular expression - : - CAT - / \ - / \ - - - CAT means concatenation. */ - -static bin_tree_t * -parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - bin_tree_t *tree, *expr; - re_dfa_t *dfa = preg->buffer; - tree = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - - while (token->type != OP_ALT && token->type != END_OF_RE - && (nest == 0 || token->type != OP_CLOSE_SUBEXP)) - { - expr = parse_expression (regexp, preg, token, syntax, nest, err); - if (BE (*err != REG_NOERROR && expr == NULL, 0)) - { - if (tree != NULL) - postorder (tree, free_tree, NULL); - return NULL; - } - if (tree != NULL && expr != NULL) - { - bin_tree_t *newtree = create_tree (dfa, tree, expr, CONCAT); - if (newtree == NULL) - { - postorder (expr, free_tree, NULL); - postorder (tree, free_tree, NULL); - *err = REG_ESPACE; - return NULL; - } - tree = newtree; - } - else if (tree == NULL) - tree = expr; - /* Otherwise expr == NULL, we don't need to create new tree. */ - } - return tree; -} - -/* This function build the following tree, from regular expression a*: - * - | - a -*/ - -static bin_tree_t * -parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_t *tree; - switch (token->type) - { - case CHARACTER: - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - while (!re_string_eoi (regexp) - && !re_string_first_byte (regexp, re_string_cur_idx (regexp))) - { - bin_tree_t *mbc_remain; - fetch_token (token, regexp, syntax); - mbc_remain = create_token_tree (dfa, NULL, NULL, token); - tree = create_tree (dfa, tree, mbc_remain, CONCAT); - if (BE (mbc_remain == NULL || tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - } -#endif - break; - case OP_OPEN_SUBEXP: - tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_OPEN_BRACKET: - tree = parse_bracket_exp (regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_BACK_REF: - if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1)) - { - *err = REG_ESUBREG; - return NULL; - } - dfa->used_bkref_map |= 1 << token->opr.idx; - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - ++dfa->nbackref; - dfa->has_mb_node = 1; - break; - case OP_OPEN_DUP_NUM: - if (syntax & RE_CONTEXT_INVALID_DUP) - { - *err = REG_BADRPT; - return NULL; - } - /* FALLTHROUGH */ - case OP_DUP_ASTERISK: - case OP_DUP_PLUS: - case OP_DUP_QUESTION: - if (syntax & RE_CONTEXT_INVALID_OPS) - { - *err = REG_BADRPT; - return NULL; - } - else if (syntax & RE_CONTEXT_INDEP_OPS) - { - fetch_token (token, regexp, syntax); - return parse_expression (regexp, preg, token, syntax, nest, err); - } - /* else fall through */ - case OP_CLOSE_SUBEXP: - if ((token->type == OP_CLOSE_SUBEXP) && - !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)) - { - *err = REG_ERPAREN; - return NULL; - } - /* else fall through */ - case OP_CLOSE_DUP_NUM: - /* We treat it as a normal character. */ - - /* Then we can these characters as normal characters. */ - token->type = CHARACTER; - /* mb_partial and word_char bits should be initialized already - by peek_token. */ - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - break; - case ANCHOR: - if ((token->opr.ctx_type - & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST)) - && dfa->word_ops_used == 0) - init_word_char (dfa); - if (token->opr.ctx_type == WORD_DELIM - || token->opr.ctx_type == NOT_WORD_DELIM) - { - bin_tree_t *tree_first, *tree_last; - if (token->opr.ctx_type == WORD_DELIM) - { - token->opr.ctx_type = WORD_FIRST; - tree_first = create_token_tree (dfa, NULL, NULL, token); - token->opr.ctx_type = WORD_LAST; - } - else - { - token->opr.ctx_type = INSIDE_WORD; - tree_first = create_token_tree (dfa, NULL, NULL, token); - token->opr.ctx_type = INSIDE_NOTWORD; - } - tree_last = create_token_tree (dfa, NULL, NULL, token); - tree = create_tree (dfa, tree_first, tree_last, OP_ALT); - if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - else - { - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - } - /* We must return here, since ANCHORs can't be followed - by repetition operators. - eg. RE"^*" is invalid or "", - it must not be "". */ - fetch_token (token, regexp, syntax); - return tree; - case OP_PERIOD: - tree = create_token_tree (dfa, NULL, NULL, token); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - if (dfa->mb_cur_max > 1) - dfa->has_mb_node = 1; - break; - case OP_WORD: - case OP_NOTWORD: - tree = build_charclass_op (dfa, regexp->trans, - (const unsigned char *) "alnum", - (const unsigned char *) "_", - token->type == OP_NOTWORD, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_SPACE: - case OP_NOTSPACE: - tree = build_charclass_op (dfa, regexp->trans, - (const unsigned char *) "space", - (const unsigned char *) "", - token->type == OP_NOTSPACE, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - break; - case OP_ALT: - case END_OF_RE: - return NULL; - case BACK_SLASH: - *err = REG_EESCAPE; - return NULL; - default: - /* Must not happen? */ -#ifdef DEBUG - assert (0); -#endif - return NULL; - } - fetch_token (token, regexp, syntax); - - while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS - || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM) - { - tree = parse_dup_op (tree, regexp, dfa, token, syntax, err); - if (BE (*err != REG_NOERROR && tree == NULL, 0)) - return NULL; - /* In BRE consecutive duplications are not allowed. */ - if ((syntax & RE_CONTEXT_INVALID_DUP) - && (token->type == OP_DUP_ASTERISK - || token->type == OP_OPEN_DUP_NUM)) - { - *err = REG_BADRPT; - return NULL; - } - } - - return tree; -} - -/* This function build the following tree, from regular expression - (): - SUBEXP - | - -*/ - -static bin_tree_t * -parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token, - reg_syntax_t syntax, Idx nest, reg_errcode_t *err) -{ - re_dfa_t *dfa = preg->buffer; - bin_tree_t *tree; - size_t cur_nsub; - cur_nsub = preg->re_nsub++; - - fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE); - - /* The subexpression may be a null string. */ - if (token->type == OP_CLOSE_SUBEXP) - tree = NULL; - else - { - tree = parse_reg_exp (regexp, preg, token, syntax, nest, err); - if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0)) - { - if (tree != NULL) - postorder (tree, free_tree, NULL); - *err = REG_EPAREN; - } - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } - - if (cur_nsub <= '9' - '1') - dfa->completed_bkref_map |= 1 << cur_nsub; - - tree = create_tree (dfa, tree, NULL, SUBEXP); - if (BE (tree == NULL, 0)) - { - *err = REG_ESPACE; - return NULL; - } - tree->token.opr.idx = cur_nsub; - return tree; -} - -/* This function parse repetition operators like "*", "+", "{1,3}" etc. */ - -static bin_tree_t * -parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa, - re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err) -{ - bin_tree_t *tree = NULL, *old_tree = NULL; - Idx i, start, end, start_idx = re_string_cur_idx (regexp); - re_token_t start_token = *token; - - if (token->type == OP_OPEN_DUP_NUM) - { - end = 0; - start = fetch_number (regexp, token, syntax); - if (start == REG_MISSING) - { - if (token->type == CHARACTER && token->opr.c == ',') - start = 0; /* We treat "{,m}" as "{0,m}". */ - else - { - *err = REG_BADBR; /* {} is invalid. */ - return NULL; - } - } - if (BE (start != REG_ERROR, 1)) - { - /* We treat "{n}" as "{n,n}". */ - end = ((token->type == OP_CLOSE_DUP_NUM) ? start - : ((token->type == CHARACTER && token->opr.c == ',') - ? fetch_number (regexp, token, syntax) : REG_ERROR)); - } - if (BE (start == REG_ERROR || end == REG_ERROR, 0)) - { - /* Invalid sequence. */ - if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0)) - { - if (token->type == END_OF_RE) - *err = REG_EBRACE; - else - *err = REG_BADBR; - - return NULL; - } - - /* If the syntax bit is set, rollback. */ - re_string_set_index (regexp, start_idx); - *token = start_token; - token->type = CHARACTER; - /* mb_partial and word_char bits should be already initialized by - peek_token. */ - return elem; - } - - if (BE ((end != REG_MISSING && start > end) - || token->type != OP_CLOSE_DUP_NUM, 0)) - { - /* First number greater than second. */ - *err = REG_BADBR; - return NULL; - } - - if (BE (RE_DUP_MAX < (end == REG_MISSING ? start : end), 0)) - { - *err = REG_ESIZE; - return NULL; - } - } - else - { - start = (token->type == OP_DUP_PLUS) ? 1 : 0; - end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING; - } - - fetch_token (token, regexp, syntax); - - if (BE (elem == NULL, 0)) - return NULL; - if (BE (start == 0 && end == 0, 0)) - { - postorder (elem, free_tree, NULL); - return NULL; - } - - /* Extract "{n,m}" to "...{0,}". */ - if (BE (start > 0, 0)) - { - tree = elem; - for (i = 2; i <= start; ++i) - { - elem = duplicate_tree (elem, dfa); - tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) - goto parse_dup_op_espace; - } - - if (start == end) - return tree; - - /* Duplicate ELEM before it is marked optional. */ - elem = duplicate_tree (elem, dfa); - old_tree = tree; - } - else - old_tree = NULL; - - if (elem->token.type == SUBEXP) - { - uintptr_t subidx = elem->token.opr.idx; - postorder (elem, mark_opt_subexp, (void *) subidx); - } - - tree = create_tree (dfa, elem, NULL, - (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT)); - if (BE (tree == NULL, 0)) - goto parse_dup_op_espace; - -/* From gnulib's "intprops.h": - True if the arithmetic type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - - /* This loop is actually executed only when end != REG_MISSING, - to rewrite {0,n} as ((...?)?)?... We have - already created the start+1-th copy. */ - if (TYPE_SIGNED (Idx) || end != REG_MISSING) - for (i = start + 2; i <= end; ++i) - { - elem = duplicate_tree (elem, dfa); - tree = create_tree (dfa, tree, elem, CONCAT); - if (BE (elem == NULL || tree == NULL, 0)) - goto parse_dup_op_espace; - - tree = create_tree (dfa, tree, NULL, OP_ALT); - if (BE (tree == NULL, 0)) - goto parse_dup_op_espace; - } - - if (old_tree) - tree = create_tree (dfa, old_tree, tree, CONCAT); - - return tree; - - parse_dup_op_espace: - *err = REG_ESPACE; - return NULL; -} - -/* Size of the names for collating symbol/equivalence_class/character_class. - I'm not sure, but maybe enough. */ -#define BRACKET_NAME_BUF_SIZE 32 - -#ifndef _LIBC - /* Local function for parse_bracket_exp only used in case of NOT _LIBC. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument since we may - update it. */ - -static reg_errcode_t -internal_function -# ifdef RE_ENABLE_I18N -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - re_charset_t *mbcset, - Idx *range_alloc, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# else /* not RE_ENABLE_I18N */ -build_range_exp (const reg_syntax_t syntax, - bitset_t sbcset, - const bracket_elem_t *start_elem, - const bracket_elem_t *end_elem) -# endif /* not RE_ENABLE_I18N */ -{ - unsigned int start_ch, end_ch; - /* Equivalence Classes and Character Classes can't be a range start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) - return REG_ERANGE; - - /* We can handle no multi character collating elements without libc - support. */ - if (BE ((start_elem->type == COLL_SYM - && strlen ((char *) start_elem->opr.name) > 1) - || (end_elem->type == COLL_SYM - && strlen ((char *) end_elem->opr.name) > 1), 0)) - return REG_ECOLLATE; - -# ifdef RE_ENABLE_I18N - { - wchar_t wc; - wint_t start_wc; - wint_t end_wc; - wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'}; - - start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch - : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); - end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM) - ? __btowc (start_ch) : start_elem->opr.wch); - end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM) - ? __btowc (end_ch) : end_elem->opr.wch); - if (start_wc == WEOF || end_wc == WEOF) - return REG_ECOLLATE; - cmp_buf[0] = start_wc; - cmp_buf[4] = end_wc; - - if (BE ((syntax & RE_NO_EMPTY_RANGES) - && wcscoll (cmp_buf, cmp_buf + 4) > 0, 0)) - return REG_ERANGE; - - /* Got valid collation sequence values, add them as a new entry. - However, for !_LIBC we have no collation elements: if the - character set is single byte, the single byte character set - that we build below suffices. parse_bracket_exp passes - no MBCSET if dfa->mb_cur_max == 1. */ - if (mbcset) - { - /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) - { - /* There is not enough space, need realloc. */ - wchar_t *new_array_start, *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - /* Use realloc since mbcset->range_starts and mbcset->range_ends - are NULL if *range_alloc == 0. */ - new_array_start = re_realloc (mbcset->range_starts, wchar_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, wchar_t, - new_nranges); - - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) - return REG_ESPACE; - - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } - - mbcset->range_starts[mbcset->nranges] = start_wc; - mbcset->range_ends[mbcset->nranges++] = end_wc; - } - - /* Build the table for single byte characters. */ - for (wc = 0; wc < SBC_MAX; ++wc) - { - cmp_buf[2] = wc; - if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 - && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) - bitset_set (sbcset, wc); - } - } -# else /* not RE_ENABLE_I18N */ - { - unsigned int ch; - start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch - : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0] - : 0)); - end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch - : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0] - : 0)); - if (start_ch > end_ch) - return REG_ERANGE; - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ++ch) - if (start_ch <= ch && ch <= end_ch) - bitset_set (sbcset, ch); - } -# endif /* not RE_ENABLE_I18N */ - return REG_NOERROR; -} -#endif /* not _LIBC */ - -#ifndef _LIBC -/* Helper function for parse_bracket_exp only used in case of NOT _LIBC.. - Build the collating element which is represented by NAME. - The result are written to MBCSET and SBCSET. - COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a - pointer argument since we may update it. */ - -static reg_errcode_t -internal_function -# ifdef RE_ENABLE_I18N -build_collating_symbol (bitset_t sbcset, re_charset_t *mbcset, - Idx *coll_sym_alloc, const unsigned char *name) -# else /* not RE_ENABLE_I18N */ -build_collating_symbol (bitset_t sbcset, const unsigned char *name) -# endif /* not RE_ENABLE_I18N */ -{ - size_t name_len = strlen ((const char *) name); - if (BE (name_len != 1, 0)) - return REG_ECOLLATE; - else - { - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } -} -#endif /* not _LIBC */ - -/* This function parse bracket expression like "[abc]", "[a-c]", - "[[.a-a.]]" etc. */ - -static bin_tree_t * -parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token, - reg_syntax_t syntax, reg_errcode_t *err) -{ -#ifdef _LIBC - const unsigned char *collseqmb; - const char *collseqwc; - uint32_t nrules; - int32_t table_size; - const int32_t *symb_table; - const unsigned char *extra; - - /* Local function for parse_bracket_exp used in _LIBC environment. - Seek the collating symbol entry corresponding to NAME. - Return the index of the symbol in the SYMB_TABLE. */ - - auto inline int32_t - __attribute ((always_inline)) - seek_collating_symbol_entry (name, name_len) - const unsigned char *name; - size_t name_len; - { - int32_t hash = elem_hash ((const char *) name, name_len); - int32_t elem = hash % table_size; - if (symb_table[2 * elem] != 0) - { - int32_t second = hash % (table_size - 2) + 1; - - do - { - /* First compare the hashing value. */ - if (symb_table[2 * elem] == hash - /* Compare the length of the name. */ - && name_len == extra[symb_table[2 * elem + 1]] - /* Compare the name. */ - && memcmp (name, &extra[symb_table[2 * elem + 1] + 1], - name_len) == 0) - { - /* Yep, this is the entry. */ - break; - } - - /* Next entry. */ - elem += second; - } - while (symb_table[2 * elem] != 0); - } - return elem; - } - - /* Local function for parse_bracket_exp used in _LIBC environment. - Look up the collation sequence value of BR_ELEM. - Return the value if succeeded, UINT_MAX otherwise. */ - - auto inline unsigned int - __attribute ((always_inline)) - lookup_collation_sequence_value (br_elem) - bracket_elem_t *br_elem; - { - if (br_elem->type == SB_CHAR) - { - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - return collseqmb[br_elem->opr.ch]; - else - { - wint_t wc = __btowc (br_elem->opr.ch); - return __collseq_table_lookup (collseqwc, wc); - } - } - else if (br_elem->type == MB_CHAR) - { - if (nrules != 0) - return __collseq_table_lookup (collseqwc, br_elem->opr.wch); - } - else if (br_elem->type == COLL_SYM) - { - size_t sym_name_len = strlen ((char *) br_elem->opr.name); - if (nrules != 0) - { - int32_t elem, idx; - elem = seek_collating_symbol_entry (br_elem->opr.name, - sym_name_len); - if (symb_table[2 * elem] != 0) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - /* Skip the byte sequence of the collating element. */ - idx += 1 + extra[idx]; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - /* Skip the multibyte collation sequence value. */ - idx += sizeof (unsigned int); - /* Skip the wide char sequence of the collating element. */ - idx += sizeof (unsigned int) * - (1 + *(unsigned int *) (extra + idx)); - /* Return the collation sequence value. */ - return *(unsigned int *) (extra + idx); - } - else if (symb_table[2 * elem] == 0 && sym_name_len == 1) - { - /* No valid character. Match it as a single byte - character. */ - return collseqmb[br_elem->opr.name[0]]; - } - } - else if (sym_name_len == 1) - return collseqmb[br_elem->opr.name[0]]; - } - return UINT_MAX; - } - - /* Local function for parse_bracket_exp used in _LIBC environment. - Build the range expression which starts from START_ELEM, and ends - at END_ELEM. The result are written to MBCSET and SBCSET. - RANGE_ALLOC is the allocated size of mbcset->range_starts, and - mbcset->range_ends, is a pointer argument since we may - update it. */ - - auto inline reg_errcode_t - __attribute ((always_inline)) - build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem) - re_charset_t *mbcset; - Idx *range_alloc; - bitset_t sbcset; - bracket_elem_t *start_elem, *end_elem; - { - unsigned int ch; - uint32_t start_collseq; - uint32_t end_collseq; - - /* Equivalence Classes and Character Classes can't be a range - start/end. */ - if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS - || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS, - 0)) - return REG_ERANGE; - - start_collseq = lookup_collation_sequence_value (start_elem); - end_collseq = lookup_collation_sequence_value (end_elem); - /* Check start/end collation sequence values. */ - if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0)) - return REG_ECOLLATE; - if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0)) - return REG_ERANGE; - - /* Got valid collation sequence values, add them as a new entry. - However, if we have no collation elements, and the character set - is single byte, the single byte character set that we - build below suffices. */ - if (nrules > 0 || dfa->mb_cur_max > 1) - { - /* Check the space of the arrays. */ - if (BE (*range_alloc == mbcset->nranges, 0)) - { - /* There is not enough space, need realloc. */ - uint32_t *new_array_start; - uint32_t *new_array_end; - Idx new_nranges; - - /* +1 in case of mbcset->nranges is 0. */ - new_nranges = 2 * mbcset->nranges + 1; - new_array_start = re_realloc (mbcset->range_starts, uint32_t, - new_nranges); - new_array_end = re_realloc (mbcset->range_ends, uint32_t, - new_nranges); - - if (BE (new_array_start == NULL || new_array_end == NULL, 0)) - return REG_ESPACE; - - mbcset->range_starts = new_array_start; - mbcset->range_ends = new_array_end; - *range_alloc = new_nranges; - } - - mbcset->range_starts[mbcset->nranges] = start_collseq; - mbcset->range_ends[mbcset->nranges++] = end_collseq; - } - - /* Build the table for single byte characters. */ - for (ch = 0; ch < SBC_MAX; ch++) - { - uint32_t ch_collseq; - /* - if (MB_CUR_MAX == 1) - */ - if (nrules == 0) - ch_collseq = collseqmb[ch]; - else - ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch)); - if (start_collseq <= ch_collseq && ch_collseq <= end_collseq) - bitset_set (sbcset, ch); - } - return REG_NOERROR; - } - - /* Local function for parse_bracket_exp used in _LIBC environment. - Build the collating element which is represented by NAME. - The result are written to MBCSET and SBCSET. - COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a - pointer argument since we may update it. */ - - auto inline reg_errcode_t - __attribute ((always_inline)) - build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name) - re_charset_t *mbcset; - Idx *coll_sym_alloc; - bitset_t sbcset; - const unsigned char *name; - { - int32_t elem, idx; - size_t name_len = strlen ((const char *) name); - if (nrules != 0) - { - elem = seek_collating_symbol_entry (name, name_len); - if (symb_table[2 * elem] != 0) - { - /* We found the entry. */ - idx = symb_table[2 * elem + 1]; - /* Skip the name of collating element name. */ - idx += 1 + extra[idx]; - } - else if (symb_table[2 * elem] == 0 && name_len == 1) - { - /* No valid character, treat it as a normal - character. */ - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } - else - return REG_ECOLLATE; - - /* Got valid collation sequence, add it as a new entry. */ - /* Check the space of the arrays. */ - if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->ncoll_syms is 0. */ - Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1; - /* Use realloc since mbcset->coll_syms is NULL - if *alloc == 0. */ - int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t, - new_coll_sym_alloc); - if (BE (new_coll_syms == NULL, 0)) - return REG_ESPACE; - mbcset->coll_syms = new_coll_syms; - *coll_sym_alloc = new_coll_sym_alloc; - } - mbcset->coll_syms[mbcset->ncoll_syms++] = idx; - return REG_NOERROR; - } - else - { - if (BE (name_len != 1, 0)) - return REG_ECOLLATE; - else - { - bitset_set (sbcset, name[0]); - return REG_NOERROR; - } - } - } -#endif - - re_token_t br_token; - re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; - Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0; - Idx equiv_class_alloc = 0, char_class_alloc = 0; -#endif /* not RE_ENABLE_I18N */ - bool non_match = false; - bin_tree_t *work_tree; - int token_len; - bool first_round = true; -#ifdef _LIBC - collseqmb = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); - nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules) - { - /* - if (MB_CUR_MAX > 1) - */ - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); - table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB); - symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_TABLEMB); - extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_SYMB_EXTRAMB); - } -#endif - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); -#ifdef RE_ENABLE_I18N - mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -#endif /* RE_ENABLE_I18N */ -#ifdef RE_ENABLE_I18N - if (BE (sbcset == NULL || mbcset == NULL, 0)) -#else - if (BE (sbcset == NULL, 0)) -#endif /* RE_ENABLE_I18N */ - { - re_free (sbcset); -#ifdef RE_ENABLE_I18N - re_free (mbcset); -#endif - *err = REG_ESPACE; - return NULL; - } - - token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_BADPAT; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_NON_MATCH_LIST) - { -#ifdef RE_ENABLE_I18N - mbcset->non_match = 1; -#endif /* not RE_ENABLE_I18N */ - non_match = true; - if (syntax & RE_HAT_LISTS_NOT_NEWLINE) - bitset_set (sbcset, '\n'); - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - token_len = peek_token_bracket (token, regexp, syntax); - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_BADPAT; - goto parse_bracket_exp_free_return; - } - } - - /* We treat the first ']' as a normal character. */ - if (token->type == OP_CLOSE_BRACKET) - token->type = CHARACTER; - - while (1) - { - bracket_elem_t start_elem, end_elem; - unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE]; - unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE]; - reg_errcode_t ret; - int token_len2 = 0; - bool is_range_exp = false; - re_token_t token2; - - start_elem.opr.name = start_name_buf; - ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa, - syntax, first_round); - if (BE (ret != REG_NOERROR, 0)) - { - *err = ret; - goto parse_bracket_exp_free_return; - } - first_round = false; - - /* Get information about the next token. We need it in any case. */ - token_len = peek_token_bracket (token, regexp, syntax); - - /* Do not check for ranges if we know they are not allowed. */ - if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS) - { - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_CHARSET_RANGE) - { - re_string_skip_bytes (regexp, token_len); /* Skip '-'. */ - token_len2 = peek_token_bracket (&token2, regexp, syntax); - if (BE (token2.type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token2.type == OP_CLOSE_BRACKET) - { - /* We treat the last '-' as a normal character. */ - re_string_skip_bytes (regexp, -token_len); - token->type = CHARACTER; - } - else - is_range_exp = true; - } - } - - if (is_range_exp == true) - { - end_elem.opr.name = end_name_buf; - ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2, - dfa, syntax, true); - if (BE (ret != REG_NOERROR, 0)) - { - *err = ret; - goto parse_bracket_exp_free_return; - } - - token_len = peek_token_bracket (token, regexp, syntax); - -#ifdef _LIBC - *err = build_range_exp (sbcset, mbcset, &range_alloc, - &start_elem, &end_elem); -#else -# ifdef RE_ENABLE_I18N - *err = build_range_exp (syntax, sbcset, - dfa->mb_cur_max > 1 ? mbcset : NULL, - &range_alloc, &start_elem, &end_elem); -# else - *err = build_range_exp (syntax, sbcset, &start_elem, &end_elem); -# endif -#endif /* RE_ENABLE_I18N */ - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - } - else - { - switch (start_elem.type) - { - case SB_CHAR: - bitset_set (sbcset, start_elem.opr.ch); - break; -#ifdef RE_ENABLE_I18N - case MB_CHAR: - /* Check whether the array has enough space. */ - if (BE (mbchar_alloc == mbcset->nmbchars, 0)) - { - wchar_t *new_mbchars; - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nmbchars is 0. */ - mbchar_alloc = 2 * mbcset->nmbchars + 1; - /* Use realloc since array is NULL if *alloc == 0. */ - new_mbchars = re_realloc (mbcset->mbchars, wchar_t, - mbchar_alloc); - if (BE (new_mbchars == NULL, 0)) - goto parse_bracket_exp_espace; - mbcset->mbchars = new_mbchars; - } - mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch; - break; -#endif /* RE_ENABLE_I18N */ - case EQUIV_CLASS: - *err = build_equiv_class (sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &equiv_class_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - case COLL_SYM: - *err = build_collating_symbol (sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &coll_sym_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - case CHAR_CLASS: - *err = build_charclass (regexp->trans, sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &char_class_alloc, -#endif /* RE_ENABLE_I18N */ - start_elem.opr.name, syntax); - if (BE (*err != REG_NOERROR, 0)) - goto parse_bracket_exp_free_return; - break; - default: - assert (0); - break; - } - } - if (BE (token->type == END_OF_RE, 0)) - { - *err = REG_EBRACK; - goto parse_bracket_exp_free_return; - } - if (token->type == OP_CLOSE_BRACKET) - break; - } - - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - - /* If it is non-matching list. */ - if (non_match) - bitset_not (sbcset); - -#ifdef RE_ENABLE_I18N - /* Ensure only single byte characters are set. */ - if (dfa->mb_cur_max > 1) - bitset_mask (sbcset, dfa->sb_char); - - if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes - || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes - || mbcset->non_match))) - { - bin_tree_t *mbc_tree; - int sbc_idx; - /* Build a tree for complex bracket. */ - dfa->has_mb_node = 1; - br_token.type = COMPLEX_BRACKET; - br_token.opr.mbcset = mbcset; - mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) - goto parse_bracket_exp_espace; - for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx) - if (sbcset[sbc_idx]) - break; - /* If there are no bits set in sbcset, there is no point - of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */ - if (sbc_idx < BITSET_WORDS) - { - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - - /* Then join them by ALT node. */ - work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - } - else - { - re_free (sbcset); - work_tree = mbc_tree; - } - } - else -#endif /* not RE_ENABLE_I18N */ - { -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - work_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (work_tree == NULL, 0)) - goto parse_bracket_exp_espace; - } - return work_tree; - - parse_bracket_exp_espace: - *err = REG_ESPACE; - parse_bracket_exp_free_return: - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - return NULL; -} - -/* Parse an element in the bracket expression. */ - -static reg_errcode_t -parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp, - re_token_t *token, int token_len, re_dfa_t *dfa, - reg_syntax_t syntax, bool accept_hyphen) -{ -#ifdef RE_ENABLE_I18N - int cur_char_size; - cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp)); - if (cur_char_size > 1) - { - elem->type = MB_CHAR; - elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp)); - re_string_skip_bytes (regexp, cur_char_size); - return REG_NOERROR; - } -#endif /* RE_ENABLE_I18N */ - re_string_skip_bytes (regexp, token_len); /* Skip a token. */ - if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS - || token->type == OP_OPEN_EQUIV_CLASS) - return parse_bracket_symbol (elem, regexp, token); - if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen) - { - /* A '-' must only appear as anything but a range indicator before - the closing bracket. Everything else is an error. */ - re_token_t token2; - (void) peek_token_bracket (&token2, regexp, syntax); - if (token2.type != OP_CLOSE_BRACKET) - /* The actual error value is not standardized since this whole - case is undefined. But ERANGE makes good sense. */ - return REG_ERANGE; - } - elem->type = SB_CHAR; - elem->opr.ch = token->opr.c; - return REG_NOERROR; -} - -/* Parse a bracket symbol in the bracket expression. Bracket symbols are - such as [::], [..], and - [==]. */ - -static reg_errcode_t -parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp, - re_token_t *token) -{ - unsigned char ch, delim = token->opr.c; - int i = 0; - if (re_string_eoi(regexp)) - return REG_EBRACK; - for (;; ++i) - { - if (i >= BRACKET_NAME_BUF_SIZE) - return REG_EBRACK; - if (token->type == OP_OPEN_CHAR_CLASS) - ch = re_string_fetch_byte_case (regexp); - else - ch = re_string_fetch_byte (regexp); - if (re_string_eoi(regexp)) - return REG_EBRACK; - if (ch == delim && re_string_peek_byte (regexp, 0) == ']') - break; - elem->opr.name[i] = ch; - } - re_string_skip_bytes (regexp, 1); - elem->opr.name[i] = '\0'; - switch (token->type) - { - case OP_OPEN_COLL_ELEM: - elem->type = COLL_SYM; - break; - case OP_OPEN_EQUIV_CLASS: - elem->type = EQUIV_CLASS; - break; - case OP_OPEN_CHAR_CLASS: - elem->type = CHAR_CLASS; - break; - default: - break; - } - return REG_NOERROR; -} - - /* Helper function for parse_bracket_exp. - Build the equivalence class which is represented by NAME. - The result are written to MBCSET and SBCSET. - EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes, - is a pointer argument since we may update it. */ - -static reg_errcode_t -#ifdef RE_ENABLE_I18N -build_equiv_class (bitset_t sbcset, re_charset_t *mbcset, - Idx *equiv_class_alloc, const unsigned char *name) -#else /* not RE_ENABLE_I18N */ -build_equiv_class (bitset_t sbcset, const unsigned char *name) -#endif /* not RE_ENABLE_I18N */ -{ -#ifdef _LIBC - uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules != 0) - { - const int32_t *table, *indirect; - const unsigned char *weights, *extra, *cp; - unsigned char char_buf[2]; - int32_t idx1, idx2; - unsigned int ch; - size_t len; - /* This #include defines a local function! */ -# include - /* Calculate the index for equivalence class. */ - cp = name; - table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); - idx1 = findidx (&cp, -1); - if (BE (idx1 == 0 || *cp != '\0', 0)) - /* This isn't a valid character. */ - return REG_ECOLLATE; - - /* Build single byte matching table for this equivalence class. */ - len = weights[idx1 & 0xffffff]; - for (ch = 0; ch < SBC_MAX; ++ch) - { - char_buf[0] = ch; - cp = char_buf; - idx2 = findidx (&cp, 1); -/* - idx2 = table[ch]; -*/ - if (idx2 == 0) - /* This isn't a valid character. */ - continue; - /* Compare only if the length matches and the collation rule - index is the same. */ - if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24)) - { - int cnt = 0; - - while (cnt <= len && - weights[(idx1 & 0xffffff) + 1 + cnt] - == weights[(idx2 & 0xffffff) + 1 + cnt]) - ++cnt; - - if (cnt > len) - bitset_set (sbcset, ch); - } - } - /* Check whether the array has enough space. */ - if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nequiv_classes is 0. */ - Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1; - /* Use realloc since the array is NULL if *alloc == 0. */ - int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes, - int32_t, - new_equiv_class_alloc); - if (BE (new_equiv_classes == NULL, 0)) - return REG_ESPACE; - mbcset->equiv_classes = new_equiv_classes; - *equiv_class_alloc = new_equiv_class_alloc; - } - mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1; - } - else -#endif /* _LIBC */ - { - if (BE (strlen ((const char *) name) != 1, 0)) - return REG_ECOLLATE; - bitset_set (sbcset, *name); - } - return REG_NOERROR; -} - - /* Helper function for parse_bracket_exp. - Build the character class which is represented by NAME. - The result are written to MBCSET and SBCSET. - CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes, - is a pointer argument since we may update it. */ - -static reg_errcode_t -#ifdef RE_ENABLE_I18N -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, - re_charset_t *mbcset, Idx *char_class_alloc, - const unsigned char *class_name, reg_syntax_t syntax) -#else /* not RE_ENABLE_I18N */ -build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset, - const unsigned char *class_name, reg_syntax_t syntax) -#endif /* not RE_ENABLE_I18N */ -{ - int i; - const char *name = (const char *) class_name; - - /* In case of REG_ICASE "upper" and "lower" match the both of - upper and lower cases. */ - if ((syntax & RE_ICASE) - && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0)) - name = "alpha"; - -#ifdef RE_ENABLE_I18N - /* Check the space of the arrays. */ - if (BE (*char_class_alloc == mbcset->nchar_classes, 0)) - { - /* Not enough, realloc it. */ - /* +1 in case of mbcset->nchar_classes is 0. */ - Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1; - /* Use realloc since array is NULL if *alloc == 0. */ - wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t, - new_char_class_alloc); - if (BE (new_char_classes == NULL, 0)) - return REG_ESPACE; - mbcset->char_classes = new_char_classes; - *char_class_alloc = new_char_class_alloc; - } - mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name); -#endif /* RE_ENABLE_I18N */ - -#define BUILD_CHARCLASS_LOOP(ctype_func) \ - do { \ - if (BE (trans != NULL, 0)) \ - { \ - for (i = 0; i < SBC_MAX; ++i) \ - if (ctype_func (i)) \ - bitset_set (sbcset, trans[i]); \ - } \ - else \ - { \ - for (i = 0; i < SBC_MAX; ++i) \ - if (ctype_func (i)) \ - bitset_set (sbcset, i); \ - } \ - } while (0) - - if (strcmp (name, "alnum") == 0) - BUILD_CHARCLASS_LOOP (isalnum); - else if (strcmp (name, "cntrl") == 0) - BUILD_CHARCLASS_LOOP (iscntrl); - else if (strcmp (name, "lower") == 0) - BUILD_CHARCLASS_LOOP (islower); - else if (strcmp (name, "space") == 0) - BUILD_CHARCLASS_LOOP (isspace); - else if (strcmp (name, "alpha") == 0) - BUILD_CHARCLASS_LOOP (isalpha); - else if (strcmp (name, "digit") == 0) - BUILD_CHARCLASS_LOOP (isdigit); - else if (strcmp (name, "print") == 0) - BUILD_CHARCLASS_LOOP (isprint); - else if (strcmp (name, "upper") == 0) - BUILD_CHARCLASS_LOOP (isupper); - else if (strcmp (name, "blank") == 0) - BUILD_CHARCLASS_LOOP (isblank); - else if (strcmp (name, "graph") == 0) - BUILD_CHARCLASS_LOOP (isgraph); - else if (strcmp (name, "punct") == 0) - BUILD_CHARCLASS_LOOP (ispunct); - else if (strcmp (name, "xdigit") == 0) - BUILD_CHARCLASS_LOOP (isxdigit); - else - return REG_ECTYPE; - - return REG_NOERROR; -} - -static bin_tree_t * -build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans, - const unsigned char *class_name, - const unsigned char *extra, bool non_match, - reg_errcode_t *err) -{ - re_bitset_ptr_t sbcset; -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; - Idx alloc = 0; -#endif /* not RE_ENABLE_I18N */ - reg_errcode_t ret; - re_token_t br_token; - bin_tree_t *tree; - - sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1); -#ifdef RE_ENABLE_I18N - mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1); -#endif /* RE_ENABLE_I18N */ - -#ifdef RE_ENABLE_I18N - if (BE (sbcset == NULL || mbcset == NULL, 0)) -#else /* not RE_ENABLE_I18N */ - if (BE (sbcset == NULL, 0)) -#endif /* not RE_ENABLE_I18N */ - { - *err = REG_ESPACE; - return NULL; - } - - if (non_match) - { -#ifdef RE_ENABLE_I18N - mbcset->non_match = 1; -#endif /* not RE_ENABLE_I18N */ - } - - /* We don't care the syntax in this case. */ - ret = build_charclass (trans, sbcset, -#ifdef RE_ENABLE_I18N - mbcset, &alloc, -#endif /* RE_ENABLE_I18N */ - class_name, 0); - - if (BE (ret != REG_NOERROR, 0)) - { - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - *err = ret; - return NULL; - } - /* \w match '_' also. */ - for (; *extra; extra++) - bitset_set (sbcset, *extra); - - /* If it is non-matching list. */ - if (non_match) - bitset_not (sbcset); - -#ifdef RE_ENABLE_I18N - /* Ensure only single byte characters are set. */ - if (dfa->mb_cur_max > 1) - bitset_mask (sbcset, dfa->sb_char); -#endif - - /* Build a tree for simple bracket. */ - br_token.type = SIMPLE_BRACKET; - br_token.opr.sbcset = sbcset; - tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (tree == NULL, 0)) - goto build_word_op_espace; - -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - bin_tree_t *mbc_tree; - /* Build a tree for complex bracket. */ - br_token.type = COMPLEX_BRACKET; - br_token.opr.mbcset = mbcset; - dfa->has_mb_node = 1; - mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token); - if (BE (mbc_tree == NULL, 0)) - goto build_word_op_espace; - /* Then join them by ALT node. */ - tree = create_tree (dfa, tree, mbc_tree, OP_ALT); - if (BE (mbc_tree != NULL, 1)) - return tree; - } - else - { - free_charset (mbcset); - return tree; - } -#else /* not RE_ENABLE_I18N */ - return tree; -#endif /* not RE_ENABLE_I18N */ - - build_word_op_espace: - re_free (sbcset); -#ifdef RE_ENABLE_I18N - free_charset (mbcset); -#endif /* RE_ENABLE_I18N */ - *err = REG_ESPACE; - return NULL; -} - -/* This is intended for the expressions like "a{1,3}". - Fetch a number from 'input', and return the number. - Return REG_MISSING if the number field is empty like "{,1}". - Return RE_DUP_MAX + 1 if the number field is too large. - Return REG_ERROR if an error occurred. */ - -static Idx -fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax) -{ - Idx num = REG_MISSING; - unsigned char c; - while (1) - { - fetch_token (token, input, syntax); - c = token->opr.c; - if (BE (token->type == END_OF_RE, 0)) - return REG_ERROR; - if (token->type == OP_CLOSE_DUP_NUM || c == ',') - break; - num = ((token->type != CHARACTER || c < '0' || '9' < c - || num == REG_ERROR) - ? REG_ERROR - : num == REG_MISSING - ? c - '0' - : MIN (RE_DUP_MAX + 1, num * 10 + c - '0')); - } - return num; -} - -#ifdef RE_ENABLE_I18N -static void -free_charset (re_charset_t *cset) -{ - re_free (cset->mbchars); -# ifdef _LIBC - re_free (cset->coll_syms); - re_free (cset->equiv_classes); - re_free (cset->range_starts); - re_free (cset->range_ends); -# endif - re_free (cset->char_classes); - re_free (cset); -} -#endif /* RE_ENABLE_I18N */ - -/* Functions for binary tree operation. */ - -/* Create a tree node. */ - -static bin_tree_t * -create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, - re_token_type_t type) -{ - re_token_t t; - t.type = type; - return create_token_tree (dfa, left, right, &t); -} - -static bin_tree_t * -create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right, - const re_token_t *token) -{ - bin_tree_t *tree; - if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0)) - { - bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1); - - if (storage == NULL) - return NULL; - storage->next = dfa->str_tree_storage; - dfa->str_tree_storage = storage; - dfa->str_tree_storage_idx = 0; - } - tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++]; - - tree->parent = NULL; - tree->left = left; - tree->right = right; - tree->token = *token; - tree->token.duplicated = 0; - tree->token.opt_subexp = 0; - tree->first = NULL; - tree->next = NULL; - tree->node_idx = REG_MISSING; - - if (left != NULL) - left->parent = tree; - if (right != NULL) - right->parent = tree; - return tree; -} - -/* Mark the tree SRC as an optional subexpression. - To be called from preorder or postorder. */ - -static reg_errcode_t -mark_opt_subexp (void *extra, bin_tree_t *node) -{ - Idx idx = (uintptr_t) extra; - if (node->token.type == SUBEXP && node->token.opr.idx == idx) - node->token.opt_subexp = 1; - - return REG_NOERROR; -} - -/* Free the allocated memory inside NODE. */ - -static void -free_token (re_token_t *node) -{ -#ifdef RE_ENABLE_I18N - if (node->type == COMPLEX_BRACKET && node->duplicated == 0) - free_charset (node->opr.mbcset); - else -#endif /* RE_ENABLE_I18N */ - if (node->type == SIMPLE_BRACKET && node->duplicated == 0) - re_free (node->opr.sbcset); -} - -/* Worker function for tree walking. Free the allocated memory inside NODE - and its children. */ - -static reg_errcode_t -free_tree (void *extra, bin_tree_t *node) -{ - free_token (&node->token); - return REG_NOERROR; -} - - -/* Duplicate the node SRC, and return new node. This is a preorder - visit similar to the one implemented by the generic visitor, but - we need more infrastructure to maintain two parallel trees --- so, - it's easier to duplicate. */ - -static bin_tree_t * -duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa) -{ - const bin_tree_t *node; - bin_tree_t *dup_root; - bin_tree_t **p_new = &dup_root, *dup_node = root->parent; - - for (node = root; ; ) - { - /* Create a new tree and link it back to the current parent. */ - *p_new = create_token_tree (dfa, NULL, NULL, &node->token); - if (*p_new == NULL) - return NULL; - (*p_new)->parent = dup_node; - (*p_new)->token.duplicated = 1; - dup_node = *p_new; - - /* Go to the left node, or up and to the right. */ - if (node->left) - { - node = node->left; - p_new = &dup_node->left; - } - else - { - const bin_tree_t *prev = NULL; - while (node->right == prev || node->right == NULL) - { - prev = node; - node = node->parent; - dup_node = dup_node->parent; - if (!node) - return dup_root; - } - node = node->right; - p_new = &dup_node->right; - } - } -} diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c deleted file mode 100644 index 14362b6..0000000 --- a/gnulib/lib/regex.c +++ /dev/null @@ -1,79 +0,0 @@ -/* Extended regular expression matching and search library. - 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 . - - 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 . */ - -#ifndef _LIBC -# include - -# if (__GNUC__ == 4 && 6 <= __GNUC_MINOR__) || 4 < __GNUC__ -# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure" -# endif -# if (__GNUC__ == 4 && 3 <= __GNUC_MINOR__) || 4 < __GNUC__ -# pragma GCC diagnostic ignored "-Wtype-limits" -# endif -#endif - -/* Make sure no one compiles this code with a C++ compiler. */ -#if defined __cplusplus && defined _LIBC -# error "This is C code, use a C compiler" -#endif - -#ifdef _LIBC -/* We have to keep the namespace clean. */ -# define regfree(preg) __regfree (preg) -# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef) -# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags) -# define regerror(errcode, preg, errbuf, errbuf_size) \ - __regerror(errcode, preg, errbuf, errbuf_size) -# define re_set_registers(bu, re, nu, st, en) \ - __re_set_registers (bu, re, nu, st, en) -# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \ - __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) -# define re_match(bufp, string, size, pos, regs) \ - __re_match (bufp, string, size, pos, regs) -# define re_search(bufp, string, size, startpos, range, regs) \ - __re_search (bufp, string, size, startpos, range, regs) -# define re_compile_pattern(pattern, length, bufp) \ - __re_compile_pattern (pattern, length, bufp) -# define re_set_syntax(syntax) __re_set_syntax (syntax) -# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \ - __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop) -# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp) - -# include "../locale/localeinfo.h" -#endif - -/* On some systems, limits.h sets RE_DUP_MAX to a lower value than - GNU regex allows. Include it before , which correctly - #undefs RE_DUP_MAX and sets it to the right value. */ -#include - -#include -#include "regex_internal.h" - -#include "regex_internal.c" -#include "regcomp.c" -#include "regexec.c" - -/* Binary backward compatibility. */ -#if _LIBC -# include -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3) -link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.") -int re_max_failures = 2000; -# endif -#endif diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h deleted file mode 100644 index 32ef4ac..0000000 --- a/gnulib/lib/regex.h +++ /dev/null @@ -1,666 +0,0 @@ -/* Definitions for data structures and routines for the regular - expression library. - Copyright (C) 1985, 1989-1993, 1995-1998, 2000-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 - 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 . */ - -#ifndef _REGEX_H -#define _REGEX_H 1 - -#include - -/* Allow the use in C++ code. */ -#ifdef __cplusplus -extern "C" { -#endif - -/* Define __USE_GNU to declare GNU extensions that violate the - POSIX name space rules. */ -#ifdef _GNU_SOURCE -# define __USE_GNU 1 -#endif - -#ifdef _REGEX_LARGE_OFFSETS - -/* Use types and values that are wide enough to represent signed and - unsigned byte offsets in memory. This currently works only when - the regex code is used outside of the GNU C library; it is not yet - supported within glibc itself, and glibc users should not define - _REGEX_LARGE_OFFSETS. */ - -/* The type of nonnegative object indexes. Traditionally, GNU regex - uses 'int' for these. Code that uses __re_idx_t should work - regardless of whether the type is signed. */ -typedef size_t __re_idx_t; - -/* The type of object sizes. */ -typedef size_t __re_size_t; - -/* The type of object sizes, in places where the traditional code - uses unsigned long int. */ -typedef size_t __re_long_size_t; - -#else - -/* The traditional GNU regex implementation mishandles strings longer - than INT_MAX. */ -typedef int __re_idx_t; -typedef unsigned int __re_size_t; -typedef unsigned long int __re_long_size_t; - -#endif - -/* The following two types have to be signed and unsigned integer type - wide enough to hold a value of a pointer. For most ANSI compilers - ptrdiff_t and size_t should be likely OK. Still size of these two - types is 2 for Microsoft C. Ugh... */ -typedef long int s_reg_t; -typedef unsigned long int active_reg_t; - -/* The following bits are used to determine the regexp syntax we - recognize. The set/not-set meanings are chosen so that Emacs syntax - remains the value 0. The bits are given in alphabetical order, and - the definitions shifted by one from the previous bit; thus, when we - add or remove a bit, only one other definition need change. */ -typedef unsigned long int reg_syntax_t; - -#ifdef __USE_GNU -/* If this bit is not set, then \ inside a bracket expression is literal. - If set, then such a \ quotes the following character. */ -# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1) - -/* If this bit is not set, then + and ? are operators, and \+ and \? are - literals. - If set, then \+ and \? are operators and + and ? are literals. */ -# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1) - -/* If this bit is set, then character classes are supported. They are: - [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], - [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. - If not set, then character classes are not supported. */ -# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1) - -/* If this bit is set, then ^ and $ are always anchors (outside bracket - expressions, of course). - If this bit is not set, then it depends: - ^ is an anchor if it is at the beginning of a regular - expression or after an open-group or an alternation operator; - $ is an anchor if it is at the end of a regular expression, or - before a close-group or an alternation operator. - - This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because - POSIX draft 11.2 says that * etc. in leading positions is undefined. - We already implemented a previous draft which made those constructs - invalid, though, so we haven't changed the code back. */ -# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1) - -/* If this bit is set, then special characters are always special - regardless of where they are in the pattern. - If this bit is not set, then special characters are special only in - some contexts; otherwise they are ordinary. Specifically, - * + ? and intervals are only special when not after the beginning, - open-group, or alternation operator. */ -# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1) - -/* If this bit is set, then *, +, ?, and { cannot be first in an re or - immediately after an alternation or begin-group operator. */ -# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1) - -/* If this bit is set, then . matches newline. - If not set, then it doesn't. */ -# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1) - -/* If this bit is set, then . doesn't match NUL. - If not set, then it does. */ -# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1) - -/* If this bit is set, nonmatching lists [^...] do not match newline. - If not set, they do. */ -# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1) - -/* If this bit is set, either \{...\} or {...} defines an - interval, depending on RE_NO_BK_BRACES. - If not set, \{, \}, {, and } are literals. */ -# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1) - -/* If this bit is set, +, ? and | aren't recognized as operators. - If not set, they are. */ -# define RE_LIMITED_OPS (RE_INTERVALS << 1) - -/* If this bit is set, newline is an alternation operator. - If not set, newline is literal. */ -# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1) - -/* If this bit is set, then '{...}' defines an interval, and \{ and \} - are literals. - If not set, then '\{...\}' defines an interval. */ -# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1) - -/* If this bit is set, (...) defines a group, and \( and \) are literals. - If not set, \(...\) defines a group, and ( and ) are literals. */ -# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1) - -/* If this bit is set, then \ matches . - If not set, then \ is a back-reference. */ -# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1) - -/* If this bit is set, then | is an alternation operator, and \| is literal. - If not set, then \| is an alternation operator, and | is literal. */ -# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1) - -/* If this bit is set, then an ending range point collating higher - than the starting range point, as in [z-a], is invalid. - If not set, then when ending range point collates higher than the - starting range point, the range is ignored. */ -# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1) - -/* If this bit is set, then an unmatched ) is ordinary. - If not set, then an unmatched ) is invalid. */ -# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1) - -/* If this bit is set, succeed as soon as we match the whole pattern, - without further backtracking. */ -# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1) - -/* If this bit is set, do not process the GNU regex operators. - If not set, then the GNU regex operators are recognized. */ -# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1) - -/* If this bit is set, turn on internal regex debugging. - If not set, and debugging was on, turn it off. - This only works if regex.c is compiled -DDEBUG. - We define this bit always, so that all that's needed to turn on - debugging is to recompile regex.c; the calling code can always have - this bit set, and it won't affect anything in the normal case. */ -# define RE_DEBUG (RE_NO_GNU_OPS << 1) - -/* If this bit is set, a syntactically invalid interval is treated as - a string of ordinary characters. For example, the ERE 'a{1' is - treated as 'a\{1'. */ -# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1) - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1) - -/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only - for ^, because it is difficult to scan the regex backwards to find - whether ^ should be special. */ -# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1) - -/* If this bit is set, then \{ cannot be first in a regex or - immediately after an alternation, open-group or \} operator. */ -# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1) - -/* If this bit is set, then no_sub will be set to 1 during - re_compile_pattern. */ -# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1) -#endif - -/* This global variable defines the particular regexp syntax to use (for - some interfaces). When a regexp is compiled, the syntax used is - stored in the pattern buffer, so changing this does not affect - already-compiled regexps. */ -extern reg_syntax_t re_syntax_options; - -#ifdef __USE_GNU -/* Define combinations of the above bits for the standard possibilities. - (The [[[ comments delimit what gets put into the Texinfo file, so - don't delete them!) */ -/* [[[begin syntaxes]]] */ -# define RE_SYNTAX_EMACS 0 - -# define RE_SYNTAX_AWK \ - (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \ - | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CHAR_CLASSES \ - | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS) - -# define RE_SYNTAX_GNU_AWK \ - ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ - | RE_INVALID_INTERVAL_ORD) \ - & ~(RE_DOT_NOT_NULL | RE_CONTEXT_INDEP_OPS \ - | RE_CONTEXT_INVALID_OPS )) - -# define RE_SYNTAX_POSIX_AWK \ - (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \ - | RE_INTERVALS | RE_NO_GNU_OPS \ - | RE_INVALID_INTERVAL_ORD) - -# define RE_SYNTAX_GREP \ - (RE_BK_PLUS_QM | RE_CHAR_CLASSES \ - | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \ - | RE_NEWLINE_ALT) - -# define RE_SYNTAX_EGREP \ - (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \ - | RE_NEWLINE_ALT | RE_NO_BK_PARENS \ - | RE_NO_BK_VBAR) - -# define RE_SYNTAX_POSIX_EGREP \ - (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \ - | RE_INVALID_INTERVAL_ORD) - -/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */ -# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC - -# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC - -/* Syntax bits common to both basic and extended POSIX regex syntax. */ -# define _RE_SYNTAX_POSIX_COMMON \ - (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \ - | RE_INTERVALS | RE_NO_EMPTY_RANGES) - -# define RE_SYNTAX_POSIX_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP) - -/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes - RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this - isn't minimal, since other operators, such as \`, aren't disabled. */ -# define RE_SYNTAX_POSIX_MINIMAL_BASIC \ - (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS) - -# define RE_SYNTAX_POSIX_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_VBAR \ - | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD) - -/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is - removed and RE_NO_BK_REFS is added. */ -# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \ - (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \ - | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \ - | RE_NO_BK_PARENS | RE_NO_BK_REFS \ - | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD) -/* [[[end syntaxes]]] */ - -/* Maximum number of duplicates an interval can allow. POSIX-conforming - systems might define this in , but we want our - value, so remove any previous define. */ -# ifdef _REGEX_INCLUDE_LIMITS_H -# include -# endif -# ifdef RE_DUP_MAX -# undef RE_DUP_MAX -# endif - -/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored - the counter as a 2-byte signed integer. This is no longer true, so - RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to - ((SIZE_MAX - 9) / 10) if _REGEX_LARGE_OFFSETS is defined. - However, there would be a huge performance problem if someone - actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains - its historical value. */ -# define RE_DUP_MAX (0x7fff) -#endif - - -/* POSIX 'cflags' bits (i.e., information for 'regcomp'). */ - -/* If this bit is set, then use extended regular expression syntax. - If not set, then use basic regular expression syntax. */ -#define REG_EXTENDED 1 - -/* If this bit is set, then ignore case when matching. - If not set, then case is significant. */ -#define REG_ICASE (1 << 1) - -/* If this bit is set, then anchors do not match at newline - characters in the string. - If not set, then anchors do match at newlines. */ -#define REG_NEWLINE (1 << 2) - -/* If this bit is set, then report only success or fail in regexec. - If not set, then returns differ between not matching and errors. */ -#define REG_NOSUB (1 << 3) - - -/* POSIX 'eflags' bits (i.e., information for regexec). */ - -/* If this bit is set, then the beginning-of-line operator doesn't match - the beginning of the string (presumably because it's not the - beginning of a line). - If not set, then the beginning-of-line operator does match the - beginning of the string. */ -#define REG_NOTBOL 1 - -/* Like REG_NOTBOL, except for the end-of-line. */ -#define REG_NOTEOL (1 << 1) - -/* Use PMATCH[0] to delimit the start and end of the search in the - buffer. */ -#define REG_STARTEND (1 << 2) - - -/* If any error codes are removed, changed, or added, update the - '__re_error_msgid' table in regcomp.c. */ - -typedef enum -{ - _REG_ENOSYS = -1, /* This will never happen for this implementation. */ - _REG_NOERROR = 0, /* Success. */ - _REG_NOMATCH, /* Didn't find a match (for regexec). */ - - /* POSIX regcomp return error codes. (In the order listed in the - standard.) */ - _REG_BADPAT, /* Invalid pattern. */ - _REG_ECOLLATE, /* Invalid collating element. */ - _REG_ECTYPE, /* Invalid character class name. */ - _REG_EESCAPE, /* Trailing backslash. */ - _REG_ESUBREG, /* Invalid back reference. */ - _REG_EBRACK, /* Unmatched left bracket. */ - _REG_EPAREN, /* Parenthesis imbalance. */ - _REG_EBRACE, /* Unmatched \{. */ - _REG_BADBR, /* Invalid contents of \{\}. */ - _REG_ERANGE, /* Invalid range end. */ - _REG_ESPACE, /* Ran out of memory. */ - _REG_BADRPT, /* No preceding re for repetition op. */ - - /* Error codes we've added. */ - _REG_EEND, /* Premature end. */ - _REG_ESIZE, /* Too large (e.g., repeat count too large). */ - _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */ -} reg_errcode_t; - -#if defined _XOPEN_SOURCE || defined __USE_XOPEN2K -# define REG_ENOSYS _REG_ENOSYS -#endif -#define REG_NOERROR _REG_NOERROR -#define REG_NOMATCH _REG_NOMATCH -#define REG_BADPAT _REG_BADPAT -#define REG_ECOLLATE _REG_ECOLLATE -#define REG_ECTYPE _REG_ECTYPE -#define REG_EESCAPE _REG_EESCAPE -#define REG_ESUBREG _REG_ESUBREG -#define REG_EBRACK _REG_EBRACK -#define REG_EPAREN _REG_EPAREN -#define REG_EBRACE _REG_EBRACE -#define REG_BADBR _REG_BADBR -#define REG_ERANGE _REG_ERANGE -#define REG_ESPACE _REG_ESPACE -#define REG_BADRPT _REG_BADRPT -#define REG_EEND _REG_EEND -#define REG_ESIZE _REG_ESIZE -#define REG_ERPAREN _REG_ERPAREN - -/* This data structure represents a compiled pattern. Before calling - the pattern compiler, the fields 'buffer', 'allocated', 'fastmap', - and 'translate' can be set. After the pattern has been compiled, - the fields 're_nsub', 'not_bol' and 'not_eol' are available. All - other fields are private to the regex routines. */ - -#ifndef RE_TRANSLATE_TYPE -# define __RE_TRANSLATE_TYPE unsigned char * -# ifdef __USE_GNU -# define RE_TRANSLATE_TYPE __RE_TRANSLATE_TYPE -# endif -#endif - -#ifdef __USE_GNU -# define __REPB_PREFIX(name) name -#else -# define __REPB_PREFIX(name) __##name -#endif - -struct re_pattern_buffer -{ - /* Space that holds the compiled pattern. The type - 'struct re_dfa_t' is private and is not declared here. */ - struct re_dfa_t *__REPB_PREFIX(buffer); - - /* Number of bytes to which 'buffer' points. */ - __re_long_size_t __REPB_PREFIX(allocated); - - /* Number of bytes actually used in 'buffer'. */ - __re_long_size_t __REPB_PREFIX(used); - - /* Syntax setting with which the pattern was compiled. */ - reg_syntax_t __REPB_PREFIX(syntax); - - /* Pointer to a fastmap, if any, otherwise zero. re_search uses the - fastmap, if there is one, to skip over impossible starting points - for matches. */ - char *__REPB_PREFIX(fastmap); - - /* Either a translate table to apply to all characters before - comparing them, or zero for no translation. The translation is - applied to a pattern when it is compiled and to a string when it - is matched. */ - __RE_TRANSLATE_TYPE __REPB_PREFIX(translate); - - /* Number of subexpressions found by the compiler. */ - size_t re_nsub; - - /* Zero if this pattern cannot match the empty string, one else. - Well, in truth it's used only in 're_search_2', to see whether or - not we should use the fastmap, so we don't set this absolutely - perfectly; see 're_compile_fastmap' (the "duplicate" case). */ - unsigned __REPB_PREFIX(can_be_null) : 1; - - /* If REGS_UNALLOCATED, allocate space in the 'regs' structure - for 'max (RE_NREGS, re_nsub + 1)' groups. - If REGS_REALLOCATE, reallocate space if necessary. - If REGS_FIXED, use what's there. */ -#ifdef __USE_GNU -# define REGS_UNALLOCATED 0 -# define REGS_REALLOCATE 1 -# define REGS_FIXED 2 -#endif - unsigned __REPB_PREFIX(regs_allocated) : 2; - - /* Set to zero when 're_compile_pattern' compiles a pattern; set to - one by 're_compile_fastmap' if it updates the fastmap. */ - unsigned __REPB_PREFIX(fastmap_accurate) : 1; - - /* If set, 're_match_2' does not return information about - subexpressions. */ - unsigned __REPB_PREFIX(no_sub) : 1; - - /* If set, a beginning-of-line anchor doesn't match at the beginning - of the string. */ - unsigned __REPB_PREFIX(not_bol) : 1; - - /* Similarly for an end-of-line anchor. */ - unsigned __REPB_PREFIX(not_eol) : 1; - - /* If true, an anchor at a newline matches. */ - unsigned __REPB_PREFIX(newline_anchor) : 1; -}; - -typedef struct re_pattern_buffer regex_t; - -/* Type for byte offsets within the string. POSIX mandates this. */ -#ifdef _REGEX_LARGE_OFFSETS -/* POSIX 1003.1-2008 requires that regoff_t be at least as wide as - ptrdiff_t and ssize_t. We don't know of any hosts where ptrdiff_t - is wider than ssize_t, so ssize_t is safe. */ -typedef ssize_t regoff_t; -#else -/* The traditional GNU regex implementation mishandles strings longer - than INT_MAX. */ -typedef int regoff_t; -#endif - - -#ifdef __USE_GNU -/* This is the structure we store register match data in. See - regex.texinfo for a full description of what registers match. */ -struct re_registers -{ - __re_size_t num_regs; - regoff_t *start; - regoff_t *end; -}; - - -/* If 'regs_allocated' is REGS_UNALLOCATED in the pattern buffer, - 're_match_2' returns information about at least this many registers - the first time a 'regs' structure is passed. */ -# ifndef RE_NREGS -# define RE_NREGS 30 -# endif -#endif - - -/* POSIX specification for registers. Aside from the different names than - 're_registers', POSIX uses an array of structures, instead of a - structure of arrays. */ -typedef struct -{ - regoff_t rm_so; /* Byte offset from string's start to substring's start. */ - regoff_t rm_eo; /* Byte offset from string's start to substring's end. */ -} regmatch_t; - -/* Declarations for routines. */ - -#ifdef __USE_GNU -/* Sets the current default syntax to SYNTAX, and return the old syntax. - You can also simply assign to the 're_syntax_options' variable. */ -extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax); - -/* Compile the regular expression PATTERN, with length LENGTH - and syntax given by the global 're_syntax_options', into the buffer - BUFFER. Return NULL if successful, and an error string if not. - - To free the allocated storage, you must call 'regfree' on BUFFER. - Note that the translate table must either have been initialised by - 'regcomp', with a malloc'ed value, or set to NULL before calling - 'regfree'. */ -extern const char *re_compile_pattern (const char *__pattern, size_t __length, - struct re_pattern_buffer *__buffer); - - -/* Compile a fastmap for the compiled pattern in BUFFER; used to - accelerate searches. Return 0 if successful and -2 if was an - internal error. */ -extern int re_compile_fastmap (struct re_pattern_buffer *__buffer); - - -/* Search in the string STRING (with length LENGTH) for the pattern - compiled into BUFFER. Start searching at position START, for RANGE - characters. Return the starting position of the match, -1 for no - match, or -2 for an internal error. Also return register - information in REGS (if REGS and BUFFER->no_sub are nonzero). */ -extern regoff_t re_search (struct re_pattern_buffer *__buffer, - const char *__string, __re_idx_t __length, - __re_idx_t __start, regoff_t __range, - struct re_registers *__regs); - - -/* Like 're_search', but search in the concatenation of STRING1 and - STRING2. Also, stop searching at index START + STOP. */ -extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer, - const char *__string1, __re_idx_t __length1, - const char *__string2, __re_idx_t __length2, - __re_idx_t __start, regoff_t __range, - struct re_registers *__regs, - __re_idx_t __stop); - - -/* Like 're_search', but return how many characters in STRING the regexp - in BUFFER matched, starting at position START. */ -extern regoff_t re_match (struct re_pattern_buffer *__buffer, - const char *__string, __re_idx_t __length, - __re_idx_t __start, struct re_registers *__regs); - - -/* Relates to 're_match' as 're_search_2' relates to 're_search'. */ -extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer, - const char *__string1, __re_idx_t __length1, - const char *__string2, __re_idx_t __length2, - __re_idx_t __start, struct re_registers *__regs, - __re_idx_t __stop); - - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using BUFFER and REGS will use this memory - for recording register information. STARTS and ENDS must be - allocated with malloc, and must each be at least 'NUM_REGS * sizeof - (regoff_t)' bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - BUFFER will allocate its own register data, without - freeing the old data. */ -extern void re_set_registers (struct re_pattern_buffer *__buffer, - struct re_registers *__regs, - __re_size_t __num_regs, - regoff_t *__starts, regoff_t *__ends); -#endif /* Use GNU */ - -#if defined _REGEX_RE_COMP || (defined _LIBC && defined __USE_BSD) -# ifndef _CRAY -/* 4.2 bsd compatibility. */ -extern char *re_comp (const char *); -extern int re_exec (const char *); -# endif -#endif - -/* GCC 2.95 and later have "__restrict"; C99 compilers have - "restrict", and "configure" may have defined "restrict". - Other compilers use __restrict, __restrict__, and _Restrict, and - 'configure' might #define 'restrict' to those words, so pick a - different name. */ -#ifndef _Restrict_ -# if 199901L <= __STDC_VERSION__ -# define _Restrict_ restrict -# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__) -# define _Restrict_ __restrict -# else -# define _Restrict_ -# endif -#endif -/* gcc 3.1 and up support the [restrict] syntax. Don't trust - sys/cdefs.h's definition of __restrict_arr, though, as it - mishandles gcc -ansi -pedantic. */ -#ifndef _Restrict_arr_ -# if ((199901L <= __STDC_VERSION__ \ - || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \ - && !defined __STRICT_ANSI__)) \ - && !defined __GNUG__) -# define _Restrict_arr_ _Restrict_ -# else -# define _Restrict_arr_ -# endif -#endif - -/* POSIX compatibility. */ -extern int regcomp (regex_t *_Restrict_ __preg, - const char *_Restrict_ __pattern, - int __cflags); - -extern int regexec (const regex_t *_Restrict_ __preg, - const char *_Restrict_ __string, size_t __nmatch, - regmatch_t __pmatch[_Restrict_arr_], - int __eflags); - -extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg, - char *_Restrict_ __errbuf, size_t __errbuf_size); - -extern void regfree (regex_t *__preg); - - -#ifdef __cplusplus -} -#endif /* C++ */ - -#endif /* regex.h */ diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c deleted file mode 100644 index ca046cf..0000000 --- a/gnulib/lib/regex_internal.c +++ /dev/null @@ -1,1742 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 . */ - -static void re_string_construct_common (const char *str, Idx len, - re_string_t *pstr, - RE_TRANSLATE_TYPE trans, bool icase, - const re_dfa_t *dfa) internal_function; -static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa, - const re_node_set *nodes, - re_hashval_t hash) internal_function; -static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa, - const re_node_set *nodes, - unsigned int context, - re_hashval_t hash) internal_function; - -/* Functions for string operation. */ - -/* This function allocate the buffers. It is necessary to call - re_string_reconstruct before using the object. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len, - RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) -{ - reg_errcode_t ret; - Idx init_buf_len; - - /* Ensure at least one character fits into the buffers. */ - if (init_len < dfa->mb_cur_max) - init_len = dfa->mb_cur_max; - init_buf_len = (len + 1 < init_len) ? len + 1: init_len; - re_string_construct_common (str, len, pstr, trans, icase, dfa); - - ret = re_string_realloc_buffers (pstr, init_buf_len); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - pstr->word_char = dfa->word_char; - pstr->word_ops_used = dfa->word_ops_used; - pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; - pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len; - pstr->valid_raw_len = pstr->valid_len; - return REG_NOERROR; -} - -/* This function allocate the buffers, and initialize them. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_construct (re_string_t *pstr, const char *str, Idx len, - RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa) -{ - reg_errcode_t ret; - memset (pstr, '\0', sizeof (re_string_t)); - re_string_construct_common (str, len, pstr, trans, icase, dfa); - - if (len > 0) - { - ret = re_string_realloc_buffers (pstr, len + 1); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str; - - if (icase) - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - { - while (1) - { - ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - if (pstr->valid_raw_len >= len) - break; - if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max) - break; - ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - } - else -#endif /* RE_ENABLE_I18N */ - build_upper_buffer (pstr); - } - else - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - build_wcs_buffer (pstr); - else -#endif /* RE_ENABLE_I18N */ - { - if (trans != NULL) - re_string_translate_buffer (pstr); - else - { - pstr->valid_len = pstr->bufs_len; - pstr->valid_raw_len = pstr->bufs_len; - } - } - } - - return REG_NOERROR; -} - -/* Helper functions for re_string_allocate, and re_string_construct. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len) -{ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - wint_t *new_wcs; - - /* Avoid overflow in realloc. */ - const size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx)); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_buf_len, 0)) - return REG_ESPACE; - - new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len); - if (BE (new_wcs == NULL, 0)) - return REG_ESPACE; - pstr->wcs = new_wcs; - if (pstr->offsets != NULL) - { - Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len); - if (BE (new_offsets == NULL, 0)) - return REG_ESPACE; - pstr->offsets = new_offsets; - } - } -#endif /* RE_ENABLE_I18N */ - if (pstr->mbs_allocated) - { - unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char, - new_buf_len); - if (BE (new_mbs == NULL, 0)) - return REG_ESPACE; - pstr->mbs = new_mbs; - } - pstr->bufs_len = new_buf_len; - return REG_NOERROR; -} - - -static void -internal_function -re_string_construct_common (const char *str, Idx len, re_string_t *pstr, - RE_TRANSLATE_TYPE trans, bool icase, - const re_dfa_t *dfa) -{ - pstr->raw_mbs = (const unsigned char *) str; - pstr->len = len; - pstr->raw_len = len; - pstr->trans = trans; - pstr->icase = icase; - pstr->mbs_allocated = (trans != NULL || icase); - pstr->mb_cur_max = dfa->mb_cur_max; - pstr->is_utf8 = dfa->is_utf8; - pstr->map_notascii = dfa->map_notascii; - pstr->stop = pstr->len; - pstr->raw_stop = pstr->stop; -} - -#ifdef RE_ENABLE_I18N - -/* Build wide character buffer PSTR->WCS. - If the byte sequence of the string are: - (0), (1), (0), (1), - Then wide character buffer will be: - , WEOF , , WEOF , - We use WEOF for padding, they indicate that the position isn't - a first byte of a multibyte character. - - Note that this function assumes PSTR->VALID_LEN elements are already - built and starts from PSTR->VALID_LEN. */ - -static void -internal_function -build_wcs_buffer (re_string_t *pstr) -{ -#ifdef _LIBC - unsigned char buf[MB_LEN_MAX]; - assert (MB_LEN_MAX >= pstr->mb_cur_max); -#else - unsigned char buf[64]; -#endif - mbstate_t prev_st; - Idx byte_idx, end_idx, remain_len; - size_t mbclen; - - /* Build the buffers from pstr->valid_len to either pstr->len or - pstr->bufs_len. */ - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - for (byte_idx = pstr->valid_len; byte_idx < end_idx;) - { - wchar_t wc; - const char *p; - - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - /* Apply the translation if we need. */ - if (BE (pstr->trans != NULL, 0)) - { - int i, ch; - - for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) - { - ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i]; - buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch]; - } - p = (const char *) buf; - } - else - p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx; - mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -1 || mbclen == 0 - || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len), 0)) - { - /* We treat these cases as a singlebyte character. */ - mbclen = 1; - wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - if (BE (pstr->trans != NULL, 0)) - wc = pstr->trans[wc]; - pstr->cur_state = prev_st; - } - else if (BE (mbclen == (size_t) -2, 0)) - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - - /* Write wide character and padding. */ - pstr->wcs[byte_idx++] = wc; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = byte_idx; -} - -/* Build wide character buffer PSTR->WCS like build_wcs_buffer, - but for REG_ICASE. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -build_wcs_upper_buffer (re_string_t *pstr) -{ - mbstate_t prev_st; - Idx src_idx, byte_idx, end_idx, remain_len; - size_t mbclen; -#ifdef _LIBC - char buf[MB_LEN_MAX]; - assert (MB_LEN_MAX >= pstr->mb_cur_max); -#else - char buf[64]; -#endif - - byte_idx = pstr->valid_len; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - /* The following optimization assumes that ASCII characters can be - mapped to wide characters with a simple cast. */ - if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed) - { - while (byte_idx < end_idx) - { - wchar_t wc; - - if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]) - && mbsinit (&pstr->cur_state)) - { - /* In case of a singlebyte character. */ - pstr->mbs[byte_idx] - = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]); - /* The next step uses the assumption that wchar_t is encoded - ASCII-safe: all ASCII values can be converted like this. */ - pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx]; - ++byte_idx; - continue; - } - - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - mbclen = __mbrtowc (&wc, - ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx - + byte_idx), remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { - wchar_t wcu = wc; - if (iswlower (wc)) - { - size_t mbcdlen; - - wcu = towupper (wc); - mbcdlen = wcrtomb (buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) - memcpy (pstr->mbs + byte_idx, buf, mbclen); - else - { - src_idx = byte_idx; - goto offsets_needed; - } - } - else - memcpy (pstr->mbs + byte_idx, - pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen); - pstr->wcs[byte_idx++] = wcu; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - else if (mbclen == (size_t) -1 || mbclen == 0 - || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) - { - /* It is an invalid character, an incomplete character - at the end of the string, or '\0'. Just use the byte. */ - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]; - pstr->mbs[byte_idx] = ch; - /* And also cast it to wide char. */ - pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) - pstr->cur_state = prev_st; - } - else - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = byte_idx; - return REG_NOERROR; - } - else - for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;) - { - wchar_t wc; - const char *p; - offsets_needed: - remain_len = end_idx - byte_idx; - prev_st = pstr->cur_state; - if (BE (pstr->trans != NULL, 0)) - { - int i, ch; - - for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i) - { - ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i]; - buf[i] = pstr->trans[ch]; - } - p = (const char *) buf; - } - else - p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx; - mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state); - if (BE (mbclen < (size_t) -2, 1)) - { - wchar_t wcu = wc; - if (iswlower (wc)) - { - size_t mbcdlen; - - wcu = towupper (wc); - mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st); - if (BE (mbclen == mbcdlen, 1)) - memcpy (pstr->mbs + byte_idx, buf, mbclen); - else if (mbcdlen != (size_t) -1) - { - size_t i; - - if (byte_idx + mbcdlen > pstr->bufs_len) - { - pstr->cur_state = prev_st; - break; - } - - if (pstr->offsets == NULL) - { - pstr->offsets = re_malloc (Idx, pstr->bufs_len); - - if (pstr->offsets == NULL) - return REG_ESPACE; - } - if (!pstr->offsets_needed) - { - for (i = 0; i < (size_t) byte_idx; ++i) - pstr->offsets[i] = i; - pstr->offsets_needed = 1; - } - - memcpy (pstr->mbs + byte_idx, buf, mbcdlen); - pstr->wcs[byte_idx] = wcu; - pstr->offsets[byte_idx] = src_idx; - for (i = 1; i < mbcdlen; ++i) - { - pstr->offsets[byte_idx + i] - = src_idx + (i < mbclen ? i : mbclen - 1); - pstr->wcs[byte_idx + i] = WEOF; - } - pstr->len += mbcdlen - mbclen; - if (pstr->raw_stop > src_idx) - pstr->stop += mbcdlen - mbclen; - end_idx = (pstr->bufs_len > pstr->len) - ? pstr->len : pstr->bufs_len; - byte_idx += mbcdlen; - src_idx += mbclen; - continue; - } - else - memcpy (pstr->mbs + byte_idx, p, mbclen); - } - else - memcpy (pstr->mbs + byte_idx, p, mbclen); - - if (BE (pstr->offsets_needed != 0, 0)) - { - size_t i; - for (i = 0; i < mbclen; ++i) - pstr->offsets[byte_idx + i] = src_idx + i; - } - src_idx += mbclen; - - pstr->wcs[byte_idx++] = wcu; - /* Write paddings. */ - for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;) - pstr->wcs[byte_idx++] = WEOF; - } - else if (mbclen == (size_t) -1 || mbclen == 0 - || (mbclen == (size_t) -2 && pstr->bufs_len >= pstr->len)) - { - /* It is an invalid character or '\0'. Just use the byte. */ - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx]; - - if (BE (pstr->trans != NULL, 0)) - ch = pstr->trans [ch]; - pstr->mbs[byte_idx] = ch; - - if (BE (pstr->offsets_needed != 0, 0)) - pstr->offsets[byte_idx] = src_idx; - ++src_idx; - - /* And also cast it to wide char. */ - pstr->wcs[byte_idx++] = (wchar_t) ch; - if (BE (mbclen == (size_t) -1, 0)) - pstr->cur_state = prev_st; - } - else - { - /* The buffer doesn't have enough space, finish to build. */ - pstr->cur_state = prev_st; - break; - } - } - pstr->valid_len = byte_idx; - pstr->valid_raw_len = src_idx; - return REG_NOERROR; -} - -/* Skip characters until the index becomes greater than NEW_RAW_IDX. - Return the index. */ - -static Idx -internal_function -re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc) -{ - mbstate_t prev_st; - Idx rawbuf_idx; - size_t mbclen; - wint_t wc = WEOF; - - /* Skip the characters which are not necessary to check. */ - for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len; - rawbuf_idx < new_raw_idx;) - { - wchar_t wc2; - Idx remain_len = pstr->raw_len - rawbuf_idx; - prev_st = pstr->cur_state; - mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx, - remain_len, &pstr->cur_state); - if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0)) - { - /* We treat these cases as a single byte character. */ - if (mbclen == 0 || remain_len == 0) - wc = L'\0'; - else - wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx); - mbclen = 1; - pstr->cur_state = prev_st; - } - else - wc = wc2; - /* Then proceed the next character. */ - rawbuf_idx += mbclen; - } - *last_wc = wc; - return rawbuf_idx; -} -#endif /* RE_ENABLE_I18N */ - -/* Build the buffer PSTR->MBS, and apply the translation if we need. - This function is used in case of REG_ICASE. */ - -static void -internal_function -build_upper_buffer (re_string_t *pstr) -{ - Idx char_idx, end_idx; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx) - { - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx]; - if (BE (pstr->trans != NULL, 0)) - ch = pstr->trans[ch]; - if (islower (ch)) - pstr->mbs[char_idx] = toupper (ch); - else - pstr->mbs[char_idx] = ch; - } - pstr->valid_len = char_idx; - pstr->valid_raw_len = char_idx; -} - -/* Apply TRANS to the buffer in PSTR. */ - -static void -internal_function -re_string_translate_buffer (re_string_t *pstr) -{ - Idx buf_idx, end_idx; - end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len; - - for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx) - { - int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx]; - pstr->mbs[buf_idx] = pstr->trans[ch]; - } - - pstr->valid_len = buf_idx; - pstr->valid_raw_len = buf_idx; -} - -/* This function re-construct the buffers. - Concretely, convert to wide character in case of pstr->mb_cur_max > 1, - convert to upper case in case of REG_ICASE, apply translation. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags) -{ - Idx offset; - - if (BE (pstr->raw_mbs_idx <= idx, 0)) - offset = idx - pstr->raw_mbs_idx; - else - { - /* Reset buffer. */ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); -#endif /* RE_ENABLE_I18N */ - pstr->len = pstr->raw_len; - pstr->stop = pstr->raw_stop; - pstr->valid_len = 0; - pstr->raw_mbs_idx = 0; - pstr->valid_raw_len = 0; - pstr->offsets_needed = 0; - pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF - : CONTEXT_NEWLINE | CONTEXT_BEGBUF); - if (!pstr->mbs_allocated) - pstr->mbs = (unsigned char *) pstr->raw_mbs; - offset = idx; - } - - if (BE (offset != 0, 1)) - { - /* Should the already checked characters be kept? */ - if (BE (offset < pstr->valid_raw_len, 1)) - { - /* Yes, move them to the front of the buffer. */ -#ifdef RE_ENABLE_I18N - if (BE (pstr->offsets_needed, 0)) - { - Idx low = 0, high = pstr->valid_len, mid; - do - { - mid = (high + low) / 2; - if (pstr->offsets[mid] > offset) - high = mid; - else if (pstr->offsets[mid] < offset) - low = mid + 1; - else - break; - } - while (low < high); - if (pstr->offsets[mid] < offset) - ++mid; - pstr->tip_context = re_string_context_at (pstr, mid - 1, - eflags); - /* This can be quite complicated, so handle specially - only the common and easy case where the character with - different length representation of lower and upper - case is present at or after offset. */ - if (pstr->valid_len > offset - && mid == offset && pstr->offsets[mid] == offset) - { - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); - memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; - for (low = 0; low < pstr->valid_len; low++) - pstr->offsets[low] = pstr->offsets[low + offset] - offset; - } - else - { - /* Otherwise, just find out how long the partial multibyte - character at offset is and fill it with WEOF/255. */ - pstr->len = pstr->raw_len - idx + offset; - pstr->stop = pstr->raw_stop - idx + offset; - pstr->offsets_needed = 0; - while (mid > 0 && pstr->offsets[mid - 1] == offset) - --mid; - while (mid < pstr->valid_len) - if (pstr->wcs[mid] != WEOF) - break; - else - ++mid; - if (mid == pstr->valid_len) - pstr->valid_len = 0; - else - { - pstr->valid_len = pstr->offsets[mid] - offset; - if (pstr->valid_len) - { - for (low = 0; low < pstr->valid_len; ++low) - pstr->wcs[low] = WEOF; - memset (pstr->mbs, 255, pstr->valid_len); - } - } - pstr->valid_raw_len = pstr->valid_len; - } - } - else -#endif - { - pstr->tip_context = re_string_context_at (pstr, offset - 1, - eflags); -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - memmove (pstr->wcs, pstr->wcs + offset, - (pstr->valid_len - offset) * sizeof (wint_t)); -#endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - memmove (pstr->mbs, pstr->mbs + offset, - pstr->valid_len - offset); - pstr->valid_len -= offset; - pstr->valid_raw_len -= offset; -#if DEBUG - assert (pstr->valid_len > 0); -#endif - } - } - else - { -#ifdef RE_ENABLE_I18N - /* No, skip all characters until IDX. */ - Idx prev_valid_len = pstr->valid_len; - - if (BE (pstr->offsets_needed, 0)) - { - pstr->len = pstr->raw_len - idx + offset; - pstr->stop = pstr->raw_stop - idx + offset; - pstr->offsets_needed = 0; - } -#endif - pstr->valid_len = 0; -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - Idx wcs_idx; - wint_t wc = WEOF; - - if (pstr->is_utf8) - { - const unsigned char *raw, *p, *end; - - /* Special case UTF-8. Multi-byte chars start with any - byte other than 0x80 - 0xbf. */ - raw = pstr->raw_mbs + pstr->raw_mbs_idx; - end = raw + (offset - pstr->mb_cur_max); - if (end < pstr->raw_mbs) - end = pstr->raw_mbs; - p = raw + offset - 1; -#ifdef _LIBC - /* We know the wchar_t encoding is UCS4, so for the simple - case, ASCII characters, skip the conversion step. */ - if (isascii (*p) && BE (pstr->trans == NULL, 1)) - { - memset (&pstr->cur_state, '\0', sizeof (mbstate_t)); - /* pstr->valid_len = 0; */ - wc = (wchar_t) *p; - } - else -#endif - for (; p >= end; --p) - if ((*p & 0xc0) != 0x80) - { - mbstate_t cur_state; - wchar_t wc2; - Idx mlen = raw + pstr->len - p; - unsigned char buf[6]; - size_t mbclen; - - const unsigned char *pp = p; - if (BE (pstr->trans != NULL, 0)) - { - int i = mlen < 6 ? mlen : 6; - while (--i >= 0) - buf[i] = pstr->trans[p[i]]; - pp = buf; - } - /* XXX Don't use mbrtowc, we know which conversion - to use (UTF-8 -> UCS4). */ - memset (&cur_state, 0, sizeof (cur_state)); - mbclen = __mbrtowc (&wc2, (const char *) pp, mlen, - &cur_state); - if (raw + offset - p <= mbclen - && mbclen < (size_t) -2) - { - memset (&pstr->cur_state, '\0', - sizeof (mbstate_t)); - pstr->valid_len = mbclen - (raw + offset - p); - wc = wc2; - } - break; - } - } - - if (wc == WEOF) - pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx; - if (wc == WEOF) - pstr->tip_context - = re_string_context_at (pstr, prev_valid_len - 1, eflags); - else - pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0) - && IS_WIDE_WORD_CHAR (wc)) - ? CONTEXT_WORD - : ((IS_WIDE_NEWLINE (wc) - && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); - if (BE (pstr->valid_len, 0)) - { - for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx) - pstr->wcs[wcs_idx] = WEOF; - if (pstr->mbs_allocated) - memset (pstr->mbs, 255, pstr->valid_len); - } - pstr->valid_raw_len = pstr->valid_len; - } - else -#endif /* RE_ENABLE_I18N */ - { - int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1]; - pstr->valid_raw_len = 0; - if (pstr->trans) - c = pstr->trans[c]; - pstr->tip_context = (bitset_contain (pstr->word_char, c) - ? CONTEXT_WORD - : ((IS_NEWLINE (c) && pstr->newline_anchor) - ? CONTEXT_NEWLINE : 0)); - } - } - if (!BE (pstr->mbs_allocated, 0)) - pstr->mbs += offset; - } - pstr->raw_mbs_idx = idx; - pstr->len -= offset; - pstr->stop -= offset; - - /* Then build the buffers. */ -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - if (pstr->icase) - { - reg_errcode_t ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - else - build_wcs_buffer (pstr); - } - else -#endif /* RE_ENABLE_I18N */ - if (BE (pstr->mbs_allocated, 0)) - { - if (pstr->icase) - build_upper_buffer (pstr); - else if (pstr->trans != NULL) - re_string_translate_buffer (pstr); - } - else - pstr->valid_len = pstr->len; - - pstr->cur_idx = 0; - return REG_NOERROR; -} - -static unsigned char -internal_function __attribute ((pure)) -re_string_peek_byte_case (const re_string_t *pstr, Idx idx) -{ - int ch; - Idx off; - - /* Handle the common (easiest) cases first. */ - if (BE (!pstr->mbs_allocated, 1)) - return re_string_peek_byte (pstr, idx); - -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1 - && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx)) - return re_string_peek_byte (pstr, idx); -#endif - - off = pstr->cur_idx + idx; -#ifdef RE_ENABLE_I18N - if (pstr->offsets_needed) - off = pstr->offsets[off]; -#endif - - ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; - -#ifdef RE_ENABLE_I18N - /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I - this function returns CAPITAL LETTER I instead of first byte of - DOTLESS SMALL LETTER I. The latter would confuse the parser, - since peek_byte_case doesn't advance cur_idx in any way. */ - if (pstr->offsets_needed && !isascii (ch)) - return re_string_peek_byte (pstr, idx); -#endif - - return ch; -} - -static unsigned char -internal_function -re_string_fetch_byte_case (re_string_t *pstr) -{ - if (BE (!pstr->mbs_allocated, 1)) - return re_string_fetch_byte (pstr); - -#ifdef RE_ENABLE_I18N - if (pstr->offsets_needed) - { - Idx off; - int ch; - - /* For tr_TR.UTF-8 [[:islower:]] there is - [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip - in that case the whole multi-byte character and return - the original letter. On the other side, with - [[: DOTLESS SMALL LETTER I return [[:I, as doing - anything else would complicate things too much. */ - - if (!re_string_first_byte (pstr, pstr->cur_idx)) - return re_string_fetch_byte (pstr); - - off = pstr->offsets[pstr->cur_idx]; - ch = pstr->raw_mbs[pstr->raw_mbs_idx + off]; - - if (! isascii (ch)) - return re_string_fetch_byte (pstr); - - re_string_skip_bytes (pstr, - re_string_char_size_at (pstr, pstr->cur_idx)); - return ch; - } -#endif - - return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++]; -} - -static void -internal_function -re_string_destruct (re_string_t *pstr) -{ -#ifdef RE_ENABLE_I18N - re_free (pstr->wcs); - re_free (pstr->offsets); -#endif /* RE_ENABLE_I18N */ - if (pstr->mbs_allocated) - re_free (pstr->mbs); -} - -/* Return the context at IDX in INPUT. */ - -static unsigned int -internal_function -re_string_context_at (const re_string_t *input, Idx idx, int eflags) -{ - int c; - if (BE (! REG_VALID_INDEX (idx), 0)) - /* In this case, we use the value stored in input->tip_context, - since we can't know the character in input->mbs[-1] here. */ - return input->tip_context; - if (BE (idx == input->len, 0)) - return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF - : CONTEXT_NEWLINE | CONTEXT_ENDBUF); -#ifdef RE_ENABLE_I18N - if (input->mb_cur_max > 1) - { - wint_t wc; - Idx wc_idx = idx; - while(input->wcs[wc_idx] == WEOF) - { -#ifdef DEBUG - /* It must not happen. */ - assert (REG_VALID_INDEX (wc_idx)); -#endif - --wc_idx; - if (! REG_VALID_INDEX (wc_idx)) - return input->tip_context; - } - wc = input->wcs[wc_idx]; - if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc)) - return CONTEXT_WORD; - return (IS_WIDE_NEWLINE (wc) && input->newline_anchor - ? CONTEXT_NEWLINE : 0); - } - else -#endif - { - c = re_string_byte_at (input, idx); - if (bitset_contain (input->word_char, c)) - return CONTEXT_WORD; - return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0; - } -} - -/* Functions for set operation. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_alloc (re_node_set *set, Idx size) -{ - set->alloc = size; - set->nelem = 0; - set->elems = re_malloc (Idx, size); - if (BE (set->elems == NULL, 0)) - return REG_ESPACE; - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_1 (re_node_set *set, Idx elem) -{ - set->alloc = 1; - set->nelem = 1; - set->elems = re_malloc (Idx, 1); - if (BE (set->elems == NULL, 0)) - { - set->alloc = set->nelem = 0; - return REG_ESPACE; - } - set->elems[0] = elem; - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2) -{ - set->alloc = 2; - set->elems = re_malloc (Idx, 2); - if (BE (set->elems == NULL, 0)) - return REG_ESPACE; - if (elem1 == elem2) - { - set->nelem = 1; - set->elems[0] = elem1; - } - else - { - set->nelem = 2; - if (elem1 < elem2) - { - set->elems[0] = elem1; - set->elems[1] = elem2; - } - else - { - set->elems[0] = elem2; - set->elems[1] = elem1; - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_copy (re_node_set *dest, const re_node_set *src) -{ - dest->nelem = src->nelem; - if (src->nelem > 0) - { - dest->alloc = dest->nelem; - dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) - { - dest->alloc = dest->nelem = 0; - return REG_ESPACE; - } - memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); - } - else - re_node_set_init_empty (dest); - return REG_NOERROR; -} - -/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. - Note: We assume dest->elems is NULL, when dest->alloc is 0. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2) -{ - Idx i1, i2, is, id, delta, sbase; - if (src1->nelem == 0 || src2->nelem == 0) - return REG_NOERROR; - - /* We need dest->nelem + 2 * elems_in_intersection; this is a - conservative estimate. */ - if (src1->nelem + src2->nelem + dest->nelem > dest->alloc) - { - Idx new_alloc = src1->nelem + src2->nelem + dest->alloc; - Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_elems == NULL, 0)) - return REG_ESPACE; - dest->elems = new_elems; - dest->alloc = new_alloc; - } - - /* Find the items in the intersection of SRC1 and SRC2, and copy - into the top of DEST those that are not already in DEST itself. */ - sbase = dest->nelem + src1->nelem + src2->nelem; - i1 = src1->nelem - 1; - i2 = src2->nelem - 1; - id = dest->nelem - 1; - for (;;) - { - if (src1->elems[i1] == src2->elems[i2]) - { - /* Try to find the item in DEST. Maybe we could binary search? */ - while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1]) - --id; - - if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1]) - dest->elems[--sbase] = src1->elems[i1]; - - if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2)) - break; - } - - /* Lower the highest of the two items. */ - else if (src1->elems[i1] < src2->elems[i2]) - { - if (! REG_VALID_INDEX (--i2)) - break; - } - else - { - if (! REG_VALID_INDEX (--i1)) - break; - } - } - - id = dest->nelem - 1; - is = dest->nelem + src1->nelem + src2->nelem - 1; - delta = is - sbase + 1; - - /* Now copy. When DELTA becomes zero, the remaining - DEST elements are already in place; this is more or - less the same loop that is in re_node_set_merge. */ - dest->nelem += delta; - if (delta > 0 && REG_VALID_INDEX (id)) - for (;;) - { - if (dest->elems[is] > dest->elems[id]) - { - /* Copy from the top. */ - dest->elems[id + delta--] = dest->elems[is--]; - if (delta == 0) - break; - } - else - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; - if (! REG_VALID_INDEX (--id)) - break; - } - } - - /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx)); - - return REG_NOERROR; -} - -/* Calculate the union set of the sets SRC1 and SRC2. And store it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_init_union (re_node_set *dest, const re_node_set *src1, - const re_node_set *src2) -{ - Idx i1, i2, id; - if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0) - { - dest->alloc = src1->nelem + src2->nelem; - dest->elems = re_malloc (Idx, dest->alloc); - if (BE (dest->elems == NULL, 0)) - return REG_ESPACE; - } - else - { - if (src1 != NULL && src1->nelem > 0) - return re_node_set_init_copy (dest, src1); - else if (src2 != NULL && src2->nelem > 0) - return re_node_set_init_copy (dest, src2); - else - re_node_set_init_empty (dest); - return REG_NOERROR; - } - for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;) - { - if (src1->elems[i1] > src2->elems[i2]) - { - dest->elems[id++] = src2->elems[i2++]; - continue; - } - if (src1->elems[i1] == src2->elems[i2]) - ++i2; - dest->elems[id++] = src1->elems[i1++]; - } - if (i1 < src1->nelem) - { - memcpy (dest->elems + id, src1->elems + i1, - (src1->nelem - i1) * sizeof (Idx)); - id += src1->nelem - i1; - } - else if (i2 < src2->nelem) - { - memcpy (dest->elems + id, src2->elems + i2, - (src2->nelem - i2) * sizeof (Idx)); - id += src2->nelem - i2; - } - dest->nelem = id; - return REG_NOERROR; -} - -/* Calculate the union set of the sets DEST and SRC. And store it to - DEST. Return value indicate the error code or REG_NOERROR if succeeded. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -re_node_set_merge (re_node_set *dest, const re_node_set *src) -{ - Idx is, id, sbase, delta; - if (src == NULL || src->nelem == 0) - return REG_NOERROR; - if (dest->alloc < 2 * src->nelem + dest->nelem) - { - Idx new_alloc = 2 * (src->nelem + dest->alloc); - Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc); - if (BE (new_buffer == NULL, 0)) - return REG_ESPACE; - dest->elems = new_buffer; - dest->alloc = new_alloc; - } - - if (BE (dest->nelem == 0, 0)) - { - dest->nelem = src->nelem; - memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx)); - return REG_NOERROR; - } - - /* Copy into the top of DEST the items of SRC that are not - found in DEST. Maybe we could binary search in DEST? */ - for (sbase = dest->nelem + 2 * src->nelem, - is = src->nelem - 1, id = dest->nelem - 1; - REG_VALID_INDEX (is) && REG_VALID_INDEX (id); ) - { - if (dest->elems[id] == src->elems[is]) - is--, id--; - else if (dest->elems[id] < src->elems[is]) - dest->elems[--sbase] = src->elems[is--]; - else /* if (dest->elems[id] > src->elems[is]) */ - --id; - } - - if (REG_VALID_INDEX (is)) - { - /* If DEST is exhausted, the remaining items of SRC must be unique. */ - sbase -= is + 1; - memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx)); - } - - id = dest->nelem - 1; - is = dest->nelem + 2 * src->nelem - 1; - delta = is - sbase + 1; - if (delta == 0) - return REG_NOERROR; - - /* Now copy. When DELTA becomes zero, the remaining - DEST elements are already in place. */ - dest->nelem += delta; - for (;;) - { - if (dest->elems[is] > dest->elems[id]) - { - /* Copy from the top. */ - dest->elems[id + delta--] = dest->elems[is--]; - if (delta == 0) - break; - } - else - { - /* Slide from the bottom. */ - dest->elems[id + delta] = dest->elems[id]; - if (! REG_VALID_INDEX (--id)) - { - /* Copy remaining SRC elements. */ - memcpy (dest->elems, dest->elems + sbase, - delta * sizeof (Idx)); - break; - } - } - } - - return REG_NOERROR; -} - -/* Insert the new element ELEM to the re_node_set* SET. - SET should not already have ELEM. - Return true if successful. */ - -static bool -internal_function __attribute_warn_unused_result__ -re_node_set_insert (re_node_set *set, Idx elem) -{ - Idx idx; - /* In case the set is empty. */ - if (set->alloc == 0) - return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1); - - if (BE (set->nelem, 0) == 0) - { - /* We already guaranteed above that set->alloc != 0. */ - set->elems[0] = elem; - ++set->nelem; - return true; - } - - /* Realloc if we need. */ - if (set->alloc == set->nelem) - { - Idx *new_elems; - set->alloc = set->alloc * 2; - new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) - return false; - set->elems = new_elems; - } - - /* Move the elements which follows the new element. Test the - first element separately to skip a check in the inner loop. */ - if (elem < set->elems[0]) - { - idx = 0; - for (idx = set->nelem; idx > 0; idx--) - set->elems[idx] = set->elems[idx - 1]; - } - else - { - for (idx = set->nelem; set->elems[idx - 1] > elem; idx--) - set->elems[idx] = set->elems[idx - 1]; - } - - /* Insert the new element. */ - set->elems[idx] = elem; - ++set->nelem; - return true; -} - -/* Insert the new element ELEM to the re_node_set* SET. - SET should not already have any element greater than or equal to ELEM. - Return true if successful. */ - -static bool -internal_function __attribute_warn_unused_result__ -re_node_set_insert_last (re_node_set *set, Idx elem) -{ - /* Realloc if we need. */ - if (set->alloc == set->nelem) - { - Idx *new_elems; - set->alloc = (set->alloc + 1) * 2; - new_elems = re_realloc (set->elems, Idx, set->alloc); - if (BE (new_elems == NULL, 0)) - return false; - set->elems = new_elems; - } - - /* Insert the new element. */ - set->elems[set->nelem++] = elem; - return true; -} - -/* Compare two node sets SET1 and SET2. - Return true if SET1 and SET2 are equivalent. */ - -static bool -internal_function __attribute ((pure)) -re_node_set_compare (const re_node_set *set1, const re_node_set *set2) -{ - Idx i; - if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem) - return false; - for (i = set1->nelem ; REG_VALID_INDEX (--i) ; ) - if (set1->elems[i] != set2->elems[i]) - return false; - return true; -} - -/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */ - -static Idx -internal_function __attribute ((pure)) -re_node_set_contains (const re_node_set *set, Idx elem) -{ - __re_size_t idx, right, mid; - if (! REG_VALID_NONZERO_INDEX (set->nelem)) - return 0; - - /* Binary search the element. */ - idx = 0; - right = set->nelem - 1; - while (idx < right) - { - mid = (idx + right) / 2; - if (set->elems[mid] < elem) - idx = mid + 1; - else - right = mid; - } - return set->elems[idx] == elem ? idx + 1 : 0; -} - -static void -internal_function -re_node_set_remove_at (re_node_set *set, Idx idx) -{ - if (idx < 0 || idx >= set->nelem) - return; - --set->nelem; - for (; idx < set->nelem; idx++) - set->elems[idx] = set->elems[idx + 1]; -} - - -/* Add the token TOKEN to dfa->nodes, and return the index of the token. - Or return REG_MISSING if an error occurred. */ - -static Idx -internal_function -re_dfa_add_node (re_dfa_t *dfa, re_token_t token) -{ - if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0)) - { - size_t new_nodes_alloc = dfa->nodes_alloc * 2; - Idx *new_nexts, *new_indices; - re_node_set *new_edests, *new_eclosures; - re_token_t *new_nodes; - - /* Avoid overflows in realloc. */ - const size_t max_object_size = MAX (sizeof (re_token_t), - MAX (sizeof (re_node_set), - sizeof (Idx))); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < new_nodes_alloc, 0)) - return REG_MISSING; - - new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc); - if (BE (new_nodes == NULL, 0)) - return REG_MISSING; - dfa->nodes = new_nodes; - new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc); - new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc); - new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc); - new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc); - if (BE (new_nexts == NULL || new_indices == NULL - || new_edests == NULL || new_eclosures == NULL, 0)) - return REG_MISSING; - dfa->nexts = new_nexts; - dfa->org_indices = new_indices; - dfa->edests = new_edests; - dfa->eclosures = new_eclosures; - dfa->nodes_alloc = new_nodes_alloc; - } - dfa->nodes[dfa->nodes_len] = token; - dfa->nodes[dfa->nodes_len].constraint = 0; -#ifdef RE_ENABLE_I18N - { - int type = token.type; - dfa->nodes[dfa->nodes_len].accept_mb = - (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET; - } -#endif - dfa->nexts[dfa->nodes_len] = REG_MISSING; - re_node_set_init_empty (dfa->edests + dfa->nodes_len); - re_node_set_init_empty (dfa->eclosures + dfa->nodes_len); - return dfa->nodes_len++; -} - -static inline re_hashval_t -internal_function -calc_state_hash (const re_node_set *nodes, unsigned int context) -{ - re_hashval_t hash = nodes->nelem + context; - Idx i; - for (i = 0 ; i < nodes->nelem ; i++) - hash += nodes->elems[i]; - return hash; -} - -/* Search for the state whose node_set is equivalent to NODES. - Return the pointer to the state, if we found it in the DFA. - Otherwise create the new one and return it. In case of an error - return NULL and set the error code in ERR. - Note: - We assume NULL as the invalid state, then it is possible that - return value is NULL and ERR is REG_NOERROR. - - We never return non-NULL value in case of any errors, it is for - optimization. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa, - const re_node_set *nodes) -{ - re_hashval_t hash; - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; -#ifdef lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; -#endif - if (BE (nodes->nelem == 0, 0)) - { - *err = REG_NOERROR; - return NULL; - } - hash = calc_state_hash (nodes, 0); - spot = dfa->state_table + (hash & dfa->state_hash_mask); - - for (i = 0 ; i < spot->num ; i++) - { - re_dfastate_t *state = spot->array[i]; - if (hash != state->hash) - continue; - if (re_node_set_compare (&state->nodes, nodes)) - return state; - } - - /* There are no appropriate state in the dfa, create the new one. */ - new_state = create_ci_newstate (dfa, nodes, hash); - if (BE (new_state == NULL, 0)) - *err = REG_ESPACE; - - return new_state; -} - -/* Search for the state whose node_set is equivalent to NODES and - whose context is equivalent to CONTEXT. - Return the pointer to the state, if we found it in the DFA. - Otherwise create the new one and return it. In case of an error - return NULL and set the error code in ERR. - Note: - We assume NULL as the invalid state, then it is possible that - return value is NULL and ERR is REG_NOERROR. - - We never return non-NULL value in case of any errors, it is for - optimization. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa, - const re_node_set *nodes, unsigned int context) -{ - re_hashval_t hash; - re_dfastate_t *new_state; - struct re_state_table_entry *spot; - Idx i; -#ifdef lint - /* Suppress bogus uninitialized-variable warnings. */ - *err = REG_NOERROR; -#endif - if (nodes->nelem == 0) - { - *err = REG_NOERROR; - return NULL; - } - hash = calc_state_hash (nodes, context); - spot = dfa->state_table + (hash & dfa->state_hash_mask); - - for (i = 0 ; i < spot->num ; i++) - { - re_dfastate_t *state = spot->array[i]; - if (state->hash == hash - && state->context == context - && re_node_set_compare (state->entrance_nodes, nodes)) - return state; - } - /* There are no appropriate state in 'dfa', create the new one. */ - new_state = create_cd_newstate (dfa, nodes, context, hash); - if (BE (new_state == NULL, 0)) - *err = REG_ESPACE; - - return new_state; -} - -/* Finish initialization of the new state NEWSTATE, and using its hash value - HASH put in the appropriate bucket of DFA's state table. Return value - indicates the error code if failed. */ - -static reg_errcode_t -__attribute_warn_unused_result__ -register_state (const re_dfa_t *dfa, re_dfastate_t *newstate, - re_hashval_t hash) -{ - struct re_state_table_entry *spot; - reg_errcode_t err; - Idx i; - - newstate->hash = hash; - err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - for (i = 0; i < newstate->nodes.nelem; i++) - { - Idx elem = newstate->nodes.elems[i]; - if (!IS_EPSILON_NODE (dfa->nodes[elem].type)) - if (! re_node_set_insert_last (&newstate->non_eps_nodes, elem)) - return REG_ESPACE; - } - - spot = dfa->state_table + (hash & dfa->state_hash_mask); - if (BE (spot->alloc <= spot->num, 0)) - { - Idx new_alloc = 2 * spot->num + 2; - re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *, - new_alloc); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - spot->array = new_array; - spot->alloc = new_alloc; - } - spot->array[spot->num++] = newstate; - return REG_NOERROR; -} - -static void -free_state (re_dfastate_t *state) -{ - re_node_set_free (&state->non_eps_nodes); - re_node_set_free (&state->inveclosure); - if (state->entrance_nodes != &state->nodes) - { - re_node_set_free (state->entrance_nodes); - re_free (state->entrance_nodes); - } - re_node_set_free (&state->nodes); - re_free (state->word_trtable); - re_free (state->trtable); - re_free (state); -} - -/* Create the new state which is independent of contexts. - Return the new state if succeeded, otherwise return NULL. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes, - re_hashval_t hash) -{ - Idx i; - reg_errcode_t err; - re_dfastate_t *newstate; - - newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) - return NULL; - err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_free (newstate); - return NULL; - } - - newstate->entrance_nodes = &newstate->nodes; - for (i = 0 ; i < nodes->nelem ; i++) - { - re_token_t *node = dfa->nodes + nodes->elems[i]; - re_token_type_t type = node->type; - if (type == CHARACTER && !node->constraint) - continue; -#ifdef RE_ENABLE_I18N - newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ - - /* If the state has the halt node, the state is a halt state. */ - if (type == END_OF_RE) - newstate->halt = 1; - else if (type == OP_BACK_REF) - newstate->has_backref = 1; - else if (type == ANCHOR || node->constraint) - newstate->has_constraint = 1; - } - err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) - { - free_state (newstate); - newstate = NULL; - } - return newstate; -} - -/* Create the new state which is depend on the context CONTEXT. - Return the new state if succeeded, otherwise return NULL. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes, - unsigned int context, re_hashval_t hash) -{ - Idx i, nctx_nodes = 0; - reg_errcode_t err; - re_dfastate_t *newstate; - - newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1); - if (BE (newstate == NULL, 0)) - return NULL; - err = re_node_set_init_copy (&newstate->nodes, nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_free (newstate); - return NULL; - } - - newstate->context = context; - newstate->entrance_nodes = &newstate->nodes; - - for (i = 0 ; i < nodes->nelem ; i++) - { - re_token_t *node = dfa->nodes + nodes->elems[i]; - re_token_type_t type = node->type; - unsigned int constraint = node->constraint; - - if (type == CHARACTER && !constraint) - continue; -#ifdef RE_ENABLE_I18N - newstate->accept_mb |= node->accept_mb; -#endif /* RE_ENABLE_I18N */ - - /* If the state has the halt node, the state is a halt state. */ - if (type == END_OF_RE) - newstate->halt = 1; - else if (type == OP_BACK_REF) - newstate->has_backref = 1; - - if (constraint) - { - if (newstate->entrance_nodes == &newstate->nodes) - { - newstate->entrance_nodes = re_malloc (re_node_set, 1); - if (BE (newstate->entrance_nodes == NULL, 0)) - { - free_state (newstate); - return NULL; - } - if (re_node_set_init_copy (newstate->entrance_nodes, nodes) - != REG_NOERROR) - return NULL; - nctx_nodes = 0; - newstate->has_constraint = 1; - } - - if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context)) - { - re_node_set_remove_at (&newstate->nodes, i - nctx_nodes); - ++nctx_nodes; - } - } - } - err = register_state (dfa, newstate, hash); - if (BE (err != REG_NOERROR, 0)) - { - free_state (newstate); - newstate = NULL; - } - return newstate; -} diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h deleted file mode 100644 index 2e36fe5..0000000 --- a/gnulib/lib/regex_internal.h +++ /dev/null @@ -1,869 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 . */ - -#ifndef _REGEX_INTERNAL_H -#define _REGEX_INTERNAL_H 1 - -#include -#include -#include -#include -#include - -#include -#ifndef _LIBC -# 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) -#endif - -/* In case that the system doesn't have isblank(). */ -#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK)) -# define isblank(ch) ((ch) == ' ' || (ch) == '\t') -#endif - -#ifdef _LIBC -# ifndef _RE_DEFINE_LOCALE_FUNCTIONS -# define _RE_DEFINE_LOCALE_FUNCTIONS 1 -# include -# include -# include -# endif -#endif - -/* This is for other GNU distributions with internationalized messages. */ -#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC -# include -# ifdef _LIBC -# undef gettext -# define gettext(msgid) \ - INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES) -# endif -#else -# define gettext(msgid) (msgid) -#endif - -#ifndef gettext_noop -/* This define is so xgettext can find the internationalizable - strings. */ -# define gettext_noop(String) String -#endif - -#if (defined MB_CUR_MAX && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC -# define RE_ENABLE_I18N -#endif - -#if __GNUC__ >= 3 -# define BE(expr, val) __builtin_expect (expr, val) -#else -# define BE(expr, val) (expr) -# ifdef _LIBC -# define inline -# endif -#endif - -/* Number of ASCII characters. */ -#define ASCII_CHARS 0x80 - -/* Number of single byte characters. */ -#define SBC_MAX (UCHAR_MAX + 1) - -#define COLL_ELEM_LEN_MAX 8 - -/* The character which represents newline. */ -#define NEWLINE_CHAR '\n' -#define WIDE_NEWLINE_CHAR L'\n' - -/* Rename to standard API for using out of glibc. */ -#ifndef _LIBC -# define __wctype wctype -# define __iswctype iswctype -# define __btowc btowc -# define __mbrtowc mbrtowc -# define __wcrtomb wcrtomb -# define __regfree regfree -# define attribute_hidden -#endif /* not _LIBC */ - -#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) -# define __attribute(arg) __attribute__ (arg) -#else -# define __attribute(arg) -#endif - -typedef __re_idx_t Idx; -#ifdef _REGEX_LARGE_OFFSETS -# define IDX_MAX (SIZE_MAX - 2) -#else -# define IDX_MAX INT_MAX -#endif - -/* Special return value for failure to match. */ -#define REG_MISSING ((Idx) -1) - -/* Special return value for internal error. */ -#define REG_ERROR ((Idx) -2) - -/* Test whether N is a valid index, and is not one of the above. */ -#ifdef _REGEX_LARGE_OFFSETS -# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR) -#else -# define REG_VALID_INDEX(n) (0 <= (n)) -#endif - -/* Test whether N is a valid nonzero index. */ -#ifdef _REGEX_LARGE_OFFSETS -# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1)) -#else -# define REG_VALID_NONZERO_INDEX(n) (0 < (n)) -#endif - -/* A hash value, suitable for computing hash tables. */ -typedef __re_size_t re_hashval_t; - -/* An integer used to represent a set of bits. It must be unsigned, - and must be at least as wide as unsigned int. */ -typedef unsigned long int bitset_word_t; -/* All bits set in a bitset_word_t. */ -#define BITSET_WORD_MAX ULONG_MAX - -/* Number of bits in a bitset_word_t. For portability to hosts with - padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)'; - instead, deduce it directly from BITSET_WORD_MAX. Avoid - greater-than-32-bit integers and unconditional shifts by more than - 31 bits, as they're not portable. */ -#if BITSET_WORD_MAX == 0xffffffffUL -# define BITSET_WORD_BITS 32 -#elif BITSET_WORD_MAX >> 31 >> 4 == 1 -# define BITSET_WORD_BITS 36 -#elif BITSET_WORD_MAX >> 31 >> 16 == 1 -# define BITSET_WORD_BITS 48 -#elif BITSET_WORD_MAX >> 31 >> 28 == 1 -# define BITSET_WORD_BITS 60 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1 -# define BITSET_WORD_BITS 64 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1 -# define BITSET_WORD_BITS 72 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1 -# define BITSET_WORD_BITS 128 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1 -# define BITSET_WORD_BITS 256 -#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1 -# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */ -# if BITSET_WORD_BITS <= SBC_MAX -# error "Invalid SBC_MAX" -# endif -#else -# error "Add case for new bitset_word_t size" -#endif - -/* Number of bitset_word_t values in a bitset_t. */ -#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS) - -typedef bitset_word_t bitset_t[BITSET_WORDS]; -typedef bitset_word_t *re_bitset_ptr_t; -typedef const bitset_word_t *re_const_bitset_ptr_t; - -#define PREV_WORD_CONSTRAINT 0x0001 -#define PREV_NOTWORD_CONSTRAINT 0x0002 -#define NEXT_WORD_CONSTRAINT 0x0004 -#define NEXT_NOTWORD_CONSTRAINT 0x0008 -#define PREV_NEWLINE_CONSTRAINT 0x0010 -#define NEXT_NEWLINE_CONSTRAINT 0x0020 -#define PREV_BEGBUF_CONSTRAINT 0x0040 -#define NEXT_ENDBUF_CONSTRAINT 0x0080 -#define WORD_DELIM_CONSTRAINT 0x0100 -#define NOT_WORD_DELIM_CONSTRAINT 0x0200 - -typedef enum -{ - INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, - WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT, - WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, - INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT, - LINE_FIRST = PREV_NEWLINE_CONSTRAINT, - LINE_LAST = NEXT_NEWLINE_CONSTRAINT, - BUF_FIRST = PREV_BEGBUF_CONSTRAINT, - BUF_LAST = NEXT_ENDBUF_CONSTRAINT, - WORD_DELIM = WORD_DELIM_CONSTRAINT, - NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT -} re_context_type; - -typedef struct -{ - Idx alloc; - Idx nelem; - Idx *elems; -} re_node_set; - -typedef enum -{ - NON_TYPE = 0, - - /* Node type, These are used by token, node, tree. */ - CHARACTER = 1, - END_OF_RE = 2, - SIMPLE_BRACKET = 3, - OP_BACK_REF = 4, - OP_PERIOD = 5, -#ifdef RE_ENABLE_I18N - COMPLEX_BRACKET = 6, - OP_UTF8_PERIOD = 7, -#endif /* RE_ENABLE_I18N */ - - /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used - when the debugger shows values of this enum type. */ -#define EPSILON_BIT 8 - OP_OPEN_SUBEXP = EPSILON_BIT | 0, - OP_CLOSE_SUBEXP = EPSILON_BIT | 1, - OP_ALT = EPSILON_BIT | 2, - OP_DUP_ASTERISK = EPSILON_BIT | 3, - ANCHOR = EPSILON_BIT | 4, - - /* Tree type, these are used only by tree. */ - CONCAT = 16, - SUBEXP = 17, - - /* Token type, these are used only by token. */ - OP_DUP_PLUS = 18, - OP_DUP_QUESTION, - OP_OPEN_BRACKET, - OP_CLOSE_BRACKET, - OP_CHARSET_RANGE, - OP_OPEN_DUP_NUM, - OP_CLOSE_DUP_NUM, - OP_NON_MATCH_LIST, - OP_OPEN_COLL_ELEM, - OP_CLOSE_COLL_ELEM, - OP_OPEN_EQUIV_CLASS, - OP_CLOSE_EQUIV_CLASS, - OP_OPEN_CHAR_CLASS, - OP_CLOSE_CHAR_CLASS, - OP_WORD, - OP_NOTWORD, - OP_SPACE, - OP_NOTSPACE, - BACK_SLASH - -} re_token_type_t; - -#ifdef RE_ENABLE_I18N -typedef struct -{ - /* Multibyte characters. */ - wchar_t *mbchars; - - /* Collating symbols. */ -# ifdef _LIBC - int32_t *coll_syms; -# endif - - /* Equivalence classes. */ -# ifdef _LIBC - int32_t *equiv_classes; -# endif - - /* Range expressions. */ -# ifdef _LIBC - uint32_t *range_starts; - uint32_t *range_ends; -# else /* not _LIBC */ - wchar_t *range_starts; - wchar_t *range_ends; -# endif /* not _LIBC */ - - /* Character classes. */ - wctype_t *char_classes; - - /* If this character set is the non-matching list. */ - unsigned int non_match : 1; - - /* # of multibyte characters. */ - Idx nmbchars; - - /* # of collating symbols. */ - Idx ncoll_syms; - - /* # of equivalence classes. */ - Idx nequiv_classes; - - /* # of range expressions. */ - Idx nranges; - - /* # of character classes. */ - Idx nchar_classes; -} re_charset_t; -#endif /* RE_ENABLE_I18N */ - -typedef struct -{ - union - { - unsigned char c; /* for CHARACTER */ - re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */ -#ifdef RE_ENABLE_I18N - re_charset_t *mbcset; /* for COMPLEX_BRACKET */ -#endif /* RE_ENABLE_I18N */ - Idx idx; /* for BACK_REF */ - re_context_type ctx_type; /* for ANCHOR */ - } opr; -#if __GNUC__ >= 2 && !defined __STRICT_ANSI__ - re_token_type_t type : 8; -#else - re_token_type_t type; -#endif - unsigned int constraint : 10; /* context constraint */ - unsigned int duplicated : 1; - unsigned int opt_subexp : 1; -#ifdef RE_ENABLE_I18N - unsigned int accept_mb : 1; - /* These 2 bits can be moved into the union if needed (e.g. if running out - of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */ - unsigned int mb_partial : 1; -#endif - unsigned int word_char : 1; -} re_token_t; - -#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT) - -struct re_string_t -{ - /* Indicate the raw buffer which is the original string passed as an - argument of regexec(), re_search(), etc.. */ - const unsigned char *raw_mbs; - /* Store the multibyte string. In case of "case insensitive mode" like - REG_ICASE, upper cases of the string are stored, otherwise MBS points - the same address that RAW_MBS points. */ - unsigned char *mbs; -#ifdef RE_ENABLE_I18N - /* Store the wide character string which is corresponding to MBS. */ - wint_t *wcs; - Idx *offsets; - mbstate_t cur_state; -#endif - /* Index in RAW_MBS. Each character mbs[i] corresponds to - raw_mbs[raw_mbs_idx + i]. */ - Idx raw_mbs_idx; - /* The length of the valid characters in the buffers. */ - Idx valid_len; - /* The corresponding number of bytes in raw_mbs array. */ - Idx valid_raw_len; - /* The length of the buffers MBS and WCS. */ - Idx bufs_len; - /* The index in MBS, which is updated by re_string_fetch_byte. */ - Idx cur_idx; - /* length of RAW_MBS array. */ - Idx raw_len; - /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */ - Idx len; - /* End of the buffer may be shorter than its length in the cases such - as re_match_2, re_search_2. Then, we use STOP for end of the buffer - instead of LEN. */ - Idx raw_stop; - /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */ - Idx stop; - - /* The context of mbs[0]. We store the context independently, since - the context of mbs[0] may be different from raw_mbs[0], which is - the beginning of the input string. */ - unsigned int tip_context; - /* The translation passed as a part of an argument of re_compile_pattern. */ - RE_TRANSLATE_TYPE trans; - /* Copy of re_dfa_t's word_char. */ - re_const_bitset_ptr_t word_char; - /* true if REG_ICASE. */ - unsigned char icase; - unsigned char is_utf8; - unsigned char map_notascii; - unsigned char mbs_allocated; - unsigned char offsets_needed; - unsigned char newline_anchor; - unsigned char word_ops_used; - int mb_cur_max; -}; -typedef struct re_string_t re_string_t; - - -struct re_dfa_t; -typedef struct re_dfa_t re_dfa_t; - -#ifndef _LIBC -# define internal_function -#endif - -#ifndef NOT_IN_libc -static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr, - Idx new_buf_len) - internal_function; -# ifdef RE_ENABLE_I18N -static void build_wcs_buffer (re_string_t *pstr) internal_function; -static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr) - internal_function; -# endif /* RE_ENABLE_I18N */ -static void build_upper_buffer (re_string_t *pstr) internal_function; -static void re_string_translate_buffer (re_string_t *pstr) internal_function; -static unsigned int re_string_context_at (const re_string_t *input, Idx idx, - int eflags) - internal_function __attribute ((pure)); -#endif -#define re_string_peek_byte(pstr, offset) \ - ((pstr)->mbs[(pstr)->cur_idx + offset]) -#define re_string_fetch_byte(pstr) \ - ((pstr)->mbs[(pstr)->cur_idx++]) -#define re_string_first_byte(pstr, idx) \ - ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF) -#define re_string_is_single_byte_char(pstr, idx) \ - ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \ - || (pstr)->wcs[(idx) + 1] != WEOF)) -#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx) -#define re_string_cur_idx(pstr) ((pstr)->cur_idx) -#define re_string_get_buffer(pstr) ((pstr)->mbs) -#define re_string_length(pstr) ((pstr)->len) -#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx]) -#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx)) -#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx)) - -#include - -#ifndef _LIBC -# if HAVE_ALLOCA -/* The OS usually guarantees only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - allocate anything larger than 4096 bytes. Also care for the possibility - of a few compiler-allocated temporary stack slots. */ -# define __libc_use_alloca(n) ((n) < 4032) -# else -/* alloca is implemented with malloc, so just use malloc. */ -# define __libc_use_alloca(n) 0 -# undef alloca -# define alloca(n) malloc (n) -# endif -#endif - -#ifndef MAX -# define MAX(a,b) ((a) < (b) ? (b) : (a)) -#endif -#ifndef MIN -# define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t))) -#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t))) -#define re_free(p) free (p) - -struct bin_tree_t -{ - struct bin_tree_t *parent; - struct bin_tree_t *left; - struct bin_tree_t *right; - struct bin_tree_t *first; - struct bin_tree_t *next; - - re_token_t token; - - /* 'node_idx' is the index in dfa->nodes, if 'type' == 0. - Otherwise 'type' indicate the type of this node. */ - Idx node_idx; -}; -typedef struct bin_tree_t bin_tree_t; - -#define BIN_TREE_STORAGE_SIZE \ - ((1024 - sizeof (void *)) / sizeof (bin_tree_t)) - -struct bin_tree_storage_t -{ - struct bin_tree_storage_t *next; - bin_tree_t data[BIN_TREE_STORAGE_SIZE]; -}; -typedef struct bin_tree_storage_t bin_tree_storage_t; - -#define CONTEXT_WORD 1 -#define CONTEXT_NEWLINE (CONTEXT_WORD << 1) -#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1) -#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1) - -#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD) -#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE) -#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF) -#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF) -#define IS_ORDINARY_CONTEXT(c) ((c) == 0) - -#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_') -#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR) -#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_') -#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR) - -#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \ - ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ - || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ - || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\ - || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context))) - -#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \ - ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \ - || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \ - || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \ - || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context))) - -struct re_dfastate_t -{ - re_hashval_t hash; - re_node_set nodes; - re_node_set non_eps_nodes; - re_node_set inveclosure; - re_node_set *entrance_nodes; - struct re_dfastate_t **trtable, **word_trtable; - unsigned int context : 4; - unsigned int halt : 1; - /* If this state can accept "multi byte". - Note that we refer to multibyte characters, and multi character - collating elements as "multi byte". */ - unsigned int accept_mb : 1; - /* If this state has backreference node(s). */ - unsigned int has_backref : 1; - unsigned int has_constraint : 1; -}; -typedef struct re_dfastate_t re_dfastate_t; - -struct re_state_table_entry -{ - Idx num; - Idx alloc; - re_dfastate_t **array; -}; - -/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */ - -typedef struct -{ - Idx next_idx; - Idx alloc; - re_dfastate_t **array; -} state_array_t; - -/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */ - -typedef struct -{ - Idx node; - Idx str_idx; /* The position NODE match at. */ - state_array_t path; -} re_sub_match_last_t; - -/* Store information about the node NODE whose type is OP_OPEN_SUBEXP. - And information about the node, whose type is OP_CLOSE_SUBEXP, - corresponding to NODE is stored in LASTS. */ - -typedef struct -{ - Idx str_idx; - Idx node; - state_array_t *path; - Idx alasts; /* Allocation size of LASTS. */ - Idx nlasts; /* The number of LASTS. */ - re_sub_match_last_t **lasts; -} re_sub_match_top_t; - -struct re_backref_cache_entry -{ - Idx node; - Idx str_idx; - Idx subexp_from; - Idx subexp_to; - char more; - char unused; - unsigned short int eps_reachable_subexps_map; -}; - -typedef struct -{ - /* The string object corresponding to the input string. */ - re_string_t input; -#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) - const re_dfa_t *const dfa; -#else - const re_dfa_t *dfa; -#endif - /* EFLAGS of the argument of regexec. */ - int eflags; - /* Where the matching ends. */ - Idx match_last; - Idx last_node; - /* The state log used by the matcher. */ - re_dfastate_t **state_log; - Idx state_log_top; - /* Back reference cache. */ - Idx nbkref_ents; - Idx abkref_ents; - struct re_backref_cache_entry *bkref_ents; - int max_mb_elem_len; - Idx nsub_tops; - Idx asub_tops; - re_sub_match_top_t **sub_tops; -} re_match_context_t; - -typedef struct -{ - re_dfastate_t **sifted_states; - re_dfastate_t **limited_states; - Idx last_node; - Idx last_str_idx; - re_node_set limits; -} re_sift_context_t; - -struct re_fail_stack_ent_t -{ - Idx idx; - Idx node; - regmatch_t *regs; - re_node_set eps_via_nodes; -}; - -struct re_fail_stack_t -{ - Idx num; - Idx alloc; - struct re_fail_stack_ent_t *stack; -}; - -struct re_dfa_t -{ - re_token_t *nodes; - size_t nodes_alloc; - size_t nodes_len; - Idx *nexts; - Idx *org_indices; - re_node_set *edests; - re_node_set *eclosures; - re_node_set *inveclosures; - struct re_state_table_entry *state_table; - re_dfastate_t *init_state; - re_dfastate_t *init_state_word; - re_dfastate_t *init_state_nl; - re_dfastate_t *init_state_begbuf; - bin_tree_t *str_tree; - bin_tree_storage_t *str_tree_storage; - re_bitset_ptr_t sb_char; - int str_tree_storage_idx; - - /* number of subexpressions 're_nsub' is in regex_t. */ - re_hashval_t state_hash_mask; - Idx init_node; - Idx nbackref; /* The number of backreference in this dfa. */ - - /* Bitmap expressing which backreference is used. */ - bitset_word_t used_bkref_map; - bitset_word_t completed_bkref_map; - - unsigned int has_plural_match : 1; - /* If this dfa has "multibyte node", which is a backreference or - a node which can accept multibyte character or multi character - collating element. */ - unsigned int has_mb_node : 1; - unsigned int is_utf8 : 1; - unsigned int map_notascii : 1; - unsigned int word_ops_used : 1; - int mb_cur_max; - bitset_t word_char; - reg_syntax_t syntax; - Idx *subexp_map; -#ifdef DEBUG - char* re_str; -#endif - __libc_lock_define (, lock) -}; - -#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set)) -#define re_node_set_remove(set,id) \ - (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1)) -#define re_node_set_empty(p) ((p)->nelem = 0) -#define re_node_set_free(set) re_free ((set)->elems) - - -typedef enum -{ - SB_CHAR, - MB_CHAR, - EQUIV_CLASS, - COLL_SYM, - CHAR_CLASS -} bracket_elem_type; - -typedef struct -{ - bracket_elem_type type; - union - { - unsigned char ch; - unsigned char *name; - wchar_t wch; - } opr; -} bracket_elem_t; - - -/* Inline functions for bitset_t operation. */ - -static inline void -bitset_set (bitset_t set, Idx i) -{ - set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS; -} - -static inline void -bitset_clear (bitset_t set, Idx i) -{ - set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS); -} - -static inline bool -bitset_contain (const bitset_t set, Idx i) -{ - return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1; -} - -static inline void -bitset_empty (bitset_t set) -{ - memset (set, '\0', sizeof (bitset_t)); -} - -static inline void -bitset_set_all (bitset_t set) -{ - memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS)); - if (SBC_MAX % BITSET_WORD_BITS != 0) - set[BITSET_WORDS - 1] = - ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1; -} - -static inline void -bitset_copy (bitset_t dest, const bitset_t src) -{ - memcpy (dest, src, sizeof (bitset_t)); -} - -static inline void -bitset_not (bitset_t set) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i) - set[bitset_i] = ~set[bitset_i]; - if (SBC_MAX % BITSET_WORD_BITS != 0) - set[BITSET_WORDS - 1] = - ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1) - & ~set[BITSET_WORDS - 1]); -} - -static inline void -bitset_merge (bitset_t dest, const bitset_t src) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) - dest[bitset_i] |= src[bitset_i]; -} - -static inline void -bitset_mask (bitset_t dest, const bitset_t src) -{ - int bitset_i; - for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i) - dest[bitset_i] &= src[bitset_i]; -} - -#ifdef RE_ENABLE_I18N -/* Inline functions for re_string. */ -static inline int -internal_function __attribute ((pure)) -re_string_char_size_at (const re_string_t *pstr, Idx idx) -{ - int byte_idx; - if (pstr->mb_cur_max == 1) - return 1; - for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx) - if (pstr->wcs[idx + byte_idx] != WEOF) - break; - return byte_idx; -} - -static inline wint_t -internal_function __attribute ((pure)) -re_string_wchar_at (const re_string_t *pstr, Idx idx) -{ - if (pstr->mb_cur_max == 1) - return (wint_t) pstr->mbs[idx]; - return (wint_t) pstr->wcs[idx]; -} - -# ifndef NOT_IN_libc -static int -internal_function __attribute ((pure)) -re_string_elem_size_at (const re_string_t *pstr, Idx idx) -{ -# ifdef _LIBC - const unsigned char *p, *extra; - const int32_t *table, *indirect; -# include - uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - - if (nrules != 0) - { - table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE, - _NL_COLLATE_INDIRECTMB); - p = pstr->mbs + idx; - findidx (&p, pstr->len - idx); - return p - pstr->mbs - idx; - } - else -# endif /* _LIBC */ - return 1; -} -# endif -#endif /* RE_ENABLE_I18N */ - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -#if __GNUC_PREREQ (3,4) -# undef __attribute_warn_unused_result__ -# define __attribute_warn_unused_result__ \ - __attribute__ ((__warn_unused_result__)) -#else -# define __attribute_warn_unused_result__ /* empty */ -#endif - -#endif /* _REGEX_INTERNAL_H */ diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c deleted file mode 100644 index 0b095a7..0000000 --- a/gnulib/lib/regexec.c +++ /dev/null @@ -1,4419 +0,0 @@ -/* Extended regular expression matching and search library. - Copyright (C) 2002-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Contributed by Isamu Hasegawa . - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 . */ - -static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags, - Idx n) internal_function; -static void match_ctx_clean (re_match_context_t *mctx) internal_function; -static void match_ctx_free (re_match_context_t *cache) internal_function; -static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node, - Idx str_idx, Idx from, Idx to) - internal_function; -static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) - internal_function; -static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node, - Idx str_idx) internal_function; -static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop, - Idx node, Idx str_idx) - internal_function; -static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, - re_dfastate_t **limited_sts, Idx last_node, - Idx last_str_idx) - internal_function; -static reg_errcode_t re_search_internal (const regex_t *preg, - const char *string, Idx length, - Idx start, Idx last_start, Idx stop, - size_t nmatch, regmatch_t pmatch[], - int eflags) internal_function; -static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, regoff_t range, - struct re_registers *regs, - Idx stop, bool ret_len) internal_function; -static regoff_t re_search_stub (struct re_pattern_buffer *bufp, - const char *string, Idx length, Idx start, - regoff_t range, Idx stop, - struct re_registers *regs, - bool ret_len) internal_function; -static unsigned re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, - Idx nregs, int regs_allocated) internal_function; -static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx) - internal_function; -static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) internal_function; -static Idx check_halt_state_context (const re_match_context_t *mctx, - const re_dfastate_t *state, Idx idx) - internal_function; -static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, - regmatch_t *prev_idx_match, Idx cur_node, - Idx cur_idx, Idx nmatch) internal_function; -static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs, - Idx str_idx, Idx dest_node, Idx nregs, - regmatch_t *regs, - re_node_set *eps_via_nodes) - internal_function; -static reg_errcode_t set_regs (const regex_t *preg, - const re_match_context_t *mctx, - size_t nmatch, regmatch_t *pmatch, - bool fl_backtrack) internal_function; -static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs) - internal_function; - -#ifdef RE_ENABLE_I18N -static int sift_states_iter_mb (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) - internal_function; -#endif /* RE_ENABLE_I18N */ -static reg_errcode_t sift_states_backward (const re_match_context_t *mctx, - re_sift_context_t *sctx) - internal_function; -static reg_errcode_t build_sifted_states (const re_match_context_t *mctx, - re_sift_context_t *sctx, Idx str_idx, - re_node_set *cur_dest) - internal_function; -static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx str_idx, - re_node_set *dest_nodes) - internal_function; -static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa, - re_node_set *dest_nodes, - const re_node_set *candidates) - internal_function; -static bool check_dst_limits (const re_match_context_t *mctx, - const re_node_set *limits, - Idx dst_node, Idx dst_idx, Idx src_node, - Idx src_idx) internal_function; -static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, - int boundaries, Idx subexp_idx, - Idx from_node, Idx bkref_idx) - internal_function; -static int check_dst_limits_calc_pos (const re_match_context_t *mctx, - Idx limit, Idx subexp_idx, - Idx node, Idx str_idx, - Idx bkref_idx) internal_function; -static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa, - re_node_set *dest_nodes, - const re_node_set *candidates, - re_node_set *limits, - struct re_backref_cache_entry *bkref_ents, - Idx str_idx) internal_function; -static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx, - re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) - internal_function; -static reg_errcode_t merge_state_array (const re_dfa_t *dfa, - re_dfastate_t **dst, - re_dfastate_t **src, Idx num) - internal_function; -static re_dfastate_t *find_recover_state (reg_errcode_t *err, - re_match_context_t *mctx) internal_function; -static re_dfastate_t *transit_state (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *state) internal_function; -static re_dfastate_t *merge_state_with_log (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *next_state) - internal_function; -static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx, - re_node_set *cur_nodes, - Idx str_idx) internal_function; -#if 0 -static re_dfastate_t *transit_state_sb (reg_errcode_t *err, - re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; -#endif -#ifdef RE_ENABLE_I18N -static reg_errcode_t transit_state_mb (re_match_context_t *mctx, - re_dfastate_t *pstate) - internal_function; -#endif /* RE_ENABLE_I18N */ -static reg_errcode_t transit_state_bkref (re_match_context_t *mctx, - const re_node_set *nodes) - internal_function; -static reg_errcode_t get_subexp (re_match_context_t *mctx, - Idx bkref_node, Idx bkref_str_idx) - internal_function; -static reg_errcode_t get_subexp_sub (re_match_context_t *mctx, - const re_sub_match_top_t *sub_top, - re_sub_match_last_t *sub_last, - Idx bkref_node, Idx bkref_str) - internal_function; -static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, - Idx subexp_idx, int type) internal_function; -static reg_errcode_t check_arrival (re_match_context_t *mctx, - state_array_t *path, Idx top_node, - Idx top_str, Idx last_node, Idx last_str, - int type) internal_function; -static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx, - Idx str_idx, - re_node_set *cur_nodes, - re_node_set *next_nodes) - internal_function; -static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa, - re_node_set *cur_nodes, - Idx ex_subexp, int type) - internal_function; -static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa, - re_node_set *dst_nodes, - Idx target, Idx ex_subexp, - int type) internal_function; -static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx, - re_node_set *cur_nodes, Idx cur_str, - Idx subexp_num, int type) - internal_function; -static bool build_trtable (const re_dfa_t *dfa, - re_dfastate_t *state) internal_function; -#ifdef RE_ENABLE_I18N -static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx idx) - internal_function; -# ifdef _LIBC -static unsigned int find_collation_sequence_value (const unsigned char *mbs, - size_t name_len) - internal_function; -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ -static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa, - const re_dfastate_t *state, - re_node_set *states_node, - bitset_t *states_ch) internal_function; -static bool check_node_accept (const re_match_context_t *mctx, - const re_token_t *node, Idx idx) - internal_function; -static reg_errcode_t extend_buffers (re_match_context_t *mctx) - internal_function; - -/* Entry point for POSIX code. */ - -/* regexec searches for a given pattern, specified by PREG, in the - string STRING. - - If NMATCH is zero or REG_NOSUB was set in the cflags argument to - 'regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at - least NMATCH elements, and we set them to the offsets of the - corresponding matched substrings. - - EFLAGS specifies "execution flags" which affect matching: if - REG_NOTBOL is set, then ^ does not match at the beginning of the - string; if REG_NOTEOL is set, then $ does not match at the end. - - We return 0 if we find a match and REG_NOMATCH if not. */ - -int -regexec (preg, string, nmatch, pmatch, eflags) - const regex_t *_Restrict_ preg; - const char *_Restrict_ string; - size_t nmatch; - regmatch_t pmatch[_Restrict_arr_]; - int eflags; -{ - reg_errcode_t err; - Idx start, length; -#ifdef _LIBC - re_dfa_t *dfa = preg->buffer; -#endif - - if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND)) - return REG_BADPAT; - - if (eflags & REG_STARTEND) - { - start = pmatch[0].rm_so; - length = pmatch[0].rm_eo; - } - else - { - start = 0; - length = strlen (string); - } - - __libc_lock_lock (dfa->lock); - if (preg->no_sub) - err = re_search_internal (preg, string, length, start, length, - length, 0, NULL, eflags); - else - err = re_search_internal (preg, string, length, start, length, - length, nmatch, pmatch, eflags); - __libc_lock_unlock (dfa->lock); - return err != REG_NOERROR; -} - -#ifdef _LIBC -# include -versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4); - -# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4) -__typeof__ (__regexec) __compat_regexec; - -int -attribute_compat_text_section -__compat_regexec (const regex_t *_Restrict_ preg, - const char *_Restrict_ string, size_t nmatch, - regmatch_t pmatch[], int eflags) -{ - return regexec (preg, string, nmatch, pmatch, - eflags & (REG_NOTBOL | REG_NOTEOL)); -} -compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0); -# endif -#endif - -/* Entry points for GNU code. */ - -/* re_match, re_search, re_match_2, re_search_2 - - The former two functions operate on STRING with length LENGTH, - while the later two operate on concatenation of STRING1 and STRING2 - with lengths LENGTH1 and LENGTH2, respectively. - - re_match() matches the compiled pattern in BUFP against the string, - starting at index START. - - re_search() first tries matching at index START, then it tries to match - starting from index START + 1, and so on. The last start position tried - is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same - way as re_match().) - - The parameter STOP of re_{match,search}_2 specifies that no match exceeding - the first STOP characters of the concatenation of the strings should be - concerned. - - If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match - and all groups is stored in REGS. (For the "_2" variants, the offsets are - computed relative to the concatenation, not relative to the individual - strings.) - - On success, re_match* functions return the length of the match, re_search* - return the position of the start of the match. Return value -1 means no - match was found and -2 indicates an internal error. */ - -regoff_t -re_match (bufp, string, length, start, regs) - struct re_pattern_buffer *bufp; - const char *string; - Idx length, start; - struct re_registers *regs; -{ - return re_search_stub (bufp, string, length, start, 0, length, regs, true); -} -#ifdef _LIBC -weak_alias (__re_match, re_match) -#endif - -regoff_t -re_search (bufp, string, length, start, range, regs) - struct re_pattern_buffer *bufp; - const char *string; - Idx length, start; - regoff_t range; - struct re_registers *regs; -{ - return re_search_stub (bufp, string, length, start, range, length, regs, - false); -} -#ifdef _LIBC -weak_alias (__re_search, re_search) -#endif - -regoff_t -re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - Idx length1, length2, start, stop; - struct re_registers *regs; -{ - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, 0, regs, stop, true); -} -#ifdef _LIBC -weak_alias (__re_match_2, re_match_2) -#endif - -regoff_t -re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop) - struct re_pattern_buffer *bufp; - const char *string1, *string2; - Idx length1, length2, start, stop; - regoff_t range; - struct re_registers *regs; -{ - return re_search_2_stub (bufp, string1, length1, string2, length2, - start, range, regs, stop, false); -} -#ifdef _LIBC -weak_alias (__re_search_2, re_search_2) -#endif - -static regoff_t -re_search_2_stub (struct re_pattern_buffer *bufp, - const char *string1, Idx length1, - const char *string2, Idx length2, - Idx start, regoff_t range, struct re_registers *regs, - Idx stop, bool ret_len) -{ - const char *str; - regoff_t rval; - Idx len = length1 + length2; - char *s = NULL; - - if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0)) - return -2; - - /* Concatenate the strings. */ - if (length2 > 0) - if (length1 > 0) - { - s = re_malloc (char, len); - - if (BE (s == NULL, 0)) - return -2; -#ifdef _LIBC - memcpy (__mempcpy (s, string1, length1), string2, length2); -#else - memcpy (s, string1, length1); - memcpy (s + length1, string2, length2); -#endif - str = s; - } - else - str = string2; - else - str = string1; - - rval = re_search_stub (bufp, str, len, start, range, stop, regs, - ret_len); - re_free (s); - return rval; -} - -/* The parameters have the same meaning as those of re_search. - Additional parameters: - If RET_LEN is true the length of the match is returned (re_match style); - otherwise the position of the match is returned. */ - -static regoff_t -re_search_stub (struct re_pattern_buffer *bufp, - const char *string, Idx length, - Idx start, regoff_t range, Idx stop, struct re_registers *regs, - bool ret_len) -{ - reg_errcode_t result; - regmatch_t *pmatch; - Idx nregs; - regoff_t rval; - int eflags = 0; -#ifdef _LIBC - re_dfa_t *dfa = bufp->buffer; -#endif - Idx last_start = start + range; - - /* Check for out-of-range. */ - if (BE (start < 0 || start > length, 0)) - return -1; - if (BE (length < last_start || (0 <= range && last_start < start), 0)) - last_start = length; - else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0)) - last_start = 0; - - __libc_lock_lock (dfa->lock); - - eflags |= (bufp->not_bol) ? REG_NOTBOL : 0; - eflags |= (bufp->not_eol) ? REG_NOTEOL : 0; - - /* Compile fastmap if we haven't yet. */ - if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate) - re_compile_fastmap (bufp); - - if (BE (bufp->no_sub, 0)) - regs = NULL; - - /* We need at least 1 register. */ - if (regs == NULL) - nregs = 1; - else if (BE (bufp->regs_allocated == REGS_FIXED - && regs->num_regs <= bufp->re_nsub, 0)) - { - nregs = regs->num_regs; - if (BE (nregs < 1, 0)) - { - /* Nothing can be copied to regs. */ - regs = NULL; - nregs = 1; - } - } - else - nregs = bufp->re_nsub + 1; - pmatch = re_malloc (regmatch_t, nregs); - if (BE (pmatch == NULL, 0)) - { - rval = -2; - goto out; - } - - result = re_search_internal (bufp, string, length, start, last_start, stop, - nregs, pmatch, eflags); - - rval = 0; - - /* I hope we needn't fill their regs with -1's when no match was found. */ - if (result != REG_NOERROR) - rval = result == REG_NOMATCH ? -1 : -2; - else if (regs != NULL) - { - /* If caller wants register contents data back, copy them. */ - bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs, - bufp->regs_allocated); - if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0)) - rval = -2; - } - - if (BE (rval == 0, 1)) - { - if (ret_len) - { - assert (pmatch[0].rm_so == start); - rval = pmatch[0].rm_eo - start; - } - else - rval = pmatch[0].rm_so; - } - re_free (pmatch); - out: - __libc_lock_unlock (dfa->lock); - return rval; -} - -static unsigned -re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs, - int regs_allocated) -{ - int rval = REGS_REALLOCATE; - Idx i; - Idx need_regs = nregs + 1; - /* We need one extra element beyond 'num_regs' for the '-1' marker GNU code - uses. */ - - /* Have the register data arrays been allocated? */ - if (regs_allocated == REGS_UNALLOCATED) - { /* No. So allocate them with malloc. */ - regs->start = re_malloc (regoff_t, need_regs); - if (BE (regs->start == NULL, 0)) - return REGS_UNALLOCATED; - regs->end = re_malloc (regoff_t, need_regs); - if (BE (regs->end == NULL, 0)) - { - re_free (regs->start); - return REGS_UNALLOCATED; - } - regs->num_regs = need_regs; - } - else if (regs_allocated == REGS_REALLOCATE) - { /* Yes. If we need more elements than were already - allocated, reallocate them. If we need fewer, just - leave it alone. */ - if (BE (need_regs > regs->num_regs, 0)) - { - regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs); - regoff_t *new_end; - if (BE (new_start == NULL, 0)) - return REGS_UNALLOCATED; - new_end = re_realloc (regs->end, regoff_t, need_regs); - if (BE (new_end == NULL, 0)) - { - re_free (new_start); - return REGS_UNALLOCATED; - } - regs->start = new_start; - regs->end = new_end; - regs->num_regs = need_regs; - } - } - else - { - assert (regs_allocated == REGS_FIXED); - /* This function may not be called with REGS_FIXED and nregs too big. */ - assert (regs->num_regs >= nregs); - rval = REGS_FIXED; - } - - /* Copy the regs. */ - for (i = 0; i < nregs; ++i) - { - regs->start[i] = pmatch[i].rm_so; - regs->end[i] = pmatch[i].rm_eo; - } - for ( ; i < regs->num_regs; ++i) - regs->start[i] = regs->end[i] = -1; - - return rval; -} - -/* Set REGS to hold NUM_REGS registers, storing them in STARTS and - ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use - this memory for recording register information. STARTS and ENDS - must be allocated using the malloc library routine, and must each - be at least NUM_REGS * sizeof (regoff_t) bytes long. - - If NUM_REGS == 0, then subsequent matches should allocate their own - register data. - - Unless this function is called, the first search or match using - PATTERN_BUFFER will allocate its own register data, without - freeing the old data. */ - -void -re_set_registers (bufp, regs, num_regs, starts, ends) - struct re_pattern_buffer *bufp; - struct re_registers *regs; - __re_size_t num_regs; - regoff_t *starts, *ends; -{ - if (num_regs) - { - bufp->regs_allocated = REGS_REALLOCATE; - regs->num_regs = num_regs; - regs->start = starts; - regs->end = ends; - } - else - { - bufp->regs_allocated = REGS_UNALLOCATED; - regs->num_regs = 0; - regs->start = regs->end = NULL; - } -} -#ifdef _LIBC -weak_alias (__re_set_registers, re_set_registers) -#endif - -/* Entry points compatible with 4.2 BSD regex library. We don't define - them unless specifically requested. */ - -#if defined _REGEX_RE_COMP || defined _LIBC -int -# ifdef _LIBC -weak_function -# endif -re_exec (s) - const char *s; -{ - return 0 == regexec (&re_comp_buf, s, 0, NULL, 0); -} -#endif /* _REGEX_RE_COMP */ - -/* Internal entry point. */ - -/* Searches for a compiled pattern PREG in the string STRING, whose - length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same - meaning as with regexec. LAST_START is START + RANGE, where - START and RANGE have the same meaning as with re_search. - Return REG_NOERROR if we find a match, and REG_NOMATCH if not, - otherwise return the error code. - Note: We assume front end functions already check ranges. - (0 <= LAST_START && LAST_START <= LENGTH) */ - -static reg_errcode_t -__attribute_warn_unused_result__ -re_search_internal (const regex_t *preg, - const char *string, Idx length, - Idx start, Idx last_start, Idx stop, - size_t nmatch, regmatch_t pmatch[], - int eflags) -{ - reg_errcode_t err; - const re_dfa_t *dfa = preg->buffer; - Idx left_lim, right_lim; - int incr; - bool fl_longest_match; - int match_kind; - Idx match_first; - Idx match_last = REG_MISSING; - Idx extra_nmatch; - bool sb; - int ch; -#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) - re_match_context_t mctx = { .dfa = dfa }; -#else - re_match_context_t mctx; -#endif - char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate - && start != last_start && !preg->can_be_null) - ? preg->fastmap : NULL); - RE_TRANSLATE_TYPE t = preg->translate; - -#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)) - memset (&mctx, '\0', sizeof (re_match_context_t)); - mctx.dfa = dfa; -#endif - - extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0; - nmatch -= extra_nmatch; - - /* Check if the DFA haven't been compiled. */ - if (BE (preg->used == 0 || dfa->init_state == NULL - || dfa->init_state_word == NULL || dfa->init_state_nl == NULL - || dfa->init_state_begbuf == NULL, 0)) - return REG_NOMATCH; - -#ifdef DEBUG - /* We assume front-end functions already check them. */ - assert (0 <= last_start && last_start <= length); -#endif - - /* If initial states with non-begbuf contexts have no elements, - the regex must be anchored. If preg->newline_anchor is set, - we'll never use init_state_nl, so do not check it. */ - if (dfa->init_state->nodes.nelem == 0 - && dfa->init_state_word->nodes.nelem == 0 - && (dfa->init_state_nl->nodes.nelem == 0 - || !preg->newline_anchor)) - { - if (start != 0 && last_start != 0) - return REG_NOMATCH; - start = last_start = 0; - } - - /* We must check the longest matching, if nmatch > 0. */ - fl_longest_match = (nmatch != 0 || dfa->nbackref); - - err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1, - preg->translate, (preg->syntax & RE_ICASE) != 0, - dfa); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - mctx.input.stop = stop; - mctx.input.raw_stop = stop; - mctx.input.newline_anchor = preg->newline_anchor; - - err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* We will log all the DFA states through which the dfa pass, - if nmatch > 1, or this dfa has "multibyte node", which is a - back-reference or a node which can accept multibyte character or - multi character collating element. */ - if (nmatch > 1 || dfa->has_mb_node) - { - /* Avoid overflow. */ - if (BE ((MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) - <= mctx.input.bufs_len), 0)) - { - err = REG_ESPACE; - goto free_return; - } - - mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1); - if (BE (mctx.state_log == NULL, 0)) - { - err = REG_ESPACE; - goto free_return; - } - } - else - mctx.state_log = NULL; - - match_first = start; - mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF - : CONTEXT_NEWLINE | CONTEXT_BEGBUF; - - /* Check incrementally whether of not the input string match. */ - incr = (last_start < start) ? -1 : 1; - left_lim = (last_start < start) ? last_start : start; - right_lim = (last_start < start) ? start : last_start; - sb = dfa->mb_cur_max == 1; - match_kind = - (fastmap - ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0) - | (start <= last_start ? 2 : 0) - | (t != NULL ? 1 : 0)) - : 8); - - for (;; match_first += incr) - { - err = REG_NOMATCH; - if (match_first < left_lim || right_lim < match_first) - goto free_return; - - /* Advance as rapidly as possible through the string, until we - find a plausible place to start matching. This may be done - with varying efficiency, so there are various possibilities: - only the most common of them are specialized, in order to - save on code size. We use a switch statement for speed. */ - switch (match_kind) - { - case 8: - /* No fastmap. */ - break; - - case 7: - /* Fastmap with single-byte translation, match forward. */ - while (BE (match_first < right_lim, 1) - && !fastmap[t[(unsigned char) string[match_first]]]) - ++match_first; - goto forward_match_found_start_or_reached_end; - - case 6: - /* Fastmap without translation, match forward. */ - while (BE (match_first < right_lim, 1) - && !fastmap[(unsigned char) string[match_first]]) - ++match_first; - - forward_match_found_start_or_reached_end: - if (BE (match_first == right_lim, 0)) - { - ch = match_first >= length - ? 0 : (unsigned char) string[match_first]; - if (!fastmap[t ? t[ch] : ch]) - goto free_return; - } - break; - - case 4: - case 5: - /* Fastmap without multi-byte translation, match backwards. */ - while (match_first >= left_lim) - { - ch = match_first >= length - ? 0 : (unsigned char) string[match_first]; - if (fastmap[t ? t[ch] : ch]) - break; - --match_first; - } - if (match_first < left_lim) - goto free_return; - break; - - default: - /* In this case, we can't determine easily the current byte, - since it might be a component byte of a multibyte - character. Then we use the constructed buffer instead. */ - for (;;) - { - /* If MATCH_FIRST is out of the valid range, reconstruct the - buffers. */ - __re_size_t offset = match_first - mctx.input.raw_mbs_idx; - if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0)) - { - err = re_string_reconstruct (&mctx.input, match_first, - eflags); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - offset = match_first - mctx.input.raw_mbs_idx; - } - /* If MATCH_FIRST is out of the buffer, leave it as '\0'. - Note that MATCH_FIRST must not be smaller than 0. */ - ch = (match_first >= length - ? 0 : re_string_byte_at (&mctx.input, offset)); - if (fastmap[ch]) - break; - match_first += incr; - if (match_first < left_lim || match_first > right_lim) - { - err = REG_NOMATCH; - goto free_return; - } - } - break; - } - - /* Reconstruct the buffers so that the matcher can assume that - the matching starts from the beginning of the buffer. */ - err = re_string_reconstruct (&mctx.input, match_first, eflags); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - -#ifdef RE_ENABLE_I18N - /* Don't consider this char as a possible match start if it part, - yet isn't the head, of a multibyte character. */ - if (!sb && !re_string_first_byte (&mctx.input, 0)) - continue; -#endif - - /* It seems to be appropriate one, then use the matcher. */ - /* We assume that the matching starts from 0. */ - mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0; - match_last = check_matching (&mctx, fl_longest_match, - start <= last_start ? &match_first : NULL); - if (match_last != REG_MISSING) - { - if (BE (match_last == REG_ERROR, 0)) - { - err = REG_ESPACE; - goto free_return; - } - else - { - mctx.match_last = match_last; - if ((!preg->no_sub && nmatch > 1) || dfa->nbackref) - { - re_dfastate_t *pstate = mctx.state_log[match_last]; - mctx.last_node = check_halt_state_context (&mctx, pstate, - match_last); - } - if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match) - || dfa->nbackref) - { - err = prune_impossible_nodes (&mctx); - if (err == REG_NOERROR) - break; - if (BE (err != REG_NOMATCH, 0)) - goto free_return; - match_last = REG_MISSING; - } - else - break; /* We found a match. */ - } - } - - match_ctx_clean (&mctx); - } - -#ifdef DEBUG - assert (match_last != REG_MISSING); - assert (err == REG_NOERROR); -#endif - - /* Set pmatch[] if we need. */ - if (nmatch > 0) - { - Idx reg_idx; - - /* Initialize registers. */ - for (reg_idx = 1; reg_idx < nmatch; ++reg_idx) - pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1; - - /* Set the points where matching start/end. */ - pmatch[0].rm_so = 0; - pmatch[0].rm_eo = mctx.match_last; - /* FIXME: This function should fail if mctx.match_last exceeds - the maximum possible regoff_t value. We need a new error - code REG_OVERFLOW. */ - - if (!preg->no_sub && nmatch > 1) - { - err = set_regs (preg, &mctx, nmatch, pmatch, - dfa->has_plural_match && dfa->nbackref > 0); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - - /* At last, add the offset to each register, since we slid - the buffers so that we could assume that the matching starts - from 0. */ - for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) - if (pmatch[reg_idx].rm_so != -1) - { -#ifdef RE_ENABLE_I18N - if (BE (mctx.input.offsets_needed != 0, 0)) - { - pmatch[reg_idx].rm_so = - (pmatch[reg_idx].rm_so == mctx.input.valid_len - ? mctx.input.valid_raw_len - : mctx.input.offsets[pmatch[reg_idx].rm_so]); - pmatch[reg_idx].rm_eo = - (pmatch[reg_idx].rm_eo == mctx.input.valid_len - ? mctx.input.valid_raw_len - : mctx.input.offsets[pmatch[reg_idx].rm_eo]); - } -#else - assert (mctx.input.offsets_needed == 0); -#endif - pmatch[reg_idx].rm_so += match_first; - pmatch[reg_idx].rm_eo += match_first; - } - for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx) - { - pmatch[nmatch + reg_idx].rm_so = -1; - pmatch[nmatch + reg_idx].rm_eo = -1; - } - - if (dfa->subexp_map) - for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++) - if (dfa->subexp_map[reg_idx] != reg_idx) - { - pmatch[reg_idx + 1].rm_so - = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so; - pmatch[reg_idx + 1].rm_eo - = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo; - } - } - - free_return: - re_free (mctx.state_log); - if (dfa->nbackref) - match_ctx_free (&mctx); - re_string_destruct (&mctx.input); - return err; -} - -static reg_errcode_t -__attribute_warn_unused_result__ -prune_impossible_nodes (re_match_context_t *mctx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx halt_node, match_last; - reg_errcode_t ret; - re_dfastate_t **sifted_states; - re_dfastate_t **lim_states = NULL; - re_sift_context_t sctx; -#ifdef DEBUG - assert (mctx->state_log != NULL); -#endif - match_last = mctx->match_last; - halt_node = mctx->last_node; - - /* Avoid overflow. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) <= match_last, 0)) - return REG_ESPACE; - - sifted_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (sifted_states == NULL, 0)) - { - ret = REG_ESPACE; - goto free_return; - } - if (dfa->nbackref) - { - lim_states = re_malloc (re_dfastate_t *, match_last + 1); - if (BE (lim_states == NULL, 0)) - { - ret = REG_ESPACE; - goto free_return; - } - while (1) - { - memset (lim_states, '\0', - sizeof (re_dfastate_t *) * (match_last + 1)); - sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, - match_last); - ret = sift_states_backward (mctx, &sctx); - re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - if (sifted_states[0] != NULL || lim_states[0] != NULL) - break; - do - { - --match_last; - if (! REG_VALID_INDEX (match_last)) - { - ret = REG_NOMATCH; - goto free_return; - } - } while (mctx->state_log[match_last] == NULL - || !mctx->state_log[match_last]->halt); - halt_node = check_halt_state_context (mctx, - mctx->state_log[match_last], - match_last); - } - ret = merge_state_array (dfa, sifted_states, lim_states, - match_last + 1); - re_free (lim_states); - lim_states = NULL; - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - } - else - { - sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last); - ret = sift_states_backward (mctx, &sctx); - re_node_set_free (&sctx.limits); - if (BE (ret != REG_NOERROR, 0)) - goto free_return; - if (sifted_states[0] == NULL) - { - ret = REG_NOMATCH; - goto free_return; - } - } - re_free (mctx->state_log); - mctx->state_log = sifted_states; - sifted_states = NULL; - mctx->last_node = halt_node; - mctx->match_last = match_last; - ret = REG_NOERROR; - free_return: - re_free (sifted_states); - re_free (lim_states); - return ret; -} - -/* Acquire an initial state and return it. - We must select appropriate initial state depending on the context, - since initial states may have constraints like "\<", "^", etc.. */ - -static inline re_dfastate_t * -__attribute ((always_inline)) internal_function -acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx, - Idx idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - if (dfa->init_state->has_constraint) - { - unsigned int context; - context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags); - if (IS_WORD_CONTEXT (context)) - return dfa->init_state_word; - else if (IS_ORDINARY_CONTEXT (context)) - return dfa->init_state; - else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context)) - return dfa->init_state_begbuf; - else if (IS_NEWLINE_CONTEXT (context)) - return dfa->init_state_nl; - else if (IS_BEGBUF_CONTEXT (context)) - { - /* It is relatively rare case, then calculate on demand. */ - return re_acquire_state_context (err, dfa, - dfa->init_state->entrance_nodes, - context); - } - else - /* Must not happen? */ - return dfa->init_state; - } - else - return dfa->init_state; -} - -/* Check whether the regular expression match input string INPUT or not, - and return the index where the matching end. Return REG_MISSING if - there is no match, and return REG_ERROR in case of an error. - FL_LONGEST_MATCH means we want the POSIX longest matching. - If P_MATCH_FIRST is not NULL, and the match fails, it is set to the - next place where we may want to try matching. - Note that the matcher assumes that the matching starts from the current - index of the buffer. */ - -static Idx -internal_function __attribute_warn_unused_result__ -check_matching (re_match_context_t *mctx, bool fl_longest_match, - Idx *p_match_first) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx match = 0; - Idx match_last = REG_MISSING; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - re_dfastate_t *cur_state; - bool at_init_state = p_match_first != NULL; - Idx next_start_idx = cur_str_idx; - - err = REG_NOERROR; - cur_state = acquire_init_state_context (&err, mctx, cur_str_idx); - /* An initial state must not be NULL (invalid). */ - if (BE (cur_state == NULL, 0)) - { - assert (err == REG_ESPACE); - return REG_ERROR; - } - - if (mctx->state_log != NULL) - { - mctx->state_log[cur_str_idx] = cur_state; - - /* Check OP_OPEN_SUBEXP in the initial state in case that we use them - later. E.g. Processing back references. */ - if (BE (dfa->nbackref, 0)) - { - at_init_state = false; - err = check_subexp_matching_top (mctx, &cur_state->nodes, 0); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (cur_state->has_backref) - { - err = transit_state_bkref (mctx, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - } - - /* If the RE accepts NULL string. */ - if (BE (cur_state->halt, 0)) - { - if (!cur_state->has_constraint - || check_halt_state_context (mctx, cur_state, cur_str_idx)) - { - if (!fl_longest_match) - return cur_str_idx; - else - { - match_last = cur_str_idx; - match = 1; - } - } - } - - while (!re_string_eoi (&mctx->input)) - { - re_dfastate_t *old_state = cur_state; - Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1; - - if ((BE (next_char_idx >= mctx->input.bufs_len, 0) - && mctx->input.bufs_len < mctx->input.len) - || (BE (next_char_idx >= mctx->input.valid_len, 0) - && mctx->input.valid_len < mctx->input.len)) - { - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - { - assert (err == REG_ESPACE); - return REG_ERROR; - } - } - - cur_state = transit_state (&err, mctx, cur_state); - if (mctx->state_log != NULL) - cur_state = merge_state_with_log (&err, mctx, cur_state); - - if (cur_state == NULL) - { - /* Reached the invalid state or an error. Try to recover a valid - state using the state log, if available and if we have not - already found a valid (even if not the longest) match. */ - if (BE (err != REG_NOERROR, 0)) - return REG_ERROR; - - if (mctx->state_log == NULL - || (match && !fl_longest_match) - || (cur_state = find_recover_state (&err, mctx)) == NULL) - break; - } - - if (BE (at_init_state, 0)) - { - if (old_state == cur_state) - next_start_idx = next_char_idx; - else - at_init_state = false; - } - - if (cur_state->halt) - { - /* Reached a halt state. - Check the halt state can satisfy the current context. */ - if (!cur_state->has_constraint - || check_halt_state_context (mctx, cur_state, - re_string_cur_idx (&mctx->input))) - { - /* We found an appropriate halt state. */ - match_last = re_string_cur_idx (&mctx->input); - match = 1; - - /* We found a match, do not modify match_first below. */ - p_match_first = NULL; - if (!fl_longest_match) - break; - } - } - } - - if (p_match_first) - *p_match_first += next_start_idx; - - return match_last; -} - -/* Check NODE match the current context. */ - -static bool -internal_function -check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context) -{ - re_token_type_t type = dfa->nodes[node].type; - unsigned int constraint = dfa->nodes[node].constraint; - if (type != END_OF_RE) - return false; - if (!constraint) - return true; - if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context)) - return false; - return true; -} - -/* Check the halt state STATE match the current context. - Return 0 if not match, if the node, STATE has, is a halt node and - match the context, return the node. */ - -static Idx -internal_function -check_halt_state_context (const re_match_context_t *mctx, - const re_dfastate_t *state, Idx idx) -{ - Idx i; - unsigned int context; -#ifdef DEBUG - assert (state->halt); -#endif - context = re_string_context_at (&mctx->input, idx, mctx->eflags); - for (i = 0; i < state->nodes.nelem; ++i) - if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context)) - return state->nodes.elems[i]; - return 0; -} - -/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA - corresponding to the DFA). - Return the destination node, and update EPS_VIA_NODES; - return REG_MISSING in case of errors. */ - -static Idx -internal_function -proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs, - Idx *pidx, Idx node, re_node_set *eps_via_nodes, - struct re_fail_stack_t *fs) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx i; - bool ok; - if (IS_EPSILON_NODE (dfa->nodes[node].type)) - { - re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes; - re_node_set *edests = &dfa->edests[node]; - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) - return REG_ERROR; - /* Pick up a valid destination, or return REG_MISSING if none - is found. */ - for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i) - { - Idx candidate = edests->elems[i]; - if (!re_node_set_contains (cur_nodes, candidate)) - continue; - if (dest_node == REG_MISSING) - dest_node = candidate; - - else - { - /* In order to avoid infinite loop like "(a*)*", return the second - epsilon-transition if the first was already considered. */ - if (re_node_set_contains (eps_via_nodes, dest_node)) - return candidate; - - /* Otherwise, push the second epsilon-transition on the fail stack. */ - else if (fs != NULL - && push_fail_stack (fs, *pidx, candidate, nregs, regs, - eps_via_nodes)) - return REG_ERROR; - - /* We know we are going to exit. */ - break; - } - } - return dest_node; - } - else - { - Idx naccepted = 0; - re_token_type_t type = dfa->nodes[node].type; - -#ifdef RE_ENABLE_I18N - if (dfa->nodes[node].accept_mb) - naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx); - else -#endif /* RE_ENABLE_I18N */ - if (type == OP_BACK_REF) - { - Idx subexp_idx = dfa->nodes[node].opr.idx + 1; - naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so; - if (fs != NULL) - { - if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1) - return REG_MISSING; - else if (naccepted) - { - char *buf = (char *) re_string_get_buffer (&mctx->input); - if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx, - naccepted) != 0) - return REG_MISSING; - } - } - - if (naccepted == 0) - { - Idx dest_node; - ok = re_node_set_insert (eps_via_nodes, node); - if (BE (! ok, 0)) - return REG_ERROR; - dest_node = dfa->edests[node].elems[0]; - if (re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node)) - return dest_node; - } - } - - if (naccepted != 0 - || check_node_accept (mctx, dfa->nodes + node, *pidx)) - { - Idx dest_node = dfa->nexts[node]; - *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted; - if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL - || !re_node_set_contains (&mctx->state_log[*pidx]->nodes, - dest_node))) - return REG_MISSING; - re_node_set_empty (eps_via_nodes); - return dest_node; - } - } - return REG_MISSING; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node, - Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes) -{ - reg_errcode_t err; - Idx num = fs->num++; - if (fs->num == fs->alloc) - { - struct re_fail_stack_ent_t *new_array; - new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t) - * fs->alloc * 2)); - if (new_array == NULL) - return REG_ESPACE; - fs->alloc *= 2; - fs->stack = new_array; - } - fs->stack[num].idx = str_idx; - fs->stack[num].node = dest_node; - fs->stack[num].regs = re_malloc (regmatch_t, nregs); - if (fs->stack[num].regs == NULL) - return REG_ESPACE; - memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs); - err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes); - return err; -} - -static Idx -internal_function -pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs, - regmatch_t *regs, re_node_set *eps_via_nodes) -{ - Idx num = --fs->num; - assert (REG_VALID_INDEX (num)); - *pidx = fs->stack[num].idx; - memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs); - re_node_set_free (eps_via_nodes); - re_free (fs->stack[num].regs); - *eps_via_nodes = fs->stack[num].eps_via_nodes; - return fs->stack[num].node; -} - -/* Set the positions where the subexpressions are starts/ends to registers - PMATCH. - Note: We assume that pmatch[0] is already set, and - pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch, - regmatch_t *pmatch, bool fl_backtrack) -{ - const re_dfa_t *dfa = preg->buffer; - Idx idx, cur_node; - re_node_set eps_via_nodes; - struct re_fail_stack_t *fs; - struct re_fail_stack_t fs_body = { 0, 2, NULL }; - regmatch_t *prev_idx_match; - bool prev_idx_match_malloced = false; - -#ifdef DEBUG - assert (nmatch > 1); - assert (mctx->state_log != NULL); -#endif - if (fl_backtrack) - { - fs = &fs_body; - fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc); - if (fs->stack == NULL) - return REG_ESPACE; - } - else - fs = NULL; - - cur_node = dfa->init_node; - re_node_set_init_empty (&eps_via_nodes); - - if (__libc_use_alloca (nmatch * sizeof (regmatch_t))) - prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t)); - else - { - prev_idx_match = re_malloc (regmatch_t, nmatch); - if (prev_idx_match == NULL) - { - free_fail_stack_return (fs); - return REG_ESPACE; - } - prev_idx_match_malloced = true; - } - memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); - - for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;) - { - update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch); - - if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node) - { - Idx reg_idx; - if (fs) - { - for (reg_idx = 0; reg_idx < nmatch; ++reg_idx) - if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1) - break; - if (reg_idx == nmatch) - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return free_fail_stack_return (fs); - } - cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - } - else - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return REG_NOERROR; - } - } - - /* Proceed to next node. */ - cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node, - &eps_via_nodes, fs); - - if (BE (! REG_VALID_INDEX (cur_node), 0)) - { - if (BE (cur_node == REG_ERROR, 0)) - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - free_fail_stack_return (fs); - return REG_ESPACE; - } - if (fs) - cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch, - &eps_via_nodes); - else - { - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return REG_NOMATCH; - } - } - } - re_node_set_free (&eps_via_nodes); - if (prev_idx_match_malloced) - re_free (prev_idx_match); - return free_fail_stack_return (fs); -} - -static reg_errcode_t -internal_function -free_fail_stack_return (struct re_fail_stack_t *fs) -{ - if (fs) - { - Idx fs_idx; - for (fs_idx = 0; fs_idx < fs->num; ++fs_idx) - { - re_node_set_free (&fs->stack[fs_idx].eps_via_nodes); - re_free (fs->stack[fs_idx].regs); - } - re_free (fs->stack); - } - return REG_NOERROR; -} - -static void -internal_function -update_regs (const re_dfa_t *dfa, regmatch_t *pmatch, - regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch) -{ - int type = dfa->nodes[cur_node].type; - if (type == OP_OPEN_SUBEXP) - { - Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; - - /* We are at the first node of this sub expression. */ - if (reg_num < nmatch) - { - pmatch[reg_num].rm_so = cur_idx; - pmatch[reg_num].rm_eo = -1; - } - } - else if (type == OP_CLOSE_SUBEXP) - { - Idx reg_num = dfa->nodes[cur_node].opr.idx + 1; - if (reg_num < nmatch) - { - /* We are at the last node of this sub expression. */ - if (pmatch[reg_num].rm_so < cur_idx) - { - pmatch[reg_num].rm_eo = cur_idx; - /* This is a non-empty match or we are not inside an optional - subexpression. Accept this right away. */ - memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch); - } - else - { - if (dfa->nodes[cur_node].opt_subexp - && prev_idx_match[reg_num].rm_so != -1) - /* We transited through an empty match for an optional - subexpression, like (a?)*, and this is not the subexp's - first match. Copy back the old content of the registers - so that matches of an inner subexpression are undone as - well, like in ((a?))*. */ - memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch); - else - /* We completed a subexpression, but it may be part of - an optional one, so do not update PREV_IDX_MATCH. */ - pmatch[reg_num].rm_eo = cur_idx; - } - } - } -} - -/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0 - and sift the nodes in each states according to the following rules. - Updated state_log will be wrote to STATE_LOG. - - Rules: We throw away the Node 'a' in the STATE_LOG[STR_IDX] if... - 1. When STR_IDX == MATCH_LAST(the last index in the state_log): - If 'a' isn't the LAST_NODE and 'a' can't epsilon transit to - the LAST_NODE, we throw away the node 'a'. - 2. When 0 <= STR_IDX < MATCH_LAST and 'a' accepts - string 's' and transit to 'b': - i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw - away the node 'a'. - ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is - thrown away, we throw away the node 'a'. - 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b': - i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the - node 'a'. - ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away, - we throw away the node 'a'. */ - -#define STATE_NODE_CONTAINS(state,node) \ - ((state) != NULL && re_node_set_contains (&(state)->nodes, node)) - -static reg_errcode_t -internal_function -sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx) -{ - reg_errcode_t err; - int null_cnt = 0; - Idx str_idx = sctx->last_str_idx; - re_node_set cur_dest; - -#ifdef DEBUG - assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL); -#endif - - /* Build sifted state_log[str_idx]. It has the nodes which can epsilon - transit to the last_node and the last_node itself. */ - err = re_node_set_init_1 (&cur_dest, sctx->last_node); - if (BE (err != REG_NOERROR, 0)) - return err; - err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* Then check each states in the state_log. */ - while (str_idx > 0) - { - /* Update counters. */ - null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0; - if (null_cnt > mctx->max_mb_elem_len) - { - memset (sctx->sifted_states, '\0', - sizeof (re_dfastate_t *) * str_idx); - re_node_set_free (&cur_dest); - return REG_NOERROR; - } - re_node_set_empty (&cur_dest); - --str_idx; - - if (mctx->state_log[str_idx]) - { - err = build_sifted_states (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - - /* Add all the nodes which satisfy the following conditions: - - It can epsilon transit to a node in CUR_DEST. - - It is in CUR_SRC. - And update state_log. */ - err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - err = REG_NOERROR; - free_return: - re_node_set_free (&cur_dest); - return err; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, re_node_set *cur_dest) -{ - const re_dfa_t *const dfa = mctx->dfa; - const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes; - Idx i; - - /* Then build the next sifted state. - We build the next sifted state on 'cur_dest', and update - 'sifted_states[str_idx]' with 'cur_dest'. - Note: - 'cur_dest' is the sifted state from 'state_log[str_idx + 1]'. - 'cur_src' points the node_set of the old 'state_log[str_idx]' - (with the epsilon nodes pre-filtered out). */ - for (i = 0; i < cur_src->nelem; i++) - { - Idx prev_node = cur_src->elems[i]; - int naccepted = 0; - bool ok; - -#ifdef DEBUG - re_token_type_t type = dfa->nodes[prev_node].type; - assert (!IS_EPSILON_NODE (type)); -#endif -#ifdef RE_ENABLE_I18N - /* If the node may accept "multi byte". */ - if (dfa->nodes[prev_node].accept_mb) - naccepted = sift_states_iter_mb (mctx, sctx, prev_node, - str_idx, sctx->last_str_idx); -#endif /* RE_ENABLE_I18N */ - - /* We don't check backreferences here. - See update_cur_sifted_state(). */ - if (!naccepted - && check_node_accept (mctx, dfa->nodes + prev_node, str_idx) - && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1], - dfa->nexts[prev_node])) - naccepted = 1; - - if (naccepted == 0) - continue; - - if (sctx->limits.nelem) - { - Idx to_idx = str_idx + naccepted; - if (check_dst_limits (mctx, &sctx->limits, - dfa->nexts[prev_node], to_idx, - prev_node, str_idx)) - continue; - } - ok = re_node_set_insert (cur_dest, prev_node); - if (BE (! ok, 0)) - return REG_ESPACE; - } - - return REG_NOERROR; -} - -/* Helper functions. */ - -static reg_errcode_t -internal_function -clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx) -{ - Idx top = mctx->state_log_top; - - if ((next_state_log_idx >= mctx->input.bufs_len - && mctx->input.bufs_len < mctx->input.len) - || (next_state_log_idx >= mctx->input.valid_len - && mctx->input.valid_len < mctx->input.len)) - { - reg_errcode_t err; - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (top < next_state_log_idx) - { - memset (mctx->state_log + top + 1, '\0', - sizeof (re_dfastate_t *) * (next_state_log_idx - top)); - mctx->state_log_top = next_state_log_idx; - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function -merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst, - re_dfastate_t **src, Idx num) -{ - Idx st_idx; - reg_errcode_t err; - for (st_idx = 0; st_idx < num; ++st_idx) - { - if (dst[st_idx] == NULL) - dst[st_idx] = src[st_idx]; - else if (src[st_idx] != NULL) - { - re_node_set merged_set; - err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes, - &src[st_idx]->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - dst[st_idx] = re_acquire_state (&err, dfa, &merged_set); - re_node_set_free (&merged_set); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function -update_cur_sifted_state (const re_match_context_t *mctx, - re_sift_context_t *sctx, Idx str_idx, - re_node_set *dest_nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err = REG_NOERROR; - const re_node_set *candidates; - candidates = ((mctx->state_log[str_idx] == NULL) ? NULL - : &mctx->state_log[str_idx]->nodes); - - if (dest_nodes->nelem == 0) - sctx->sifted_states[str_idx] = NULL; - else - { - if (candidates) - { - /* At first, add the nodes which can epsilon transit to a node in - DEST_NODE. */ - err = add_epsilon_src_nodes (dfa, dest_nodes, candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - - /* Then, check the limitations in the current sift_context. */ - if (sctx->limits.nelem) - { - err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits, - mctx->bkref_ents, str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - - sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (candidates && mctx->state_log[str_idx]->has_backref) - { - err = sift_states_bkref (mctx, sctx, str_idx, candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates) -{ - reg_errcode_t err = REG_NOERROR; - Idx i; - - re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - - if (!state->inveclosure.alloc) - { - err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - for (i = 0; i < dest_nodes->nelem; i++) - { - err = re_node_set_merge (&state->inveclosure, - dfa->inveclosures + dest_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) - return REG_ESPACE; - } - } - return re_node_set_add_intersect (dest_nodes, candidates, - &state->inveclosure); -} - -static reg_errcode_t -internal_function -sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes, - const re_node_set *candidates) -{ - Idx ecl_idx; - reg_errcode_t err; - re_node_set *inv_eclosure = dfa->inveclosures + node; - re_node_set except_nodes; - re_node_set_init_empty (&except_nodes); - for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) - { - Idx cur_node = inv_eclosure->elems[ecl_idx]; - if (cur_node == node) - continue; - if (IS_EPSILON_NODE (dfa->nodes[cur_node].type)) - { - Idx edst1 = dfa->edests[cur_node].elems[0]; - Idx edst2 = ((dfa->edests[cur_node].nelem > 1) - ? dfa->edests[cur_node].elems[1] : REG_MISSING); - if ((!re_node_set_contains (inv_eclosure, edst1) - && re_node_set_contains (dest_nodes, edst1)) - || (REG_VALID_NONZERO_INDEX (edst2) - && !re_node_set_contains (inv_eclosure, edst2) - && re_node_set_contains (dest_nodes, edst2))) - { - err = re_node_set_add_intersect (&except_nodes, candidates, - dfa->inveclosures + cur_node); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&except_nodes); - return err; - } - } - } - } - for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx) - { - Idx cur_node = inv_eclosure->elems[ecl_idx]; - if (!re_node_set_contains (&except_nodes, cur_node)) - { - Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1; - re_node_set_remove_at (dest_nodes, idx); - } - } - re_node_set_free (&except_nodes); - return REG_NOERROR; -} - -static bool -internal_function -check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits, - Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx lim_idx, src_pos, dst_pos; - - Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx); - Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx); - for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) - { - Idx subexp_idx; - struct re_backref_cache_entry *ent; - ent = mctx->bkref_ents + limits->elems[lim_idx]; - subexp_idx = dfa->nodes[ent->node].opr.idx; - - dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], - subexp_idx, dst_node, dst_idx, - dst_bkref_idx); - src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx], - subexp_idx, src_node, src_idx, - src_bkref_idx); - - /* In case of: - ( ) - ( ) - ( ) */ - if (src_pos == dst_pos) - continue; /* This is unrelated limitation. */ - else - return true; - } - return false; -} - -static int -internal_function -check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries, - Idx subexp_idx, Idx from_node, Idx bkref_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - const re_node_set *eclosures = dfa->eclosures + from_node; - Idx node_idx; - - /* Else, we are on the boundary: examine the nodes on the epsilon - closure. */ - for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx) - { - Idx node = eclosures->elems[node_idx]; - switch (dfa->nodes[node].type) - { - case OP_BACK_REF: - if (bkref_idx != REG_MISSING) - { - struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx; - do - { - Idx dst; - int cpos; - - if (ent->node != node) - continue; - - if (subexp_idx < BITSET_WORD_BITS - && !(ent->eps_reachable_subexps_map - & ((bitset_word_t) 1 << subexp_idx))) - continue; - - /* Recurse trying to reach the OP_OPEN_SUBEXP and - OP_CLOSE_SUBEXP cases below. But, if the - destination node is the same node as the source - node, don't recurse because it would cause an - infinite loop: a regex that exhibits this behavior - is ()\1*\1* */ - dst = dfa->edests[node].elems[0]; - if (dst == from_node) - { - if (boundaries & 1) - return -1; - else /* if (boundaries & 2) */ - return 0; - } - - cpos = - check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, - dst, bkref_idx); - if (cpos == -1 /* && (boundaries & 1) */) - return -1; - if (cpos == 0 && (boundaries & 2)) - return 0; - - if (subexp_idx < BITSET_WORD_BITS) - ent->eps_reachable_subexps_map - &= ~((bitset_word_t) 1 << subexp_idx); - } - while (ent++->more); - } - break; - - case OP_OPEN_SUBEXP: - if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx) - return -1; - break; - - case OP_CLOSE_SUBEXP: - if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx) - return 0; - break; - - default: - break; - } - } - - return (boundaries & 2) ? 1 : 0; -} - -static int -internal_function -check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit, - Idx subexp_idx, Idx from_node, Idx str_idx, - Idx bkref_idx) -{ - struct re_backref_cache_entry *lim = mctx->bkref_ents + limit; - int boundaries; - - /* If we are outside the range of the subexpression, return -1 or 1. */ - if (str_idx < lim->subexp_from) - return -1; - - if (lim->subexp_to < str_idx) - return 1; - - /* If we are within the subexpression, return 0. */ - boundaries = (str_idx == lim->subexp_from); - boundaries |= (str_idx == lim->subexp_to) << 1; - if (boundaries == 0) - return 0; - - /* Else, examine epsilon closure. */ - return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx, - from_node, bkref_idx); -} - -/* Check the limitations of sub expressions LIMITS, and remove the nodes - which are against limitations from DEST_NODES. */ - -static reg_errcode_t -internal_function -check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes, - const re_node_set *candidates, re_node_set *limits, - struct re_backref_cache_entry *bkref_ents, Idx str_idx) -{ - reg_errcode_t err; - Idx node_idx, lim_idx; - - for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx) - { - Idx subexp_idx; - struct re_backref_cache_entry *ent; - ent = bkref_ents + limits->elems[lim_idx]; - - if (str_idx <= ent->subexp_from || ent->str_idx < str_idx) - continue; /* This is unrelated limitation. */ - - subexp_idx = dfa->nodes[ent->node].opr.idx; - if (ent->subexp_to == str_idx) - { - Idx ops_node = REG_MISSING; - Idx cls_node = REG_MISSING; - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - re_token_type_t type = dfa->nodes[node].type; - if (type == OP_OPEN_SUBEXP - && subexp_idx == dfa->nodes[node].opr.idx) - ops_node = node; - else if (type == OP_CLOSE_SUBEXP - && subexp_idx == dfa->nodes[node].opr.idx) - cls_node = node; - } - - /* Check the limitation of the open subexpression. */ - /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */ - if (REG_VALID_INDEX (ops_node)) - { - err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - - /* Check the limitation of the close subexpression. */ - if (REG_VALID_INDEX (cls_node)) - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - if (!re_node_set_contains (dfa->inveclosures + node, - cls_node) - && !re_node_set_contains (dfa->eclosures + node, - cls_node)) - { - /* It is against this limitation. - Remove it form the current sifted state. */ - err = sub_epsilon_src_nodes (dfa, node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - --node_idx; - } - } - } - else /* (ent->subexp_to != str_idx) */ - { - for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx) - { - Idx node = dest_nodes->elems[node_idx]; - re_token_type_t type = dfa->nodes[node].type; - if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP) - { - if (subexp_idx != dfa->nodes[node].opr.idx) - continue; - /* It is against this limitation. - Remove it form the current sifted state. */ - err = sub_epsilon_src_nodes (dfa, node, dest_nodes, - candidates); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - } - } - return REG_NOERROR; -} - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx str_idx, const re_node_set *candidates) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx node_idx, node; - re_sift_context_t local_sctx; - Idx first_idx = search_cur_bkref_entry (mctx, str_idx); - - if (first_idx == REG_MISSING) - return REG_NOERROR; - - local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */ - - for (node_idx = 0; node_idx < candidates->nelem; ++node_idx) - { - Idx enabled_idx; - re_token_type_t type; - struct re_backref_cache_entry *entry; - node = candidates->elems[node_idx]; - type = dfa->nodes[node].type; - /* Avoid infinite loop for the REs like "()\1+". */ - if (node == sctx->last_node && str_idx == sctx->last_str_idx) - continue; - if (type != OP_BACK_REF) - continue; - - entry = mctx->bkref_ents + first_idx; - enabled_idx = first_idx; - do - { - Idx subexp_len; - Idx to_idx; - Idx dst_node; - bool ok; - re_dfastate_t *cur_state; - - if (entry->node != node) - continue; - subexp_len = entry->subexp_to - entry->subexp_from; - to_idx = str_idx + subexp_len; - dst_node = (subexp_len ? dfa->nexts[node] - : dfa->edests[node].elems[0]); - - if (to_idx > sctx->last_str_idx - || sctx->sifted_states[to_idx] == NULL - || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node) - || check_dst_limits (mctx, &sctx->limits, node, - str_idx, dst_node, to_idx)) - continue; - - if (local_sctx.sifted_states == NULL) - { - local_sctx = *sctx; - err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - local_sctx.last_node = node; - local_sctx.last_str_idx = str_idx; - ok = re_node_set_insert (&local_sctx.limits, enabled_idx); - if (BE (! ok, 0)) - { - err = REG_ESPACE; - goto free_return; - } - cur_state = local_sctx.sifted_states[str_idx]; - err = sift_states_backward (mctx, &local_sctx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - if (sctx->limited_states != NULL) - { - err = merge_state_array (dfa, sctx->limited_states, - local_sctx.sifted_states, - str_idx + 1); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - local_sctx.sifted_states[str_idx] = cur_state; - re_node_set_remove (&local_sctx.limits, enabled_idx); - - /* mctx->bkref_ents may have changed, reload the pointer. */ - entry = mctx->bkref_ents + enabled_idx; - } - while (enabled_idx++, entry++->more); - } - err = REG_NOERROR; - free_return: - if (local_sctx.sifted_states != NULL) - { - re_node_set_free (&local_sctx.limits); - } - - return err; -} - - -#ifdef RE_ENABLE_I18N -static int -internal_function -sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx, - Idx node_idx, Idx str_idx, Idx max_str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - int naccepted; - /* Check the node can accept "multi byte". */ - naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx); - if (naccepted > 0 && str_idx + naccepted <= max_str_idx && - !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted], - dfa->nexts[node_idx])) - /* The node can't accept the "multi byte", or the - destination was already thrown away, then the node - could't accept the current input "multi byte". */ - naccepted = 0; - /* Otherwise, it is sure that the node could accept - 'naccepted' bytes input. */ - return naccepted; -} -#endif /* RE_ENABLE_I18N */ - - -/* Functions for state transition. */ - -/* Return the next state to which the current state STATE will transit by - accepting the current input byte, and update STATE_LOG if necessary. - If STATE can accept a multibyte char/collating element/back reference - update the destination of STATE_LOG. */ - -static re_dfastate_t * -internal_function __attribute_warn_unused_result__ -transit_state (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state) -{ - re_dfastate_t **trtable; - unsigned char ch; - -#ifdef RE_ENABLE_I18N - /* If the current state can accept multibyte. */ - if (BE (state->accept_mb, 0)) - { - *err = transit_state_mb (mctx, state); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } -#endif /* RE_ENABLE_I18N */ - - /* Then decide the next state with the single byte. */ -#if 0 - if (0) - /* don't use transition table */ - return transit_state_sb (err, mctx, state); -#endif - - /* Use transition table */ - ch = re_string_fetch_byte (&mctx->input); - for (;;) - { - trtable = state->trtable; - if (BE (trtable != NULL, 1)) - return trtable[ch]; - - trtable = state->word_trtable; - if (BE (trtable != NULL, 1)) - { - unsigned int context; - context - = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input) - 1, - mctx->eflags); - if (IS_WORD_CONTEXT (context)) - return trtable[ch + SBC_MAX]; - else - return trtable[ch]; - } - - if (!build_trtable (mctx->dfa, state)) - { - *err = REG_ESPACE; - return NULL; - } - - /* Retry, we now have a transition table. */ - } -} - -/* Update the state_log if we need */ -static re_dfastate_t * -internal_function -merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *next_state) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx cur_idx = re_string_cur_idx (&mctx->input); - - if (cur_idx > mctx->state_log_top) - { - mctx->state_log[cur_idx] = next_state; - mctx->state_log_top = cur_idx; - } - else if (mctx->state_log[cur_idx] == 0) - { - mctx->state_log[cur_idx] = next_state; - } - else - { - re_dfastate_t *pstate; - unsigned int context; - re_node_set next_nodes, *log_nodes, *table_nodes = NULL; - /* If (state_log[cur_idx] != 0), it implies that cur_idx is - the destination of a multibyte char/collating element/ - back reference. Then the next state is the union set of - these destinations and the results of the transition table. */ - pstate = mctx->state_log[cur_idx]; - log_nodes = pstate->entrance_nodes; - if (next_state != NULL) - { - table_nodes = next_state->entrance_nodes; - *err = re_node_set_init_union (&next_nodes, table_nodes, - log_nodes); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - } - else - next_nodes = *log_nodes; - /* Note: We already add the nodes of the initial state, - then we don't need to add them here. */ - - context = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input) - 1, - mctx->eflags); - next_state = mctx->state_log[cur_idx] - = re_acquire_state_context (err, dfa, &next_nodes, context); - /* We don't need to check errors here, since the return value of - this function is next_state and ERR is already set. */ - - if (table_nodes != NULL) - re_node_set_free (&next_nodes); - } - - if (BE (dfa->nbackref, 0) && next_state != NULL) - { - /* Check OP_OPEN_SUBEXP in the current state in case that we use them - later. We must check them here, since the back references in the - next state might use them. */ - *err = check_subexp_matching_top (mctx, &next_state->nodes, - cur_idx); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - - /* If the next state has back references. */ - if (next_state->has_backref) - { - *err = transit_state_bkref (mctx, &next_state->nodes); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - next_state = mctx->state_log[cur_idx]; - } - } - - return next_state; -} - -/* Skip bytes in the input that correspond to part of a - multi-byte match, then look in the log for a state - from which to restart matching. */ -static re_dfastate_t * -internal_function -find_recover_state (reg_errcode_t *err, re_match_context_t *mctx) -{ - re_dfastate_t *cur_state; - do - { - Idx max = mctx->state_log_top; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - - do - { - if (++cur_str_idx > max) - return NULL; - re_string_skip_bytes (&mctx->input, 1); - } - while (mctx->state_log[cur_str_idx] == NULL); - - cur_state = merge_state_with_log (err, mctx, NULL); - } - while (*err == REG_NOERROR && cur_state == NULL); - return cur_state; -} - -/* Helper functions for transit_state. */ - -/* From the node set CUR_NODES, pick up the nodes whose types are - OP_OPEN_SUBEXP and which have corresponding back references in the regular - expression. And register them to use them later for evaluating the - corresponding back references. */ - -static reg_errcode_t -internal_function -check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes, - Idx str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx node_idx; - reg_errcode_t err; - - /* TODO: This isn't efficient. - Because there might be more than one nodes whose types are - OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all - nodes. - E.g. RE: (a){2} */ - for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx) - { - Idx node = cur_nodes->elems[node_idx]; - if (dfa->nodes[node].type == OP_OPEN_SUBEXP - && dfa->nodes[node].opr.idx < BITSET_WORD_BITS - && (dfa->used_bkref_map - & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx))) - { - err = match_ctx_add_subtop (mctx, node, str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - } - } - return REG_NOERROR; -} - -#if 0 -/* Return the next state to which the current state STATE will transit by - accepting the current input byte. */ - -static re_dfastate_t * -transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx, - re_dfastate_t *state) -{ - const re_dfa_t *const dfa = mctx->dfa; - re_node_set next_nodes; - re_dfastate_t *next_state; - Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input); - unsigned int context; - - *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1); - if (BE (*err != REG_NOERROR, 0)) - return NULL; - for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt) - { - Idx cur_node = state->nodes.elems[node_cnt]; - if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx)) - { - *err = re_node_set_merge (&next_nodes, - dfa->eclosures + dfa->nexts[cur_node]); - if (BE (*err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return NULL; - } - } - } - context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags); - next_state = re_acquire_state_context (err, dfa, &next_nodes, context); - /* We don't need to check errors here, since the return value of - this function is next_state and ERR is already set. */ - - re_node_set_free (&next_nodes); - re_string_skip_bytes (&mctx->input, 1); - return next_state; -} -#endif - -#ifdef RE_ENABLE_I18N -static reg_errcode_t -internal_function -transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx i; - - for (i = 0; i < pstate->nodes.nelem; ++i) - { - re_node_set dest_nodes, *new_nodes; - Idx cur_node_idx = pstate->nodes.elems[i]; - int naccepted; - Idx dest_idx; - unsigned int context; - re_dfastate_t *dest_state; - - if (!dfa->nodes[cur_node_idx].accept_mb) - continue; - - if (dfa->nodes[cur_node_idx].constraint) - { - context = re_string_context_at (&mctx->input, - re_string_cur_idx (&mctx->input), - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint, - context)) - continue; - } - - /* How many bytes the node can accept? */ - naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input, - re_string_cur_idx (&mctx->input)); - if (naccepted == 0) - continue; - - /* The node can accepts 'naccepted' bytes. */ - dest_idx = re_string_cur_idx (&mctx->input) + naccepted; - mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted - : mctx->max_mb_elem_len); - err = clean_state_log_if_needed (mctx, dest_idx); - if (BE (err != REG_NOERROR, 0)) - return err; -#ifdef DEBUG - assert (dfa->nexts[cur_node_idx] != REG_MISSING); -#endif - new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx]; - - dest_state = mctx->state_log[dest_idx]; - if (dest_state == NULL) - dest_nodes = *new_nodes; - else - { - err = re_node_set_init_union (&dest_nodes, - dest_state->entrance_nodes, new_nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - context = re_string_context_at (&mctx->input, dest_idx - 1, - mctx->eflags); - mctx->state_log[dest_idx] - = re_acquire_state_context (&err, dfa, &dest_nodes, context); - if (dest_state != NULL) - re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0)) - return err; - } - return REG_NOERROR; -} -#endif /* RE_ENABLE_I18N */ - -static reg_errcode_t -internal_function -transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx i; - Idx cur_str_idx = re_string_cur_idx (&mctx->input); - - for (i = 0; i < nodes->nelem; ++i) - { - Idx dest_str_idx, prev_nelem, bkc_idx; - Idx node_idx = nodes->elems[i]; - unsigned int context; - const re_token_t *node = dfa->nodes + node_idx; - re_node_set *new_dest_nodes; - - /* Check whether 'node' is a backreference or not. */ - if (node->type != OP_BACK_REF) - continue; - - if (node->constraint) - { - context = re_string_context_at (&mctx->input, cur_str_idx, - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) - continue; - } - - /* 'node' is a backreference. - Check the substring which the substring matched. */ - bkc_idx = mctx->nbkref_ents; - err = get_subexp (mctx, node_idx, cur_str_idx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - - /* And add the epsilon closures (which is 'new_dest_nodes') of - the backreference to appropriate state_log. */ -#ifdef DEBUG - assert (dfa->nexts[node_idx] != REG_MISSING); -#endif - for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx) - { - Idx subexp_len; - re_dfastate_t *dest_state; - struct re_backref_cache_entry *bkref_ent; - bkref_ent = mctx->bkref_ents + bkc_idx; - if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx) - continue; - subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from; - new_dest_nodes = (subexp_len == 0 - ? dfa->eclosures + dfa->edests[node_idx].elems[0] - : dfa->eclosures + dfa->nexts[node_idx]); - dest_str_idx = (cur_str_idx + bkref_ent->subexp_to - - bkref_ent->subexp_from); - context = re_string_context_at (&mctx->input, dest_str_idx - 1, - mctx->eflags); - dest_state = mctx->state_log[dest_str_idx]; - prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0 - : mctx->state_log[cur_str_idx]->nodes.nelem); - /* Add 'new_dest_node' to state_log. */ - if (dest_state == NULL) - { - mctx->state_log[dest_str_idx] - = re_acquire_state_context (&err, dfa, new_dest_nodes, - context); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) - goto free_return; - } - else - { - re_node_set dest_nodes; - err = re_node_set_init_union (&dest_nodes, - dest_state->entrance_nodes, - new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&dest_nodes); - goto free_return; - } - mctx->state_log[dest_str_idx] - = re_acquire_state_context (&err, dfa, &dest_nodes, context); - re_node_set_free (&dest_nodes); - if (BE (mctx->state_log[dest_str_idx] == NULL - && err != REG_NOERROR, 0)) - goto free_return; - } - /* We need to check recursively if the backreference can epsilon - transit. */ - if (subexp_len == 0 - && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem) - { - err = check_subexp_matching_top (mctx, new_dest_nodes, - cur_str_idx); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - err = transit_state_bkref (mctx, new_dest_nodes); - if (BE (err != REG_NOERROR, 0)) - goto free_return; - } - } - } - err = REG_NOERROR; - free_return: - return err; -} - -/* Enumerate all the candidates which the backreference BKREF_NODE can match - at BKREF_STR_IDX, and register them by match_ctx_add_entry(). - Note that we might collect inappropriate candidates here. - However, the cost of checking them strictly here is too high, then we - delay these checking for prune_impossible_nodes(). */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx) -{ - const re_dfa_t *const dfa = mctx->dfa; - Idx subexp_num, sub_top_idx; - const char *buf = (const char *) re_string_get_buffer (&mctx->input); - /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */ - Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx); - if (cache_idx != REG_MISSING) - { - const struct re_backref_cache_entry *entry - = mctx->bkref_ents + cache_idx; - do - if (entry->node == bkref_node) - return REG_NOERROR; /* We already checked it. */ - while (entry++->more); - } - - subexp_num = dfa->nodes[bkref_node].opr.idx; - - /* For each sub expression */ - for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx) - { - reg_errcode_t err; - re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx]; - re_sub_match_last_t *sub_last; - Idx sub_last_idx, sl_str, bkref_str_off; - - if (dfa->nodes[sub_top->node].opr.idx != subexp_num) - continue; /* It isn't related. */ - - sl_str = sub_top->str_idx; - bkref_str_off = bkref_str_idx; - /* At first, check the last node of sub expressions we already - evaluated. */ - for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx) - { - regoff_t sl_str_diff; - sub_last = sub_top->lasts[sub_last_idx]; - sl_str_diff = sub_last->str_idx - sl_str; - /* The matched string by the sub expression match with the substring - at the back reference? */ - if (sl_str_diff > 0) - { - if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0)) - { - /* Not enough chars for a successful match. */ - if (bkref_str_off + sl_str_diff > mctx->input.len) - break; - - err = clean_state_log_if_needed (mctx, - bkref_str_off - + sl_str_diff); - if (BE (err != REG_NOERROR, 0)) - return err; - buf = (const char *) re_string_get_buffer (&mctx->input); - } - if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0) - /* We don't need to search this sub expression any more. */ - break; - } - bkref_str_off += sl_str_diff; - sl_str += sl_str_diff; - err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, - bkref_str_idx); - - /* Reload buf, since the preceding call might have reallocated - the buffer. */ - buf = (const char *) re_string_get_buffer (&mctx->input); - - if (err == REG_NOMATCH) - continue; - if (BE (err != REG_NOERROR, 0)) - return err; - } - - if (sub_last_idx < sub_top->nlasts) - continue; - if (sub_last_idx > 0) - ++sl_str; - /* Then, search for the other last nodes of the sub expression. */ - for (; sl_str <= bkref_str_idx; ++sl_str) - { - Idx cls_node; - regoff_t sl_str_off; - const re_node_set *nodes; - sl_str_off = sl_str - sub_top->str_idx; - /* The matched string by the sub expression match with the substring - at the back reference? */ - if (sl_str_off > 0) - { - if (BE (bkref_str_off >= mctx->input.valid_len, 0)) - { - /* If we are at the end of the input, we cannot match. */ - if (bkref_str_off >= mctx->input.len) - break; - - err = extend_buffers (mctx); - if (BE (err != REG_NOERROR, 0)) - return err; - - buf = (const char *) re_string_get_buffer (&mctx->input); - } - if (buf [bkref_str_off++] != buf[sl_str - 1]) - break; /* We don't need to search this sub expression - any more. */ - } - if (mctx->state_log[sl_str] == NULL) - continue; - /* Does this state have a ')' of the sub expression? */ - nodes = &mctx->state_log[sl_str]->nodes; - cls_node = find_subexp_node (dfa, nodes, subexp_num, - OP_CLOSE_SUBEXP); - if (cls_node == REG_MISSING) - continue; /* No. */ - if (sub_top->path == NULL) - { - sub_top->path = calloc (sizeof (state_array_t), - sl_str - sub_top->str_idx + 1); - if (sub_top->path == NULL) - return REG_ESPACE; - } - /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node - in the current context? */ - err = check_arrival (mctx, sub_top->path, sub_top->node, - sub_top->str_idx, cls_node, sl_str, - OP_CLOSE_SUBEXP); - if (err == REG_NOMATCH) - continue; - if (BE (err != REG_NOERROR, 0)) - return err; - sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str); - if (BE (sub_last == NULL, 0)) - return REG_ESPACE; - err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node, - bkref_str_idx); - if (err == REG_NOMATCH) - continue; - } - } - return REG_NOERROR; -} - -/* Helper functions for get_subexp(). */ - -/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR. - If it can arrive, register the sub expression expressed with SUB_TOP - and SUB_LAST. */ - -static reg_errcode_t -internal_function -get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top, - re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str) -{ - reg_errcode_t err; - Idx to_idx; - /* Can the subexpression arrive the back reference? */ - err = check_arrival (mctx, &sub_last->path, sub_last->node, - sub_last->str_idx, bkref_node, bkref_str, - OP_OPEN_SUBEXP); - if (err != REG_NOERROR) - return err; - err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx, - sub_last->str_idx); - if (BE (err != REG_NOERROR, 0)) - return err; - to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx; - return clean_state_log_if_needed (mctx, to_idx); -} - -/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX. - Search '(' if FL_OPEN, or search ')' otherwise. - TODO: This function isn't efficient... - Because there might be more than one nodes whose types are - OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all - nodes. - E.g. RE: (a){2} */ - -static Idx -internal_function -find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes, - Idx subexp_idx, int type) -{ - Idx cls_idx; - for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx) - { - Idx cls_node = nodes->elems[cls_idx]; - const re_token_t *node = dfa->nodes + cls_node; - if (node->type == type - && node->opr.idx == subexp_idx) - return cls_node; - } - return REG_MISSING; -} - -/* Check whether the node TOP_NODE at TOP_STR can arrive to the node - LAST_NODE at LAST_STR. We record the path onto PATH since it will be - heavily reused. - Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node, - Idx top_str, Idx last_node, Idx last_str, int type) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err = REG_NOERROR; - Idx subexp_num, backup_cur_idx, str_idx, null_cnt; - re_dfastate_t *cur_state = NULL; - re_node_set *cur_nodes, next_nodes; - re_dfastate_t **backup_state_log; - unsigned int context; - - subexp_num = dfa->nodes[top_node].opr.idx; - /* Extend the buffer if we need. */ - if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0)) - { - re_dfastate_t **new_array; - Idx old_alloc = path->alloc; - Idx incr_alloc = last_str + mctx->max_mb_elem_len + 1; - Idx new_alloc; - if (BE (IDX_MAX - old_alloc < incr_alloc, 0)) - return REG_ESPACE; - new_alloc = old_alloc + incr_alloc; - if (BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0)) - return REG_ESPACE; - new_array = re_realloc (path->array, re_dfastate_t *, new_alloc); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - path->array = new_array; - path->alloc = new_alloc; - memset (new_array + old_alloc, '\0', - sizeof (re_dfastate_t *) * (path->alloc - old_alloc)); - } - - str_idx = path->next_idx ? path->next_idx : top_str; - - /* Temporary modify MCTX. */ - backup_state_log = mctx->state_log; - backup_cur_idx = mctx->input.cur_idx; - mctx->state_log = path->array; - mctx->input.cur_idx = str_idx; - - /* Setup initial node set. */ - context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); - if (str_idx == top_str) - { - err = re_node_set_init_1 (&next_nodes, top_node); - if (BE (err != REG_NOERROR, 0)) - return err; - err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - else - { - cur_state = mctx->state_log[str_idx]; - if (cur_state && cur_state->has_backref) - { - err = re_node_set_init_copy (&next_nodes, &cur_state->nodes); - if (BE (err != REG_NOERROR, 0)) - return err; - } - else - re_node_set_init_empty (&next_nodes); - } - if (str_idx == top_str || (cur_state && cur_state->has_backref)) - { - if (next_nodes.nelem) - { - err = expand_bkref_cache (mctx, &next_nodes, str_idx, - subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - mctx->state_log[str_idx] = cur_state; - } - - for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;) - { - re_node_set_empty (&next_nodes); - if (mctx->state_log[str_idx + 1]) - { - err = re_node_set_merge (&next_nodes, - &mctx->state_log[str_idx + 1]->nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - if (cur_state) - { - err = check_arrival_add_next_nodes (mctx, str_idx, - &cur_state->non_eps_nodes, - &next_nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - ++str_idx; - if (next_nodes.nelem) - { - err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - err = expand_bkref_cache (mctx, &next_nodes, str_idx, - subexp_num, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - } - context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags); - cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context); - if (BE (cur_state == NULL && err != REG_NOERROR, 0)) - { - re_node_set_free (&next_nodes); - return err; - } - mctx->state_log[str_idx] = cur_state; - null_cnt = cur_state == NULL ? null_cnt + 1 : 0; - } - re_node_set_free (&next_nodes); - cur_nodes = (mctx->state_log[last_str] == NULL ? NULL - : &mctx->state_log[last_str]->nodes); - path->next_idx = str_idx; - - /* Fix MCTX. */ - mctx->state_log = backup_state_log; - mctx->input.cur_idx = backup_cur_idx; - - /* Then check the current node set has the node LAST_NODE. */ - if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node)) - return REG_NOERROR; - - return REG_NOMATCH; -} - -/* Helper functions for check_arrival. */ - -/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them - to NEXT_NODES. - TODO: This function is similar to the functions transit_state*(), - however this function has many additional works. - Can't we unify them? */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx, - re_node_set *cur_nodes, re_node_set *next_nodes) -{ - const re_dfa_t *const dfa = mctx->dfa; - bool ok; - Idx cur_idx; -#ifdef RE_ENABLE_I18N - reg_errcode_t err = REG_NOERROR; -#endif - re_node_set union_set; - re_node_set_init_empty (&union_set); - for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx) - { - int naccepted = 0; - Idx cur_node = cur_nodes->elems[cur_idx]; -#ifdef DEBUG - re_token_type_t type = dfa->nodes[cur_node].type; - assert (!IS_EPSILON_NODE (type)); -#endif -#ifdef RE_ENABLE_I18N - /* If the node may accept "multi byte". */ - if (dfa->nodes[cur_node].accept_mb) - { - naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input, - str_idx); - if (naccepted > 1) - { - re_dfastate_t *dest_state; - Idx next_node = dfa->nexts[cur_node]; - Idx next_idx = str_idx + naccepted; - dest_state = mctx->state_log[next_idx]; - re_node_set_empty (&union_set); - if (dest_state) - { - err = re_node_set_merge (&union_set, &dest_state->nodes); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&union_set); - return err; - } - } - ok = re_node_set_insert (&union_set, next_node); - if (BE (! ok, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } - mctx->state_log[next_idx] = re_acquire_state (&err, dfa, - &union_set); - if (BE (mctx->state_log[next_idx] == NULL - && err != REG_NOERROR, 0)) - { - re_node_set_free (&union_set); - return err; - } - } - } -#endif /* RE_ENABLE_I18N */ - if (naccepted - || check_node_accept (mctx, dfa->nodes + cur_node, str_idx)) - { - ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]); - if (BE (! ok, 0)) - { - re_node_set_free (&union_set); - return REG_ESPACE; - } - } - } - re_node_set_free (&union_set); - return REG_NOERROR; -} - -/* For all the nodes in CUR_NODES, add the epsilon closures of them to - CUR_NODES, however exclude the nodes which are: - - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN. - - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN. -*/ - -static reg_errcode_t -internal_function -check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes, - Idx ex_subexp, int type) -{ - reg_errcode_t err; - Idx idx, outside_node; - re_node_set new_nodes; -#ifdef DEBUG - assert (cur_nodes->nelem); -#endif - err = re_node_set_alloc (&new_nodes, cur_nodes->nelem); - if (BE (err != REG_NOERROR, 0)) - return err; - /* Create a new node set NEW_NODES with the nodes which are epsilon - closures of the node in CUR_NODES. */ - - for (idx = 0; idx < cur_nodes->nelem; ++idx) - { - Idx cur_node = cur_nodes->elems[idx]; - const re_node_set *eclosure = dfa->eclosures + cur_node; - outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type); - if (outside_node == REG_MISSING) - { - /* There are no problematic nodes, just merge them. */ - err = re_node_set_merge (&new_nodes, eclosure); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&new_nodes); - return err; - } - } - else - { - /* There are problematic nodes, re-calculate incrementally. */ - err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node, - ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) - { - re_node_set_free (&new_nodes); - return err; - } - } - } - re_node_set_free (cur_nodes); - *cur_nodes = new_nodes; - return REG_NOERROR; -} - -/* Helper function for check_arrival_expand_ecl. - Check incrementally the epsilon closure of TARGET, and if it isn't - problematic append it to DST_NODES. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes, - Idx target, Idx ex_subexp, int type) -{ - Idx cur_node; - for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);) - { - bool ok; - - if (dfa->nodes[cur_node].type == type - && dfa->nodes[cur_node].opr.idx == ex_subexp) - { - if (type == OP_CLOSE_SUBEXP) - { - ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) - return REG_ESPACE; - } - break; - } - ok = re_node_set_insert (dst_nodes, cur_node); - if (BE (! ok, 0)) - return REG_ESPACE; - if (dfa->edests[cur_node].nelem == 0) - break; - if (dfa->edests[cur_node].nelem == 2) - { - reg_errcode_t err; - err = check_arrival_expand_ecl_sub (dfa, dst_nodes, - dfa->edests[cur_node].elems[1], - ex_subexp, type); - if (BE (err != REG_NOERROR, 0)) - return err; - } - cur_node = dfa->edests[cur_node].elems[0]; - } - return REG_NOERROR; -} - - -/* For all the back references in the current state, calculate the - destination of the back references by the appropriate entry - in MCTX->BKREF_ENTS. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes, - Idx cur_str, Idx subexp_num, int type) -{ - const re_dfa_t *const dfa = mctx->dfa; - reg_errcode_t err; - Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str); - struct re_backref_cache_entry *ent; - - if (cache_idx_start == REG_MISSING) - return REG_NOERROR; - - restart: - ent = mctx->bkref_ents + cache_idx_start; - do - { - Idx to_idx, next_node; - - /* Is this entry ENT is appropriate? */ - if (!re_node_set_contains (cur_nodes, ent->node)) - continue; /* No. */ - - to_idx = cur_str + ent->subexp_to - ent->subexp_from; - /* Calculate the destination of the back reference, and append it - to MCTX->STATE_LOG. */ - if (to_idx == cur_str) - { - /* The backreference did epsilon transit, we must re-check all the - node in the current state. */ - re_node_set new_dests; - reg_errcode_t err2, err3; - next_node = dfa->edests[ent->node].elems[0]; - if (re_node_set_contains (cur_nodes, next_node)) - continue; - err = re_node_set_init_1 (&new_dests, next_node); - err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type); - err3 = re_node_set_merge (cur_nodes, &new_dests); - re_node_set_free (&new_dests); - if (BE (err != REG_NOERROR || err2 != REG_NOERROR - || err3 != REG_NOERROR, 0)) - { - err = (err != REG_NOERROR ? err - : (err2 != REG_NOERROR ? err2 : err3)); - return err; - } - /* TODO: It is still inefficient... */ - goto restart; - } - else - { - re_node_set union_set; - next_node = dfa->nexts[ent->node]; - if (mctx->state_log[to_idx]) - { - bool ok; - if (re_node_set_contains (&mctx->state_log[to_idx]->nodes, - next_node)) - continue; - err = re_node_set_init_copy (&union_set, - &mctx->state_log[to_idx]->nodes); - ok = re_node_set_insert (&union_set, next_node); - if (BE (err != REG_NOERROR || ! ok, 0)) - { - re_node_set_free (&union_set); - err = err != REG_NOERROR ? err : REG_ESPACE; - return err; - } - } - else - { - err = re_node_set_init_1 (&union_set, next_node); - if (BE (err != REG_NOERROR, 0)) - return err; - } - mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set); - re_node_set_free (&union_set); - if (BE (mctx->state_log[to_idx] == NULL - && err != REG_NOERROR, 0)) - return err; - } - } - while (ent++->more); - return REG_NOERROR; -} - -/* Build transition table for the state. - Return true if successful. */ - -static bool -internal_function -build_trtable (const re_dfa_t *dfa, re_dfastate_t *state) -{ - reg_errcode_t err; - Idx i, j; - int ch; - bool need_word_trtable = false; - bitset_word_t elem, mask; - bool dests_node_malloced = false; - bool dest_states_malloced = false; - Idx ndests; /* Number of the destination states from 'state'. */ - re_dfastate_t **trtable; - re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl; - re_node_set follows, *dests_node; - bitset_t *dests_ch; - bitset_t acceptable; - - struct dests_alloc - { - re_node_set dests_node[SBC_MAX]; - bitset_t dests_ch[SBC_MAX]; - } *dests_alloc; - - /* We build DFA states which corresponds to the destination nodes - from 'state'. 'dests_node[i]' represents the nodes which i-th - destination state contains, and 'dests_ch[i]' represents the - characters which i-th destination state accepts. */ - if (__libc_use_alloca (sizeof (struct dests_alloc))) - dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc)); - else - { - dests_alloc = re_malloc (struct dests_alloc, 1); - if (BE (dests_alloc == NULL, 0)) - return false; - dests_node_malloced = true; - } - dests_node = dests_alloc->dests_node; - dests_ch = dests_alloc->dests_ch; - - /* Initialize transition table. */ - state->word_trtable = state->trtable = NULL; - - /* At first, group all nodes belonging to 'state' into several - destinations. */ - ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch); - if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0)) - { - if (dests_node_malloced) - free (dests_alloc); - /* Return false in case of an error, true otherwise. */ - if (ndests == 0) - { - state->trtable = (re_dfastate_t **) - calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (state->trtable == NULL, 0)) - return false; - return true; - } - return false; - } - - err = re_node_set_alloc (&follows, ndests + 1); - if (BE (err != REG_NOERROR, 0)) - goto out_free; - - /* Avoid arithmetic overflow in size calculation. */ - if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX) - / (3 * sizeof (re_dfastate_t *))) - < ndests), - 0)) - goto out_free; - - if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX - + ndests * 3 * sizeof (re_dfastate_t *))) - dest_states = (re_dfastate_t **) - alloca (ndests * 3 * sizeof (re_dfastate_t *)); - else - { - dest_states = (re_dfastate_t **) - malloc (ndests * 3 * sizeof (re_dfastate_t *)); - if (BE (dest_states == NULL, 0)) - { -out_free: - if (dest_states_malloced) - free (dest_states); - re_node_set_free (&follows); - for (i = 0; i < ndests; ++i) - re_node_set_free (dests_node + i); - if (dests_node_malloced) - free (dests_alloc); - return false; - } - dest_states_malloced = true; - } - dest_states_word = dest_states + ndests; - dest_states_nl = dest_states_word + ndests; - bitset_empty (acceptable); - - /* Then build the states for all destinations. */ - for (i = 0; i < ndests; ++i) - { - Idx next_node; - re_node_set_empty (&follows); - /* Merge the follows of this destination states. */ - for (j = 0; j < dests_node[i].nelem; ++j) - { - next_node = dfa->nexts[dests_node[i].elems[j]]; - if (next_node != REG_MISSING) - { - err = re_node_set_merge (&follows, dfa->eclosures + next_node); - if (BE (err != REG_NOERROR, 0)) - goto out_free; - } - } - dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0); - if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - /* If the new state has context constraint, - build appropriate states for these contexts. */ - if (dest_states[i]->has_constraint) - { - dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows, - CONTEXT_WORD); - if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - - if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1) - need_word_trtable = true; - - dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows, - CONTEXT_NEWLINE); - if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0)) - goto out_free; - } - else - { - dest_states_word[i] = dest_states[i]; - dest_states_nl[i] = dest_states[i]; - } - bitset_merge (acceptable, dests_ch[i]); - } - - if (!BE (need_word_trtable, 0)) - { - /* We don't care about whether the following character is a word - character, or we are in a single-byte character set so we can - discern by looking at the character code: allocate a - 256-entry transition table. */ - trtable = state->trtable = - (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX); - if (BE (trtable == NULL, 0)) - goto out_free; - - /* For all characters ch...: */ - for (i = 0; i < BITSET_WORDS; ++i) - for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; - elem; - mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) - { - /* There must be exactly one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) - ; - - /* j-th destination accepts the word character ch. */ - if (dfa->word_char[i] & mask) - trtable[ch] = dest_states_word[j]; - else - trtable[ch] = dest_states[j]; - } - } - else - { - /* We care about whether the following character is a word - character, and we are in a multi-byte character set: discern - by looking at the character code: build two 256-entry - transition tables, one starting at trtable[0] and one - starting at trtable[SBC_MAX]. */ - trtable = state->word_trtable = - (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX); - if (BE (trtable == NULL, 0)) - goto out_free; - - /* For all characters ch...: */ - for (i = 0; i < BITSET_WORDS; ++i) - for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1; - elem; - mask <<= 1, elem >>= 1, ++ch) - if (BE (elem & 1, 0)) - { - /* There must be exactly one destination which accepts - character ch. See group_nodes_into_DFAstates. */ - for (j = 0; (dests_ch[j][i] & mask) == 0; ++j) - ; - - /* j-th destination accepts the word character ch. */ - trtable[ch] = dest_states[j]; - trtable[ch + SBC_MAX] = dest_states_word[j]; - } - } - - /* new line */ - if (bitset_contain (acceptable, NEWLINE_CHAR)) - { - /* The current state accepts newline character. */ - for (j = 0; j < ndests; ++j) - if (bitset_contain (dests_ch[j], NEWLINE_CHAR)) - { - /* k-th destination accepts newline character. */ - trtable[NEWLINE_CHAR] = dest_states_nl[j]; - if (need_word_trtable) - trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j]; - /* There must be only one destination which accepts - newline. See group_nodes_into_DFAstates. */ - break; - } - } - - if (dest_states_malloced) - free (dest_states); - - re_node_set_free (&follows); - for (i = 0; i < ndests; ++i) - re_node_set_free (dests_node + i); - - if (dests_node_malloced) - free (dests_alloc); - - return true; -} - -/* Group all nodes belonging to STATE into several destinations. - Then for all destinations, set the nodes belonging to the destination - to DESTS_NODE[i] and set the characters accepted by the destination - to DEST_CH[i]. This function return the number of destinations. */ - -static Idx -internal_function -group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state, - re_node_set *dests_node, bitset_t *dests_ch) -{ - reg_errcode_t err; - bool ok; - Idx i, j, k; - Idx ndests; /* Number of the destinations from 'state'. */ - bitset_t accepts; /* Characters a node can accept. */ - const re_node_set *cur_nodes = &state->nodes; - bitset_empty (accepts); - ndests = 0; - - /* For all the nodes belonging to 'state', */ - for (i = 0; i < cur_nodes->nelem; ++i) - { - re_token_t *node = &dfa->nodes[cur_nodes->elems[i]]; - re_token_type_t type = node->type; - unsigned int constraint = node->constraint; - - /* Enumerate all single byte character this node can accept. */ - if (type == CHARACTER) - bitset_set (accepts, node->opr.c); - else if (type == SIMPLE_BRACKET) - { - bitset_merge (accepts, node->opr.sbcset); - } - else if (type == OP_PERIOD) - { -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - bitset_merge (accepts, dfa->sb_char); - else -#endif - bitset_set_all (accepts); - if (!(dfa->syntax & RE_DOT_NEWLINE)) - bitset_clear (accepts, '\n'); - if (dfa->syntax & RE_DOT_NOT_NULL) - bitset_clear (accepts, '\0'); - } -#ifdef RE_ENABLE_I18N - else if (type == OP_UTF8_PERIOD) - { - if (ASCII_CHARS % BITSET_WORD_BITS == 0) - memset (accepts, -1, ASCII_CHARS / CHAR_BIT); - else - bitset_merge (accepts, utf8_sb_map); - if (!(dfa->syntax & RE_DOT_NEWLINE)) - bitset_clear (accepts, '\n'); - if (dfa->syntax & RE_DOT_NOT_NULL) - bitset_clear (accepts, '\0'); - } -#endif - else - continue; - - /* Check the 'accepts' and sift the characters which are not - match it the context. */ - if (constraint) - { - if (constraint & NEXT_NEWLINE_CONSTRAINT) - { - bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR); - bitset_empty (accepts); - if (accepts_newline) - bitset_set (accepts, NEWLINE_CHAR); - else - continue; - } - if (constraint & NEXT_ENDBUF_CONSTRAINT) - { - bitset_empty (accepts); - continue; - } - - if (constraint & NEXT_WORD_CONSTRAINT) - { - bitset_word_t any_set = 0; - if (type == CHARACTER && !node->word_char) - { - bitset_empty (accepts); - continue; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j])); - else -#endif - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= dfa->word_char[j]); - if (!any_set) - continue; - } - if (constraint & NEXT_NOTWORD_CONSTRAINT) - { - bitset_word_t any_set = 0; - if (type == CHARACTER && node->word_char) - { - bitset_empty (accepts); - continue; - } -#ifdef RE_ENABLE_I18N - if (dfa->mb_cur_max > 1) - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j])); - else -#endif - for (j = 0; j < BITSET_WORDS; ++j) - any_set |= (accepts[j] &= ~dfa->word_char[j]); - if (!any_set) - continue; - } - } - - /* Then divide 'accepts' into DFA states, or create a new - state. Above, we make sure that accepts is not empty. */ - for (j = 0; j < ndests; ++j) - { - bitset_t intersec; /* Intersection sets, see below. */ - bitset_t remains; - /* Flags, see below. */ - bitset_word_t has_intersec, not_subset, not_consumed; - - /* Optimization, skip if this state doesn't accept the character. */ - if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c)) - continue; - - /* Enumerate the intersection set of this state and 'accepts'. */ - has_intersec = 0; - for (k = 0; k < BITSET_WORDS; ++k) - has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k]; - /* And skip if the intersection set is empty. */ - if (!has_intersec) - continue; - - /* Then check if this state is a subset of 'accepts'. */ - not_subset = not_consumed = 0; - for (k = 0; k < BITSET_WORDS; ++k) - { - not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k]; - not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k]; - } - - /* If this state isn't a subset of 'accepts', create a - new group state, which has the 'remains'. */ - if (not_subset) - { - bitset_copy (dests_ch[ndests], remains); - bitset_copy (dests_ch[j], intersec); - err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]); - if (BE (err != REG_NOERROR, 0)) - goto error_return; - ++ndests; - } - - /* Put the position in the current group. */ - ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]); - if (BE (! ok, 0)) - goto error_return; - - /* If all characters are consumed, go to next node. */ - if (!not_consumed) - break; - } - /* Some characters remain, create a new group. */ - if (j == ndests) - { - bitset_copy (dests_ch[ndests], accepts); - err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]); - if (BE (err != REG_NOERROR, 0)) - goto error_return; - ++ndests; - bitset_empty (accepts); - } - } - return ndests; - error_return: - for (j = 0; j < ndests; ++j) - re_node_set_free (dests_node + j); - return REG_MISSING; -} - -#ifdef RE_ENABLE_I18N -/* Check how many bytes the node 'dfa->nodes[node_idx]' accepts. - Return the number of the bytes the node accepts. - STR_IDX is the current index of the input string. - - This function handles the nodes which can accept one character, or - one collating element like '.', '[a-z]', opposite to the other nodes - can only accept one byte. */ - -static int -internal_function -check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx, - const re_string_t *input, Idx str_idx) -{ - const re_token_t *node = dfa->nodes + node_idx; - int char_len, elem_len; - Idx i; - - if (BE (node->type == OP_UTF8_PERIOD, 0)) - { - unsigned char c = re_string_byte_at (input, str_idx), d; - if (BE (c < 0xc2, 1)) - return 0; - - if (str_idx + 2 > input->len) - return 0; - - d = re_string_byte_at (input, str_idx + 1); - if (c < 0xe0) - return (d < 0x80 || d > 0xbf) ? 0 : 2; - else if (c < 0xf0) - { - char_len = 3; - if (c == 0xe0 && d < 0xa0) - return 0; - } - else if (c < 0xf8) - { - char_len = 4; - if (c == 0xf0 && d < 0x90) - return 0; - } - else if (c < 0xfc) - { - char_len = 5; - if (c == 0xf8 && d < 0x88) - return 0; - } - else if (c < 0xfe) - { - char_len = 6; - if (c == 0xfc && d < 0x84) - return 0; - } - else - return 0; - - if (str_idx + char_len > input->len) - return 0; - - for (i = 1; i < char_len; ++i) - { - d = re_string_byte_at (input, str_idx + i); - if (d < 0x80 || d > 0xbf) - return 0; - } - return char_len; - } - - char_len = re_string_char_size_at (input, str_idx); - if (node->type == OP_PERIOD) - { - if (char_len <= 1) - return 0; - /* FIXME: I don't think this if is needed, as both '\n' - and '\0' are char_len == 1. */ - /* '.' accepts any one character except the following two cases. */ - if ((!(dfa->syntax & RE_DOT_NEWLINE) && - re_string_byte_at (input, str_idx) == '\n') || - ((dfa->syntax & RE_DOT_NOT_NULL) && - re_string_byte_at (input, str_idx) == '\0')) - return 0; - return char_len; - } - - elem_len = re_string_elem_size_at (input, str_idx); - if ((elem_len <= 1 && char_len <= 1) || char_len == 0) - return 0; - - if (node->type == COMPLEX_BRACKET) - { - const re_charset_t *cset = node->opr.mbcset; -# ifdef _LIBC - const unsigned char *pin - = ((const unsigned char *) re_string_get_buffer (input) + str_idx); - Idx j; - uint32_t nrules; -# endif /* _LIBC */ - int match_len = 0; - wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars) - ? re_string_wchar_at (input, str_idx) : 0); - - /* match with multibyte character? */ - for (i = 0; i < cset->nmbchars; ++i) - if (wc == cset->mbchars[i]) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - /* match with character_class? */ - for (i = 0; i < cset->nchar_classes; ++i) - { - wctype_t wt = cset->char_classes[i]; - if (__iswctype (wc, wt)) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - } - -# ifdef _LIBC - nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules != 0) - { - unsigned int in_collseq = 0; - const int32_t *table, *indirect; - const unsigned char *weights, *extra; - const char *collseqwc; - /* This #include defines a local function! */ -# include - - /* match with collating_symbol? */ - if (cset->ncoll_syms) - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); - for (i = 0; i < cset->ncoll_syms; ++i) - { - const unsigned char *coll_sym = extra + cset->coll_syms[i]; - /* Compare the length of input collating element and - the length of current collating element. */ - if (*coll_sym != elem_len) - continue; - /* Compare each bytes. */ - for (j = 0; j < *coll_sym; j++) - if (pin[j] != coll_sym[1 + j]) - break; - if (j == *coll_sym) - { - /* Match if every bytes is equal. */ - match_len = j; - goto check_node_accept_bytes_match; - } - } - - if (cset->nranges) - { - if (elem_len <= char_len) - { - collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC); - in_collseq = __collseq_table_lookup (collseqwc, wc); - } - else - in_collseq = find_collation_sequence_value (pin, elem_len); - } - /* match with range expression? */ - for (i = 0; i < cset->nranges; ++i) - if (cset->range_starts[i] <= in_collseq - && in_collseq <= cset->range_ends[i]) - { - match_len = elem_len; - goto check_node_accept_bytes_match; - } - - /* match with equivalence_class? */ - if (cset->nequiv_classes) - { - const unsigned char *cp = pin; - table = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB); - weights = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB); - extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB); - indirect = (const int32_t *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB); - int32_t idx = findidx (&cp, elem_len); - if (idx > 0) - for (i = 0; i < cset->nequiv_classes; ++i) - { - int32_t equiv_class_idx = cset->equiv_classes[i]; - size_t weight_len = weights[idx & 0xffffff]; - if (weight_len == weights[equiv_class_idx & 0xffffff] - && (idx >> 24) == (equiv_class_idx >> 24)) - { - Idx cnt = 0; - - idx &= 0xffffff; - equiv_class_idx &= 0xffffff; - - while (cnt <= weight_len - && (weights[equiv_class_idx + 1 + cnt] - == weights[idx + 1 + cnt])) - ++cnt; - if (cnt > weight_len) - { - match_len = elem_len; - goto check_node_accept_bytes_match; - } - } - } - } - } - else -# endif /* _LIBC */ - { - /* match with range expression? */ -#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'}; - cmp_buf[2] = wc; -#endif - for (i = 0; i < cset->nranges; ++i) - { - cmp_buf[0] = cset->range_starts[i]; - cmp_buf[4] = cset->range_ends[i]; - if (wcscoll (cmp_buf, cmp_buf + 2) <= 0 - && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0) - { - match_len = char_len; - goto check_node_accept_bytes_match; - } - } - } - check_node_accept_bytes_match: - if (!cset->non_match) - return match_len; - else - { - if (match_len > 0) - return 0; - else - return (elem_len > char_len) ? elem_len : char_len; - } - } - return 0; -} - -# ifdef _LIBC -static unsigned int -internal_function -find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len) -{ - uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES); - if (nrules == 0) - { - if (mbs_len == 1) - { - /* No valid character. Match it as a single byte character. */ - const unsigned char *collseq = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB); - return collseq[mbs[0]]; - } - return UINT_MAX; - } - else - { - int32_t idx; - const unsigned char *extra = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB); - int32_t extrasize = (const unsigned char *) - _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra; - - for (idx = 0; idx < extrasize;) - { - int mbs_cnt; - bool found = false; - int32_t elem_mbs_len; - /* Skip the name of collating element name. */ - idx = idx + extra[idx] + 1; - elem_mbs_len = extra[idx++]; - if (mbs_len == elem_mbs_len) - { - for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt) - if (extra[idx + mbs_cnt] != mbs[mbs_cnt]) - break; - if (mbs_cnt == elem_mbs_len) - /* Found the entry. */ - found = true; - } - /* Skip the byte sequence of the collating element. */ - idx += elem_mbs_len; - /* Adjust for the alignment. */ - idx = (idx + 3) & ~3; - /* Skip the collation sequence value. */ - idx += sizeof (uint32_t); - /* Skip the wide char sequence of the collating element. */ - idx = idx + sizeof (uint32_t) * (*(int32_t *) (extra + idx) + 1); - /* If we found the entry, return the sequence value. */ - if (found) - return *(uint32_t *) (extra + idx); - /* Skip the collation sequence value. */ - idx += sizeof (uint32_t); - } - return UINT_MAX; - } -} -# endif /* _LIBC */ -#endif /* RE_ENABLE_I18N */ - -/* Check whether the node accepts the byte which is IDX-th - byte of the INPUT. */ - -static bool -internal_function -check_node_accept (const re_match_context_t *mctx, const re_token_t *node, - Idx idx) -{ - unsigned char ch; - ch = re_string_byte_at (&mctx->input, idx); - switch (node->type) - { - case CHARACTER: - if (node->opr.c != ch) - return false; - break; - - case SIMPLE_BRACKET: - if (!bitset_contain (node->opr.sbcset, ch)) - return false; - break; - -#ifdef RE_ENABLE_I18N - case OP_UTF8_PERIOD: - if (ch >= ASCII_CHARS) - return false; - /* FALLTHROUGH */ -#endif - case OP_PERIOD: - if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE)) - || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL))) - return false; - break; - - default: - return false; - } - - if (node->constraint) - { - /* The node has constraints. Check whether the current context - satisfies the constraints. */ - unsigned int context = re_string_context_at (&mctx->input, idx, - mctx->eflags); - if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context)) - return false; - } - - return true; -} - -/* Extend the buffers, if the buffers have run out. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -extend_buffers (re_match_context_t *mctx) -{ - reg_errcode_t ret; - re_string_t *pstr = &mctx->input; - - /* Avoid overflow. */ - if (BE (MIN (IDX_MAX, SIZE_MAX / sizeof (re_dfastate_t *)) / 2 - <= pstr->bufs_len, 0)) - return REG_ESPACE; - - /* Double the lengths of the buffers. */ - ret = re_string_realloc_buffers (pstr, MIN (pstr->len, pstr->bufs_len * 2)); - if (BE (ret != REG_NOERROR, 0)) - return ret; - - if (mctx->state_log != NULL) - { - /* And double the length of state_log. */ - /* XXX We have no indication of the size of this buffer. If this - allocation fail we have no indication that the state_log array - does not have the right size. */ - re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *, - pstr->bufs_len + 1); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - mctx->state_log = new_array; - } - - /* Then reconstruct the buffers. */ - if (pstr->icase) - { -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - { - ret = build_wcs_upper_buffer (pstr); - if (BE (ret != REG_NOERROR, 0)) - return ret; - } - else -#endif /* RE_ENABLE_I18N */ - build_upper_buffer (pstr); - } - else - { -#ifdef RE_ENABLE_I18N - if (pstr->mb_cur_max > 1) - build_wcs_buffer (pstr); - else -#endif /* RE_ENABLE_I18N */ - { - if (pstr->trans != NULL) - re_string_translate_buffer (pstr); - } - } - return REG_NOERROR; -} - - -/* Functions for matching context. */ - -/* Initialize MCTX. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_init (re_match_context_t *mctx, int eflags, Idx n) -{ - mctx->eflags = eflags; - mctx->match_last = REG_MISSING; - if (n > 0) - { - /* Avoid overflow. */ - size_t max_object_size = - MAX (sizeof (struct re_backref_cache_entry), - sizeof (re_sub_match_top_t *)); - if (BE (MIN (IDX_MAX, SIZE_MAX / max_object_size) < n, 0)) - return REG_ESPACE; - - mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n); - mctx->sub_tops = re_malloc (re_sub_match_top_t *, n); - if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0)) - return REG_ESPACE; - } - /* Already zero-ed by the caller. - else - mctx->bkref_ents = NULL; - mctx->nbkref_ents = 0; - mctx->nsub_tops = 0; */ - mctx->abkref_ents = n; - mctx->max_mb_elem_len = 1; - mctx->asub_tops = n; - return REG_NOERROR; -} - -/* Clean the entries which depend on the current input in MCTX. - This function must be invoked when the matcher changes the start index - of the input, or changes the input string. */ - -static void -internal_function -match_ctx_clean (re_match_context_t *mctx) -{ - Idx st_idx; - for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx) - { - Idx sl_idx; - re_sub_match_top_t *top = mctx->sub_tops[st_idx]; - for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx) - { - re_sub_match_last_t *last = top->lasts[sl_idx]; - re_free (last->path.array); - re_free (last); - } - re_free (top->lasts); - if (top->path) - { - re_free (top->path->array); - re_free (top->path); - } - free (top); - } - - mctx->nsub_tops = 0; - mctx->nbkref_ents = 0; -} - -/* Free all the memory associated with MCTX. */ - -static void -internal_function -match_ctx_free (re_match_context_t *mctx) -{ - /* First, free all the memory associated with MCTX->SUB_TOPS. */ - match_ctx_clean (mctx); - re_free (mctx->sub_tops); - re_free (mctx->bkref_ents); -} - -/* Add a new backreference entry to MCTX. - Note that we assume that caller never call this function with duplicate - entry, and call with STR_IDX which isn't smaller than any existing entry. -*/ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from, - Idx to) -{ - if (mctx->nbkref_ents >= mctx->abkref_ents) - { - struct re_backref_cache_entry* new_entry; - new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry, - mctx->abkref_ents * 2); - if (BE (new_entry == NULL, 0)) - { - re_free (mctx->bkref_ents); - return REG_ESPACE; - } - mctx->bkref_ents = new_entry; - memset (mctx->bkref_ents + mctx->nbkref_ents, '\0', - sizeof (struct re_backref_cache_entry) * mctx->abkref_ents); - mctx->abkref_ents *= 2; - } - if (mctx->nbkref_ents > 0 - && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx) - mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1; - - mctx->bkref_ents[mctx->nbkref_ents].node = node; - mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx; - mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from; - mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to; - - /* This is a cache that saves negative results of check_dst_limits_calc_pos. - If bit N is clear, means that this entry won't epsilon-transition to - an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If - it is set, check_dst_limits_calc_pos_1 will recurse and try to find one - such node. - - A backreference does not epsilon-transition unless it is empty, so set - to all zeros if FROM != TO. */ - mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map - = (from == to ? -1 : 0); - - mctx->bkref_ents[mctx->nbkref_ents++].more = 0; - if (mctx->max_mb_elem_len < to - from) - mctx->max_mb_elem_len = to - from; - return REG_NOERROR; -} - -/* Return the first entry with the same str_idx, or REG_MISSING if none is - found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */ - -static Idx -internal_function -search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx) -{ - Idx left, right, mid, last; - last = right = mctx->nbkref_ents; - for (left = 0; left < right;) - { - mid = (left + right) / 2; - if (mctx->bkref_ents[mid].str_idx < str_idx) - left = mid + 1; - else - right = mid; - } - if (left < last && mctx->bkref_ents[left].str_idx == str_idx) - return left; - else - return REG_MISSING; -} - -/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches - at STR_IDX. */ - -static reg_errcode_t -internal_function __attribute_warn_unused_result__ -match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx) -{ -#ifdef DEBUG - assert (mctx->sub_tops != NULL); - assert (mctx->asub_tops > 0); -#endif - if (BE (mctx->nsub_tops == mctx->asub_tops, 0)) - { - Idx new_asub_tops = mctx->asub_tops * 2; - re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops, - re_sub_match_top_t *, - new_asub_tops); - if (BE (new_array == NULL, 0)) - return REG_ESPACE; - mctx->sub_tops = new_array; - mctx->asub_tops = new_asub_tops; - } - mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t)); - if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0)) - return REG_ESPACE; - mctx->sub_tops[mctx->nsub_tops]->node = node; - mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx; - return REG_NOERROR; -} - -/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches - at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */ - -static re_sub_match_last_t * -internal_function -match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx) -{ - re_sub_match_last_t *new_entry; - if (BE (subtop->nlasts == subtop->alasts, 0)) - { - Idx new_alasts = 2 * subtop->alasts + 1; - re_sub_match_last_t **new_array = re_realloc (subtop->lasts, - re_sub_match_last_t *, - new_alasts); - if (BE (new_array == NULL, 0)) - return NULL; - subtop->lasts = new_array; - subtop->alasts = new_alasts; - } - new_entry = calloc (1, sizeof (re_sub_match_last_t)); - if (BE (new_entry != NULL, 1)) - { - subtop->lasts[subtop->nlasts] = new_entry; - new_entry->node = node; - new_entry->str_idx = str_idx; - ++subtop->nlasts; - } - return new_entry; -} - -static void -internal_function -sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts, - re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx) -{ - sctx->sifted_states = sifted_sts; - sctx->limited_states = limited_sts; - sctx->last_node = last_node; - sctx->last_str_idx = last_str_idx; - re_node_set_init_empty (&sctx->limits); -} diff --git a/gnulib/lib/safe-alloc.c b/gnulib/lib/safe-alloc.c deleted file mode 100644 index e08b6c2..0000000 --- a/gnulib/lib/safe-alloc.c +++ /dev/null @@ -1,121 +0,0 @@ -/* safe-alloc.c: safer memory allocation - - 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 - Free Software Foundation; either version 2.1 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU 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 Daniel Berrange , 2008 */ - -#include - -/* Specification. */ -#include "safe-alloc.h" - -#include -#include -#include - - -/* Return 1 if an array of N objects, each of size S, cannot exist due - to size arithmetic overflow. S must be positive and N must be - nonnegative. This is a macro, not an inline function, so that it - works correctly even when SIZE_MAX < N. - - By gnulib convention, SIZE_MAX represents overflow in size - calculations, so the conservative dividend to use here is - SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value. - However, malloc (SIZE_MAX) fails on all known hosts where - sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for - exactly-SIZE_MAX allocations on such hosts; this avoids a test and - branch when S is known to be 1. - - This is the same as xalloc_oversized from xalloc.h -*/ -#define safe_alloc_oversized(n, s) \ - ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n)) - - -/** - * safe_alloc_alloc_n: - * @ptrptr: pointer to pointer for address of allocated memory - * @size: number of bytes to allocate - * @count: number of elements to allocate - * - * Allocate an array of memory 'count' elements long, - * each with 'size' bytes. Return the address of the - * allocated memory in 'ptrptr'. The newly allocated - * memory is filled with zeros. - * - * Return -1 on failure to allocate, zero on success - */ -int -safe_alloc_alloc_n (void *ptrptr, size_t size, size_t count, int zeroed) -{ - if (size == 0 || count == 0) - { - *(void **) ptrptr = NULL; - return 0; - } - - if (safe_alloc_oversized (count, size)) - { - errno = ENOMEM; - return -1; - } - - if (zeroed) - *(void **) ptrptr = calloc (count, size); - else - *(void **) ptrptr = malloc (count * size); - - if (*(void **) ptrptr == NULL) - return -1; - return 0; -} - -/** - * safe_alloc_realloc_n: - * @ptrptr: pointer to pointer for address of allocated memory - * @size: number of bytes to allocate - * @count: number of elements in array - * - * Resize the block of memory in 'ptrptr' to be an array of - * 'count' elements, each 'size' bytes in length. Update 'ptrptr' - * with the address of the newly allocated memory. On failure, - * 'ptrptr' is not changed and still points to the original memory - * block. The newly allocated memory is filled with zeros. - * - * Return -1 on failure to allocate, zero on success - */ -int -safe_alloc_realloc_n (void *ptrptr, size_t size, size_t count) -{ - void *tmp; - if (size == 0 || count == 0) - { - free (*(void **) ptrptr); - *(void **) ptrptr = NULL; - return 0; - } - if (safe_alloc_oversized (count, size)) - { - errno = ENOMEM; - return -1; - } - tmp = realloc (*(void **) ptrptr, size * count); - if (!tmp) - return -1; - *(void **) ptrptr = tmp; - return 0; -} diff --git a/gnulib/lib/safe-alloc.h b/gnulib/lib/safe-alloc.h deleted file mode 100644 index b0377a6..0000000 --- a/gnulib/lib/safe-alloc.h +++ /dev/null @@ -1,121 +0,0 @@ -/* safe-alloc.h: safer memory allocation - - 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 - Free Software Foundation; either version 2.1 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU 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 Daniel Berrange , 2008 */ - -#ifndef SAFE_ALLOC_H_ -# define SAFE_ALLOC_H_ - -# include - -#ifndef __GNUC_PREREQ -# if defined __GNUC__ && defined __GNUC_MINOR__ -# define __GNUC_PREREQ(maj, min) \ - ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min)) -# else -# define __GNUC_PREREQ(maj, min) 0 -# endif -#endif - -# ifndef _GL_ATTRIBUTE_RETURN_CHECK -# if __GNUC_PREREQ (3, 4) -# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) -# else -# define _GL_ATTRIBUTE_RETURN_CHECK -# endif -# endif - -/* Don't call these directly - use the macros below */ -int -safe_alloc_alloc_n (void *ptrptr, size_t size, size_t count, int zeroed) - _GL_ATTRIBUTE_RETURN_CHECK; - -int -safe_alloc_realloc_n (void *ptrptr, size_t size, size_t count) - _GL_ATTRIBUTE_RETURN_CHECK; - -/** - * ALLOC: - * @ptr: pointer to hold address of allocated memory - * - * Allocate sizeof(*ptr) bytes of memory and store - * the address of allocated memory in 'ptr'. Fill the - * newly allocated memory with zeros. - * - * Return -1 on failure to allocate, zero on success - */ -# define ALLOC(ptr) \ - safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), 1, 1) - -/** - * ALLOC_N: - * @ptr: pointer to hold address of allocated memory - * @count: number of elements to allocate - * - * Allocate an array of 'count' elements, each sizeof(*ptr) - * bytes long and store the address of allocated memory in - * 'ptr'. Fill the newly allocated memory with zeros. - * - * Return -1 on failure, 0 on success - */ -# define ALLOC_N(ptr, count) \ - safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), (count), 1) - -/** - * ALLOC_N_UNINITIALIZED: - * @ptr: pointer to hold address of allocated memory - * @count: number of elements to allocate - * - * Allocate an array of 'count' elements, each sizeof(*ptr) - * bytes long and store the address of allocated memory in - * 'ptr'. Do not initialize the new memory at all. - * - * Return -1 on failure to allocate, zero on success - */ -# define ALLOC_N_UNINITIALIZED(ptr, count) \ - safe_alloc_alloc_n (&(ptr), sizeof (*(ptr)), (count), 0) - -/** - * REALLOC_N: - * @ptr: pointer to hold address of allocated memory - * @count: number of elements to allocate - * - * Re-allocate an array of 'count' elements, each sizeof(*ptr) - * bytes long and store the address of allocated memory in - * 'ptr'. Fill the newly allocated memory with zeros - * - * Return -1 on failure to reallocate, zero on success - */ -# define REALLOC_N(ptr, count) \ - safe_alloc_realloc_n (&(ptr), sizeof (*(ptr)), (count)) - -/** - * FREE: - * @ptr: pointer holding address to be freed - * - * Free the memory stored in 'ptr' and update to point - * to NULL. - */ -# define FREE(ptr) \ - do \ - { \ - free (ptr); \ - (ptr) = NULL; \ - } \ - while (0) - -#endif /* SAFE_ALLOC_H_ */ diff --git a/gnulib/lib/se-context.in.h b/gnulib/lib/se-context.in.h deleted file mode 100644 index cb7419a..0000000 --- a/gnulib/lib/se-context.in.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef SELINUX_CONTEXT_H -# define SELINUX_CONTEXT_H - -# include - -/* The definition of _GL_UNUSED_PARAMETER is copied here. */ - -typedef int context_t; -static inline context_t context_new (char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return 0; } -static inline char *context_str (context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return (void *) 0; } -static inline void context_free (context_t c _GL_UNUSED_PARAMETER) {} - -static inline int context_user_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_role_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_range_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int context_type_set (context_t sc _GL_UNUSED_PARAMETER, - char const *s _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -#endif diff --git a/gnulib/lib/se-selinux.in.h b/gnulib/lib/se-selinux.in.h deleted file mode 100644 index 1081e90..0000000 --- a/gnulib/lib/se-selinux.in.h +++ /dev/null @@ -1,97 +0,0 @@ -/* Replacement for platforms that lack it. - 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 . */ - -#ifndef _@GUARD_PREFIX@_SELINUX_SELINUX_H -# define _@GUARD_PREFIX@_SELINUX_SELINUX_H - -# if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -# endif -@PRAGMA_COLUMNS@ - -# if HAVE_SELINUX_SELINUX_H - -#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@ - -# else - -# include -# include - -/* The definition of _GL_UNUSED_PARAMETER is copied here. */ - -# if !GNULIB_defined_security_types - -typedef unsigned short security_class_t; -# define security_context_t char* -# define is_selinux_enabled() 0 - -static inline int getcon (security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline void freecon (security_context_t con _GL_UNUSED_PARAMETER) {} - - -static inline int getfscreatecon (security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setfscreatecon (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int matchpathcon (char const *file _GL_UNUSED_PARAMETER, - mode_t m _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int getfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int lgetfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int fgetfilecon (int fd, - security_context_t *con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int lsetfilecon (char const *file _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int fsetfilecon (int fd _GL_UNUSED_PARAMETER, - security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -static inline int security_check_context - (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int security_check_context_raw - (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int setexeccon (security_context_t con _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int security_compute_create - (security_context_t scon _GL_UNUSED_PARAMETER, - security_context_t tcon _GL_UNUSED_PARAMETER, - security_class_t tclass _GL_UNUSED_PARAMETER, - security_context_t *newcon _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } -static inline int matchpathcon_init_prefix - (char const *path _GL_UNUSED_PARAMETER, - char const *prefix _GL_UNUSED_PARAMETER) - { errno = ENOTSUP; return -1; } - -# define GNULIB_defined_security_types 1 -# endif - -# endif -#endif /* _@GUARD_PREFIX@_SELINUX_SELINUX_H */ diff --git a/gnulib/lib/size_max.h b/gnulib/lib/size_max.h deleted file mode 100644 index 7187be7..0000000 --- a/gnulib/lib/size_max.h +++ /dev/null @@ -1,30 +0,0 @@ -/* size_max.h -- declare SIZE_MAX through system headers - 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 - 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 . */ - -#ifndef GNULIB_SIZE_MAX_H -#define GNULIB_SIZE_MAX_H - -/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */ -# include -/* Get SIZE_MAX declaration on systems like glibc 2. */ -# if HAVE_STDINT_H -# include -# endif -/* On systems where these include files don't define it, SIZE_MAX is defined - in config.h. */ - -#endif /* GNULIB_SIZE_MAX_H */ diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c deleted file mode 100644 index 0a0b05c..0000000 --- a/gnulib/lib/stat.c +++ /dev/null @@ -1,138 +0,0 @@ -/* Work around platform bugs in stat. - 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 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 . */ - -/* written by Eric Blake */ - -/* If the user's config.h happens to include , let it include only - the system's here, so that orig_stat doesn't recurse to - rpl_stat. */ -#define __need_system_sys_stat_h -#include - -/* Get the original definition of stat. It might be defined as a macro. */ -#include -#include -#undef __need_system_sys_stat_h - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# if _GL_WINDOWS_64_BIT_ST_SIZE -# undef stat /* avoid warning on mingw64 with _FILE_OFFSET_BITS=64 */ -# define stat _stati64 -# define REPLACE_FUNC_STAT_DIR 1 -# undef REPLACE_FUNC_STAT_FILE -# elif REPLACE_FUNC_STAT_FILE -/* mingw64 has a broken stat() function, based on _stat(), in libmingwex.a. - Bypass it. */ -# define stat _stat -# define REPLACE_FUNC_STAT_DIR 1 -# undef REPLACE_FUNC_STAT_FILE -# endif -#endif - -static inline int -orig_stat (const char *filename, struct stat *buf) -{ - return stat (filename, buf); -} - -/* Specification. */ -/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc - eliminates this include because of the preliminary #include - above. */ -#include "sys/stat.h" - -#include -#include -#include -#include -#include "dosname.h" -#include "verify.h" - -#if REPLACE_FUNC_STAT_DIR -# include "pathmax.h" - /* The only known systems where REPLACE_FUNC_STAT_DIR is needed also - have a constant PATH_MAX. */ -# ifndef PATH_MAX -# error "Please port this replacement to your platform" -# endif -#endif - -/* Store information about NAME into ST. Work around bugs with - trailing slashes. Mingw has other bugs (such as st_ino always - being 0 on success) which this wrapper does not work around. But - at least this implementation provides the ability to emulate fchdir - correctly. */ - -int -rpl_stat (char const *name, struct stat *st) -{ - int result = orig_stat (name, st); -#if REPLACE_FUNC_STAT_FILE - /* Solaris 9 mistakenly succeeds when given a non-directory with a - trailing slash. */ - if (result == 0 && !S_ISDIR (st->st_mode)) - { - size_t len = strlen (name); - if (ISSLASH (name[len - 1])) - { - errno = ENOTDIR; - return -1; - } - } -#endif /* REPLACE_FUNC_STAT_FILE */ -#if REPLACE_FUNC_STAT_DIR - - if (result == -1 && errno == ENOENT) - { - /* Due to mingw's oddities, there are some directories (like - c:\) where stat() only succeeds with a trailing slash, and - other directories (like c:\windows) where stat() only - succeeds without a trailing slash. But we want the two to be - synonymous, since chdir() manages either style. Likewise, Mingw also - reports ENOENT for names longer than PATH_MAX, when we want - ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR. - Fortunately, mingw PATH_MAX is small enough for stack - allocation. */ - char fixed_name[PATH_MAX + 1] = {0}; - size_t len = strlen (name); - bool check_dir = false; - verify (PATH_MAX <= 4096); - if (PATH_MAX <= len) - errno = ENAMETOOLONG; - else if (len) - { - strcpy (fixed_name, name); - if (ISSLASH (fixed_name[len - 1])) - { - check_dir = true; - while (len && ISSLASH (fixed_name[len - 1])) - fixed_name[--len] = '\0'; - if (!len) - fixed_name[0] = '/'; - } - else - fixed_name[len++] = '/'; - result = orig_stat (fixed_name, st); - if (result == 0 && check_dir && !S_ISDIR (st->st_mode)) - { - result = -1; - errno = ENOTDIR; - } - } - } -#endif /* REPLACE_FUNC_STAT_DIR */ - return result; -} diff --git a/gnulib/lib/stdbool.in.h b/gnulib/lib/stdbool.in.h deleted file mode 100644 index a329c70..0000000 --- a/gnulib/lib/stdbool.in.h +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 - 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 . */ - -#ifndef _GL_STDBOOL_H -#define _GL_STDBOOL_H - -/* ISO C 99 for platforms that lack it. */ - -/* Usage suggestions: - - Programs that use should be aware of some limitations - and standards compliance issues. - - Standards compliance: - - - must be #included before 'bool', 'false', 'true' - can be used. - - - You cannot assume that sizeof (bool) == 1. - - - Programs should not undefine the macros bool, true, and false, - as C99 lists that as an "obsolescent feature". - - Limitations of this substitute, when used in a C89 environment: - - - must be #included before the '_Bool' type can be used. - - - You cannot assume that _Bool is a typedef; it might be a macro. - - - Bit-fields of type 'bool' are not supported. Portable code - should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. - - - In C99, casts and automatic conversions to '_Bool' or 'bool' are - performed in such a way that every nonzero value gets converted - to 'true', and zero gets converted to 'false'. This doesn't work - with this substitute. With this substitute, only the values 0 and 1 - give the expected result when converted to _Bool' or 'bool'. - - - C99 allows the use of (_Bool)0.0 in constant expressions, but - this substitute cannot always provide this property. - - Also, it is suggested that programs use 'bool' rather than '_Bool'; - this isn't required, but 'bool' is more common. */ - - -/* 7.16. Boolean type and values */ - -/* BeOS already #defines false 0, true 1. We use the same - definitions below, but temporarily we have to #undef them. */ -#if defined __BEOS__ && !defined __HAIKU__ -# include /* defines bool but not _Bool */ -# undef false -# undef true -#endif - -/* For the sake of symbolic names in gdb, we define true and false as - enum constants, not only as macros. - It is tempting to write - typedef enum { false = 0, true = 1 } _Bool; - so that gdb prints values of type 'bool' symbolically. But if we do - this, values of type '_Bool' may promote to 'int' or 'unsigned int' - (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' - (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the - enum; this ensures that '_Bool' promotes to 'int'. */ -#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__) - /* A compiler known to have 'bool'. */ - /* If the compiler already has both 'bool' and '_Bool', we can assume they - are the same types. */ -# if !@HAVE__BOOL@ -typedef bool _Bool; -# endif -#else -# if !defined __GNUC__ - /* If @HAVE__BOOL@: - Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when - the built-in _Bool type is used. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - Similar bugs are likely with other compilers as well; this file - wouldn't be used if was working. - So we override the _Bool type. - If !@HAVE__BOOL@: - Need to define _Bool ourselves. As 'signed char' or as an enum type? - Use of a typedef, with SunPRO C, leads to a stupid - "warning: _Bool is a keyword in ISO C99". - Use of an enum type, with IRIX cc, leads to a stupid - "warning(1185): enumerated type mixed with another type". - Even the existence of an enum type, without a typedef, - "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. - The only benefit of the enum, debuggability, is not important - with these compilers. So use 'signed char' and no enum. */ -# define _Bool signed char -# else - /* With this compiler, trust the _Bool type if the compiler has it. */ -# if !@HAVE__BOOL@ -typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; -# endif -# endif -#endif -#define bool _Bool - -/* The other macros must be usable in preprocessor directives. */ -#define false 0 -#define true 1 -#define __bool_true_false_are_defined 1 - -#endif /* _GL_STDBOOL_H */ diff --git a/gnulib/lib/stddef.in.h b/gnulib/lib/stddef.in.h deleted file mode 100644 index 9384cf6..0000000 --- a/gnulib/lib/stddef.in.h +++ /dev/null @@ -1,86 +0,0 @@ -/* A substitute for POSIX 2008 , for platforms that have issues. - - 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 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 Eric Blake. */ - -/* - * POSIX 2008 for platforms that have issues. - * - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_wchar_t || defined __need_size_t \ - || defined __need_ptrdiff_t || defined __need_NULL \ - || defined __need_wint_t -/* Special invocation convention inside gcc header files. In - particular, gcc provides a version of that blindly - redefines NULL even when __need_wint_t was defined, even though - wint_t is not normally provided by . Hence, we must - remember if special invocation has ever been used to obtain wint_t, - in which case we need to clean up NULL yet again. */ - -# if !(defined _@GUARD_PREFIX@_STDDEF_H && defined _GL_STDDEF_WINT_T) -# ifdef __need_wint_t -# undef _@GUARD_PREFIX@_STDDEF_H -# define _GL_STDDEF_WINT_T -# endif -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ -# endif - -#else -/* Normal invocation convention. */ - -# ifndef _@GUARD_PREFIX@_STDDEF_H - -/* The include_next requires a split double-inclusion guard. */ - -# @INCLUDE_NEXT@ @NEXT_STDDEF_H@ - -# ifndef _@GUARD_PREFIX@_STDDEF_H -# define _@GUARD_PREFIX@_STDDEF_H - -/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */ -#if @REPLACE_NULL@ -# undef NULL -# ifdef __cplusplus - /* ISO C++ says that the macro NULL must expand to an integer constant - expression, hence '((void *) 0)' is not allowed in C++. */ -# if __GNUG__ >= 3 - /* GNU C++ has a __null macro that behaves like an integer ('int' or - 'long') but has the same size as a pointer. Use that, to avoid - warnings. */ -# define NULL __null -# else -# define NULL 0L -# endif -# else -# define NULL ((void *) 0) -# endif -#endif - -/* Some platforms lack wchar_t. */ -#if !@HAVE_WCHAR_T@ -# define wchar_t int -#endif - -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -# endif /* _@GUARD_PREFIX@_STDDEF_H */ -#endif /* __need_XXX */ diff --git a/gnulib/lib/stdint.in.h b/gnulib/lib/stdint.in.h deleted file mode 100644 index 4f61f95..0000000 --- a/gnulib/lib/stdint.in.h +++ /dev/null @@ -1,636 +0,0 @@ -/* 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. - - 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 . */ - -/* - * ISO C 99 for platforms that lack it. - * - */ - -#ifndef _@GUARD_PREFIX@_STDINT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* When including a system file that in turn includes , - use the system , not our substitute. This avoids - problems with (for example) VMS, whose includes - . */ -#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* On Android (Bionic libc), includes this file before - having defined 'time_t'. Therefore in this case avoid including - other system header files; just include the system's . - Ideally we should test __BIONIC__ here, but it is only defined after - has been included; hence test __ANDROID__ instead. */ -#if defined __ANDROID__ \ - && defined _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 - signed char int8_t;" that will get messed up by our macro. Our - macros should all be consistent with the system versions, except - for the "fast" types and macros, which we recommend against using - in public interfaces due to compiler differences. */ - -#if @HAVE_STDINT_H@ -# if defined __sgi && ! defined __c99 - /* Bypass IRIX's if in C89 mode, since it merely annoys users - with "This header file is to be used only for c99 mode compilations" - diagnostics. */ -# define __STDINT_H__ -# endif - - /* Some pre-C++11 implementations need this. */ -# ifdef __cplusplus -# ifndef __STDC_CONSTANT_MACROS -# define __STDC_CONSTANT_MACROS 1 -# endif -# ifndef __STDC_LIMIT_MACROS -# define __STDC_LIMIT_MACROS 1 -# endif -# endif - - /* Other systems may have an incomplete or buggy . - Include it before , since any "#include " - in would reinclude us, skipping our contents because - _@GUARD_PREFIX@_STDINT_H is defined. - The include_next requires a split double-inclusion guard. */ -# @INCLUDE_NEXT@ @NEXT_STDINT_H@ -#endif - -#if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H -#define _@GUARD_PREFIX@_STDINT_H - -/* defines some of the stdint.h types as well, on glibc, - IRIX 6.5, and OpenBSD 3.8 (via ). - AIX 5.2 isn't needed and causes troubles. - Mac OS X 10.4.6 includes (which is us), but - relies on the system definitions, so include - after @NEXT_STDINT_H@. */ -#if @HAVE_SYS_TYPES_H@ && ! defined _AIX -# include -#endif - -/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX, - LONG_MIN, LONG_MAX, ULONG_MAX. */ -#include - -#if @HAVE_INTTYPES_H@ - /* In OpenBSD 3.8, includes , which defines - int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__. - also defines intptr_t and uintptr_t. */ -# include -#elif @HAVE_SYS_INTTYPES_H@ - /* Solaris 7 has the types except the *_fast*_t types, and - the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */ -# include -#endif - -#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__ - /* Linux libc4 >= 4.6.7 and libc5 have a that defines - int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is - included by . */ -# include -#endif - -#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H - -/* Minimum and maximum values for an integer type under the usual assumption. - Return an unspecified value if BITS == 0, adding a check to pacify - picky compilers. */ - -#define _STDINT_MIN(signed, bits, zero) \ - ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero)) - -#define _STDINT_MAX(signed, bits, zero) \ - ((signed) \ - ? ~ _STDINT_MIN (signed, bits, zero) \ - : /* The expression for the unsigned case. The subtraction of (signed) \ - is a nop in the unsigned case and avoids "signed integer overflow" \ - warnings in the signed case. */ \ - ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1) - -#if !GNULIB_defined_stdint_types - -/* 7.18.1.1. Exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -#undef int8_t -#undef uint8_t -typedef signed char gl_int8_t; -typedef unsigned char gl_uint8_t; -#define int8_t gl_int8_t -#define uint8_t gl_uint8_t - -#undef int16_t -#undef uint16_t -typedef short int gl_int16_t; -typedef unsigned short int gl_uint16_t; -#define int16_t gl_int16_t -#define uint16_t gl_uint16_t - -#undef int32_t -#undef uint32_t -typedef int gl_int32_t; -typedef unsigned int gl_uint32_t; -#define int32_t gl_int32_t -#define uint32_t gl_uint32_t - -/* If the system defines INT64_MAX, assume int64_t works. That way, - if the underlying platform defines int64_t to be a 64-bit long long - int, the code below won't mistakenly define it to be a 64-bit long - int, which would mess up C++ name mangling. We must use #ifdef - rather than #if, to avoid an error with HP-UX 10.20 cc. */ - -#ifdef INT64_MAX -# define GL_INT64_T -#else -/* Do not undefine int64_t if gnulib is not being used with 64-bit - types, since otherwise it breaks platforms like Tandem/NSK. */ -# if LONG_MAX >> 31 >> 31 == 1 -# undef int64_t -typedef long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif defined _MSC_VER -# undef int64_t -typedef __int64 gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# elif @HAVE_LONG_LONG_INT@ -# undef int64_t -typedef long long int gl_int64_t; -# define int64_t gl_int64_t -# define GL_INT64_T -# endif -#endif - -#ifdef UINT64_MAX -# define GL_UINT64_T -#else -# if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# undef uint64_t -typedef unsigned long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif defined _MSC_VER -# undef uint64_t -typedef unsigned __int64 gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# undef uint64_t -typedef unsigned long long int gl_uint64_t; -# define uint64_t gl_uint64_t -# define GL_UINT64_T -# endif -#endif - -/* Avoid collision with Solaris 2.5.1 etc. */ -#define _UINT8_T -#define _UINT32_T -#define _UINT64_T - - -/* 7.18.1.2. Minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -#undef int_least8_t -#undef uint_least8_t -#undef int_least16_t -#undef uint_least16_t -#undef int_least32_t -#undef uint_least32_t -#undef int_least64_t -#undef uint_least64_t -#define int_least8_t int8_t -#define uint_least8_t uint8_t -#define int_least16_t int16_t -#define uint_least16_t uint16_t -#define int_least32_t int32_t -#define uint_least32_t uint32_t -#ifdef GL_INT64_T -# define int_least64_t int64_t -#endif -#ifdef GL_UINT64_T -# define uint_least64_t uint64_t -#endif - -/* 7.18.1.3. Fastest minimum-width integer types */ - -/* Note: Other substitutes may define these types differently. - It is not recommended to use these types in public header files. */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. The following code normally - uses types consistent with glibc, as that lessens the chance of - incompatibility with older GNU hosts. */ - -#undef int_fast8_t -#undef uint_fast8_t -#undef int_fast16_t -#undef uint_fast16_t -#undef int_fast32_t -#undef uint_fast32_t -#undef int_fast64_t -#undef uint_fast64_t -typedef signed char gl_int_fast8_t; -typedef unsigned char gl_uint_fast8_t; - -#ifdef __sun -/* Define types compatible with SunOS 5.10, so that code compiled under - earlier SunOS versions works with code compiled under SunOS 5.10. */ -typedef int gl_int_fast32_t; -typedef unsigned int gl_uint_fast32_t; -#else -typedef long int gl_int_fast32_t; -typedef unsigned long int gl_uint_fast32_t; -#endif -typedef gl_int_fast32_t gl_int_fast16_t; -typedef gl_uint_fast32_t gl_uint_fast16_t; - -#define int_fast8_t gl_int_fast8_t -#define uint_fast8_t gl_uint_fast8_t -#define int_fast16_t gl_int_fast16_t -#define uint_fast16_t gl_uint_fast16_t -#define int_fast32_t gl_int_fast32_t -#define uint_fast32_t gl_uint_fast32_t -#ifdef GL_INT64_T -# define int_fast64_t int64_t -#endif -#ifdef GL_UINT64_T -# define uint_fast64_t uint64_t -#endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ - -#undef intptr_t -#undef uintptr_t -typedef long int gl_intptr_t; -typedef unsigned long int gl_uintptr_t; -#define intptr_t gl_intptr_t -#define uintptr_t gl_uintptr_t - -/* 7.18.1.5. Greatest-width integer types */ - -/* Note: These types are compiler dependent. It may be unwise to use them in - public header files. */ - -/* If the system defines INTMAX_MAX, assume that intmax_t works, and - similarly for UINTMAX_MAX and uintmax_t. This avoids problems with - assuming one type where another is used by the system. */ - -#ifndef INTMAX_MAX -# undef INTMAX_C -# undef intmax_t -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -typedef long long int gl_intmax_t; -# define intmax_t gl_intmax_t -# elif defined GL_INT64_T -# define intmax_t int64_t -# else -typedef long int gl_intmax_t; -# define intmax_t gl_intmax_t -# endif -#endif - -#ifndef UINTMAX_MAX -# undef UINTMAX_C -# undef uintmax_t -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -typedef unsigned long long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# elif defined GL_UINT64_T -# define uintmax_t uint64_t -# else -typedef unsigned long int gl_uintmax_t; -# define uintmax_t gl_uintmax_t -# endif -#endif - -/* Verify that intmax_t and uintmax_t have the same size. Too much code - breaks if this is not the case. If this check fails, the reason is likely - to be found in the autoconf macros. */ -typedef int _verify_intmax_size[sizeof (intmax_t) == sizeof (uintmax_t) - ? 1 : -1]; - -#define GNULIB_defined_stdint_types 1 -#endif /* !GNULIB_defined_stdint_types */ - -/* 7.18.2. Limits of specified-width integer types */ - -/* 7.18.2.1. Limits of exact-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. */ - -#undef INT8_MIN -#undef INT8_MAX -#undef UINT8_MAX -#define INT8_MIN (~ INT8_MAX) -#define INT8_MAX 127 -#define UINT8_MAX 255 - -#undef INT16_MIN -#undef INT16_MAX -#undef UINT16_MAX -#define INT16_MIN (~ INT16_MAX) -#define INT16_MAX 32767 -#define UINT16_MAX 65535 - -#undef INT32_MIN -#undef INT32_MAX -#undef UINT32_MAX -#define INT32_MIN (~ INT32_MAX) -#define INT32_MAX 2147483647 -#define UINT32_MAX 4294967295U - -#if defined GL_INT64_T && ! defined INT64_MAX -/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0 - evaluates the latter incorrectly in preprocessor expressions. */ -# define INT64_MIN (- INTMAX_C (1) << 63) -# define INT64_MAX INTMAX_C (9223372036854775807) -#endif - -#if defined GL_UINT64_T && ! defined UINT64_MAX -# define UINT64_MAX UINTMAX_C (18446744073709551615) -#endif - -/* 7.18.2.2. Limits of minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types - are the same as the corresponding N_t types. */ - -#undef INT_LEAST8_MIN -#undef INT_LEAST8_MAX -#undef UINT_LEAST8_MAX -#define INT_LEAST8_MIN INT8_MIN -#define INT_LEAST8_MAX INT8_MAX -#define UINT_LEAST8_MAX UINT8_MAX - -#undef INT_LEAST16_MIN -#undef INT_LEAST16_MAX -#undef UINT_LEAST16_MAX -#define INT_LEAST16_MIN INT16_MIN -#define INT_LEAST16_MAX INT16_MAX -#define UINT_LEAST16_MAX UINT16_MAX - -#undef INT_LEAST32_MIN -#undef INT_LEAST32_MAX -#undef UINT_LEAST32_MAX -#define INT_LEAST32_MIN INT32_MIN -#define INT_LEAST32_MAX INT32_MAX -#define UINT_LEAST32_MAX UINT32_MAX - -#undef INT_LEAST64_MIN -#undef INT_LEAST64_MAX -#ifdef GL_INT64_T -# define INT_LEAST64_MIN INT64_MIN -# define INT_LEAST64_MAX INT64_MAX -#endif - -#undef UINT_LEAST64_MAX -#ifdef GL_UINT64_T -# define UINT_LEAST64_MAX UINT64_MAX -#endif - -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types - are taken from the same list of types. */ - -#undef INT_FAST8_MIN -#undef INT_FAST8_MAX -#undef UINT_FAST8_MAX -#define INT_FAST8_MIN SCHAR_MIN -#define INT_FAST8_MAX SCHAR_MAX -#define UINT_FAST8_MAX UCHAR_MAX - -#undef INT_FAST16_MIN -#undef INT_FAST16_MAX -#undef UINT_FAST16_MAX -#define INT_FAST16_MIN INT_FAST32_MIN -#define INT_FAST16_MAX INT_FAST32_MAX -#define UINT_FAST16_MAX UINT_FAST32_MAX - -#undef INT_FAST32_MIN -#undef INT_FAST32_MAX -#undef UINT_FAST32_MAX -#ifdef __sun -# define INT_FAST32_MIN INT_MIN -# define INT_FAST32_MAX INT_MAX -# define UINT_FAST32_MAX UINT_MAX -#else -# define INT_FAST32_MIN LONG_MIN -# define INT_FAST32_MAX LONG_MAX -# define UINT_FAST32_MAX ULONG_MAX -#endif - -#undef INT_FAST64_MIN -#undef INT_FAST64_MAX -#ifdef GL_INT64_T -# define INT_FAST64_MIN INT64_MIN -# define INT_FAST64_MAX INT64_MAX -#endif - -#undef UINT_FAST64_MAX -#ifdef GL_UINT64_T -# define UINT_FAST64_MAX UINT64_MAX -#endif - -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -#undef INTPTR_MIN -#undef INTPTR_MAX -#undef UINTPTR_MAX -#define INTPTR_MIN LONG_MIN -#define INTPTR_MAX LONG_MAX -#define UINTPTR_MAX ULONG_MAX - -/* 7.18.2.5. Limits of greatest-width integer types */ - -#ifndef INTMAX_MAX -# undef INTMAX_MIN -# ifdef INT64_MAX -# define INTMAX_MIN INT64_MIN -# define INTMAX_MAX INT64_MAX -# else -# define INTMAX_MIN INT32_MIN -# define INTMAX_MAX INT32_MAX -# endif -#endif - -#ifndef UINTMAX_MAX -# ifdef UINT64_MAX -# define UINTMAX_MAX UINT64_MAX -# else -# define UINTMAX_MAX UINT32_MAX -# endif -#endif - -/* 7.18.3. Limits of other integer types */ - -/* ptrdiff_t limits */ -#undef PTRDIFF_MIN -#undef PTRDIFF_MAX -#if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l) -# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l) -# else -# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0) -# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0) -# endif -#else -# define PTRDIFF_MIN \ - _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -# define PTRDIFF_MAX \ - _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@) -#endif - -/* sig_atomic_t limits */ -#undef SIG_ATOMIC_MIN -#undef SIG_ATOMIC_MAX -#define SIG_ATOMIC_MIN \ - _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) -#define SIG_ATOMIC_MAX \ - _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \ - 0@SIG_ATOMIC_T_SUFFIX@) - - -/* size_t limit */ -#undef SIZE_MAX -#if @APPLE_UNIVERSAL_BUILD@ -# ifdef _LP64 -# define SIZE_MAX _STDINT_MAX (0, 64, 0ul) -# else -# define SIZE_MAX _STDINT_MAX (0, 32, 0ul) -# endif -#else -# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@) -#endif - -/* wchar_t limits */ -/* Get WCHAR_MIN, WCHAR_MAX. - This include is not on the top, above, because on OSF/1 4.0 we have a - sequence of nested includes - -> -> -> , and the latter includes - and assumes its types are already defined. */ -#if @HAVE_WCHAR_H@ && ! (defined WCHAR_MIN && defined WCHAR_MAX) - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -# include -# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H -#endif -#undef WCHAR_MIN -#undef WCHAR_MAX -#define WCHAR_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) -#define WCHAR_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@) - -/* wint_t limits */ -#undef WINT_MIN -#undef WINT_MAX -#define WINT_MIN \ - _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) -#define WINT_MAX \ - _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@) - -/* 7.18.4. Macros for integer constants */ - -/* 7.18.4.1. Macros for minimum-width integer constants */ -/* According to ISO C 99 Technical Corrigendum 1 */ - -/* Here we assume a standard architecture where the hardware integer - types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */ - -#undef INT8_C -#undef UINT8_C -#define INT8_C(x) x -#define UINT8_C(x) x - -#undef INT16_C -#undef UINT16_C -#define INT16_C(x) x -#define UINT16_C(x) x - -#undef INT32_C -#undef UINT32_C -#define INT32_C(x) x -#define UINT32_C(x) x ## U - -#undef INT64_C -#undef UINT64_C -#if LONG_MAX >> 31 >> 31 == 1 -# define INT64_C(x) x##L -#elif defined _MSC_VER -# define INT64_C(x) x##i64 -#elif @HAVE_LONG_LONG_INT@ -# define INT64_C(x) x##LL -#endif -#if ULONG_MAX >> 31 >> 31 >> 1 == 1 -# define UINT64_C(x) x##UL -#elif defined _MSC_VER -# define UINT64_C(x) x##ui64 -#elif @HAVE_UNSIGNED_LONG_LONG_INT@ -# define UINT64_C(x) x##ULL -#endif - -/* 7.18.4.2. Macros for greatest-width integer constants */ - -#ifndef INTMAX_C -# if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 -# define INTMAX_C(x) x##LL -# elif defined GL_INT64_T -# define INTMAX_C(x) INT64_C(x) -# else -# define INTMAX_C(x) x##L -# endif -#endif - -#ifndef UINTMAX_C -# if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 -# define UINTMAX_C(x) x##ULL -# elif defined GL_UINT64_T -# define UINTMAX_C(x) UINT64_C(x) -# else -# define UINTMAX_C(x) x##UL -# endif -#endif - -#endif /* _@GUARD_PREFIX@_STDINT_H */ -#endif /* !(defined __ANDROID__ && ...) */ -#endif /* !defined _@GUARD_PREFIX@_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */ diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h deleted file mode 100644 index 44b5d87..0000000 --- a/gnulib/lib/stdio.in.h +++ /dev/null @@ -1,1339 +0,0 @@ -/* A GNU-like . - - 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 - 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@ - -#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H -/* Special invocation convention: - - Inside glibc header files. - - On OSF/1 5.1 we have a sequence of nested includes - -> -> -> -> - -> -> -> . - In this situation, the functions are not yet declared, therefore we cannot - provide the C++ aliases. */ - -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_STDIO_H - -#define _GL_ALREADY_INCLUDING_STDIO_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDIO_H@ - -#undef _GL_ALREADY_INCLUDING_STDIO_H - -#ifndef _@GUARD_PREFIX@_STDIO_H -#define _@GUARD_PREFIX@_STDIO_H - -/* Get va_list. Needed on many systems, including glibc 2.8. */ -#include - -#include - -/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8 - and eglibc 2.11.2. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_printf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_PRINTF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_PRINTF, - except that it indicates to GCC that the supported format string directives - are the ones of the system printf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__printf__, formatstring_parameter, first_argument)) - -/* _GL_ATTRIBUTE_FORMAT_SCANF - indicates to GCC that the function takes a format string and arguments, - where the format string directives are the ones standardized by ISO C99 - and POSIX. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__gnu_scanf__, formatstring_parameter, first_argument)) -#else -# define _GL_ATTRIBUTE_FORMAT_SCANF(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) -#endif - -/* _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM is like _GL_ATTRIBUTE_FORMAT_SCANF, - except that it indicates to GCC that the supported format string directives - are the ones of the system scanf(), rather than the ones standardized by - ISO C99 and POSIX. */ -#define _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM(formatstring_parameter, first_argument) \ - _GL_ATTRIBUTE_FORMAT ((__scanf__, formatstring_parameter, first_argument)) - -/* Solaris 10 declares renameat in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_RENAMEAT@ || defined GNULIB_POSIXCHECK) && defined __sun \ - && ! defined __GLIBC__ -# include -#endif - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Macros for stringification. */ -#define _GL_STDIO_STRINGIZE(token) #token -#define _GL_STDIO_MACROEXPAND_AND_STRINGIZE(token) _GL_STDIO_STRINGIZE(token) - - -#if @GNULIB_DPRINTF@ -# if @REPLACE_DPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dprintf rpl_dprintf -# endif -_GL_FUNCDECL_RPL (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (dprintf, int, (int fd, const char *format, ...)); -# else -# if !@HAVE_DPRINTF@ -_GL_FUNCDECL_SYS (dprintf, int, (int fd, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (dprintf, int, (int fd, const char *format, ...)); -# endif -_GL_CXXALIASWARN (dprintf); -#elif defined GNULIB_POSIXCHECK -# undef dprintf -# if HAVE_RAW_DECL_DPRINTF -_GL_WARN_ON_USE (dprintf, "dprintf is unportable - " - "use gnulib module dprintf for portability"); -# endif -#endif - -#if @GNULIB_FCLOSE@ -/* Close STREAM and its underlying file descriptor. */ -# if @REPLACE_FCLOSE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fclose rpl_fclose -# endif -_GL_FUNCDECL_RPL (fclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fclose, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fclose, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fclose); -#elif defined GNULIB_POSIXCHECK -# undef fclose -/* Assume fclose is always declared. */ -_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - " - "use gnulib module fclose for portable POSIX compliance"); -#endif - -#if @GNULIB_FDOPEN@ -# if @REPLACE_FDOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fdopen -# define fdopen rpl_fdopen -# endif -_GL_FUNCDECL_RPL (fdopen, FILE *, (int fd, const char *mode) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fdopen, FILE *, (int fd, const char *mode)); -# else -_GL_CXXALIAS_SYS (fdopen, FILE *, (int fd, const char *mode)); -# endif -_GL_CXXALIASWARN (fdopen); -#elif defined GNULIB_POSIXCHECK -# undef fdopen -/* Assume fdopen is always declared. */ -_GL_WARN_ON_USE (fdopen, "fdopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fdopen for portability"); -#endif - -#if @GNULIB_FFLUSH@ -/* Flush all pending data on STREAM according to POSIX rules. Both - output and seekable input streams are supported. - Note! LOSS OF DATA can occur if fflush is applied on an input stream - that is _not_seekable_ or on an update stream that is _not_seekable_ - and in which the most recent operation was input. Seekability can - be tested with lseek(fileno(fp),0,SEEK_CUR). */ -# if @REPLACE_FFLUSH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fflush rpl_fflush -# endif -_GL_FUNCDECL_RPL (fflush, int, (FILE *gl_stream)); -_GL_CXXALIAS_RPL (fflush, int, (FILE *gl_stream)); -# else -_GL_CXXALIAS_SYS (fflush, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fflush); -#elif defined GNULIB_POSIXCHECK -# undef fflush -/* Assume fflush is always declared. */ -_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - " - "use gnulib module fflush for portable POSIX compliance"); -#endif - -#if @GNULIB_FGETC@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgetc -# define fgetc rpl_fgetc -# endif -_GL_FUNCDECL_RPL (fgetc, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fgetc, int, (FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgetc, int, (FILE *stream)); -# endif -_GL_CXXALIASWARN (fgetc); -#endif - -#if @GNULIB_FGETS@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fgets -# define fgets rpl_fgets -# endif -_GL_FUNCDECL_RPL (fgets, char *, (char *s, int n, FILE *stream) - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (fgets, char *, (char *s, int n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fgets, char *, (char *s, int n, FILE *stream)); -# endif -_GL_CXXALIASWARN (fgets); -#endif - -#if @GNULIB_FOPEN@ -# if @REPLACE_FOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fopen -# define fopen rpl_fopen -# endif -_GL_FUNCDECL_RPL (fopen, FILE *, (const char *filename, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fopen, FILE *, (const char *filename, const char *mode)); -# else -_GL_CXXALIAS_SYS (fopen, FILE *, (const char *filename, const char *mode)); -# endif -_GL_CXXALIASWARN (fopen); -#elif defined GNULIB_POSIXCHECK -# undef fopen -/* Assume fopen is always declared. */ -_GL_WARN_ON_USE (fopen, "fopen on native Windows platforms is not POSIX compliant - " - "use gnulib module fopen for portability"); -#endif - -#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@ -# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \ - || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fprintf rpl_fprintf -# endif -# define GNULIB_overrides_fprintf 1 -# if @GNULIB_FPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (fprintf, int, (FILE *fp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (fprintf, int, (FILE *fp, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fprintf, int, (FILE *fp, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fprintf); -#endif -#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_fprintf -# undef fprintf -# endif -/* Assume fprintf is always declared. */ -_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - " - "use gnulib module fprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_FPURGE@ -/* Discard all pending buffered I/O data on STREAM. - STREAM must not be wide-character oriented. - When discarding pending output, the file position is set back to where it - was before the write calls. When discarding pending input, the file - position is advanced to match the end of the previously read input. - Return 0 if successful. Upon error, return -1 and set errno. */ -# if @REPLACE_FPURGE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define fpurge rpl_fpurge -# endif -_GL_FUNCDECL_RPL (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fpurge, int, (FILE *gl_stream)); -# else -# if !@HAVE_DECL_FPURGE@ -_GL_FUNCDECL_SYS (fpurge, int, (FILE *gl_stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fpurge, int, (FILE *gl_stream)); -# endif -_GL_CXXALIASWARN (fpurge); -#elif defined GNULIB_POSIXCHECK -# undef fpurge -# if HAVE_RAW_DECL_FPURGE -_GL_WARN_ON_USE (fpurge, "fpurge is not always present - " - "use gnulib module fpurge for portability"); -# endif -#endif - -#if @GNULIB_FPUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputc -# define fputc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputc); -#endif - -#if @GNULIB_FPUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fputs -# define fputs rpl_fputs -# endif -_GL_FUNCDECL_RPL (fputs, int, (const char *string, FILE *stream) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fputs, int, (const char *string, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fputs, int, (const char *string, FILE *stream)); -# endif -_GL_CXXALIASWARN (fputs); -#endif - -#if @GNULIB_FREAD@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fread -# define fread rpl_fread -# endif -_GL_FUNCDECL_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((4))); -_GL_CXXALIAS_RPL (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fread, size_t, (void *ptr, size_t s, size_t n, FILE *stream)); -# endif -_GL_CXXALIASWARN (fread); -#endif - -#if @GNULIB_FREOPEN@ -# if @REPLACE_FREOPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef freopen -# define freopen rpl_freopen -# endif -_GL_FUNCDECL_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# else -_GL_CXXALIAS_SYS (freopen, FILE *, - (const char *filename, const char *mode, FILE *stream)); -# endif -_GL_CXXALIASWARN (freopen); -#elif defined GNULIB_POSIXCHECK -# undef freopen -/* Assume freopen is always declared. */ -_GL_WARN_ON_USE (freopen, - "freopen on native Windows platforms is not POSIX compliant - " - "use gnulib module freopen for portability"); -#endif - -#if @GNULIB_FSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fscanf -# define fscanf rpl_fscanf -# endif -_GL_FUNCDECL_RPL (fscanf, int, (FILE *stream, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (fscanf, int, (FILE *stream, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (fscanf, int, (FILE *stream, const char *format, ...)); -# endif -_GL_CXXALIASWARN (fscanf); -#endif - - -/* Set up the following warnings, based on which modules are in use. - GNU Coding Standards discourage the use of fseek, since it imposes - an arbitrary limitation on some 32-bit hosts. Remember that the - fseek module depends on the fseeko module, so we only have three - cases to consider: - - 1. The developer is not using either module. Issue a warning under - GNULIB_POSIXCHECK for both functions, to remind them that both - functions have bugs on some systems. _GL_NO_LARGE_FILES has no - impact on this warning. - - 2. The developer is using both modules. They may be unaware of the - arbitrary limitations of fseek, so issue a warning under - GNULIB_POSIXCHECK. On the other hand, they may be using both - modules intentionally, so the developer can define - _GL_NO_LARGE_FILES in the compilation units where the use of fseek - is safe, to silence the warning. - - 3. The developer is using the fseeko module, but not fseek. Gnulib - guarantees that fseek will still work around platform bugs in that - case, but we presume that the developer is aware of the pitfalls of - fseek and was trying to avoid it, so issue a warning even when - GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be - defined to silence the warning in particular compilation units. - In C++ compilations with GNULIB_NAMESPACE, in order to avoid that - fseek gets defined as a macro, it is recommended that the developer - uses the fseek module, even if he is not calling the fseek function. - - Most gnulib clients that perform stream operations should fall into - category 3. */ - -#if @GNULIB_FSEEK@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 2, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseek -# define fseek rpl_fseek -# endif -_GL_FUNCDECL_RPL (fseek, int, (FILE *fp, long offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseek, int, (FILE *fp, long offset, int whence)); -# else -_GL_CXXALIAS_SYS (fseek, int, (FILE *fp, long offset, int whence)); -# endif -_GL_CXXALIASWARN (fseek); -#endif - -#if @GNULIB_FSEEKO@ -# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES -# define _GL_FSEEK_WARN /* Category 3, above. */ -# undef fseek -# endif -# if @REPLACE_FSEEKO@ -/* Provide an fseeko function that is aware of a preceding fflush(), and which - detects pipes. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fseeko -# define fseeko rpl_fseeko -# endif -_GL_FUNCDECL_RPL (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (fseeko, int, (FILE *fp, off_t offset, int whence)); -# else -# if ! @HAVE_DECL_FSEEKO@ -_GL_FUNCDECL_SYS (fseeko, int, (FILE *fp, off_t offset, int whence) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (fseeko, int, (FILE *fp, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (fseeko); -#elif defined GNULIB_POSIXCHECK -# define _GL_FSEEK_WARN /* Category 1, above. */ -# undef fseek -# undef fseeko -# if HAVE_RAW_DECL_FSEEKO -_GL_WARN_ON_USE (fseeko, "fseeko is unportable - " - "use gnulib module fseeko for portability"); -# endif -#endif - -#ifdef _GL_FSEEK_WARN -# undef _GL_FSEEK_WARN -/* Here, either fseek is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_fseek (declared above). */ -_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use fseeko function for handling of large files"); -#endif - - -/* ftell, ftello. See the comments on fseek/fseeko. */ - -#if @GNULIB_FTELL@ -# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 2, above. */ -# undef ftell -# endif -# if @REPLACE_FTELL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftell -# define ftell rpl_ftell -# endif -_GL_FUNCDECL_RPL (ftell, long, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftell, long, (FILE *fp)); -# else -_GL_CXXALIAS_SYS (ftell, long, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftell); -#endif - -#if @GNULIB_FTELLO@ -# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES -# define _GL_FTELL_WARN /* Category 3, above. */ -# undef ftell -# endif -# if @REPLACE_FTELLO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftello -# define ftello rpl_ftello -# endif -_GL_FUNCDECL_RPL (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (ftello, off_t, (FILE *fp)); -# else -# if ! @HAVE_DECL_FTELLO@ -_GL_FUNCDECL_SYS (ftello, off_t, (FILE *fp) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (ftello, off_t, (FILE *fp)); -# endif -_GL_CXXALIASWARN (ftello); -#elif defined GNULIB_POSIXCHECK -# define _GL_FTELL_WARN /* Category 1, above. */ -# undef ftell -# undef ftello -# if HAVE_RAW_DECL_FTELLO -_GL_WARN_ON_USE (ftello, "ftello is unportable - " - "use gnulib module ftello for portability"); -# endif -#endif - -#ifdef _GL_FTELL_WARN -# undef _GL_FTELL_WARN -/* Here, either ftell is undefined (but C89 guarantees that it is - declared), or it is defined as rpl_ftell (declared above). */ -_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB " - "on 32-bit platforms - " - "use ftello function for handling of large files"); -#endif - - -#if @GNULIB_FWRITE@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fwrite -# define fwrite rpl_fwrite -# endif -_GL_FUNCDECL_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream) - _GL_ARG_NONNULL ((1, 4))); -_GL_CXXALIAS_RPL (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); -# else -_GL_CXXALIAS_SYS (fwrite, size_t, - (const void *ptr, size_t s, size_t n, FILE *stream)); - -/* Work around 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). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETDELIM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdelim -# define getdelim rpl_getdelim -# endif -_GL_FUNCDECL_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -_GL_CXXALIAS_RPL (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# else -# if !@HAVE_DECL_GETDELIM@ -_GL_FUNCDECL_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream) - _GL_ARG_NONNULL ((1, 2, 4))); -# endif -_GL_CXXALIAS_SYS (getdelim, ssize_t, - (char **lineptr, size_t *linesize, int delimiter, - FILE *stream)); -# endif -_GL_CXXALIASWARN (getdelim); -#elif defined GNULIB_POSIXCHECK -# undef getdelim -# if HAVE_RAW_DECL_GETDELIM -_GL_WARN_ON_USE (getdelim, "getdelim is unportable - " - "use gnulib module getdelim for portability"); -# endif -#endif - -#if @GNULIB_GETLINE@ -/* Read a line, up to (and including) the next newline, from STREAM, store it - in *LINEPTR (and NUL-terminate it). - *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE - bytes of space. It is realloc'd as necessary. - Return the number of bytes read and stored at *LINEPTR (not including the - NUL terminator), or -1 on error or EOF. */ -# if @REPLACE_GETLINE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getline -# define getline rpl_getline -# endif -_GL_FUNCDECL_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -_GL_CXXALIAS_RPL (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# else -# if !@HAVE_DECL_GETLINE@ -_GL_FUNCDECL_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getline, ssize_t, - (char **lineptr, size_t *linesize, FILE *stream)); -# endif -# if @HAVE_DECL_GETLINE@ -_GL_CXXALIASWARN (getline); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getline -# if HAVE_RAW_DECL_GETLINE -_GL_WARN_ON_USE (getline, "getline is unportable - " - "use gnulib module getline for portability"); -# endif -#endif - -/* It is very rare that the developer ever has full control of stdin, - so any use of gets warrants an unconditional warning; besides, C11 - removed it. */ -#undef gets -#if HAVE_RAW_DECL_GETS -_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); -#endif - - -#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ -struct obstack; -/* Grow an obstack with formatted output. Return the number of - bytes added to OBS. No trailing nul byte is added, and the - object should be closed with obstack_finish before use. Upon - memory allocation error, call obstack_alloc_failed_handler. Upon - other error, return -1. */ -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_printf rpl_obstack_printf -# endif -_GL_FUNCDECL_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_printf, int, - (struct obstack *obs, const char *format, ...)); -# endif -_GL_CXXALIASWARN (obstack_printf); -# if @REPLACE_OBSTACK_PRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define obstack_vprintf rpl_obstack_vprintf -# endif -_GL_FUNCDECL_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# else -# if !@HAVE_DECL_OBSTACK_PRINTF@ -_GL_FUNCDECL_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (obstack_vprintf, int, - (struct obstack *obs, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (obstack_vprintf); -#endif - -#if @GNULIB_PCLOSE@ -# if !@HAVE_PCLOSE@ -_GL_FUNCDECL_SYS (pclose, int, (FILE *stream) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pclose, int, (FILE *stream)); -_GL_CXXALIASWARN (pclose); -#elif defined GNULIB_POSIXCHECK -# undef pclose -# if HAVE_RAW_DECL_PCLOSE -_GL_WARN_ON_USE (pclose, "pclose is unportable - " - "use gnulib module pclose for more portability"); -# endif -#endif - -#if @GNULIB_PERROR@ -/* Print a message to standard error, describing the value of ERRNO, - (if STRING is not NULL and not empty) prefixed with STRING and ": ", - and terminated with a newline. */ -# if @REPLACE_PERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define perror rpl_perror -# endif -_GL_FUNCDECL_RPL (perror, void, (const char *string)); -_GL_CXXALIAS_RPL (perror, void, (const char *string)); -# else -_GL_CXXALIAS_SYS (perror, void, (const char *string)); -# endif -_GL_CXXALIASWARN (perror); -#elif defined GNULIB_POSIXCHECK -# undef perror -/* Assume perror is always declared. */ -_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - " - "use gnulib module perror for portability"); -#endif - -#if @GNULIB_POPEN@ -# if @REPLACE_POPEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef popen -# define popen rpl_popen -# endif -_GL_FUNCDECL_RPL (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (popen, FILE *, (const char *cmd, const char *mode)); -# else -# if !@HAVE_POPEN@ -_GL_FUNCDECL_SYS (popen, FILE *, (const char *cmd, const char *mode) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (popen, FILE *, (const char *cmd, const char *mode)); -# endif -_GL_CXXALIASWARN (popen); -#elif defined GNULIB_POSIXCHECK -# undef popen -# if HAVE_RAW_DECL_POPEN -_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - " - "use gnulib module popen or pipe for more portability"); -# endif -#endif - -#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@ -# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \ - || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -/* Don't break __attribute__((format(printf,M,N))). */ -# define printf __printf__ -# endif -# if @GNULIB_PRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL_1 (__printf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_printf)) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL_1 (printf, __printf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define printf rpl_printf -# endif -_GL_FUNCDECL_RPL (printf, int, - (const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (printf, int, (const char *format, ...)); -# endif -# define GNULIB_overrides_printf 1 -# else -_GL_CXXALIAS_SYS (printf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (printf); -#endif -#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_printf -# undef printf -# endif -/* Assume printf is always declared. */ -_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - " - "use gnulib module printf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_PUTC@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putc -# define putc rpl_fputc -# endif -_GL_FUNCDECL_RPL (fputc, int, (int c, FILE *stream) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL_1 (putc, rpl_fputc, int, (int c, FILE *stream)); -# else -_GL_CXXALIAS_SYS (putc, int, (int c, FILE *stream)); -# endif -_GL_CXXALIASWARN (putc); -#endif - -#if @GNULIB_PUTCHAR@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putchar -# define putchar rpl_putchar -# endif -_GL_FUNCDECL_RPL (putchar, int, (int c)); -_GL_CXXALIAS_RPL (putchar, int, (int c)); -# else -_GL_CXXALIAS_SYS (putchar, int, (int c)); -# endif -_GL_CXXALIASWARN (putchar); -#endif - -#if @GNULIB_PUTS@ -# if @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef puts -# define puts rpl_puts -# endif -_GL_FUNCDECL_RPL (puts, int, (const char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (puts, int, (const char *string)); -# else -_GL_CXXALIAS_SYS (puts, int, (const char *string)); -# endif -_GL_CXXALIASWARN (puts); -#endif - -#if @GNULIB_REMOVE@ -# if @REPLACE_REMOVE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef remove -# define remove rpl_remove -# endif -_GL_FUNCDECL_RPL (remove, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (remove, int, (const char *name)); -# else -_GL_CXXALIAS_SYS (remove, int, (const char *name)); -# endif -_GL_CXXALIASWARN (remove); -#elif defined GNULIB_POSIXCHECK -# undef remove -/* Assume remove is always declared. */ -_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - " - "use gnulib module remove for more portability"); -#endif - -#if @GNULIB_RENAME@ -# if @REPLACE_RENAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef rename -# define rename rpl_rename -# endif -_GL_FUNCDECL_RPL (rename, int, - (const char *old_filename, const char *new_filename) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (rename, int, - (const char *old_filename, const char *new_filename)); -# else -_GL_CXXALIAS_SYS (rename, int, - (const char *old_filename, const char *new_filename)); -# endif -_GL_CXXALIASWARN (rename); -#elif defined GNULIB_POSIXCHECK -# undef rename -/* Assume rename is always declared. */ -_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - " - "use gnulib module rename for more portability"); -#endif - -#if @GNULIB_RENAMEAT@ -# if @REPLACE_RENAMEAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef renameat -# define renameat rpl_renameat -# endif -_GL_FUNCDECL_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# else -# if !@HAVE_RENAMEAT@ -_GL_FUNCDECL_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (renameat, int, - (int fd1, char const *file1, int fd2, char const *file2)); -# endif -_GL_CXXALIASWARN (renameat); -#elif defined GNULIB_POSIXCHECK -# undef renameat -# if HAVE_RAW_DECL_RENAMEAT -_GL_WARN_ON_USE (renameat, "renameat is not portable - " - "use gnulib module renameat for portability"); -# endif -#endif - -#if @GNULIB_SCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if defined __GNUC__ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -/* Don't break __attribute__((format(scanf,M,N))). */ -# define scanf __scanf__ -# endif -_GL_FUNCDECL_RPL_1 (__scanf__, int, - (const char *format, ...) - __asm__ (@ASM_SYMBOL_PREFIX@ - _GL_STDIO_MACROEXPAND_AND_STRINGIZE(rpl_scanf)) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL_1 (scanf, __scanf__, int, (const char *format, ...)); -# else -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef scanf -# define scanf rpl_scanf -# endif -_GL_FUNCDECL_RPL (scanf, int, (const char *format, ...) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 2) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (scanf, int, (const char *format, ...)); -# endif -# else -_GL_CXXALIAS_SYS (scanf, int, (const char *format, ...)); -# endif -_GL_CXXALIASWARN (scanf); -#endif - -#if @GNULIB_SNPRINTF@ -# if @REPLACE_SNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define snprintf rpl_snprintf -# endif -_GL_FUNCDECL_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# else -# if !@HAVE_DECL_SNPRINTF@ -_GL_FUNCDECL_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 4) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (snprintf, int, - (char *str, size_t size, const char *format, ...)); -# endif -_GL_CXXALIASWARN (snprintf); -#elif defined GNULIB_POSIXCHECK -# undef snprintf -# if HAVE_RAW_DECL_SNPRINTF -_GL_WARN_ON_USE (snprintf, "snprintf is unportable - " - "use gnulib module snprintf for portability"); -# endif -#endif - -/* Some people would argue that all sprintf uses should be warned about - (for example, OpenBSD issues a link warning for it), - since it can cause security holes due to buffer overruns. - However, we believe that sprintf can be used safely, and is more - efficient than snprintf in those safe cases; and as proof of our - belief, we use sprintf in several gnulib modules. So this header - intentionally avoids adding a warning to sprintf except when - GNULIB_POSIXCHECK is defined. */ - -#if @GNULIB_SPRINTF_POSIX@ -# if @REPLACE_SPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define sprintf rpl_sprintf -# endif -_GL_FUNCDECL_RPL (sprintf, int, (char *str, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (sprintf, int, (char *str, const char *format, ...)); -# else -_GL_CXXALIAS_SYS (sprintf, int, (char *str, const char *format, ...)); -# endif -_GL_CXXALIASWARN (sprintf); -#elif defined GNULIB_POSIXCHECK -# undef sprintf -/* Assume sprintf is always declared. */ -_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - " - "use gnulib module sprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_TMPFILE@ -# if @REPLACE_TMPFILE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define tmpfile rpl_tmpfile -# endif -_GL_FUNCDECL_RPL (tmpfile, FILE *, (void)); -_GL_CXXALIAS_RPL (tmpfile, FILE *, (void)); -# else -_GL_CXXALIAS_SYS (tmpfile, FILE *, (void)); -# endif -_GL_CXXALIASWARN (tmpfile); -#elif defined GNULIB_POSIXCHECK -# undef tmpfile -# if HAVE_RAW_DECL_TMPFILE -_GL_WARN_ON_USE (tmpfile, "tmpfile is not usable on mingw - " - "use gnulib module tmpfile for portability"); -# endif -#endif - -#if @GNULIB_VASPRINTF@ -/* Write formatted output to a string dynamically allocated with malloc(). - If the memory allocation succeeds, store the address of the string in - *RESULT and return the number of resulting bytes, excluding the trailing - NUL. Upon memory allocation error, or some other error, return -1. */ -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define asprintf rpl_asprintf -# endif -_GL_FUNCDECL_RPL (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (asprintf, int, - (char **result, const char *format, ...)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (asprintf, int, - (char **result, const char *format, ...) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 3) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (asprintf, int, - (char **result, const char *format, ...)); -# endif -_GL_CXXALIASWARN (asprintf); -# if @REPLACE_VASPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vasprintf rpl_vasprintf -# endif -_GL_FUNCDECL_RPL (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vasprintf, int, - (char **result, const char *format, va_list args)); -# else -# if !@HAVE_VASPRINTF@ -_GL_FUNCDECL_SYS (vasprintf, int, - (char **result, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (vasprintf, int, - (char **result, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vasprintf); -#endif - -#if @GNULIB_VDPRINTF@ -# if @REPLACE_VDPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vdprintf rpl_vdprintf -# endif -_GL_FUNCDECL_RPL (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (vdprintf, int, (int fd, const char *format, va_list args)); -# else -# if !@HAVE_VDPRINTF@ -_GL_FUNCDECL_SYS (vdprintf, int, (int fd, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((2))); -# endif -/* Need to cast, because on Solaris, the third parameter will likely be - __va_list args. */ -_GL_CXXALIAS_SYS_CAST (vdprintf, int, - (int fd, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vdprintf); -#elif defined GNULIB_POSIXCHECK -# undef vdprintf -# if HAVE_RAW_DECL_VDPRINTF -_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - " - "use gnulib module vdprintf for portability"); -# endif -#endif - -#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@ -# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \ - || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vfprintf rpl_vfprintf -# endif -# define GNULIB_overrides_vfprintf 1 -# if @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# else -_GL_FUNCDECL_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_RPL (vfprintf, int, (FILE *fp, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vfprintf, int, - (FILE *fp, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfprintf); -#endif -#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vfprintf -# undef vfprintf -# endif -/* Assume vfprintf is always declared. */ -_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - " - "use gnulib module vfprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VFSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vfscanf -# define vfscanf rpl_vfscanf -# endif -_GL_FUNCDECL_RPL (vfscanf, int, - (FILE *stream, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vfscanf, int, - (FILE *stream, const char *format, va_list args)); -# else -_GL_CXXALIAS_SYS (vfscanf, int, - (FILE *stream, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vfscanf); -#endif - -#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@ -# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \ - || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && (@GNULIB_STDIO_H_NONBLOCKING@ || @GNULIB_STDIO_H_SIGPIPE@)) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vprintf rpl_vprintf -# endif -# define GNULIB_overrides_vprintf 1 -# if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VFPRINTF_POSIX@ -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (1, 0) - _GL_ARG_NONNULL ((1))); -# else -_GL_FUNCDECL_RPL (vprintf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_RPL (vprintf, int, (const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the second parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vprintf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vprintf); -#endif -#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK -# if !GNULIB_overrides_vprintf -# undef vprintf -# endif -/* Assume vprintf is always declared. */ -_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - " - "use gnulib module vprintf-posix for portable " - "POSIX compliance"); -#endif - -#if @GNULIB_VSCANF@ -# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef vscanf -# define vscanf rpl_vscanf -# endif -_GL_FUNCDECL_RPL (vscanf, int, (const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_SCANF_SYSTEM (1, 0) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (vscanf, int, (const char *format, va_list args)); -# else -_GL_CXXALIAS_SYS (vscanf, int, (const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vscanf); -#endif - -#if @GNULIB_VSNPRINTF@ -# if @REPLACE_VSNPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsnprintf rpl_vsnprintf -# endif -_GL_FUNCDECL_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -_GL_CXXALIAS_RPL (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# else -# if !@HAVE_DECL_VSNPRINTF@ -_GL_FUNCDECL_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (3, 0) - _GL_ARG_NONNULL ((3))); -# endif -_GL_CXXALIAS_SYS (vsnprintf, int, - (char *str, size_t size, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsnprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsnprintf -# if HAVE_RAW_DECL_VSNPRINTF -_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - " - "use gnulib module vsnprintf for portability"); -# endif -#endif - -#if @GNULIB_VSPRINTF_POSIX@ -# if @REPLACE_VSPRINTF@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define vsprintf rpl_vsprintf -# endif -_GL_FUNCDECL_RPL (vsprintf, int, - (char *str, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT_PRINTF (2, 0) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (vsprintf, int, - (char *str, const char *format, va_list args)); -# else -/* Need to cast, because on Solaris, the third parameter is - __va_list args - and GCC's fixincludes did not change this to __gnuc_va_list. */ -_GL_CXXALIAS_SYS_CAST (vsprintf, int, - (char *str, const char *format, va_list args)); -# endif -_GL_CXXALIASWARN (vsprintf); -#elif defined GNULIB_POSIXCHECK -# undef vsprintf -/* Assume vsprintf is always declared. */ -_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - " - "use gnulib module vsprintf-posix for portable " - "POSIX compliance"); -#endif - - -#endif /* _@GUARD_PREFIX@_STDIO_H */ -#endif /* _@GUARD_PREFIX@_STDIO_H */ -#endif diff --git a/gnulib/lib/stdlib.in.h b/gnulib/lib/stdlib.in.h deleted file mode 100644 index f270075..0000000 --- a/gnulib/lib/stdlib.in.h +++ /dev/null @@ -1,928 +0,0 @@ -/* A GNU-like . - - 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 - 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 __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_malloc_and_calloc -/* Special invocation convention inside glibc header files. */ - -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_STDLIB_H - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STDLIB_H@ - -#ifndef _@GUARD_PREFIX@_STDLIB_H -#define _@GUARD_PREFIX@_STDLIB_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD 10 defines WEXITSTATUS in , not in . */ -#if @GNULIB_SYSTEM_POSIX@ && !defined WEXITSTATUS -# include -#endif - -/* Solaris declares getloadavg() in . */ -#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@ -# include -#endif - -/* Native Windows platforms declare mktemp() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -#if @GNULIB_RANDOM_R@ - -/* OSF/1 5.1 declares 'struct random_data' in , which is included - from if _REENTRANT is defined. Include it whenever we need - 'struct random_data'. */ -# if @HAVE_RANDOM_H@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ || @REPLACE_RANDOM_R@ || !@HAVE_RANDOM_R@ -# include -# endif - -# if !@HAVE_STRUCT_RANDOM_DATA@ -/* Define 'struct random_data'. - But allow multiple gnulib generated replacements to coexist. */ -# if !GNULIB_defined_struct_random_data -struct random_data -{ - int32_t *fptr; /* Front pointer. */ - int32_t *rptr; /* Rear pointer. */ - int32_t *state; /* Array of state values. */ - int rand_type; /* Type of random number generator. */ - int rand_deg; /* Degree of random number generator. */ - int rand_sep; /* Distance between front and rear. */ - int32_t *end_ptr; /* Pointer behind state table. */ -}; -# define GNULIB_defined_struct_random_data 1 -# endif -# endif -#endif - -#if (@GNULIB_MKSTEMP@ || @GNULIB_MKSTEMPS@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ && !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* On Mac OS X 10.3, only declares mkstemp. */ -/* On Mac OS X 10.5, only declares mkstemps. */ -/* On Cygwin 1.7.1, only declares getsubopt. */ -/* But avoid namespace pollution on glibc systems and native Windows. */ -# include -#endif - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The definition of _Noreturn is copied here. */ - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Some systems do not define EXIT_*, despite otherwise supporting C89. */ -#ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -#endif -/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere - with proper operation of xargs. */ -#ifndef EXIT_FAILURE -# define EXIT_FAILURE 1 -#elif EXIT_FAILURE != 1 -# undef EXIT_FAILURE -# define EXIT_FAILURE 1 -#endif - - -#if @GNULIB__EXIT@ -/* Terminate the current process with the given return code, without running - the 'atexit' handlers. */ -# if !@HAVE__EXIT@ -_GL_FUNCDECL_SYS (_Exit, _Noreturn void, (int status)); -# endif -_GL_CXXALIAS_SYS (_Exit, void, (int status)); -_GL_CXXALIASWARN (_Exit); -#elif defined GNULIB_POSIXCHECK -# undef _Exit -# if HAVE_RAW_DECL__EXIT -_GL_WARN_ON_USE (_Exit, "_Exit is unportable - " - "use gnulib module _Exit for portability"); -# endif -#endif - - -#if @GNULIB_ATOLL@ -/* Parse a signed decimal integer. - Returns the value of the integer. Errors are not detected. */ -# if !@HAVE_ATOLL@ -_GL_FUNCDECL_SYS (atoll, long long, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (atoll, long long, (const char *string)); -_GL_CXXALIASWARN (atoll); -#elif defined GNULIB_POSIXCHECK -# undef atoll -# if HAVE_RAW_DECL_ATOLL -_GL_WARN_ON_USE (atoll, "atoll is unportable - " - "use gnulib module atoll for portability"); -# endif -#endif - -#if @GNULIB_CALLOC_POSIX@ -# if @REPLACE_CALLOC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef calloc -# define calloc rpl_calloc -# endif -_GL_FUNCDECL_RPL (calloc, void *, (size_t nmemb, size_t size)); -_GL_CXXALIAS_RPL (calloc, void *, (size_t nmemb, size_t size)); -# else -_GL_CXXALIAS_SYS (calloc, void *, (size_t nmemb, size_t size)); -# endif -_GL_CXXALIASWARN (calloc); -#elif defined GNULIB_POSIXCHECK -# undef calloc -/* Assume calloc is always declared. */ -_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - " - "use gnulib module calloc-posix for portability"); -#endif - -#if @GNULIB_CANONICALIZE_FILE_NAME@ -# if @REPLACE_CANONICALIZE_FILE_NAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define canonicalize_file_name rpl_canonicalize_file_name -# endif -_GL_FUNCDECL_RPL (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (canonicalize_file_name, char *, (const char *name)); -# else -# if !@HAVE_CANONICALIZE_FILE_NAME@ -_GL_FUNCDECL_SYS (canonicalize_file_name, char *, (const char *name) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (canonicalize_file_name, char *, (const char *name)); -# endif -_GL_CXXALIASWARN (canonicalize_file_name); -#elif defined GNULIB_POSIXCHECK -# undef canonicalize_file_name -# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME -_GL_WARN_ON_USE (canonicalize_file_name, - "canonicalize_file_name is unportable - " - "use gnulib module canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_GETLOADAVG@ -/* Store max(NELEM,3) load average numbers in LOADAVG[]. - The three numbers are the load average of the last 1 minute, the last 5 - minutes, and the last 15 minutes, respectively. - LOADAVG is an array of NELEM numbers. */ -# if !@HAVE_DECL_GETLOADAVG@ -_GL_FUNCDECL_SYS (getloadavg, int, (double loadavg[], int nelem) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getloadavg, int, (double loadavg[], int nelem)); -_GL_CXXALIASWARN (getloadavg); -#elif defined GNULIB_POSIXCHECK -# undef getloadavg -# if HAVE_RAW_DECL_GETLOADAVG -_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - " - "use gnulib module getloadavg for portability"); -# endif -#endif - -#if @GNULIB_GETSUBOPT@ -/* Assuming *OPTIONP is a comma separated list of elements of the form - "token" or "token=value", getsubopt parses the first of these elements. - If the first element refers to a "token" that is member of the given - NULL-terminated array of tokens: - - It replaces the comma with a NUL byte, updates *OPTIONP to point past - the first option and the comma, sets *VALUEP to the value of the - element (or NULL if it doesn't contain an "=" sign), - - It returns the index of the "token" in the given array of tokens. - Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined. - For more details see the POSIX:2001 specification. - http://www.opengroup.org/susv3xsh/getsubopt.html */ -# if !@HAVE_GETSUBOPT@ -_GL_FUNCDECL_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (getsubopt, int, - (char **optionp, char *const *tokens, char **valuep)); -_GL_CXXALIASWARN (getsubopt); -#elif defined GNULIB_POSIXCHECK -# undef getsubopt -# if HAVE_RAW_DECL_GETSUBOPT -_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - " - "use gnulib module getsubopt for portability"); -# endif -#endif - -#if @GNULIB_GRANTPT@ -/* Change the ownership and access permission of the slave side of the - pseudo-terminal whose master side is specified by FD. */ -# if !@HAVE_GRANTPT@ -_GL_FUNCDECL_SYS (grantpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (grantpt, int, (int fd)); -_GL_CXXALIASWARN (grantpt); -#elif defined GNULIB_POSIXCHECK -# undef grantpt -# if HAVE_RAW_DECL_GRANTPT -_GL_WARN_ON_USE (grantpt, "grantpt is not portable - " - "use gnulib module grantpt for portability"); -# endif -#endif - -/* If _GL_USE_STDLIB_ALLOC is nonzero, the including module does not - rely on GNU or POSIX semantics for malloc and realloc (for example, - by never specifying a zero size), so it does not need malloc or - realloc to be redefined. */ -#if @GNULIB_MALLOC_POSIX@ -# if @REPLACE_MALLOC@ -# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ - || _GL_USE_STDLIB_ALLOC) -# undef malloc -# define malloc rpl_malloc -# endif -_GL_FUNCDECL_RPL (malloc, void *, (size_t size)); -_GL_CXXALIAS_RPL (malloc, void *, (size_t size)); -# else -_GL_CXXALIAS_SYS (malloc, void *, (size_t size)); -# endif -_GL_CXXALIASWARN (malloc); -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef malloc -/* Assume malloc is always declared. */ -_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - " - "use gnulib module malloc-posix for portability"); -#endif - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBTOWC@ -# if @REPLACE_MBTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbtowc -# define mbtowc rpl_mbtowc -# endif -_GL_FUNCDECL_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -_GL_CXXALIAS_RPL (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# else -_GL_CXXALIAS_SYS (mbtowc, int, (wchar_t *pwc, const char *s, size_t n)); -# endif -_GL_CXXALIASWARN (mbtowc); -#endif - -#if @GNULIB_MKDTEMP@ -/* Create a unique temporary directory from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the directory name unique. - Returns TEMPLATE, or a null pointer if it cannot get a unique name. - The directory is created mode 700. */ -# if !@HAVE_MKDTEMP@ -_GL_FUNCDECL_SYS (mkdtemp, char *, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkdtemp, char *, (char * /*template*/)); -_GL_CXXALIASWARN (mkdtemp); -#elif defined GNULIB_POSIXCHECK -# undef mkdtemp -# if HAVE_RAW_DECL_MKDTEMP -_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - " - "use gnulib module mkdtemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMP@ -_GL_FUNCDECL_SYS (mkostemp, int, (char * /*template*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemp, int, (char * /*template*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemp); -#elif defined GNULIB_POSIXCHECK -# undef mkostemp -# if HAVE_RAW_DECL_MKOSTEMP -_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - " - "use gnulib module mkostemp for portability"); -# endif -#endif - -#if @GNULIB_MKOSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE before a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - The file is then created, with the specified flags, ensuring it didn't exist - before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKOSTEMPS@ -_GL_FUNCDECL_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkostemps, int, - (char * /*template*/, int /*suffixlen*/, int /*flags*/)); -_GL_CXXALIASWARN (mkostemps); -#elif defined GNULIB_POSIXCHECK -# undef mkostemps -# if HAVE_RAW_DECL_MKOSTEMPS -_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - " - "use gnulib module mkostemps for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMP@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if @REPLACE_MKSTEMP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkstemp rpl_mkstemp -# endif -_GL_FUNCDECL_RPL (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkstemp, int, (char * /*template*/)); -# else -# if ! @HAVE_MKSTEMP@ -_GL_FUNCDECL_SYS (mkstemp, int, (char * /*template*/) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemp, int, (char * /*template*/)); -# endif -_GL_CXXALIASWARN (mkstemp); -#elif defined GNULIB_POSIXCHECK -# undef mkstemp -# if HAVE_RAW_DECL_MKSTEMP -_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - " - "use gnulib module mkstemp for portability"); -# endif -#endif - -#if @GNULIB_MKSTEMPS@ -/* Create a unique temporary file from TEMPLATE. - The last six characters of TEMPLATE prior to a suffix of length - SUFFIXLEN must be "XXXXXX"; - they are replaced with a string that makes the file name unique. - The file is then created, ensuring it didn't exist before. - The file is created read-write (mask at least 0600 & ~umask), but it may be - world-readable and world-writable (mask 0666 & ~umask), depending on the - implementation. - Returns the open file descriptor if successful, otherwise -1 and errno - set. */ -# if !@HAVE_MKSTEMPS@ -_GL_FUNCDECL_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkstemps, int, (char * /*template*/, int /*suffixlen*/)); -_GL_CXXALIASWARN (mkstemps); -#elif defined GNULIB_POSIXCHECK -# undef mkstemps -# if HAVE_RAW_DECL_MKSTEMPS -_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - " - "use gnulib module mkstemps for portability"); -# endif -#endif - -#if @GNULIB_POSIX_OPENPT@ -/* Return an FD open to the master side of a pseudo-terminal. Flags should - include O_RDWR, and may also include O_NOCTTY. */ -# if !@HAVE_POSIX_OPENPT@ -_GL_FUNCDECL_SYS (posix_openpt, int, (int flags)); -# endif -_GL_CXXALIAS_SYS (posix_openpt, int, (int flags)); -_GL_CXXALIASWARN (posix_openpt); -#elif defined GNULIB_POSIXCHECK -# undef posix_openpt -# if HAVE_RAW_DECL_POSIX_OPENPT -_GL_WARN_ON_USE (posix_openpt, "posix_openpt is not portable - " - "use gnulib module posix_openpt for portability"); -# endif -#endif - -#if @GNULIB_PTSNAME@ -/* Return the pathname of the pseudo-terminal slave associated with - the master FD is open on, or NULL on errors. */ -# if !@HAVE_PTSNAME@ -_GL_FUNCDECL_SYS (ptsname, char *, (int fd)); -# endif -_GL_CXXALIAS_SYS (ptsname, char *, (int fd)); -_GL_CXXALIASWARN (ptsname); -#elif defined GNULIB_POSIXCHECK -# undef ptsname -# if HAVE_RAW_DECL_PTSNAME -_GL_WARN_ON_USE (ptsname, "ptsname is not portable - " - "use gnulib module ptsname for portability"); -# endif -#endif - -#if @GNULIB_PTSNAME_R@ -/* Set the pathname of the pseudo-terminal slave associated with - the master FD is open on and return 0, or set errno and return - non-zero on errors. */ -# if @REPLACE_PTSNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ptsname_r -# define ptsname_r rpl_ptsname_r -# endif -_GL_FUNCDECL_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); -_GL_CXXALIAS_RPL (ptsname_r, int, (int fd, char *buf, size_t len)); -# else -# if !@HAVE_PTSNAME_R@ -_GL_FUNCDECL_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); -# endif -_GL_CXXALIAS_SYS (ptsname_r, int, (int fd, char *buf, size_t len)); -# endif -_GL_CXXALIASWARN (ptsname_r); -#elif defined GNULIB_POSIXCHECK -# undef ptsname_r -# if HAVE_RAW_DECL_PTSNAME_R -_GL_WARN_ON_USE (ptsname_r, "ptsname_r is not portable - " - "use gnulib module ptsname_r for portability"); -# endif -#endif - -#if @GNULIB_PUTENV@ -# if @REPLACE_PUTENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef putenv -# define putenv rpl_putenv -# endif -_GL_FUNCDECL_RPL (putenv, int, (char *string) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (putenv, int, (char *string)); -# else -_GL_CXXALIAS_SYS (putenv, int, (char *string)); -# endif -_GL_CXXALIASWARN (putenv); -#endif - - -#if @GNULIB_RANDOM_R@ -# if !@HAVE_RANDOM_R@ -# ifndef RAND_MAX -# define RAND_MAX 2147483647 -# endif -# endif -#endif - - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (random, long, (void)); -# endif -_GL_CXXALIAS_SYS (random, long, (void)); -_GL_CXXALIASWARN (random); -#elif defined GNULIB_POSIXCHECK -# undef random -# if HAVE_RAW_DECL_RANDOM -_GL_WARN_ON_USE (random, "random is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (srandom, void, (unsigned int seed)); -# endif -_GL_CXXALIAS_SYS (srandom, void, (unsigned int seed)); -_GL_CXXALIASWARN (srandom); -#elif defined GNULIB_POSIXCHECK -# undef srandom -# if HAVE_RAW_DECL_SRANDOM -_GL_WARN_ON_USE (srandom, "srandom is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (initstate, char *, - (unsigned int seed, char *buf, size_t buf_size) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (initstate, char *, - (unsigned int seed, char *buf, size_t buf_size)); -_GL_CXXALIASWARN (initstate); -#elif defined GNULIB_POSIXCHECK -# undef initstate -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate, "initstate is unportable - " - "use gnulib module random for portability"); -# endif -#endif - -#if @GNULIB_RANDOM@ -# if !@HAVE_RANDOM@ -_GL_FUNCDECL_SYS (setstate, char *, (char *arg_state) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setstate, char *, (char *arg_state)); -_GL_CXXALIASWARN (setstate); -#elif defined GNULIB_POSIXCHECK -# undef setstate -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate, "setstate is unportable - " - "use gnulib module random for portability"); -# endif -#endif - - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef random_r -# define random_r rpl_random_r -# endif -_GL_FUNCDECL_RPL (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (random_r, int, (struct random_data *buf, int32_t *result)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (random_r, int, (struct random_data *buf, int32_t *result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (random_r, int, (struct random_data *buf, int32_t *result)); -# endif -_GL_CXXALIASWARN (random_r); -#elif defined GNULIB_POSIXCHECK -# undef random_r -# if HAVE_RAW_DECL_RANDOM_R -_GL_WARN_ON_USE (random_r, "random_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef srandom_r -# define srandom_r rpl_srandom_r -# endif -_GL_FUNCDECL_RPL (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (srandom_r, int, - (unsigned int seed, struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (srandom_r); -#elif defined GNULIB_POSIXCHECK -# undef srandom_r -# if HAVE_RAW_DECL_SRANDOM_R -_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef initstate_r -# define initstate_r rpl_initstate_r -# endif -_GL_FUNCDECL_RPL (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (initstate_r, int, - (unsigned int seed, char *buf, size_t buf_size, - struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (initstate_r); -#elif defined GNULIB_POSIXCHECK -# undef initstate_r -# if HAVE_RAW_DECL_INITSTATE_R -_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - -#if @GNULIB_RANDOM_R@ -# if @REPLACE_RANDOM_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setstate_r -# define setstate_r rpl_setstate_r -# endif -_GL_FUNCDECL_RPL (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -# else -# if !@HAVE_RANDOM_R@ -_GL_FUNCDECL_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (setstate_r, int, - (char *arg_state, struct random_data *rand_state)); -# endif -_GL_CXXALIASWARN (setstate_r); -#elif defined GNULIB_POSIXCHECK -# undef setstate_r -# if HAVE_RAW_DECL_SETSTATE_R -_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - " - "use gnulib module random_r for portability"); -# endif -#endif - - -#if @GNULIB_REALLOC_POSIX@ -# if @REPLACE_REALLOC@ -# if !((defined __cplusplus && defined GNULIB_NAMESPACE) \ - || _GL_USE_STDLIB_ALLOC) -# undef realloc -# define realloc rpl_realloc -# endif -_GL_FUNCDECL_RPL (realloc, void *, (void *ptr, size_t size)); -_GL_CXXALIAS_RPL (realloc, void *, (void *ptr, size_t size)); -# else -_GL_CXXALIAS_SYS (realloc, void *, (void *ptr, size_t size)); -# endif -_GL_CXXALIASWARN (realloc); -#elif defined GNULIB_POSIXCHECK && !_GL_USE_STDLIB_ALLOC -# undef realloc -/* Assume realloc is always declared. */ -_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - " - "use gnulib module realloc-posix for portability"); -#endif - -#if @GNULIB_REALPATH@ -# if @REPLACE_REALPATH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define realpath rpl_realpath -# endif -_GL_FUNCDECL_RPL (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (realpath, char *, (const char *name, char *resolved)); -# else -# if !@HAVE_REALPATH@ -_GL_FUNCDECL_SYS (realpath, char *, (const char *name, char *resolved) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (realpath, char *, (const char *name, char *resolved)); -# endif -_GL_CXXALIASWARN (realpath); -#elif defined GNULIB_POSIXCHECK -# undef realpath -# if HAVE_RAW_DECL_REALPATH -_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module " - "canonicalize or canonicalize-lgpl for portability"); -# endif -#endif - -#if @GNULIB_RPMATCH@ -/* Test a user response to a question. - Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */ -# if !@HAVE_RPMATCH@ -_GL_FUNCDECL_SYS (rpmatch, int, (const char *response) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (rpmatch, int, (const char *response)); -_GL_CXXALIASWARN (rpmatch); -#elif defined GNULIB_POSIXCHECK -# undef rpmatch -# if HAVE_RAW_DECL_RPMATCH -_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - " - "use gnulib module rpmatch for portability"); -# endif -#endif - -#if @GNULIB_SETENV@ -/* Set NAME to VALUE in the environment. - If REPLACE is nonzero, overwrite an existing value. */ -# if @REPLACE_SETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef setenv -# define setenv rpl_setenv -# endif -_GL_FUNCDECL_RPL (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (setenv, int, - (const char *name, const char *value, int replace)); -# else -# if !@HAVE_DECL_SETENV@ -_GL_FUNCDECL_SYS (setenv, int, - (const char *name, const char *value, int replace) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (setenv, int, - (const char *name, const char *value, int replace)); -# endif -# if !(@REPLACE_SETENV@ && !@HAVE_DECL_SETENV@) -_GL_CXXALIASWARN (setenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef setenv -# if HAVE_RAW_DECL_SETENV -_GL_WARN_ON_USE (setenv, "setenv is unportable - " - "use gnulib module setenv for portability"); -# endif -#endif - -#if @GNULIB_STRTOD@ - /* Parse a double from STRING, updating ENDP if appropriate. */ -# if @REPLACE_STRTOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strtod rpl_strtod -# endif -_GL_FUNCDECL_RPL (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strtod, double, (const char *str, char **endp)); -# else -# if !@HAVE_STRTOD@ -_GL_FUNCDECL_SYS (strtod, double, (const char *str, char **endp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtod, double, (const char *str, char **endp)); -# endif -_GL_CXXALIASWARN (strtod); -#elif defined GNULIB_POSIXCHECK -# undef strtod -# if HAVE_RAW_DECL_STRTOD -_GL_WARN_ON_USE (strtod, "strtod is unportable - " - "use gnulib module strtod for portability"); -# endif -#endif - -#if @GNULIB_STRTOLL@ -/* Parse a signed integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set - to ERANGE. */ -# if !@HAVE_STRTOLL@ -_GL_FUNCDECL_SYS (strtoll, long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoll, long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoll); -#elif defined GNULIB_POSIXCHECK -# undef strtoll -# if HAVE_RAW_DECL_STRTOLL -_GL_WARN_ON_USE (strtoll, "strtoll is unportable - " - "use gnulib module strtoll for portability"); -# endif -#endif - -#if @GNULIB_STRTOULL@ -/* Parse an unsigned integer whose textual representation starts at STRING. - The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0, - it may be decimal or octal (with prefix "0") or hexadecimal (with prefix - "0x"). - If ENDPTR is not NULL, the address of the first byte after the integer is - stored in *ENDPTR. - Upon overflow, the return value is ULLONG_MAX, and errno is set to - ERANGE. */ -# if !@HAVE_STRTOULL@ -_GL_FUNCDECL_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strtoull, unsigned long long, - (const char *string, char **endptr, int base)); -_GL_CXXALIASWARN (strtoull); -#elif defined GNULIB_POSIXCHECK -# undef strtoull -# if HAVE_RAW_DECL_STRTOULL -_GL_WARN_ON_USE (strtoull, "strtoull is unportable - " - "use gnulib module strtoull for portability"); -# endif -#endif - -#if @GNULIB_UNLOCKPT@ -/* Unlock the slave side of the pseudo-terminal whose master side is specified - by FD, so that it can be opened. */ -# if !@HAVE_UNLOCKPT@ -_GL_FUNCDECL_SYS (unlockpt, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (unlockpt, int, (int fd)); -_GL_CXXALIASWARN (unlockpt); -#elif defined GNULIB_POSIXCHECK -# undef unlockpt -# if HAVE_RAW_DECL_UNLOCKPT -_GL_WARN_ON_USE (unlockpt, "unlockpt is not portable - " - "use gnulib module unlockpt for portability"); -# endif -#endif - -#if @GNULIB_UNSETENV@ -/* Remove the variable NAME from the environment. */ -# if @REPLACE_UNSETENV@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unsetenv -# define unsetenv rpl_unsetenv -# endif -_GL_FUNCDECL_RPL (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unsetenv, int, (const char *name)); -# else -# if !@HAVE_DECL_UNSETENV@ -_GL_FUNCDECL_SYS (unsetenv, int, (const char *name) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (unsetenv, int, (const char *name)); -# endif -# if !(@REPLACE_UNSETENV@ && !@HAVE_DECL_UNSETENV@) -_GL_CXXALIASWARN (unsetenv); -# endif -#elif defined GNULIB_POSIXCHECK -# undef unsetenv -# if HAVE_RAW_DECL_UNSETENV -_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - " - "use gnulib module unsetenv for portability"); -# endif -#endif - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCTOMB@ -# if @REPLACE_WCTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctomb -# define wctomb rpl_wctomb -# endif -_GL_FUNCDECL_RPL (wctomb, int, (char *s, wchar_t wc)); -_GL_CXXALIAS_RPL (wctomb, int, (char *s, wchar_t wc)); -# else -_GL_CXXALIAS_SYS (wctomb, int, (char *s, wchar_t wc)); -# endif -_GL_CXXALIASWARN (wctomb); -#endif - - -#endif /* _@GUARD_PREFIX@_STDLIB_H */ -#endif /* _@GUARD_PREFIX@_STDLIB_H */ -#endif diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c deleted file mode 100644 index 5f10a54..0000000 --- a/gnulib/lib/stpcpy.c +++ /dev/null @@ -1,49 +0,0 @@ -/* stpcpy.c -- copy a string and return pointer to end of new string - Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2012 Free Software - Foundation, Inc. - - NOTE: The canonical source of this file is maintained with the GNU C Library. - Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2.1 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU 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 - -#include - -#undef __stpcpy -#ifdef _LIBC -# undef stpcpy -#endif - -#ifndef weak_alias -# define __stpcpy stpcpy -#endif - -/* Copy SRC to DEST, returning the address of the terminating '\0' in DEST. */ -char * -__stpcpy (char *dest, const char *src) -{ - register char *d = dest; - register const char *s = src; - - do - *d++ = *s; - while (*s++ != '\0'); - - return d - 1; -} -#ifdef weak_alias -weak_alias (__stpcpy, stpcpy) -#endif diff --git a/gnulib/lib/stpncpy.c b/gnulib/lib/stpncpy.c deleted file mode 100644 index 5fdfe36..0000000 --- a/gnulib/lib/stpncpy.c +++ /dev/null @@ -1,92 +0,0 @@ -/* 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. - Bugs can be reported to bug-glibc@gnu.org. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by the - Free Software Foundation; either version 2.1 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU 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 . */ - -/* This is almost copied from strncpy.c, written by Torbjorn Granlund. */ - -#include - -/* Specification. */ -#include - -#ifndef weak_alias -# define __stpncpy stpncpy -#endif - -/* Copy no more than N bytes of SRC to DST, returning a pointer past the - last non-NUL byte written into DST. */ -char * -__stpncpy (char *dest, const char *src, size_t n) -{ - char c; - char *s = dest; - - if (n >= 4) - { - size_t n4 = n >> 2; - - for (;;) - { - c = *src++; - *dest++ = c; - if (c == '\0') - break; - c = *src++; - *dest++ = c; - if (c == '\0') - break; - c = *src++; - *dest++ = c; - if (c == '\0') - break; - c = *src++; - *dest++ = c; - if (c == '\0') - break; - if (--n4 == 0) - goto last_chars; - } - n -= dest - s; - goto zero_fill; - } - - last_chars: - n &= 3; - if (n == 0) - return dest; - - for (;;) - { - c = *src++; - --n; - *dest++ = c; - if (c == '\0') - break; - if (n == 0) - return dest; - } - - zero_fill: - while (n-- > 0) - dest[n] = '\0'; - - return dest - 1; -} -#ifdef weak_alias -weak_alias (__stpncpy, stpncpy) -#endif diff --git a/gnulib/lib/str-two-way.h b/gnulib/lib/str-two-way.h deleted file mode 100644 index dcb0854..0000000 --- a/gnulib/lib/str-two-way.h +++ /dev/null @@ -1,452 +0,0 @@ -/* Byte-wise substring search, using the Two-Way algorithm. - Copyright (C) 2008-2012 Free Software Foundation, Inc. - This file is part of the GNU C Library. - Written by Eric Blake , 2008. - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU 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 . */ - -/* Before including this file, you need to include and - , and define: - RESULT_TYPE A macro that expands to the return type. - AVAILABLE(h, h_l, j, n_l) - A macro that returns nonzero if there are - at least N_L bytes left starting at H[J]. - H is 'unsigned char *', H_L, J, and N_L - are 'size_t'; H_L is an lvalue. For - NUL-terminated searches, H_L can be - modified each iteration to avoid having - to compute the end of H up front. - - For case-insensitivity, you may optionally define: - CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L - characters of P1 and P2 are equal. - CANON_ELEMENT(c) A macro that canonicalizes an element right after - it has been fetched from one of the two strings. - The argument is an 'unsigned char'; the result - must be an 'unsigned char' as well. - - This file undefines the macros documented above, and defines - LONG_NEEDLE_THRESHOLD. -*/ - -#include -#include - -/* We use the Two-Way string matching algorithm (also known as - Chrochemore-Perrin), which guarantees linear complexity with - constant space. Additionally, for long needles, we also use a bad - character shift table similar to the Boyer-Moore algorithm to - achieve improved (potentially sub-linear) performance. - - See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260, - http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm, - http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.34.6641&rep=rep1&type=pdf -*/ - -/* Point at which computing a bad-byte shift table is likely to be - worthwhile. Small needles should not compute a table, since it - adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a - speedup no greater than a factor of NEEDLE_LEN. The larger the - needle, the better the potential performance gain. On the other - hand, on non-POSIX systems with CHAR_BIT larger than eight, the - memory required for the table is prohibitive. */ -#if CHAR_BIT < 10 -# define LONG_NEEDLE_THRESHOLD 32U -#else -# define LONG_NEEDLE_THRESHOLD SIZE_MAX -#endif - -#ifndef MAX -# define MAX(a, b) ((a < b) ? (b) : (a)) -#endif - -#ifndef CANON_ELEMENT -# define CANON_ELEMENT(c) c -#endif -#ifndef CMP_FUNC -# define CMP_FUNC memcmp -#endif - -/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN. - Return the index of the first byte in the right half, and set - *PERIOD to the global period of the right half. - - The global period of a string is the smallest index (possibly its - length) at which all remaining bytes in the string are repetitions - of the prefix (the last repetition may be a subset of the prefix). - - When NEEDLE is factored into two halves, a local period is the - length of the smallest word that shares a suffix with the left half - and shares a prefix with the right half. All factorizations of a - non-empty NEEDLE have a local period of at least 1 and no greater - than NEEDLE_LEN. - - A critical factorization has the property that the local period - equals the global period. All strings have at least one critical - factorization with the left half smaller than the global period. - And while some strings have more than one critical factorization, - it is provable that with an ordered alphabet, at least one of the - critical factorizations corresponds to a maximal suffix. - - Given an ordered alphabet, a critical factorization can be computed - in linear time, with 2 * NEEDLE_LEN comparisons, by computing the - shorter of two ordered maximal suffixes. The ordered maximal - suffixes are determined by lexicographic comparison while tracking - periodicity. */ -static size_t -critical_factorization (const unsigned char *needle, size_t needle_len, - size_t *period) -{ - /* Index of last byte of left half, or SIZE_MAX. */ - size_t max_suffix, max_suffix_rev; - size_t j; /* Index into NEEDLE for current candidate suffix. */ - size_t k; /* Offset into current period. */ - size_t p; /* Intermediate period. */ - unsigned char a, b; /* Current comparison bytes. */ - - /* Special case NEEDLE_LEN of 1 or 2 (all callers already filtered - out 0-length needles. */ - if (needle_len < 3) - { - *period = 1; - return needle_len - 1; - } - - /* Invariants: - 0 <= j < NEEDLE_LEN - 1 - -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed) - min(max_suffix, max_suffix_rev) < global period of NEEDLE - 1 <= p <= global period of NEEDLE - p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j] - 1 <= k <= p - */ - - /* Perform lexicographic search. */ - max_suffix = SIZE_MAX; - j = 0; - k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix + k]); - if (a < b) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* b < a */ - { - /* Suffix is larger, start over from current location. */ - max_suffix = j++; - k = p = 1; - } - } - *period = p; - - /* Perform reverse lexicographic search. */ - max_suffix_rev = SIZE_MAX; - j = 0; - k = p = 1; - while (j + k < needle_len) - { - a = CANON_ELEMENT (needle[j + k]); - b = CANON_ELEMENT (needle[max_suffix_rev + k]); - if (b < a) - { - /* Suffix is smaller, period is entire prefix so far. */ - j += k; - k = 1; - p = j - max_suffix_rev; - } - else if (a == b) - { - /* Advance through repetition of the current period. */ - if (k != p) - ++k; - else - { - j += p; - k = 1; - } - } - else /* a < b */ - { - /* Suffix is larger, start over from current location. */ - max_suffix_rev = j++; - k = p = 1; - } - } - - /* Choose the shorter suffix. Return the index of the first byte of - the right half, rather than the last byte of the left half. - - For some examples, 'banana' has two critical factorizations, both - exposed by the two lexicographic extreme suffixes of 'anana' and - 'nana', where both suffixes have a period of 2. On the other - hand, with 'aab' and 'bba', both strings have a single critical - factorization of the last byte, with the suffix having a period - of 1. While the maximal lexicographic suffix of 'aab' is 'b', - the maximal lexicographic suffix of 'bba' is 'ba', which is not a - critical factorization. Conversely, the maximal reverse - lexicographic suffix of 'a' works for 'bba', but not 'ab' for - 'aab'. The shorter suffix of the two will always be a critical - factorization. */ - if (max_suffix_rev + 1 < max_suffix + 1) - return max_suffix + 1; - *period = p; - return max_suffix_rev + 1; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD. - Performance is guaranteed to be linear, with an initialization cost - of 2 * NEEDLE_LEN comparisons. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */ -static RETURN_TYPE -two_way_short_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = MAX (suffix, memory); - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Scan for matches in right half. */ - i = suffix; - while (i < needle_len && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -/* Return the first location of non-empty NEEDLE within HAYSTACK, or - NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This - method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN. - Performance is guaranteed to be linear, with an initialization cost - of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations. - - If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at - most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, - and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible. - If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 * - HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and - sublinear performance is not possible. */ -static RETURN_TYPE -two_way_long_needle (const unsigned char *haystack, size_t haystack_len, - const unsigned char *needle, size_t needle_len) -{ - size_t i; /* Index into current byte of NEEDLE. */ - size_t j; /* Index into current window of HAYSTACK. */ - size_t period; /* The period of the right half of needle. */ - size_t suffix; /* The index of the right half of needle. */ - size_t shift_table[1U << CHAR_BIT]; /* See below. */ - - /* Factor the needle into two halves, such that the left half is - smaller than the global period, and the right half is - periodic (with a period as large as NEEDLE_LEN - suffix). */ - suffix = critical_factorization (needle, needle_len, &period); - - /* Populate shift_table. For each possible byte value c, - shift_table[c] is the distance from the last occurrence of c to - the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE. - shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */ - for (i = 0; i < 1U << CHAR_BIT; i++) - shift_table[i] = needle_len; - for (i = 0; i < needle_len; i++) - shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1; - - /* Perform the search. Each iteration compares the right half - first. */ - if (CMP_FUNC (needle, needle + period, suffix) == 0) - { - /* Entire needle is periodic; a mismatch in the left half can - only advance by the period, so use memory to avoid rescanning - known occurrences of the period in the right half. */ - size_t memory = 0; - size_t shift; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - if (memory && shift < period) - { - /* Since needle is periodic, but the last period has - a byte out of place, there can be no match until - after the mismatch. */ - shift = needle_len - period; - } - memory = 0; - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = MAX (suffix, memory); - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (memory < i + 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i + 1 < memory + 1) - return (RETURN_TYPE) (haystack + j); - /* No match, so remember how many repetitions of period - on the right half were scanned. */ - j += period; - memory = needle_len - period; - } - else - { - j += i - suffix + 1; - memory = 0; - } - } - } - else - { - /* The two halves of needle are distinct; no extra memory is - required, and any mismatch results in a maximal shift. */ - size_t shift; - period = MAX (suffix, needle_len - suffix) + 1; - j = 0; - while (AVAILABLE (haystack, haystack_len, j, needle_len)) - { - /* Check the last byte first; if it does not match, then - shift to the next possible match location. */ - shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])]; - if (0 < shift) - { - j += shift; - continue; - } - /* Scan for matches in right half. The last byte has - already been matched, by virtue of the shift table. */ - i = suffix; - while (i < needle_len - 1 && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - ++i; - if (needle_len - 1 <= i) - { - /* Scan for matches in left half. */ - i = suffix - 1; - while (i != SIZE_MAX && (CANON_ELEMENT (needle[i]) - == CANON_ELEMENT (haystack[i + j]))) - --i; - if (i == SIZE_MAX) - return (RETURN_TYPE) (haystack + j); - j += period; - } - else - j += i - suffix + 1; - } - } - return NULL; -} - -#undef AVAILABLE -#undef CANON_ELEMENT -#undef CMP_FUNC -#undef MAX -#undef RETURN_TYPE diff --git a/gnulib/lib/strchrnul.c b/gnulib/lib/strchrnul.c deleted file mode 100644 index 2ced7f2..0000000 --- a/gnulib/lib/strchrnul.c +++ /dev/null @@ -1,142 +0,0 @@ -/* 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 deleted file mode 100644 index b14fa13..0000000 --- a/gnulib/lib/strchrnul.valgrind +++ /dev/null @@ -1,12 +0,0 @@ -# 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 deleted file mode 100644 index 6101168..0000000 --- a/gnulib/lib/streq.h +++ /dev/null @@ -1,176 +0,0 @@ -/* Optimized string comparison. - 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 - 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 . */ - -/* Written by Bruno Haible . */ - -#ifndef _GL_STREQ_H -#define _GL_STREQ_H - -#include - -/* STREQ_OPT allows to optimize string comparison with a small literal string. - STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0) - is semantically equivalent to - strcmp (s, "EUC-KR") == 0 - just faster. */ - -/* Help GCC to generate good code for string comparisons with - immediate strings. */ -#if defined (__GNUC__) && defined (__OPTIMIZE__) - -static inline int -streq9 (const char *s1, const char *s2) -{ - return strcmp (s1 + 9, s2 + 9) == 0; -} - -static inline int -streq8 (const char *s1, const char *s2, char s28) -{ - if (s1[8] == s28) - { - if (s28 == 0) - return 1; - else - return streq9 (s1, s2); - } - else - return 0; -} - -static inline int -streq7 (const char *s1, const char *s2, char s27, char s28) -{ - if (s1[7] == s27) - { - if (s27 == 0) - return 1; - else - return streq8 (s1, s2, s28); - } - else - return 0; -} - -static inline int -streq6 (const char *s1, const char *s2, char s26, char s27, char s28) -{ - if (s1[6] == s26) - { - if (s26 == 0) - return 1; - else - return streq7 (s1, s2, s27, s28); - } - else - return 0; -} - -static inline int -streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28) -{ - if (s1[5] == s25) - { - if (s25 == 0) - return 1; - else - return streq6 (s1, s2, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[4] == s24) - { - if (s24 == 0) - return 1; - else - return streq5 (s1, s2, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[3] == s23) - { - if (s23 == 0) - return 1; - else - return streq4 (s1, s2, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[2] == s22) - { - if (s22 == 0) - return 1; - else - return streq3 (s1, s2, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[1] == s21) - { - if (s21 == 0) - return 1; - else - return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -static inline int -streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28) -{ - if (s1[0] == s20) - { - if (s20 == 0) - return 1; - else - return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28); - } - else - return 0; -} - -#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ - streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28) - -#else - -#define STREQ_OPT(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \ - (strcmp (s1, s2) == 0) - -#endif - -#endif /* _GL_STREQ_H */ diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h deleted file mode 100644 index ed187c9..0000000 --- a/gnulib/lib/string.in.h +++ /dev/null @@ -1,1029 +0,0 @@ -/* A GNU-like . - - 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 - 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 . */ - -#ifndef _@GUARD_PREFIX@_STRING_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_STRING_H@ - -#ifndef _@GUARD_PREFIX@_STRING_H -#define _@GUARD_PREFIX@_STRING_H - -/* NetBSD 5.0 mis-defines NULL. */ -#include - -/* MirBSD defines mbslen as a macro. */ -#if @GNULIB_MBSLEN@ && defined __MirBSD__ -# include -#endif - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* NetBSD 5.0 declares strsignal in , not in . */ -/* But in any case avoid namespace pollution on glibc systems. */ -#if (@GNULIB_STRSIGNAL@ || defined GNULIB_POSIXCHECK) && defined __NetBSD__ \ - && ! defined __GLIBC__ -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Find the index of the least-significant set bit. */ -#if @GNULIB_FFSL@ -# if !@HAVE_FFSL@ -_GL_FUNCDECL_SYS (ffsl, int, (long int i)); -# endif -_GL_CXXALIAS_SYS (ffsl, int, (long int i)); -_GL_CXXALIASWARN (ffsl); -#elif defined GNULIB_POSIXCHECK -# undef ffsl -# if HAVE_RAW_DECL_FFSL -_GL_WARN_ON_USE (ffsl, "ffsl is not portable - use the ffsl module"); -# endif -#endif - - -/* Find the index of the least-significant set bit. */ -#if @GNULIB_FFSLL@ -# if !@HAVE_FFSLL@ -_GL_FUNCDECL_SYS (ffsll, int, (long long int i)); -# endif -_GL_CXXALIAS_SYS (ffsll, int, (long long int i)); -_GL_CXXALIASWARN (ffsll); -#elif defined GNULIB_POSIXCHECK -# undef ffsll -# if HAVE_RAW_DECL_FFSLL -_GL_WARN_ON_USE (ffsll, "ffsll is not portable - use the ffsll module"); -# endif -#endif - - -/* Return the first instance of C within N bytes of S, or NULL. */ -#if @GNULIB_MEMCHR@ -# if @REPLACE_MEMCHR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memchr rpl_memchr -# endif -_GL_FUNCDECL_RPL (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (memchr, void *, (void const *__s, int __c, size_t __n)); -# else -# if ! @HAVE_MEMCHR@ -_GL_FUNCDECL_SYS (memchr, void *, (void const *__s, int __c, size_t __n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const void * std::memchr (const void *, int, size_t); } - extern "C++" { void * std::memchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memchr, - void *, (void const *__s, int __c, size_t __n), - void const *, (void const *__s, int __c, size_t __n)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memchr, void *, (void *__s, int __c, size_t __n)); -_GL_CXXALIASWARN1 (memchr, void const *, - (void const *__s, int __c, size_t __n)); -# else -_GL_CXXALIASWARN (memchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memchr -/* Assume memchr is always declared. */ -_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - " - "use gnulib module memchr for portability" ); -#endif - -/* Return the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_MEMMEM@ -# if @REPLACE_MEMMEM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define memmem rpl_memmem -# endif -_GL_FUNCDECL_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -_GL_CXXALIAS_RPL (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# else -# if ! @HAVE_DECL_MEMMEM@ -_GL_FUNCDECL_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (memmem, void *, - (void const *__haystack, size_t __haystack_len, - void const *__needle, size_t __needle_len)); -# endif -_GL_CXXALIASWARN (memmem); -#elif defined GNULIB_POSIXCHECK -# undef memmem -# if HAVE_RAW_DECL_MEMMEM -_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - " - "use gnulib module memmem-simple for portability, " - "and module memmem for speed" ); -# endif -#endif - -/* Copy N bytes of SRC to DEST, return pointer to bytes after the - last written byte. */ -#if @GNULIB_MEMPCPY@ -# if ! @HAVE_MEMPCPY@ -_GL_FUNCDECL_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (mempcpy, void *, - (void *restrict __dest, void const *restrict __src, - size_t __n)); -_GL_CXXALIASWARN (mempcpy); -#elif defined GNULIB_POSIXCHECK -# undef mempcpy -# if HAVE_RAW_DECL_MEMPCPY -_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - " - "use gnulib module mempcpy for portability"); -# endif -#endif - -/* Search backwards through a block for a byte (specified as an int). */ -#if @GNULIB_MEMRCHR@ -# if ! @HAVE_DECL_MEMRCHR@ -_GL_FUNCDECL_SYS (memrchr, void *, (void const *, int, size_t) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::memrchr (const void *, int, size_t); } - extern "C++" { void * std::memrchr (void *, int, size_t); } */ -_GL_CXXALIAS_SYS_CAST2 (memrchr, - void *, (void const *, int, size_t), - void const *, (void const *, int, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (memrchr, void *, (void *, int, size_t)); -_GL_CXXALIASWARN1 (memrchr, void const *, (void const *, int, size_t)); -# else -_GL_CXXALIASWARN (memrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef memrchr -# if HAVE_RAW_DECL_MEMRCHR -_GL_WARN_ON_USE (memrchr, "memrchr is unportable - " - "use gnulib module memrchr for portability"); -# endif -#endif - -/* Find the first occurrence of C in S. More efficient than - memchr(S,C,N), at the expense of undefined behavior if C does not - occur within N bytes. */ -#if @GNULIB_RAWMEMCHR@ -# if ! @HAVE_RAWMEMCHR@ -_GL_FUNCDECL_SYS (rawmemchr, void *, (void const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const void * std::rawmemchr (const void *, int); } - extern "C++" { void * std::rawmemchr (void *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (rawmemchr, - void *, (void const *__s, int __c_in), - void const *, (void const *__s, int __c_in)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (rawmemchr, void *, (void *__s, int __c_in)); -_GL_CXXALIASWARN1 (rawmemchr, void const *, (void const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (rawmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef rawmemchr -# if HAVE_RAW_DECL_RAWMEMCHR -_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - " - "use gnulib module rawmemchr for portability"); -# endif -#endif - -/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */ -#if @GNULIB_STPCPY@ -# if ! @HAVE_STPCPY@ -_GL_FUNCDECL_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpcpy, char *, - (char *restrict __dst, char const *restrict __src)); -_GL_CXXALIASWARN (stpcpy); -#elif defined GNULIB_POSIXCHECK -# undef stpcpy -# if HAVE_RAW_DECL_STPCPY -_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - " - "use gnulib module stpcpy for portability"); -# endif -#endif - -/* Copy no more than N bytes of SRC to DST, returning a pointer past the - last non-NUL byte written into DST. */ -#if @GNULIB_STPNCPY@ -# if @REPLACE_STPNCPY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef stpncpy -# define stpncpy rpl_stpncpy -# endif -_GL_FUNCDECL_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# else -# if ! @HAVE_STPNCPY@ -_GL_FUNCDECL_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (stpncpy, char *, - (char *restrict __dst, char const *restrict __src, - size_t __n)); -# endif -_GL_CXXALIASWARN (stpncpy); -#elif defined GNULIB_POSIXCHECK -# undef stpncpy -# if HAVE_RAW_DECL_STPNCPY -_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - " - "use gnulib module stpncpy for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strchr -/* Assume strchr is always declared. */ -_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbschr if you care about internationalization"); -#endif - -/* Find the first occurrence of C in S or the final NUL byte. */ -#if @GNULIB_STRCHRNUL@ -# if @REPLACE_STRCHRNUL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strchrnul rpl_strchrnul -# endif -_GL_FUNCDECL_RPL (strchrnul, char *, (const char *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strchrnul, char *, - (const char *str, int ch)); -# else -# if ! @HAVE_STRCHRNUL@ -_GL_FUNCDECL_SYS (strchrnul, char *, (char const *__s, int __c_in) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * std::strchrnul (const char *, int); } - extern "C++" { char * std::strchrnul (char *, int); } */ -_GL_CXXALIAS_SYS_CAST2 (strchrnul, - char *, (char const *__s, int __c_in), - char const *, (char const *__s, int __c_in)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strchrnul, char *, (char *__s, int __c_in)); -_GL_CXXALIASWARN1 (strchrnul, char const *, (char const *__s, int __c_in)); -# else -_GL_CXXALIASWARN (strchrnul); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strchrnul -# if HAVE_RAW_DECL_STRCHRNUL -_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - " - "use gnulib module strchrnul for portability"); -# endif -#endif - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_STRDUP@ -# if @REPLACE_STRDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strdup -# define strdup rpl_strdup -# endif -_GL_FUNCDECL_RPL (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strdup, char *, (char const *__s)); -# else -# if defined __cplusplus && defined GNULIB_NAMESPACE && defined strdup - /* strdup exists as a function and as a macro. Get rid of the macro. */ -# undef strdup -# endif -# if !(@HAVE_DECL_STRDUP@ || defined strdup) -_GL_FUNCDECL_SYS (strdup, char *, (char const *__s) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strdup, char *, (char const *__s)); -# endif -_GL_CXXALIASWARN (strdup); -#elif defined GNULIB_POSIXCHECK -# undef strdup -# if HAVE_RAW_DECL_STRDUP -_GL_WARN_ON_USE (strdup, "strdup is unportable - " - "use gnulib module strdup for portability"); -# endif -#endif - -/* Append no more than N characters from SRC onto DEST. */ -#if @GNULIB_STRNCAT@ -# if @REPLACE_STRNCAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strncat -# define strncat rpl_strncat -# endif -_GL_FUNCDECL_RPL (strncat, char *, (char *dest, const char *src, size_t n) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strncat, char *, (char *dest, const char *src, size_t n)); -# else -_GL_CXXALIAS_SYS (strncat, char *, (char *dest, const char *src, size_t n)); -# endif -_GL_CXXALIASWARN (strncat); -#elif defined GNULIB_POSIXCHECK -# undef strncat -# if HAVE_RAW_DECL_STRNCAT -_GL_WARN_ON_USE (strncat, "strncat is unportable - " - "use gnulib module strncat for portability"); -# endif -#endif - -/* Return a newly allocated copy of at most N bytes of STRING. */ -#if @GNULIB_STRNDUP@ -# if @REPLACE_STRNDUP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strndup -# define strndup rpl_strndup -# endif -_GL_FUNCDECL_RPL (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strndup, char *, (char const *__string, size_t __n)); -# else -# if ! @HAVE_DECL_STRNDUP@ -_GL_FUNCDECL_SYS (strndup, char *, (char const *__string, size_t __n) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strndup, char *, (char const *__string, size_t __n)); -# endif -_GL_CXXALIASWARN (strndup); -#elif defined GNULIB_POSIXCHECK -# undef strndup -# if HAVE_RAW_DECL_STRNDUP -_GL_WARN_ON_USE (strndup, "strndup is unportable - " - "use gnulib module strndup for portability"); -# endif -#endif - -/* Find the length (number of bytes) of STRING, but scan at most - MAXLEN bytes. If no '\0' terminator is found in that many bytes, - return MAXLEN. */ -#if @GNULIB_STRNLEN@ -# if @REPLACE_STRNLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strnlen -# define strnlen rpl_strnlen -# endif -_GL_FUNCDECL_RPL (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (strnlen, size_t, (char const *__string, size_t __maxlen)); -# else -# if ! @HAVE_DECL_STRNLEN@ -_GL_FUNCDECL_SYS (strnlen, size_t, (char const *__string, size_t __maxlen) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (strnlen, size_t, (char const *__string, size_t __maxlen)); -# endif -_GL_CXXALIASWARN (strnlen); -#elif defined GNULIB_POSIXCHECK -# undef strnlen -# if HAVE_RAW_DECL_STRNLEN -_GL_WARN_ON_USE (strnlen, "strnlen is unportable - " - "use gnulib module strnlen for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strcspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strcspn -/* Assume strcspn is always declared. */ -_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbscspn if you care about internationalization"); -#endif - -/* Find the first occurrence in S of any character in ACCEPT. */ -#if @GNULIB_STRPBRK@ -# if ! @HAVE_STRPBRK@ -_GL_FUNCDECL_SYS (strpbrk, char *, (char const *__s, char const *__accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C" { const char * strpbrk (const char *, const char *); } - extern "C++" { char * strpbrk (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strpbrk, - char *, (char const *__s, char const *__accept), - const char *, (char const *__s, char const *__accept)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strpbrk, char *, (char *__s, char const *__accept)); -_GL_CXXALIASWARN1 (strpbrk, char const *, - (char const *__s, char const *__accept)); -# else -_GL_CXXALIASWARN (strpbrk); -# endif -# if defined GNULIB_POSIXCHECK -/* strpbrk() assumes the second argument is a list of single-byte characters. - Even in this simple case, it does not work with multibyte strings if the - locale encoding is GB18030 and one of the characters to be searched is a - digit. */ -# undef strpbrk -_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings " - "in multibyte locales - " - "use mbspbrk if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strpbrk -# if HAVE_RAW_DECL_STRPBRK -_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - " - "use gnulib module strpbrk for portability"); -# endif -#endif - -#if defined GNULIB_POSIXCHECK -/* strspn() assumes the second argument is a list of single-byte characters. - Even in this simple case, it cannot work with multibyte strings. */ -# undef strspn -/* Assume strspn is always declared. */ -_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings " - "in multibyte locales - " - "use mbsspn if you care about internationalization"); -#endif - -#if defined GNULIB_POSIXCHECK -/* strrchr() does not work with multibyte strings if the locale encoding is - GB18030 and the character to be searched is a digit. */ -# undef strrchr -/* Assume strrchr is always declared. */ -_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings " - "in some multibyte locales - " - "use mbsrchr if you care about internationalization"); -#endif - -/* Search the next delimiter (char listed in DELIM) starting at *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP - to point to the next char after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of strtok() that is multithread-safe and supports - empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strtok_r(). */ -#if @GNULIB_STRSEP@ -# if ! @HAVE_STRSEP@ -_GL_FUNCDECL_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strsep, char *, - (char **restrict __stringp, char const *restrict __delim)); -_GL_CXXALIASWARN (strsep); -# if defined GNULIB_POSIXCHECK -# undef strsep -_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings " - "in multibyte locales - " - "use mbssep if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strsep -# if HAVE_RAW_DECL_STRSEP -_GL_WARN_ON_USE (strsep, "strsep is unportable - " - "use gnulib module strsep for portability"); -# endif -#endif - -#if @GNULIB_STRSTR@ -# if @REPLACE_STRSTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strstr rpl_strstr -# endif -_GL_FUNCDECL_RPL (strstr, char *, (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strstr, char *, (const char *haystack, const char *needle)); -# else - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strstr (const char *, const char *); } - extern "C++" { char * strstr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strstr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strstr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strstr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strstr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strstr() does not work with multibyte strings if the locale encoding is - different from UTF-8: - POSIX says that it operates on "strings", and "string" in POSIX is defined - as a sequence of bytes, not of characters. */ -# undef strstr -/* Assume strstr is always declared. */ -_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot " - "work correctly on character strings in most " - "multibyte locales - " - "use mbsstr if you care about internationalization, " - "or use strstr if you care about speed"); -#endif - -/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive - comparison. */ -#if @GNULIB_STRCASESTR@ -# if @REPLACE_STRCASESTR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strcasestr rpl_strcasestr -# endif -_GL_FUNCDECL_RPL (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (strcasestr, char *, - (const char *haystack, const char *needle)); -# else -# if ! @HAVE_STRCASESTR@ -_GL_FUNCDECL_SYS (strcasestr, char *, - (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { const char * strcasestr (const char *, const char *); } - extern "C++" { char * strcasestr (char *, const char *); } */ -_GL_CXXALIAS_SYS_CAST2 (strcasestr, - char *, (const char *haystack, const char *needle), - const char *, (const char *haystack, const char *needle)); -# endif -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (strcasestr, char *, (char *haystack, const char *needle)); -_GL_CXXALIASWARN1 (strcasestr, const char *, - (const char *haystack, const char *needle)); -# else -_GL_CXXALIASWARN (strcasestr); -# endif -#elif defined GNULIB_POSIXCHECK -/* strcasestr() does not work with multibyte strings: - It is a glibc extension, and glibc implements it only for unibyte - locales. */ -# undef strcasestr -# if HAVE_RAW_DECL_STRCASESTR -_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character " - "strings in multibyte locales - " - "use mbscasestr if you care about " - "internationalization, or use c-strcasestr if you want " - "a locale independent function"); -# endif -#endif - -/* Parse S into tokens separated by characters in DELIM. - If S is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = strtok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - This is a variant of strtok() that is multithread-safe. - - For the POSIX documentation for this function, see: - http://www.opengroup.org/susv3xsh/strtok.html - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - Caveat: It doesn't work with multibyte strings unless all of the delimiter - characters are ASCII characters < 0x30. - - See also strsep(). */ -#if @GNULIB_STRTOK_R@ -# if @REPLACE_STRTOK_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strtok_r -# define strtok_r rpl_strtok_r -# endif -_GL_FUNCDECL_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# else -# if @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK -# undef strtok_r -# endif -# if ! @HAVE_DECL_STRTOK_R@ -_GL_FUNCDECL_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (strtok_r, char *, - (char *restrict s, char const *restrict delim, - char **restrict save_ptr)); -# endif -_GL_CXXALIASWARN (strtok_r); -# if defined GNULIB_POSIXCHECK -_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character " - "strings in multibyte locales - " - "use mbstok_r if you care about internationalization"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strtok_r -# if HAVE_RAW_DECL_STRTOK_R -_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - " - "use gnulib module strtok_r for portability"); -# endif -#endif - - -/* The following functions are not specified by POSIX. They are gnulib - extensions. */ - -#if @GNULIB_MBSLEN@ -/* Return the number of multibyte characters in the character string STRING. - This considers multibyte characters, unlike strlen, which counts bytes. */ -# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */ -# undef mbslen -# endif -# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbslen rpl_mbslen -# endif -_GL_FUNCDECL_RPL (mbslen, size_t, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbslen, size_t, (const char *string)); -# else -_GL_FUNCDECL_SYS (mbslen, size_t, (const char *string) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbslen, size_t, (const char *string)); -# endif -_GL_CXXALIASWARN (mbslen); -#endif - -#if @GNULIB_MBSNLEN@ -/* Return the number of multibyte characters in the character string starting - at STRING and ending at STRING + LEN. */ -_GL_EXTERN_C size_t mbsnlen (const char *string, size_t len) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1)); -#endif - -#if @GNULIB_MBSCHR@ -/* Locate the first single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbschr rpl_mbschr /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbschr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbschr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbschr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbschr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbschr); -#endif - -#if @GNULIB_MBSRCHR@ -/* Locate the last single-byte character C in the character string STRING, - and return a pointer to it. Return NULL if C is not found in STRING. - Unlike strrchr(), this function works correctly in multibyte locales with - encodings such as GB18030. */ -# if defined __hpux || defined __INTERIX -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbsrchr rpl_mbsrchr /* avoid collision with system function */ -# endif -_GL_FUNCDECL_RPL (mbsrchr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mbsrchr, char *, (const char *string, int c)); -# else -_GL_FUNCDECL_SYS (mbsrchr, char *, (const char *string, int c) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (mbsrchr, char *, (const char *string, int c)); -# endif -_GL_CXXALIASWARN (mbsrchr); -#endif - -#if @GNULIB_MBSSTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. - Unlike strstr(), this function works correctly in multibyte locales with - encodings different from UTF-8. */ -_GL_EXTERN_C char * mbsstr (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASECMP@ -/* Compare the character strings S1 and S2, ignoring case, returning less than, - equal to or greater than zero if S1 is lexicographically less than, equal to - or greater than S2. - Note: This function may, in multibyte locales, return 0 for strings of - different lengths! - Unlike strcasecmp(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C int mbscasecmp (const char *s1, const char *s2) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSNCASECMP@ -/* Compare the initial segment of the character string S1 consisting of at most - N characters with the initial segment of the character string S2 consisting - of at most N characters, ignoring case, returning less than, equal to or - greater than zero if the initial segment of S1 is lexicographically less - than, equal to or greater than the initial segment of S2. - Note: This function may, in multibyte locales, return 0 for initial segments - of different lengths! - Unlike strncasecmp(), this function works correctly in multibyte locales. - But beware that N is not a byte count but a character count! */ -_GL_EXTERN_C int mbsncasecmp (const char *s1, const char *s2, size_t n) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPCASECMP@ -/* Compare the initial segment of the character string STRING consisting of - at most mbslen (PREFIX) characters with the character string PREFIX, - ignoring case. If the two match, return a pointer to the first byte - after this prefix in STRING. Otherwise, return NULL. - Note: This function may, in multibyte locales, return non-NULL if STRING - is of smaller length than PREFIX! - Unlike strncasecmp(), this function works correctly in multibyte - locales. */ -_GL_EXTERN_C char * mbspcasecmp (const char *string, const char *prefix) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCASESTR@ -/* Find the first occurrence of the character string NEEDLE in the character - string HAYSTACK, using case-insensitive comparison. - Note: This function may, in multibyte locales, return success even if - strlen (haystack) < strlen (needle) ! - Unlike strcasestr(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C char * mbscasestr (const char *haystack, const char *needle) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSCSPN@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strcspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbscspn (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSPBRK@ -/* Find the first occurrence in the character string STRING of any character - in the character string ACCEPT. Return the pointer to it, or NULL if none - exists. - Unlike strpbrk(), this function works correctly in multibyte locales. */ -# if defined __hpux -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */ -# endif -_GL_FUNCDECL_RPL (mbspbrk, char *, (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (mbspbrk, char *, (const char *string, const char *accept)); -# else -_GL_FUNCDECL_SYS (mbspbrk, char *, (const char *string, const char *accept) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_SYS (mbspbrk, char *, (const char *string, const char *accept)); -# endif -_GL_CXXALIASWARN (mbspbrk); -#endif - -#if @GNULIB_MBSSPN@ -/* Find the first occurrence in the character string STRING of any character - not in the character string REJECT. Return the number of bytes from the - beginning of the string to this occurrence, or to the end of the string - if none exists. - Unlike strspn(), this function works correctly in multibyte locales. */ -_GL_EXTERN_C size_t mbsspn (const char *string, const char *reject) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSSEP@ -/* Search the next delimiter (multibyte character listed in the character - string DELIM) starting at the character string *STRINGP. - If one is found, overwrite it with a NUL, and advance *STRINGP to point - to the next multibyte character after it. Otherwise, set *STRINGP to NULL. - If *STRINGP was already NULL, nothing happens. - Return the old value of *STRINGP. - - This is a variant of mbstok_r() that supports empty fields. - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbstok_r(). */ -_GL_EXTERN_C char * mbssep (char **stringp, const char *delim) - _GL_ARG_NONNULL ((1, 2)); -#endif - -#if @GNULIB_MBSTOK_R@ -/* Parse the character string STRING into tokens separated by characters in - the character string DELIM. - If STRING is NULL, the saved pointer in SAVE_PTR is used as - the next starting point. For example: - char s[] = "-abc-=-def"; - char *sp; - x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def" - x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL - x = mbstok_r(NULL, "=", &sp); // x = NULL - // s = "abc\0-def\0" - - Caveat: It modifies the original string. - Caveat: These functions cannot be used on constant strings. - Caveat: The identity of the delimiting character is lost. - - See also mbssep(). */ -_GL_EXTERN_C char * mbstok_r (char *string, const char *delim, char **save_ptr) - _GL_ARG_NONNULL ((2, 3)); -#endif - -/* Map any int, typically from errno, into an error message. */ -#if @GNULIB_STRERROR@ -# if @REPLACE_STRERROR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror -# define strerror rpl_strerror -# endif -_GL_FUNCDECL_RPL (strerror, char *, (int)); -_GL_CXXALIAS_RPL (strerror, char *, (int)); -# else -_GL_CXXALIAS_SYS (strerror, char *, (int)); -# endif -_GL_CXXALIASWARN (strerror); -#elif defined GNULIB_POSIXCHECK -# undef strerror -/* Assume strerror is always declared. */ -_GL_WARN_ON_USE (strerror, "strerror is unportable - " - "use gnulib module strerror to guarantee non-NULL result"); -#endif - -/* Map any int, typically from errno, into an error message. Multithread-safe. - Uses the POSIX declaration, not the glibc declaration. */ -#if @GNULIB_STRERROR_R@ -# if @REPLACE_STRERROR_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef strerror_r -# define strerror_r rpl_strerror_r -# endif -_GL_FUNCDECL_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_STRERROR_R@ -_GL_FUNCDECL_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (strerror_r, int, (int errnum, char *buf, size_t buflen)); -# endif -# if @HAVE_DECL_STRERROR_R@ -_GL_CXXALIASWARN (strerror_r); -# endif -#elif defined GNULIB_POSIXCHECK -# undef strerror_r -# if HAVE_RAW_DECL_STRERROR_R -_GL_WARN_ON_USE (strerror_r, "strerror_r is unportable - " - "use gnulib module strerror_r-posix for portability"); -# endif -#endif - -#if @GNULIB_STRSIGNAL@ -# if @REPLACE_STRSIGNAL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define strsignal rpl_strsignal -# endif -_GL_FUNCDECL_RPL (strsignal, char *, (int __sig)); -_GL_CXXALIAS_RPL (strsignal, char *, (int __sig)); -# else -# if ! @HAVE_DECL_STRSIGNAL@ -_GL_FUNCDECL_SYS (strsignal, char *, (int __sig)); -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is - 'const char *'. */ -_GL_CXXALIAS_SYS_CAST (strsignal, char *, (int __sig)); -# endif -_GL_CXXALIASWARN (strsignal); -#elif defined GNULIB_POSIXCHECK -# undef strsignal -# if HAVE_RAW_DECL_STRSIGNAL -_GL_WARN_ON_USE (strsignal, "strsignal is unportable - " - "use gnulib module strsignal for portability"); -# endif -#endif - -#if @GNULIB_STRVERSCMP@ -# if !@HAVE_STRVERSCMP@ -_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *) - _GL_ATTRIBUTE_PURE - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *)); -_GL_CXXALIASWARN (strverscmp); -#elif defined GNULIB_POSIXCHECK -# undef strverscmp -# if HAVE_RAW_DECL_STRVERSCMP -_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - " - "use gnulib module strverscmp for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_STRING_H */ -#endif /* _@GUARD_PREFIX@_STRING_H */ diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c deleted file mode 100644 index b6313b2..0000000 --- a/gnulib/lib/strndup.c +++ /dev/null @@ -1,36 +0,0 @@ -/* A replacement function, for systems that lack strndup. - - 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 - 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 . */ - -#include - -#include - -#include - -char * -strndup (char const *s, size_t n) -{ - size_t len = strnlen (s, n); - char *new = malloc (len + 1); - - if (new == NULL) - return NULL; - - new[len] = '\0'; - return memcpy (new, s, len); -} diff --git a/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c deleted file mode 100644 index ec6c674..0000000 --- a/gnulib/lib/strnlen.c +++ /dev/null @@ -1,30 +0,0 @@ -/* Find the length of STRING, but scan at most MAXLEN characters. - 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 - 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 . */ - -#include - -#include - -/* Find the length of STRING, but scan at most MAXLEN characters. - If no '\0' terminator is found in that many characters, return MAXLEN. */ - -size_t -strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} diff --git a/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c deleted file mode 100644 index bdfcc37..0000000 --- a/gnulib/lib/strnlen1.c +++ /dev/null @@ -1,35 +0,0 @@ -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - Copyright (C) 2005-2006, 2009-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 "strnlen1.h" - -#include - -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - If no '\0' terminator is found in that many characters, return MAXLEN. */ -/* This is the same as strnlen (string, maxlen - 1) + 1. */ -size_t -strnlen1 (const char *string, size_t maxlen) -{ - const char *end = (const char *) memchr (string, '\0', maxlen); - if (end != NULL) - return end - string + 1; - else - return maxlen; -} diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h deleted file mode 100644 index 9af1d38..0000000 --- a/gnulib/lib/strnlen1.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - 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 - 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 . */ - -#ifndef _STRNLEN1_H -#define _STRNLEN1_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Find the length of STRING + 1, but scan at most MAXLEN bytes. - If no '\0' terminator is found in that many characters, return MAXLEN. */ -/* This is the same as strnlen (string, maxlen - 1) + 1. */ -extern size_t strnlen1 (const char *string, size_t maxlen) - _GL_ATTRIBUTE_PURE; - - -#ifdef __cplusplus -} -#endif - - -#endif /* _STRNLEN1_H */ diff --git a/gnulib/lib/strstr.c b/gnulib/lib/strstr.c deleted file mode 100644 index 8e50d62..0000000 --- a/gnulib/lib/strstr.c +++ /dev/null @@ -1,82 +0,0 @@ -/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-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 - 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 . */ - -/* This particular implementation was written by Eric Blake, 2008. */ - -#ifndef _LIBC -# include -#endif - -/* Specification of strstr. */ -#include - -#include - -#ifndef _LIBC -# define __builtin_expect(expr, val) (expr) -#endif - -#define RETURN_TYPE char * -#define AVAILABLE(h, h_l, j, n_l) \ - (!memchr ((h) + (h_l), '\0', (j) + (n_l) - (h_l)) \ - && ((h_l) = (j) + (n_l))) -#include "str-two-way.h" - -/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK - if NEEDLE is empty, otherwise NULL if NEEDLE is not found in - HAYSTACK. */ -char * -strstr (const char *haystack_start, const char *needle_start) -{ - const char *haystack = haystack_start; - const char *needle = needle_start; - size_t needle_len; /* Length of NEEDLE. */ - size_t haystack_len; /* Known minimum length of HAYSTACK. */ - bool ok = true; /* True if NEEDLE is prefix of HAYSTACK. */ - - /* Determine length of NEEDLE, and in the process, make sure - HAYSTACK is at least as long (no point processing all of a long - NEEDLE if HAYSTACK is too short). */ - while (*haystack && *needle) - ok &= *haystack++ == *needle++; - if (*needle) - return NULL; - if (ok) - return (char *) haystack_start; - - /* Reduce the size of haystack using strchr, since it has a smaller - linear coefficient than the Two-Way algorithm. */ - needle_len = needle - needle_start; - haystack = strchr (haystack_start + 1, *needle_start); - if (!haystack || __builtin_expect (needle_len == 1, 0)) - return (char *) haystack; - needle -= needle_len; - haystack_len = (haystack > haystack_start + needle_len ? 1 - : needle_len + haystack_start - haystack); - - /* Perform the search. Abstract memory is considered to be an array - of 'unsigned char' values, not an array of 'char' values. See - ISO C 99 section 6.2.6.1. */ - if (needle_len < LONG_NEEDLE_THRESHOLD) - return two_way_short_needle ((const unsigned char *) haystack, - haystack_len, - (const unsigned char *) needle, needle_len); - return two_way_long_needle ((const unsigned char *) haystack, haystack_len, - (const unsigned char *) needle, needle_len); -} - -#undef LONG_NEEDLE_THRESHOLD diff --git a/gnulib/lib/sys_stat.in.h b/gnulib/lib/sys_stat.in.h deleted file mode 100644 index 8b6372f..0000000 --- a/gnulib/lib/sys_stat.in.h +++ /dev/null @@ -1,728 +0,0 @@ -/* Provide a more complete sys/stat header file. - 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 - 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 Eric Blake, Paul Eggert, and Jim Meyering. */ - -/* This file is supposed to be used on platforms where is - incomplete. It is intended to provide definitions and prototypes - needed by an application. Start with what the system provides. */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_system_sys_stat_h -/* Special invocation convention. */ - -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_SYS_STAT_H - -/* Get nlink_t. - May also define off_t to a 64-bit type on native Windows. */ -#include - -/* Get struct timespec. */ -#include - -/* The include_next requires a split double-inclusion guard. */ -#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@ - -#ifndef _@GUARD_PREFIX@_SYS_STAT_H -#define _@GUARD_PREFIX@_SYS_STAT_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Before doing "#define mkdir rpl_mkdir" below, we need to include all - headers that may declare mkdir(). Native Windows platforms declare mkdir - in and/or , not in . */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#endif - -/* Native Windows platforms declare umask() in . */ -#if 0 && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -/* Large File Support on native Windows. */ -#if @WINDOWS_64_BIT_ST_SIZE@ -# define stat _stati64 -#endif - -#ifndef S_IFIFO -# ifdef _S_IFIFO -# define S_IFIFO _S_IFIFO -# endif -#endif - -#ifndef S_IFMT -# define S_IFMT 0170000 -#endif - -#if STAT_MACROS_BROKEN -# undef S_ISBLK -# undef S_ISCHR -# undef S_ISDIR -# undef S_ISFIFO -# undef S_ISLNK -# undef S_ISNAM -# undef S_ISMPB -# undef S_ISMPC -# undef S_ISNWK -# undef S_ISREG -# undef S_ISSOCK -#endif - -#ifndef S_ISBLK -# ifdef S_IFBLK -# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) -# else -# define S_ISBLK(m) 0 -# endif -#endif - -#ifndef S_ISCHR -# ifdef S_IFCHR -# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) -# else -# define S_ISCHR(m) 0 -# endif -#endif - -#ifndef S_ISDIR -# ifdef S_IFDIR -# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) -# else -# define S_ISDIR(m) 0 -# endif -#endif - -#ifndef S_ISDOOR /* Solaris 2.5 and up */ -# define S_ISDOOR(m) 0 -#endif - -#ifndef S_ISFIFO -# ifdef S_IFIFO -# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) -# else -# define S_ISFIFO(m) 0 -# endif -#endif - -#ifndef S_ISLNK -# ifdef S_IFLNK -# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK) -# else -# define S_ISLNK(m) 0 -# endif -#endif - -#ifndef S_ISMPB /* V7 */ -# ifdef S_IFMPB -# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB) -# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC) -# else -# define S_ISMPB(m) 0 -# define S_ISMPC(m) 0 -# endif -#endif - -#ifndef S_ISNAM /* Xenix */ -# ifdef S_IFNAM -# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM) -# else -# define S_ISNAM(m) 0 -# endif -#endif - -#ifndef S_ISNWK /* HP/UX */ -# ifdef S_IFNWK -# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK) -# else -# define S_ISNWK(m) 0 -# endif -#endif - -#ifndef S_ISPORT /* Solaris 10 and up */ -# define S_ISPORT(m) 0 -#endif - -#ifndef S_ISREG -# ifdef S_IFREG -# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) -# else -# define S_ISREG(m) 0 -# endif -#endif - -#ifndef S_ISSOCK -# ifdef S_IFSOCK -# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) -# else -# define S_ISSOCK(m) 0 -# endif -#endif - - -#ifndef S_TYPEISMQ -# define S_TYPEISMQ(p) 0 -#endif - -#ifndef S_TYPEISTMO -# define S_TYPEISTMO(p) 0 -#endif - - -#ifndef S_TYPEISSEM -# ifdef S_INSEM -# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM) -# else -# define S_TYPEISSEM(p) 0 -# endif -#endif - -#ifndef S_TYPEISSHM -# ifdef S_INSHD -# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD) -# else -# define S_TYPEISSHM(p) 0 -# endif -#endif - -/* high performance ("contiguous data") */ -#ifndef S_ISCTG -# define S_ISCTG(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with data */ -#ifndef S_ISOFD -# define S_ISOFD(p) 0 -#endif - -/* Cray DMF (data migration facility): off line, with no data */ -#ifndef S_ISOFL -# define S_ISOFL(p) 0 -#endif - -/* 4.4BSD whiteout */ -#ifndef S_ISWHT -# define S_ISWHT(m) 0 -#endif - -/* If any of the following are undefined, - define them to their de facto standard values. */ -#if !S_ISUID -# define S_ISUID 04000 -#endif -#if !S_ISGID -# define S_ISGID 02000 -#endif - -/* S_ISVTX is a common extension to POSIX. */ -#ifndef S_ISVTX -# define S_ISVTX 01000 -#endif - -#if !S_IRUSR && S_IREAD -# define S_IRUSR S_IREAD -#endif -#if !S_IRUSR -# define S_IRUSR 00400 -#endif -#if !S_IRGRP -# define S_IRGRP (S_IRUSR >> 3) -#endif -#if !S_IROTH -# define S_IROTH (S_IRUSR >> 6) -#endif - -#if !S_IWUSR && S_IWRITE -# define S_IWUSR S_IWRITE -#endif -#if !S_IWUSR -# define S_IWUSR 00200 -#endif -#if !S_IWGRP -# define S_IWGRP (S_IWUSR >> 3) -#endif -#if !S_IWOTH -# define S_IWOTH (S_IWUSR >> 6) -#endif - -#if !S_IXUSR && S_IEXEC -# define S_IXUSR S_IEXEC -#endif -#if !S_IXUSR -# define S_IXUSR 00100 -#endif -#if !S_IXGRP -# define S_IXGRP (S_IXUSR >> 3) -#endif -#if !S_IXOTH -# define S_IXOTH (S_IXUSR >> 6) -#endif - -#if !S_IRWXU -# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR) -#endif -#if !S_IRWXG -# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP) -#endif -#if !S_IRWXO -# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH) -#endif - -/* S_IXUGO is a common extension to POSIX. */ -#if !S_IXUGO -# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH) -#endif - -#ifndef S_IRWXUGO -# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO) -#endif - -/* Macros for futimens and utimensat. */ -#ifndef UTIME_NOW -# define UTIME_NOW (-1) -# define UTIME_OMIT (-2) -#endif - - -#if @GNULIB_FCHMODAT@ -# if !@HAVE_FCHMODAT@ -_GL_FUNCDECL_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchmodat, int, - (int fd, char const *file, mode_t mode, int flag)); -_GL_CXXALIASWARN (fchmodat); -#elif defined GNULIB_POSIXCHECK -# undef fchmodat -# if HAVE_RAW_DECL_FCHMODAT -_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FSTAT@ -# if @REPLACE_FSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstat -# define fstat rpl_fstat -# endif -_GL_FUNCDECL_RPL (fstat, int, (int fd, struct stat *buf) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fstat, int, (int fd, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (fstat, int, (int fd, struct stat *buf)); -# endif -_GL_CXXALIASWARN (fstat); -#elif @WINDOWS_64_BIT_ST_SIZE@ -/* Above, we define stat to _stati64. */ -# define fstat _fstati64 -#elif defined GNULIB_POSIXCHECK -# undef fstat -# if HAVE_RAW_DECL_FSTAT -_GL_WARN_ON_USE (fstat, "fstat has portability problems - " - "use gnulib module fstat for portability"); -# endif -#endif - - -#if @GNULIB_FSTATAT@ -# if @REPLACE_FSTATAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fstatat -# define fstatat rpl_fstatat -# endif -_GL_FUNCDECL_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -_GL_CXXALIAS_RPL (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# else -# if !@HAVE_FSTATAT@ -_GL_FUNCDECL_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (fstatat, int, - (int fd, char const *name, struct stat *st, int flags)); -# endif -_GL_CXXALIASWARN (fstatat); -#elif defined GNULIB_POSIXCHECK -# undef fstatat -# if HAVE_RAW_DECL_FSTATAT -_GL_WARN_ON_USE (fstatat, "fstatat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FUTIMENS@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our futimens - implementation relies on futimesat, which on Solaris 10 makes an invocation - to futimens that is meant to invoke the libc's futimens(), not gnulib's - futimens(). */ -# if @REPLACE_FUTIMENS@ || (!@HAVE_FUTIMENS@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef futimens -# define futimens rpl_futimens -# endif -_GL_FUNCDECL_RPL (futimens, int, (int fd, struct timespec const times[2])); -_GL_CXXALIAS_RPL (futimens, int, (int fd, struct timespec const times[2])); -# else -# if !@HAVE_FUTIMENS@ -_GL_FUNCDECL_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -_GL_CXXALIAS_SYS (futimens, int, (int fd, struct timespec const times[2])); -# endif -# if @HAVE_FUTIMENS@ -_GL_CXXALIASWARN (futimens); -# endif -#elif defined GNULIB_POSIXCHECK -# undef futimens -# if HAVE_RAW_DECL_FUTIMENS -_GL_WARN_ON_USE (futimens, "futimens is not portable - " - "use gnulib module futimens for portability"); -# endif -#endif - - -#if @GNULIB_LCHMOD@ -/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME - denotes a symbolic link. */ -# if !@HAVE_LCHMOD@ -/* The lchmod replacement follows symbolic links. Callers should take - this into account; lchmod should be applied only to arguments that - are known to not be symbolic links. On hosts that lack lchmod, - this can lead to race conditions between the check and the - invocation of lchmod, but we know of no workarounds that are - reliable in general. You might try requesting support for lchmod - from your operating system supplier. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lchmod chmod -# endif -/* Need to cast, because on mingw, the second parameter of chmod is - int mode. */ -_GL_CXXALIAS_RPL_CAST_1 (lchmod, chmod, int, - (const char *filename, mode_t mode)); -# else -# if 0 /* assume already declared */ -_GL_FUNCDECL_SYS (lchmod, int, (const char *filename, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchmod, int, (const char *filename, mode_t mode)); -# endif -# if @HAVE_LCHMOD@ -_GL_CXXALIASWARN (lchmod); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lchmod -# if HAVE_RAW_DECL_LCHMOD -_GL_WARN_ON_USE (lchmod, "lchmod is unportable - " - "use gnulib module lchmod for portability"); -# endif -#endif - - -#if @GNULIB_LSTAT@ -# if ! @HAVE_LSTAT@ -/* mingw does not support symlinks, therefore it does not have lstat. But - without links, stat does just fine. */ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lstat stat -# endif -_GL_CXXALIAS_RPL_1 (lstat, stat, int, (const char *name, struct stat *buf)); -# elif @REPLACE_LSTAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lstat -# define lstat rpl_lstat -# endif -_GL_FUNCDECL_RPL (lstat, int, (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (lstat, int, (const char *name, struct stat *buf)); -# else -_GL_CXXALIAS_SYS (lstat, int, (const char *name, struct stat *buf)); -# endif -# if @HAVE_LSTAT@ -_GL_CXXALIASWARN (lstat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef lstat -# if HAVE_RAW_DECL_LSTAT -_GL_WARN_ON_USE (lstat, "lstat is unportable - " - "use gnulib module lstat for portability"); -# endif -#endif - - -#if @REPLACE_MKDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkdir -# define mkdir rpl_mkdir -# endif -_GL_FUNCDECL_RPL (mkdir, int, (char const *name, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -#else -/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments. - Additionally, it declares _mkdir (and depending on compile flags, an - alias mkdir), only in the nonstandard includes and , - which are included above. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# if !GNULIB_defined_rpl_mkdir -static inline int -rpl_mkdir (char const *name, mode_t mode) -{ - return _mkdir (name); -} -# define GNULIB_defined_rpl_mkdir 1 -# endif - -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mkdir rpl_mkdir -# endif -_GL_CXXALIAS_RPL (mkdir, int, (char const *name, mode_t mode)); -# else -_GL_CXXALIAS_SYS (mkdir, int, (char const *name, mode_t mode)); -# endif -#endif -_GL_CXXALIASWARN (mkdir); - - -#if @GNULIB_MKDIRAT@ -# if !@HAVE_MKDIRAT@ -_GL_FUNCDECL_SYS (mkdirat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkdirat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkdirat); -#elif defined GNULIB_POSIXCHECK -# undef mkdirat -# if HAVE_RAW_DECL_MKDIRAT -_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFO@ -# if @REPLACE_MKFIFO@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mkfifo -# define mkfifo rpl_mkfifo -# endif -_GL_FUNCDECL_RPL (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mkfifo, int, (char const *file, mode_t mode)); -# else -# if !@HAVE_MKFIFO@ -_GL_FUNCDECL_SYS (mkfifo, int, (char const *file, mode_t mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (mkfifo, int, (char const *file, mode_t mode)); -# endif -_GL_CXXALIASWARN (mkfifo); -#elif defined GNULIB_POSIXCHECK -# undef mkfifo -# if HAVE_RAW_DECL_MKFIFO -_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - " - "use gnulib module mkfifo for portability"); -# endif -#endif - - -#if @GNULIB_MKFIFOAT@ -# if !@HAVE_MKFIFOAT@ -_GL_FUNCDECL_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mkfifoat, int, (int fd, char const *file, mode_t mode)); -_GL_CXXALIASWARN (mkfifoat); -#elif defined GNULIB_POSIXCHECK -# undef mkfifoat -# if HAVE_RAW_DECL_MKFIFOAT -_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_MKNOD@ -# if @REPLACE_MKNOD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mknod -# define mknod rpl_mknod -# endif -_GL_FUNCDECL_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# else -# if !@HAVE_MKNOD@ -_GL_FUNCDECL_SYS (mknod, int, (char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on OSF/1 5.1, the third parameter is '...'. */ -_GL_CXXALIAS_SYS_CAST (mknod, int, (char const *file, mode_t mode, dev_t dev)); -# endif -_GL_CXXALIASWARN (mknod); -#elif defined GNULIB_POSIXCHECK -# undef mknod -# if HAVE_RAW_DECL_MKNOD -_GL_WARN_ON_USE (mknod, "mknod is not portable - " - "use gnulib module mknod for portability"); -# endif -#endif - - -#if @GNULIB_MKNODAT@ -# if !@HAVE_MKNODAT@ -_GL_FUNCDECL_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mknodat, int, - (int fd, char const *file, mode_t mode, dev_t dev)); -_GL_CXXALIASWARN (mknodat); -#elif defined GNULIB_POSIXCHECK -# undef mknodat -# if HAVE_RAW_DECL_MKNODAT -_GL_WARN_ON_USE (mknodat, "mknodat is not portable - " - "use gnulib module mkfifoat for portability"); -# endif -#endif - - -#if @GNULIB_STAT@ -# if @REPLACE_STAT@ -/* We can't use the object-like #define stat rpl_stat, because of - struct stat. This means that rpl_stat will not be used if the user - does (stat)(a,b). Oh well. */ -# if defined _AIX && defined stat && defined _LARGE_FILES - /* With _LARGE_FILES defined, AIX (only) defines stat to stat64, - so we have to replace stat64() instead of stat(). */ -# undef stat64 -# define stat64(name, st) rpl_stat (name, st) -# elif @WINDOWS_64_BIT_ST_SIZE@ - /* Above, we define stat to _stati64. */ -# if defined __MINGW32__ && defined _stati64 -# ifndef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# elif defined _MSC_VER && defined _stati64 -# ifdef _USE_32BIT_TIME_T - /* The system headers define _stati64 to _stat32i64. */ -# undef _stat32i64 -# define _stat32i64(name, st) rpl_stat (name, st) -# else - /* The system headers define _stati64 to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# else -# undef _stati64 -# define _stati64(name, st) rpl_stat (name, st) -# endif -# elif defined __MINGW32__ && defined stat -# ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32i64. */ -# undef _stat32i64 -# define _stat32i64(name, st) rpl_stat (name, st) -# else - /* The system headers define stat to _stat64. */ -# undef _stat64 -# define _stat64(name, st) rpl_stat (name, st) -# endif -# elif defined _MSC_VER && defined stat -# ifdef _USE_32BIT_TIME_T - /* The system headers define stat to _stat32. */ -# undef _stat32 -# define _stat32(name, st) rpl_stat (name, st) -# else - /* The system headers define stat to _stat64i32. */ -# undef _stat64i32 -# define _stat64i32(name, st) rpl_stat (name, st) -# endif -# else /* !(_AIX ||__MINGW32__ || _MSC_VER) */ -# undef stat -# define stat(name, st) rpl_stat (name, st) -# endif /* !_LARGE_FILES */ -_GL_EXTERN_C int stat (const char *name, struct stat *buf) - _GL_ARG_NONNULL ((1, 2)); -# endif -#elif defined GNULIB_POSIXCHECK -# undef stat -# if HAVE_RAW_DECL_STAT -_GL_WARN_ON_USE (stat, "stat is unportable - " - "use gnulib module stat for portability"); -# endif -#endif - - -#if @GNULIB_UTIMENSAT@ -/* Use the rpl_ prefix also on Solaris <= 9, because on Solaris 9 our utimensat - implementation relies on futimesat, which on Solaris 10 makes an invocation - to utimensat that is meant to invoke the libc's utimensat(), not gnulib's - utimensat(). */ -# if @REPLACE_UTIMENSAT@ || (!@HAVE_UTIMENSAT@ && defined __sun) -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef utimensat -# define utimensat rpl_utimensat -# endif -_GL_FUNCDECL_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# else -# if !@HAVE_UTIMENSAT@ -_GL_FUNCDECL_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (utimensat, int, (int fd, char const *name, - struct timespec const times[2], int flag)); -# endif -# if @HAVE_UTIMENSAT@ -_GL_CXXALIASWARN (utimensat); -# endif -#elif defined GNULIB_POSIXCHECK -# undef utimensat -# if HAVE_RAW_DECL_UTIMENSAT -_GL_WARN_ON_USE (utimensat, "utimensat is not portable - " - "use gnulib module utimensat for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ -#endif /* _@GUARD_PREFIX@_SYS_STAT_H */ -#endif diff --git a/gnulib/lib/sys_time.in.h b/gnulib/lib/sys_time.in.h deleted file mode 100644 index b4d6d2a..0000000 --- a/gnulib/lib/sys_time.in.h +++ /dev/null @@ -1,205 +0,0 @@ -/* 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 deleted file mode 100644 index b503870..0000000 --- a/gnulib/lib/sys_types.in.h +++ /dev/null @@ -1,51 +0,0 @@ -/* 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 deleted file mode 100644 index ed3a694..0000000 --- a/gnulib/lib/sys_wait.in.h +++ /dev/null @@ -1,129 +0,0 @@ -/* A POSIX-like . - 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 - 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 . */ - - -#ifndef _@GUARD_PREFIX@_SYS_WAIT_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* The include_next requires a split double-inclusion guard. */ -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@ -#endif - -#ifndef _@GUARD_PREFIX@_SYS_WAIT_H -#define _@GUARD_PREFIX@_SYS_WAIT_H - -/* Get pid_t. */ -#include - - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -/* Unix API. */ - -/* The following macros apply to an argument x, that is a status of a process, - as returned by waitpid(). - On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and - WTERMSIG are bits 7..0, while BeOS uses the opposite. Therefore programs - have to use the abstract macros. */ - -/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x) - is true. */ -# ifndef WIFSIGNALED -# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f) -# endif -# ifndef WIFEXITED -# define WIFEXITED(x) (WTERMSIG (x) == 0) -# endif -# ifndef WIFSTOPPED -# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f) -# endif - -/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true. */ -# ifndef WTERMSIG -# define WTERMSIG(x) ((x) & 0x7f) -# endif - -/* The exit status. Only to be accessed if WIFEXITED(x) is true. */ -# ifndef WEXITSTATUS -# define WEXITSTATUS(x) (((x) >> 8) & 0xff) -# endif - -/* The stopping signal. Only to be accessed if WIFSTOPPED(x) is true. */ -# ifndef WSTOPSIG -# define WSTOPSIG(x) (((x) >> 8) & 0x7f) -# endif - -/* True if the process dumped core. Not standardized by POSIX. */ -# ifndef WCOREDUMP -# define WCOREDUMP(x) ((x) & 0x80) -# endif - -#else -/* Native Windows API. */ - -# include /* for SIGTERM */ - -/* The following macros apply to an argument x, that is a status of a process, - as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess(). - This value is simply an 'int', not composed of bit fields. */ - -/* When an unhandled fatal signal terminates a process, the exit code is 3. */ -# define WIFSIGNALED(x) ((x) == 3) -# define WIFEXITED(x) ((x) != 3) -# define WIFSTOPPED(x) 0 - -/* The signal that terminated a process is not known posthum. */ -# define WTERMSIG(x) SIGTERM - -# define WEXITSTATUS(x) (x) - -/* There are no stopping signals. */ -# define WSTOPSIG(x) 0 - -/* There are no core dumps. */ -# define WCOREDUMP(x) 0 - -#endif - - -/* Declarations of functions. */ - -#if @GNULIB_WAITPID@ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -_GL_FUNCDECL_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); -# endif -_GL_CXXALIAS_SYS (waitpid, pid_t, (pid_t pid, int *statusp, int options)); -_GL_CXXALIASWARN (waitpid); -#elif defined GNULIB_POSIXCHECK -# undef waitpid -# if HAVE_RAW_DECL_WAITPID -_GL_WARN_ON_USE (waitpid, "waitpid is unportable - " - "use gnulib module sys_wait for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ -#endif /* _@GUARD_PREFIX@_SYS_WAIT_H */ diff --git a/gnulib/lib/tempname.c b/gnulib/lib/tempname.c deleted file mode 100644 index 4639f80..0000000 --- a/gnulib/lib/tempname.c +++ /dev/null @@ -1,309 +0,0 @@ -/* 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 deleted file mode 100644 index bcb8d27..0000000 --- a/gnulib/lib/tempname.h +++ /dev/null @@ -1,50 +0,0 @@ -/* 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 deleted file mode 100644 index 1c61df8..0000000 --- a/gnulib/lib/time.in.h +++ /dev/null @@ -1,248 +0,0 @@ -/* A more-standard . - - 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 . */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -/* Don't get in the way of glibc when it includes time.h merely to - declare a few standard symbols, rather than to declare all the - symbols. Also, Solaris 8 eventually includes itself - recursively; if that is happening, just include the system - without adding our own declarations. */ -#if (defined __need_time_t || defined __need_clock_t \ - || defined __need_timespec \ - || defined _@GUARD_PREFIX@_TIME_H) - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -#else - -# define _@GUARD_PREFIX@_TIME_H - -# @INCLUDE_NEXT@ @NEXT_TIME_H@ - -/* NetBSD 5.0 mis-defines NULL. */ -# include - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3). - Or they define it with the wrong member names or define it in - (e.g., FreeBSD circa 1997). Stock Mingw does not define it, but the - pthreads-win32 library defines it in . */ -# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@ -# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -# include -# elif @PTHREAD_H_DEFINES_STRUCT_TIMESPEC@ -# include -/* The pthreads-win32 also defines a couple of broken macros. */ -# undef asctime_r -# undef ctime_r -# undef gmtime_r -# undef localtime_r -# undef rand_r -# undef strtok_r -# else - -# ifdef __cplusplus -extern "C" { -# endif - -# if !GNULIB_defined_struct_timespec -# undef timespec -# define timespec rpl_timespec -struct timespec -{ - time_t tv_sec; - long int tv_nsec; -}; -# define GNULIB_defined_struct_timespec 1 -# endif - -# ifdef __cplusplus -} -# endif - -# endif -# endif - -# if !GNULIB_defined_struct_time_t_must_be_integral -/* Per http://austingroupbugs.net/view.php?id=327, POSIX requires - time_t to be an integer type, even though C99 permits floating - point. We don't know of any implementation that uses floating - point, and it is much easier to write code that doesn't have to - worry about that corner case, so we force the issue. */ -struct __time_t_must_be_integral { - unsigned int __floating_time_t_unsupported : (time_t) 1; -}; -# define GNULIB_defined_struct_time_t_must_be_integral 1 -# endif - -/* Sleep for at least RQTP seconds unless interrupted, If interrupted, - return -1 and store the remaining time into RMTP. See - . */ -# if @GNULIB_NANOSLEEP@ -# if @REPLACE_NANOSLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define nanosleep rpl_nanosleep -# endif -_GL_FUNCDECL_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# else -# if ! @HAVE_NANOSLEEP@ -_GL_FUNCDECL_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (nanosleep, int, - (struct timespec const *__rqtp, struct timespec *__rmtp)); -# endif -_GL_CXXALIASWARN (nanosleep); -# endif - -/* Return the 'time_t' representation of TP and normalize TP. */ -# if @GNULIB_MKTIME@ -# if @REPLACE_MKTIME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define mktime rpl_mktime -# endif -_GL_FUNCDECL_RPL (mktime, time_t, (struct tm *__tp) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (mktime, time_t, (struct tm *__tp)); -# else -_GL_CXXALIAS_SYS (mktime, time_t, (struct tm *__tp)); -# endif -_GL_CXXALIASWARN (mktime); -# endif - -/* Convert TIMER to RESULT, assuming local time and UTC respectively. See - and - . */ -# if @GNULIB_TIME_R@ -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef localtime_r -# define localtime_r rpl_localtime_r -# endif -_GL_FUNCDECL_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (localtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (localtime_r); -# endif -# if @REPLACE_LOCALTIME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gmtime_r -# define gmtime_r rpl_gmtime_r -# endif -_GL_FUNCDECL_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# else -# if ! @HAVE_DECL_LOCALTIME_R@ -_GL_FUNCDECL_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (gmtime_r, struct tm *, (time_t const *restrict __timer, - struct tm *restrict __result)); -# endif -# if @HAVE_DECL_LOCALTIME_R@ -_GL_CXXALIASWARN (gmtime_r); -# endif -# endif - -/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store - the resulting broken-down time into TM. See - . */ -# if @GNULIB_STRPTIME@ -# if ! @HAVE_STRPTIME@ -_GL_FUNCDECL_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm) - _GL_ARG_NONNULL ((1, 2, 3))); -# endif -_GL_CXXALIAS_SYS (strptime, char *, (char const *restrict __buf, - char const *restrict __format, - struct tm *restrict __tm)); -_GL_CXXALIASWARN (strptime); -# endif - -/* Convert TM to a time_t value, assuming UTC. */ -# if @GNULIB_TIMEGM@ -# if @REPLACE_TIMEGM@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef timegm -# define timegm rpl_timegm -# endif -_GL_FUNCDECL_RPL (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (timegm, time_t, (struct tm *__tm)); -# else -# if ! @HAVE_TIMEGM@ -_GL_FUNCDECL_SYS (timegm, time_t, (struct tm *__tm) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (timegm, time_t, (struct tm *__tm)); -# endif -_GL_CXXALIASWARN (timegm); -# endif - -/* Encourage applications to avoid unsafe functions that can overrun - buffers when given outlandish struct tm values. Portable - applications should use strftime (or even sprintf) instead. */ -# if defined GNULIB_POSIXCHECK -# undef asctime -_GL_WARN_ON_USE (asctime, "asctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef asctime_r -_GL_WARN_ON_USE (asctime, "asctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime -_GL_WARN_ON_USE (asctime, "ctime can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif -# if defined GNULIB_POSIXCHECK -# undef ctime_r -_GL_WARN_ON_USE (asctime, "ctime_r can overrun buffers in some cases - " - "better use strftime (or even sprintf) instead"); -# endif - -#endif diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h deleted file mode 100644 index 28d1477..0000000 --- a/gnulib/lib/unistd.in.h +++ /dev/null @@ -1,1535 +0,0 @@ -/* Substitute for and wrapper around . - 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 - 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@ - -/* Special invocation convention: - - On mingw, several headers, including , include , - but we need to ensure that both the system and - are completely included before we replace gethostname. */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H -/* is being indirectly included for the first time from - ; avoid declaring any overrides. */ -# if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -# else -# error unexpected; report this to bug-gnulib@gnu.org -# endif -# define _GL_WINSOCK2_H_WITNESS - -/* Normal invocation. */ -#elif !defined _@GUARD_PREFIX@_UNISTD_H - -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_UNISTD_H@ -# @INCLUDE_NEXT@ @NEXT_UNISTD_H@ -#endif - -/* Get all possible declarations of gethostname(). */ -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \ - && !defined _GL_INCLUDING_WINSOCK2_H -# define _GL_INCLUDING_WINSOCK2_H -# include -# undef _GL_INCLUDING_WINSOCK2_H -#endif - -#if !defined _@GUARD_PREFIX@_UNISTD_H && !defined _GL_INCLUDING_WINSOCK2_H -#define _@GUARD_PREFIX@_UNISTD_H - -/* NetBSD 5.0 mis-defines NULL. Also get size_t. */ -#include - -/* mingw doesn't define the SEEK_* or *_FILENO macros in . */ -/* Cygwin 1.7.1 declares symlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ - && defined __CYGWIN__)) \ - && ! defined __GLIBC__ -# include -#endif - -/* Cygwin 1.7.1 declares unlinkat in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ - && ! defined __GLIBC__ -# include -#endif - -/* mingw fails to declare _exit in . */ -/* mingw, MSVC, BeOS, Haiku declare environ in , not in - . */ -/* Solaris declares getcwd not only in but also in . */ -/* But avoid namespace pollution on glibc systems. */ -#ifndef __GLIBC__ -# include -#endif - -/* Native Windows platforms declare chdir, getcwd, rmdir in - and/or , not in . - They also declare access(), chmod(), close(), dup(), dup2(), isatty(), - lseek(), read(), unlink(), write() in . */ -#if ((@GNULIB_CHDIR@ || @GNULIB_GETCWD@ || @GNULIB_RMDIR@ \ - || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) -# include /* mingw32, mingw64 */ -# include /* mingw64, MSVC 9 */ -#elif (@GNULIB_CLOSE@ || @GNULIB_DUP@ || @GNULIB_DUP2@ || @GNULIB_ISATTY@ \ - || @GNULIB_LSEEK@ || @GNULIB_READ@ || @GNULIB_UNLINK@ || @GNULIB_WRITE@ \ - || defined GNULIB_POSIXCHECK) \ - && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) -# include -#endif - -/* AIX and OSF/1 5.1 declare getdomainname in , not in . - NonStop Kernel declares gethostname in , not in . */ -/* But avoid namespace pollution on glibc systems. */ -#if ((@GNULIB_GETDOMAINNAME@ && (defined _AIX || defined __osf__)) \ - || (@GNULIB_GETHOSTNAME@ && defined __TANDEM)) \ - && !defined __GLIBC__ -# include -#endif - -/* MSVC defines off_t in . - May also define off_t to a 64-bit type on native Windows. */ -#if !@HAVE_UNISTD_H@ || @WINDOWS_64_BIT_OFF_T@ -/* Get off_t. */ -# include -#endif - -#if (@GNULIB_READ@ || @GNULIB_WRITE@ \ - || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \ - || @GNULIB_PREAD@ || @GNULIB_PWRITE@ || defined GNULIB_POSIXCHECK) -/* Get ssize_t. */ -# include -#endif - -/* Get getopt(), optarg, optind, opterr, optopt. - But avoid namespace pollution on glibc systems. */ -#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT -# include -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Hide some function declarations from . */ - -#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ -# if !defined _@GUARD_PREFIX@_SYS_SOCKET_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef socket -# define socket socket_used_without_including_sys_socket_h -# undef connect -# define connect connect_used_without_including_sys_socket_h -# undef accept -# define accept accept_used_without_including_sys_socket_h -# undef bind -# define bind bind_used_without_including_sys_socket_h -# undef getpeername -# define getpeername getpeername_used_without_including_sys_socket_h -# undef getsockname -# define getsockname getsockname_used_without_including_sys_socket_h -# undef getsockopt -# define getsockopt getsockopt_used_without_including_sys_socket_h -# undef listen -# define listen listen_used_without_including_sys_socket_h -# undef recv -# define recv recv_used_without_including_sys_socket_h -# undef send -# define send send_used_without_including_sys_socket_h -# undef recvfrom -# define recvfrom recvfrom_used_without_including_sys_socket_h -# undef sendto -# define sendto sendto_used_without_including_sys_socket_h -# undef setsockopt -# define setsockopt setsockopt_used_without_including_sys_socket_h -# undef shutdown -# define shutdown shutdown_used_without_including_sys_socket_h -# else - _GL_WARN_ON_USE (socket, - "socket() used without including "); - _GL_WARN_ON_USE (connect, - "connect() used without including "); - _GL_WARN_ON_USE (accept, - "accept() used without including "); - _GL_WARN_ON_USE (bind, - "bind() used without including "); - _GL_WARN_ON_USE (getpeername, - "getpeername() used without including "); - _GL_WARN_ON_USE (getsockname, - "getsockname() used without including "); - _GL_WARN_ON_USE (getsockopt, - "getsockopt() used without including "); - _GL_WARN_ON_USE (listen, - "listen() used without including "); - _GL_WARN_ON_USE (recv, - "recv() used without including "); - _GL_WARN_ON_USE (send, - "send() used without including "); - _GL_WARN_ON_USE (recvfrom, - "recvfrom() used without including "); - _GL_WARN_ON_USE (sendto, - "sendto() used without including "); - _GL_WARN_ON_USE (setsockopt, - "setsockopt() used without including "); - _GL_WARN_ON_USE (shutdown, - "shutdown() used without including "); -# endif -# endif -# if !defined _@GUARD_PREFIX@_SYS_SELECT_H -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef select -# define select select_used_without_including_sys_select_h -# else - _GL_WARN_ON_USE (select, - "select() used without including "); -# endif -# endif -#endif - - -/* OS/2 EMX lacks these macros. */ -#ifndef STDIN_FILENO -# define STDIN_FILENO 0 -#endif -#ifndef STDOUT_FILENO -# define STDOUT_FILENO 1 -#endif -#ifndef STDERR_FILENO -# define STDERR_FILENO 2 -#endif - -/* Ensure *_OK macros exist. */ -#ifndef F_OK -# define F_OK 0 -# define X_OK 1 -# define W_OK 2 -# define R_OK 4 -#endif - - -/* Declare overridden functions. */ - - -#if defined GNULIB_POSIXCHECK -/* The access() function is a security risk. */ -_GL_WARN_ON_USE (access, "the access function is a security risk - " - "use the gnulib module faccessat instead"); -#endif - - -#if @GNULIB_CHDIR@ -_GL_CXXALIAS_SYS (chdir, int, (const char *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIASWARN (chdir); -#elif defined GNULIB_POSIXCHECK -# undef chdir -# if HAVE_RAW_DECL_CHDIR -_GL_WARN_ON_USE (chown, "chdir is not always in - " - "use gnulib module chdir for portability"); -# endif -#endif - - -#if @GNULIB_CHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_DUP2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup2 rpl_dup2 -# endif -_GL_FUNCDECL_RPL (dup2, int, (int oldfd, int newfd)); -_GL_CXXALIAS_RPL (dup2, int, (int oldfd, int newfd)); -# else -# if !@HAVE_DUP2@ -_GL_FUNCDECL_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIAS_SYS (dup2, int, (int oldfd, int newfd)); -# endif -_GL_CXXALIASWARN (dup2); -#elif defined GNULIB_POSIXCHECK -# undef dup2 -# if HAVE_RAW_DECL_DUP2 -_GL_WARN_ON_USE (dup2, "dup2 is unportable - " - "use gnulib module dup2 for portability"); -# endif -#endif - - -#if @GNULIB_DUP3@ -/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the - specified flags. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Close NEWFD first if it is open. - Return newfd if successful, otherwise -1 and errno set. - See the Linux man page at - . */ -# if @HAVE_DUP3@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define dup3 rpl_dup3 -# endif -_GL_FUNCDECL_RPL (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_RPL (dup3, int, (int oldfd, int newfd, int flags)); -# else -_GL_FUNCDECL_SYS (dup3, int, (int oldfd, int newfd, int flags)); -_GL_CXXALIAS_SYS (dup3, int, (int oldfd, int newfd, int flags)); -# endif -_GL_CXXALIASWARN (dup3); -#elif defined GNULIB_POSIXCHECK -# undef dup3 -# if HAVE_RAW_DECL_DUP3 -_GL_WARN_ON_USE (dup3, "dup3 is unportable - " - "use gnulib module dup3 for portability"); -# endif -#endif - - -#if @GNULIB_ENVIRON@ -# if !@HAVE_DECL_ENVIRON@ -/* Set of environment variables and values. An array of strings of the form - "VARIABLE=VALUE", terminated with a NULL. */ -# if defined __APPLE__ && defined __MACH__ -# include -# define environ (*_NSGetEnviron ()) -# else -# ifdef __cplusplus -extern "C" { -# endif -extern char **environ; -# ifdef __cplusplus -} -# endif -# endif -# endif -#elif defined GNULIB_POSIXCHECK -# if HAVE_RAW_DECL_ENVIRON -static inline char *** -rpl_environ (void) -{ - return &environ; -} -_GL_WARN_ON_USE (rpl_environ, "environ is unportable - " - "use gnulib module environ for portability"); -# undef environ -# define environ (*rpl_environ ()) -# endif -#endif - - -#if @GNULIB_EUIDACCESS@ -/* Like access(), except that it uses the effective user id and group id of - the current process. */ -# if !@HAVE_EUIDACCESS@ -_GL_FUNCDECL_SYS (euidaccess, int, (const char *filename, int mode) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (euidaccess, int, (const char *filename, int mode)); -_GL_CXXALIASWARN (euidaccess); -# if defined GNULIB_POSIXCHECK -/* Like access(), this function is a security risk. */ -_GL_WARN_ON_USE (euidaccess, "the euidaccess function is a security risk - " - "use the gnulib module faccessat instead"); -# endif -#elif defined GNULIB_POSIXCHECK -# undef euidaccess -# if HAVE_RAW_DECL_EUIDACCESS -_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - " - "use gnulib module euidaccess for portability"); -# endif -#endif - - -#if @GNULIB_FACCESSAT@ -# if !@HAVE_FACCESSAT@ -_GL_FUNCDECL_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (faccessat, int, - (int fd, char const *file, int mode, int flag)); -_GL_CXXALIASWARN (faccessat); -#elif defined GNULIB_POSIXCHECK -# undef faccessat -# if HAVE_RAW_DECL_FACCESSAT -_GL_WARN_ON_USE (faccessat, "faccessat is not portable - " - "use gnulib module faccessat for portability"); -# endif -#endif - - -#if @GNULIB_FCHDIR@ -/* Change the process' current working directory to the directory on which - the given file descriptor is open. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if ! @HAVE_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); - -/* Gnulib internal hooks needed to maintain the fchdir metadata. */ -_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename) - _GL_ARG_NONNULL ((2)); -_GL_EXTERN_C void _gl_unregister_fd (int fd); -_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd); -_GL_EXTERN_C const char *_gl_directory_name (int fd); - -# else -# if !@HAVE_DECL_FCHDIR@ -_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/)); -# endif -# endif -_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/)); -_GL_CXXALIASWARN (fchdir); -#elif defined GNULIB_POSIXCHECK -# undef fchdir -# if HAVE_RAW_DECL_FCHDIR -_GL_WARN_ON_USE (fchdir, "fchdir is unportable - " - "use gnulib module fchdir for portability"); -# endif -#endif - - -#if @GNULIB_FCHOWNAT@ -# if @REPLACE_FCHOWNAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef fchownat -# define fchownat rpl_fchownat -# endif -_GL_FUNCDECL_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# else -# if !@HAVE_FCHOWNAT@ -_GL_FUNCDECL_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (fchownat, int, (int fd, char const *file, - uid_t owner, gid_t group, int flag)); -# endif -_GL_CXXALIASWARN (fchownat); -#elif defined GNULIB_POSIXCHECK -# undef fchownat -# if HAVE_RAW_DECL_FCHOWNAT -_GL_WARN_ON_USE (fchownat, "fchownat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_FDATASYNC@ -/* Synchronize changes to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if !@HAVE_FDATASYNC@ || !@HAVE_DECL_FDATASYNC@ -_GL_FUNCDECL_SYS (fdatasync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fdatasync, int, (int fd)); -_GL_CXXALIASWARN (fdatasync); -#elif defined GNULIB_POSIXCHECK -# undef fdatasync -# if HAVE_RAW_DECL_FDATASYNC -_GL_WARN_ON_USE (fdatasync, "fdatasync is unportable - " - "use gnulib module fdatasync for portability"); -# endif -#endif - - -#if @GNULIB_FSYNC@ -/* Synchronize changes, including metadata, to a file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if !@HAVE_FSYNC@ -_GL_FUNCDECL_SYS (fsync, int, (int fd)); -# endif -_GL_CXXALIAS_SYS (fsync, int, (int fd)); -_GL_CXXALIASWARN (fsync); -#elif defined GNULIB_POSIXCHECK -# undef fsync -# if HAVE_RAW_DECL_FSYNC -_GL_WARN_ON_USE (fsync, "fsync is unportable - " - "use gnulib module fsync for portability"); -# endif -#endif - - -#if @GNULIB_FTRUNCATE@ -/* Change the size of the file to which FD is opened to become equal to LENGTH. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_FTRUNCATE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ftruncate -# define ftruncate rpl_ftruncate -# endif -_GL_FUNCDECL_RPL (ftruncate, int, (int fd, off_t length)); -_GL_CXXALIAS_RPL (ftruncate, int, (int fd, off_t length)); -# else -# if !@HAVE_FTRUNCATE@ -_GL_FUNCDECL_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIAS_SYS (ftruncate, int, (int fd, off_t length)); -# endif -_GL_CXXALIASWARN (ftruncate); -#elif defined GNULIB_POSIXCHECK -# undef ftruncate -# if HAVE_RAW_DECL_FTRUNCATE -_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - " - "use gnulib module ftruncate for portability"); -# endif -#endif - - -#if @GNULIB_GETCWD@ -/* Get the name of the current working directory, and put it in SIZE bytes - of BUF. - Return BUF if successful, or NULL if the directory couldn't be determined - or SIZE was too small. - See the POSIX:2008 specification - . - Additionally, the gnulib module 'getcwd' guarantees the following GNU - extension: If BUF is NULL, an array is allocated with 'malloc'; the array - is SIZE bytes long, unless SIZE == 0, in which case it is as big as - necessary. */ -# if @REPLACE_GETCWD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getcwd rpl_getcwd -# endif -_GL_FUNCDECL_RPL (getcwd, char *, (char *buf, size_t size)); -_GL_CXXALIAS_RPL (getcwd, char *, (char *buf, size_t size)); -# else -/* Need to cast, because on mingw, the second parameter is - int size. */ -_GL_CXXALIAS_SYS_CAST (getcwd, char *, (char *buf, size_t size)); -# endif -_GL_CXXALIASWARN (getcwd); -#elif defined GNULIB_POSIXCHECK -# undef getcwd -# if HAVE_RAW_DECL_GETCWD -_GL_WARN_ON_USE (getcwd, "getcwd is unportable - " - "use gnulib module getcwd for portability"); -# endif -#endif - - -#if @GNULIB_GETDOMAINNAME@ -/* Return the NIS domain name of the machine. - WARNING! The NIS domain name is unrelated to the fully qualified host name - of the machine. It is also unrelated to email addresses. - WARNING! The NIS domain name is usually the empty string or "(none)" when - not using NIS. - - Put up to LEN bytes of the NIS domain name into NAME. - Null terminate it if the name is shorter than LEN. - If the NIS domain name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @REPLACE_GETDOMAINNAME@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getdomainname -# define getdomainname rpl_getdomainname -# endif -_GL_FUNCDECL_RPL (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getdomainname, int, (char *name, size_t len)); -# else -# if !@HAVE_DECL_GETDOMAINNAME@ -_GL_FUNCDECL_SYS (getdomainname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (getdomainname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (getdomainname); -#elif defined GNULIB_POSIXCHECK -# undef getdomainname -# if HAVE_RAW_DECL_GETDOMAINNAME -_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - " - "use gnulib module getdomainname for portability"); -# endif -#endif - - -#if @GNULIB_GETDTABLESIZE@ -/* Return the maximum number of file descriptors in the current process. - In POSIX, this is same as sysconf (_SC_OPEN_MAX). */ -# if !@HAVE_GETDTABLESIZE@ -_GL_FUNCDECL_SYS (getdtablesize, int, (void)); -# endif -_GL_CXXALIAS_SYS (getdtablesize, int, (void)); -_GL_CXXALIASWARN (getdtablesize); -#elif defined GNULIB_POSIXCHECK -# undef getdtablesize -# if HAVE_RAW_DECL_GETDTABLESIZE -_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - " - "use gnulib module getdtablesize for portability"); -# endif -#endif - - -#if @GNULIB_GETGROUPS@ -/* Return the supplemental groups that the current process belongs to. - It is unspecified whether the effective group id is in the list. - If N is 0, return the group count; otherwise, N describes how many - entries are available in GROUPS. Return -1 and set errno if N is - not 0 and not large enough. Fails with ENOSYS on some systems. */ -# if @REPLACE_GETGROUPS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef getgroups -# define getgroups rpl_getgroups -# endif -_GL_FUNCDECL_RPL (getgroups, int, (int n, gid_t *groups)); -_GL_CXXALIAS_RPL (getgroups, int, (int n, gid_t *groups)); -# else -# if !@HAVE_GETGROUPS@ -_GL_FUNCDECL_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIAS_SYS (getgroups, int, (int n, gid_t *groups)); -# endif -_GL_CXXALIASWARN (getgroups); -#elif defined GNULIB_POSIXCHECK -# undef getgroups -# if HAVE_RAW_DECL_GETGROUPS -_GL_WARN_ON_USE (getgroups, "getgroups is unportable - " - "use gnulib module getgroups for portability"); -# endif -#endif - - -#if @GNULIB_GETHOSTNAME@ -/* Return the standard host name of the machine. - WARNING! The host name may or may not be fully qualified. - - Put up to LEN bytes of the host name into NAME. - Null terminate it if the name is shorter than LEN. - If the host name is longer than LEN, set errno = EINVAL and return -1. - Return 0 if successful, otherwise set errno and return -1. */ -# if @UNISTD_H_HAVE_WINSOCK2_H@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef gethostname -# define gethostname rpl_gethostname -# endif -_GL_FUNCDECL_RPL (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (gethostname, int, (char *name, size_t len)); -# else -# if !@HAVE_GETHOSTNAME@ -_GL_FUNCDECL_SYS (gethostname, int, (char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 and OSF/1 5.1 systems, the second - parameter is - int len. */ -_GL_CXXALIAS_SYS_CAST (gethostname, int, (char *name, size_t len)); -# endif -_GL_CXXALIASWARN (gethostname); -#elif @UNISTD_H_HAVE_WINSOCK2_H@ -# undef gethostname -# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname -#elif defined GNULIB_POSIXCHECK -# undef gethostname -# if HAVE_RAW_DECL_GETHOSTNAME -_GL_WARN_ON_USE (gethostname, "gethostname is unportable - " - "use gnulib module gethostname for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN@ -/* Returns the user's login name, or NULL if it cannot be found. Upon error, - returns NULL with errno set. - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if !@HAVE_GETLOGIN@ -_GL_FUNCDECL_SYS (getlogin, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getlogin, char *, (void)); -_GL_CXXALIASWARN (getlogin); -#elif defined GNULIB_POSIXCHECK -# undef getlogin -# if HAVE_RAW_DECL_GETLOGIN -_GL_WARN_ON_USE (getlogin, "getlogin is unportable - " - "use gnulib module getlogin for portability"); -# endif -#endif - - -#if @GNULIB_GETLOGIN_R@ -/* Copies the user's login name to NAME. - The array pointed to by NAME has room for SIZE bytes. - - Returns 0 if successful. Upon error, an error number is returned, or -1 in - the case that the login name cannot be found but no specific error is - provided (this case is hopefully rare but is left open by the POSIX spec). - - See . - - Most programs don't need to use this function, because the information is - available through environment variables: - ${LOGNAME-$USER} on Unix platforms, - $USERNAME on native Windows platforms. - */ -# if @REPLACE_GETLOGIN_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getlogin_r rpl_getlogin_r -# endif -_GL_FUNCDECL_RPL (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (getlogin_r, int, (char *name, size_t size)); -# else -# if !@HAVE_DECL_GETLOGIN_R@ -_GL_FUNCDECL_SYS (getlogin_r, int, (char *name, size_t size) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 10 systems, the second argument is - int size. */ -_GL_CXXALIAS_SYS_CAST (getlogin_r, int, (char *name, size_t size)); -# endif -_GL_CXXALIASWARN (getlogin_r); -#elif defined GNULIB_POSIXCHECK -# undef getlogin_r -# if HAVE_RAW_DECL_GETLOGIN_R -_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - " - "use gnulib module getlogin_r for portability"); -# endif -#endif - - -#if @GNULIB_GETPAGESIZE@ -# if @REPLACE_GETPAGESIZE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize rpl_getpagesize -# endif -_GL_FUNCDECL_RPL (getpagesize, int, (void)); -_GL_CXXALIAS_RPL (getpagesize, int, (void)); -# else -# if !@HAVE_GETPAGESIZE@ -# if !defined getpagesize -/* This is for POSIX systems. */ -# if !defined _gl_getpagesize && defined _SC_PAGESIZE -# if ! (defined __VMS && __VMS_VER < 70000000) -# define _gl_getpagesize() sysconf (_SC_PAGESIZE) -# endif -# endif -/* This is for older VMS. */ -# if !defined _gl_getpagesize && defined __VMS -# ifdef __ALPHA -# define _gl_getpagesize() 8192 -# else -# define _gl_getpagesize() 512 -# endif -# endif -/* This is for BeOS. */ -# if !defined _gl_getpagesize && @HAVE_OS_H@ -# include -# if defined B_PAGE_SIZE -# define _gl_getpagesize() B_PAGE_SIZE -# endif -# endif -/* This is for AmigaOS4.0. */ -# if !defined _gl_getpagesize && defined __amigaos4__ -# define _gl_getpagesize() 2048 -# endif -/* This is for older Unix systems. */ -# if !defined _gl_getpagesize && @HAVE_SYS_PARAM_H@ -# include -# ifdef EXEC_PAGESIZE -# define _gl_getpagesize() EXEC_PAGESIZE -# else -# ifdef NBPG -# ifndef CLSIZE -# define CLSIZE 1 -# endif -# define _gl_getpagesize() (NBPG * CLSIZE) -# else -# ifdef NBPC -# define _gl_getpagesize() NBPC -# endif -# endif -# endif -# endif -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define getpagesize() _gl_getpagesize () -# else -# if !GNULIB_defined_getpagesize_function -static inline int -getpagesize () -{ - return _gl_getpagesize (); -} -# define GNULIB_defined_getpagesize_function 1 -# endif -# endif -# endif -# endif -/* Need to cast, because on Cygwin 1.5.x systems, the return type is size_t. */ -_GL_CXXALIAS_SYS_CAST (getpagesize, int, (void)); -# endif -# if @HAVE_DECL_GETPAGESIZE@ -_GL_CXXALIASWARN (getpagesize); -# endif -#elif defined GNULIB_POSIXCHECK -# undef getpagesize -# if HAVE_RAW_DECL_GETPAGESIZE -_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - " - "use gnulib module getpagesize for portability"); -# endif -#endif - - -#if @GNULIB_GETUSERSHELL@ -/* Return the next valid login shell on the system, or NULL when the end of - the list has been reached. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (getusershell, char *, (void)); -# endif -_GL_CXXALIAS_SYS (getusershell, char *, (void)); -_GL_CXXALIASWARN (getusershell); -#elif defined GNULIB_POSIXCHECK -# undef getusershell -# if HAVE_RAW_DECL_GETUSERSHELL -_GL_WARN_ON_USE (getusershell, "getusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Rewind to pointer that is advanced at each getusershell() call. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (setusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (setusershell, void, (void)); -_GL_CXXALIASWARN (setusershell); -#elif defined GNULIB_POSIXCHECK -# undef setusershell -# if HAVE_RAW_DECL_SETUSERSHELL -_GL_WARN_ON_USE (setusershell, "setusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - -#if @GNULIB_GETUSERSHELL@ -/* Free the pointer that is advanced at each getusershell() call and - associated resources. */ -# if !@HAVE_DECL_GETUSERSHELL@ -_GL_FUNCDECL_SYS (endusershell, void, (void)); -# endif -_GL_CXXALIAS_SYS (endusershell, void, (void)); -_GL_CXXALIASWARN (endusershell); -#elif defined GNULIB_POSIXCHECK -# undef endusershell -# if HAVE_RAW_DECL_ENDUSERSHELL -_GL_WARN_ON_USE (endusershell, "endusershell is unportable - " - "use gnulib module getusershell for portability"); -# endif -#endif - - -#if @GNULIB_GROUP_MEMBER@ -/* Determine whether group id is in calling user's group list. */ -# if !@HAVE_GROUP_MEMBER@ -_GL_FUNCDECL_SYS (group_member, int, (gid_t gid)); -# endif -_GL_CXXALIAS_SYS (group_member, int, (gid_t gid)); -_GL_CXXALIASWARN (group_member); -#elif defined GNULIB_POSIXCHECK -# undef group_member -# if HAVE_RAW_DECL_GROUP_MEMBER -_GL_WARN_ON_USE (group_member, "group_member is unportable - " - "use gnulib module group-member for portability"); -# endif -#endif - - -#if @GNULIB_ISATTY@ -# if @REPLACE_ISATTY@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef isatty -# define isatty rpl_isatty -# endif -_GL_FUNCDECL_RPL (isatty, int, (int fd)); -_GL_CXXALIAS_RPL (isatty, int, (int fd)); -# else -_GL_CXXALIAS_SYS (isatty, int, (int fd)); -# endif -_GL_CXXALIASWARN (isatty); -#elif defined GNULIB_POSIXCHECK -# undef isatty -# if HAVE_RAW_DECL_ISATTY -_GL_WARN_ON_USE (isatty, "isatty has portability problems on native Windows - " - "use gnulib module isatty for portability"); -# endif -#endif - - -#if @GNULIB_LCHOWN@ -/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE - to GID (if GID is not -1). Do not follow symbolic links. - Return 0 if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_LCHOWN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef lchown -# define lchown rpl_lchown -# endif -_GL_FUNCDECL_RPL (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (lchown, int, (char const *file, uid_t owner, gid_t group)); -# else -# if !@HAVE_LCHOWN@ -_GL_FUNCDECL_SYS (lchown, int, (char const *file, uid_t owner, gid_t group) - _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (lchown, int, (char const *file, uid_t owner, gid_t group)); -# endif -_GL_CXXALIASWARN (lchown); -#elif defined GNULIB_POSIXCHECK -# undef lchown -# if HAVE_RAW_DECL_LCHOWN -_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - " - "use gnulib module lchown for portability"); -# endif -#endif - - -#if @GNULIB_LINK@ -/* Create a new hard link for an existing file. - Return 0 if successful, otherwise -1 and errno set. - See POSIX:2008 specification - . */ -# if @REPLACE_LINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define link rpl_link -# endif -_GL_FUNCDECL_RPL (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (link, int, (const char *path1, const char *path2)); -# else -# if !@HAVE_LINK@ -_GL_FUNCDECL_SYS (link, int, (const char *path1, const char *path2) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (link, int, (const char *path1, const char *path2)); -# endif -_GL_CXXALIASWARN (link); -#elif defined GNULIB_POSIXCHECK -# undef link -# if HAVE_RAW_DECL_LINK -_GL_WARN_ON_USE (link, "link is unportable - " - "use gnulib module link for portability"); -# endif -#endif - - -#if @GNULIB_LINKAT@ -/* Create a new hard link for an existing file, relative to two - directories. FLAG controls whether symlinks are followed. - Return 0 if successful, otherwise -1 and errno set. */ -# if @REPLACE_LINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef linkat -# define linkat rpl_linkat -# endif -_GL_FUNCDECL_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -_GL_CXXALIAS_RPL (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# else -# if !@HAVE_LINKAT@ -_GL_FUNCDECL_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag) - _GL_ARG_NONNULL ((2, 4))); -# endif -_GL_CXXALIAS_SYS (linkat, int, - (int fd1, const char *path1, int fd2, const char *path2, - int flag)); -# endif -_GL_CXXALIASWARN (linkat); -#elif defined GNULIB_POSIXCHECK -# undef linkat -# if HAVE_RAW_DECL_LINKAT -_GL_WARN_ON_USE (linkat, "linkat is unportable - " - "use gnulib module linkat for portability"); -# endif -#endif - - -#if @GNULIB_LSEEK@ -/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END. - Return the new offset if successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_LSEEK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define lseek rpl_lseek -# endif -_GL_FUNCDECL_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -_GL_CXXALIAS_RPL (lseek, off_t, (int fd, off_t offset, int whence)); -# else -_GL_CXXALIAS_SYS (lseek, off_t, (int fd, off_t offset, int whence)); -# endif -_GL_CXXALIASWARN (lseek); -#elif defined GNULIB_POSIXCHECK -# undef lseek -# if HAVE_RAW_DECL_LSEEK -_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some " - "systems - use gnulib module lseek for portability"); -# endif -#endif - - -#if @GNULIB_PIPE@ -/* Create a pipe, defaulting to O_BINARY mode. - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. */ -# if !@HAVE_PIPE@ -_GL_FUNCDECL_SYS (pipe, int, (int fd[2]) _GL_ARG_NONNULL ((1))); -# endif -_GL_CXXALIAS_SYS (pipe, int, (int fd[2])); -_GL_CXXALIASWARN (pipe); -#elif defined GNULIB_POSIXCHECK -# undef pipe -# if HAVE_RAW_DECL_PIPE -_GL_WARN_ON_USE (pipe, "pipe is unportable - " - "use gnulib module pipe-posix for portability"); -# endif -#endif - - -#if @GNULIB_PIPE2@ -/* Create a pipe, applying the given flags when opening the read-end of the - pipe and the write-end of the pipe. - The flags are a bitmask, possibly including O_CLOEXEC (defined in ) - and O_TEXT, O_BINARY (defined in "binary-io.h"). - Store the read-end as fd[0] and the write-end as fd[1]. - Return 0 upon success, or -1 with errno set upon failure. - See also the Linux man page at - . */ -# if @HAVE_PIPE2@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define pipe2 rpl_pipe2 -# endif -_GL_FUNCDECL_RPL (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (pipe2, int, (int fd[2], int flags)); -# else -_GL_FUNCDECL_SYS (pipe2, int, (int fd[2], int flags) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_SYS (pipe2, int, (int fd[2], int flags)); -# endif -_GL_CXXALIASWARN (pipe2); -#elif defined GNULIB_POSIXCHECK -# undef pipe2 -# if HAVE_RAW_DECL_PIPE2 -_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - " - "use gnulib module pipe2 for portability"); -# endif -#endif - - -#if @GNULIB_PREAD@ -/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET. - Return the number of bytes placed into BUF if successful, otherwise - set errno and return -1. 0 indicates EOF. - See the POSIX:2008 specification - . */ -# if @REPLACE_PREAD@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pread -# define pread rpl_pread -# endif -_GL_FUNCDECL_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PREAD@ -_GL_FUNCDECL_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pread, ssize_t, - (int fd, void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pread); -#elif defined GNULIB_POSIXCHECK -# undef pread -# if HAVE_RAW_DECL_PREAD -_GL_WARN_ON_USE (pread, "pread is unportable - " - "use gnulib module pread for portability"); -# endif -#endif - - -#if @GNULIB_PWRITE@ -/* Write at most BUFSIZE bytes from BUF into FD, starting at OFFSET. - Return the number of bytes written if successful, otherwise - set errno and return -1. 0 indicates nothing written. See the - POSIX:2008 specification - . */ -# if @REPLACE_PWRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef pwrite -# define pwrite rpl_pwrite -# endif -_GL_FUNCDECL_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# else -# if !@HAVE_PWRITE@ -_GL_FUNCDECL_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (pwrite, ssize_t, - (int fd, const void *buf, size_t bufsize, off_t offset)); -# endif -_GL_CXXALIASWARN (pwrite); -#elif defined GNULIB_POSIXCHECK -# undef pwrite -# if HAVE_RAW_DECL_PWRITE -_GL_WARN_ON_USE (pwrite, "pwrite is unportable - " - "use gnulib module pwrite for portability"); -# endif -#endif - - -#if @GNULIB_READ@ -/* Read up to COUNT bytes from file descriptor FD into the buffer starting - at BUF. See the POSIX:2008 specification - . */ -# if @REPLACE_READ@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef read -# define read rpl_read -# endif -_GL_FUNCDECL_RPL (read, ssize_t, (int fd, void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (read, ssize_t, (int fd, void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (read, ssize_t, (int fd, void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (read); -#endif - - -#if @GNULIB_READLINK@ -/* Read the contents of the symbolic link FILE and place the first BUFSIZE - bytes of it into BUF. Return the number of bytes placed into BUF if - successful, otherwise -1 and errno set. - See the POSIX:2008 specification - . */ -# if @REPLACE_READLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define readlink rpl_readlink -# endif -_GL_FUNCDECL_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# else -# if !@HAVE_READLINK@ -_GL_FUNCDECL_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (readlink, ssize_t, - (const char *file, char *buf, size_t bufsize)); -# endif -_GL_CXXALIASWARN (readlink); -#elif defined GNULIB_POSIXCHECK -# undef readlink -# if HAVE_RAW_DECL_READLINK -_GL_WARN_ON_USE (readlink, "readlink is unportable - " - "use gnulib module readlink for portability"); -# endif -#endif - - -#if @GNULIB_READLINKAT@ -# if !@HAVE_READLINKAT@ -_GL_FUNCDECL_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len) - _GL_ARG_NONNULL ((2, 3))); -# endif -_GL_CXXALIAS_SYS (readlinkat, ssize_t, - (int fd, char const *file, char *buf, size_t len)); -_GL_CXXALIASWARN (readlinkat); -#elif defined GNULIB_POSIXCHECK -# undef readlinkat -# if HAVE_RAW_DECL_READLINKAT -_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - " - "use gnulib module readlinkat for portability"); -# endif -#endif - - -#if @GNULIB_RMDIR@ -/* Remove the directory DIR. */ -# if @REPLACE_RMDIR@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define rmdir rpl_rmdir -# endif -_GL_FUNCDECL_RPL (rmdir, int, (char const *name) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (rmdir, int, (char const *name)); -# else -_GL_CXXALIAS_SYS (rmdir, int, (char const *name)); -# endif -_GL_CXXALIASWARN (rmdir); -#elif defined GNULIB_POSIXCHECK -# undef rmdir -# if HAVE_RAW_DECL_RMDIR -_GL_WARN_ON_USE (rmdir, "rmdir is unportable - " - "use gnulib module rmdir for portability"); -# endif -#endif - - -#if @GNULIB_SETHOSTNAME@ -/* Set the host name of the machine. - The host name may or may not be fully qualified. - - Put LEN bytes of NAME into the host name. - Return 0 if successful, otherwise, set errno and return -1. - - Platforms with no ability to set the hostname return -1 and set - errno = ENOSYS. */ -# if !@HAVE_SETHOSTNAME@ || !@HAVE_DECL_SETHOSTNAME@ -_GL_FUNCDECL_SYS (sethostname, int, (const char *name, size_t len) - _GL_ARG_NONNULL ((1))); -# endif -/* Need to cast, because on Solaris 11 2011-10, Mac OS X 10.5, IRIX 6.5 - and FreeBSD 6.4 the second parameter is int. On Solaris 11 - 2011-10, the first parameter is not const. */ -_GL_CXXALIAS_SYS_CAST (sethostname, int, (const char *name, size_t len)); -_GL_CXXALIASWARN (sethostname); -#elif defined GNULIB_POSIXCHECK -# undef sethostname -# if HAVE_RAW_DECL_SETHOSTNAME -_GL_WARN_ON_USE (sethostname, "sethostname is unportable - " - "use gnulib module sethostname for portability"); -# endif -#endif - - -#if @GNULIB_SLEEP@ -/* Pause the execution of the current thread for N seconds. - Returns the number of seconds left to sleep. - See the POSIX:2008 specification - . */ -# if @REPLACE_SLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef sleep -# define sleep rpl_sleep -# endif -_GL_FUNCDECL_RPL (sleep, unsigned int, (unsigned int n)); -_GL_CXXALIAS_RPL (sleep, unsigned int, (unsigned int n)); -# else -# if !@HAVE_SLEEP@ -_GL_FUNCDECL_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIAS_SYS (sleep, unsigned int, (unsigned int n)); -# endif -_GL_CXXALIASWARN (sleep); -#elif defined GNULIB_POSIXCHECK -# undef sleep -# if HAVE_RAW_DECL_SLEEP -_GL_WARN_ON_USE (sleep, "sleep is unportable - " - "use gnulib module sleep for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINK@ -# if @REPLACE_SYMLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef symlink -# define symlink rpl_symlink -# endif -_GL_FUNCDECL_RPL (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -_GL_CXXALIAS_RPL (symlink, int, (char const *contents, char const *file)); -# else -# if !@HAVE_SYMLINK@ -_GL_FUNCDECL_SYS (symlink, int, (char const *contents, char const *file) - _GL_ARG_NONNULL ((1, 2))); -# endif -_GL_CXXALIAS_SYS (symlink, int, (char const *contents, char const *file)); -# endif -_GL_CXXALIASWARN (symlink); -#elif defined GNULIB_POSIXCHECK -# undef symlink -# if HAVE_RAW_DECL_SYMLINK -_GL_WARN_ON_USE (symlink, "symlink is not portable - " - "use gnulib module symlink for portability"); -# endif -#endif - - -#if @GNULIB_SYMLINKAT@ -# if !@HAVE_SYMLINKAT@ -_GL_FUNCDECL_SYS (symlinkat, int, - (char const *contents, int fd, char const *file) - _GL_ARG_NONNULL ((1, 3))); -# endif -_GL_CXXALIAS_SYS (symlinkat, int, - (char const *contents, int fd, char const *file)); -_GL_CXXALIASWARN (symlinkat); -#elif defined GNULIB_POSIXCHECK -# undef symlinkat -# if HAVE_RAW_DECL_SYMLINKAT -_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - " - "use gnulib module symlinkat for portability"); -# endif -#endif - - -#if @GNULIB_TTYNAME_R@ -/* Store at most BUFLEN characters of the pathname of the terminal FD is - open on in BUF. Return 0 on success, otherwise an error number. */ -# if @REPLACE_TTYNAME_R@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef ttyname_r -# define ttyname_r rpl_ttyname_r -# endif -_GL_FUNCDECL_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# else -# if !@HAVE_DECL_TTYNAME_R@ -_GL_FUNCDECL_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen) _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (ttyname_r, int, - (int fd, char *buf, size_t buflen)); -# endif -_GL_CXXALIASWARN (ttyname_r); -#elif defined GNULIB_POSIXCHECK -# undef ttyname_r -# if HAVE_RAW_DECL_TTYNAME_R -_GL_WARN_ON_USE (ttyname_r, "ttyname_r is not portable - " - "use gnulib module ttyname_r for portability"); -# endif -#endif - - -#if @GNULIB_UNLINK@ -# if @REPLACE_UNLINK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlink -# define unlink rpl_unlink -# endif -_GL_FUNCDECL_RPL (unlink, int, (char const *file) _GL_ARG_NONNULL ((1))); -_GL_CXXALIAS_RPL (unlink, int, (char const *file)); -# else -_GL_CXXALIAS_SYS (unlink, int, (char const *file)); -# endif -_GL_CXXALIASWARN (unlink); -#elif defined GNULIB_POSIXCHECK -# undef unlink -# if HAVE_RAW_DECL_UNLINK -_GL_WARN_ON_USE (unlink, "unlink is not portable - " - "use gnulib module unlink for portability"); -# endif -#endif - - -#if @GNULIB_UNLINKAT@ -# if @REPLACE_UNLINKAT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef unlinkat -# define unlinkat rpl_unlinkat -# endif -_GL_FUNCDECL_RPL (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (unlinkat, int, (int fd, char const *file, int flag)); -# else -# if !@HAVE_UNLINKAT@ -_GL_FUNCDECL_SYS (unlinkat, int, (int fd, char const *file, int flag) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (unlinkat, int, (int fd, char const *file, int flag)); -# endif -_GL_CXXALIASWARN (unlinkat); -#elif defined GNULIB_POSIXCHECK -# undef unlinkat -# if HAVE_RAW_DECL_UNLINKAT -_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - " - "use gnulib module openat for portability"); -# endif -#endif - - -#if @GNULIB_USLEEP@ -/* Pause the execution of the current thread for N microseconds. - Returns 0 on completion, or -1 on range error. - See the POSIX:2001 specification - . */ -# if @REPLACE_USLEEP@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef usleep -# define usleep rpl_usleep -# endif -_GL_FUNCDECL_RPL (usleep, int, (useconds_t n)); -_GL_CXXALIAS_RPL (usleep, int, (useconds_t n)); -# else -# if !@HAVE_USLEEP@ -_GL_FUNCDECL_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIAS_SYS (usleep, int, (useconds_t n)); -# endif -_GL_CXXALIASWARN (usleep); -#elif defined GNULIB_POSIXCHECK -# undef usleep -# if HAVE_RAW_DECL_USLEEP -_GL_WARN_ON_USE (usleep, "usleep is unportable - " - "use gnulib module usleep for portability"); -# endif -#endif - - -#if @GNULIB_WRITE@ -/* Write up to COUNT bytes starting at BUF to file descriptor FD. - See the POSIX:2008 specification - . */ -# if @REPLACE_WRITE@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef write -# define write rpl_write -# endif -_GL_FUNCDECL_RPL (write, ssize_t, (int fd, const void *buf, size_t count) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (write, ssize_t, (int fd, const void *buf, size_t count)); -# else -/* Need to cast, because on mingw, the third parameter is - unsigned int count - and the return type is 'int'. */ -_GL_CXXALIAS_SYS_CAST (write, ssize_t, (int fd, const void *buf, size_t count)); -# endif -_GL_CXXALIASWARN (write); -#endif - - -#endif /* _@GUARD_PREFIX@_UNISTD_H */ -#endif /* _@GUARD_PREFIX@_UNISTD_H */ diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c deleted file mode 100644 index d875f7a..0000000 --- a/gnulib/lib/vasnprintf.c +++ /dev/null @@ -1,5606 +0,0 @@ -/* vsprintf with automatic memory allocation. - 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 - 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 . */ - -/* This file can be parametrized with the following macros: - VASNPRINTF The name of the function being defined. - FCHAR_T The element type of the format string. - DCHAR_T The element type of the destination (result) string. - FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters - in the format string are ASCII. MUST be set if - FCHAR_T and DCHAR_T are not the same type. - DIRECTIVE Structure denoting a format directive. - Depends on FCHAR_T. - DIRECTIVES Structure denoting the set of format directives of a - format string. Depends on FCHAR_T. - PRINTF_PARSE Function that parses a format string. - Depends on FCHAR_T. - DCHAR_CPY memcpy like function for DCHAR_T[] arrays. - DCHAR_SET memset like function for DCHAR_T[] arrays. - DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays. - SNPRINTF The system's snprintf (or similar) function. - This may be either snprintf or swprintf. - TCHAR_T The element type of the argument and result string - of the said SNPRINTF function. This may be either - char or wchar_t. The code exploits that - sizeof (TCHAR_T) | sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). - DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type. - DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[]. - DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t. - DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t. - DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */ - -/* Tell glibc's to provide a prototype for snprintf(). - This must come before because may include - , and once has been included, it's too late. */ -#ifndef _GNU_SOURCE -# define _GNU_SOURCE 1 -#endif - -#ifndef VASNPRINTF -# include -#endif -#ifndef IN_LIBINTL -# include -#endif - -/* Specification. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "vasnwprintf.h" -# else -# include "vasnprintf.h" -# endif -#endif - -#include /* localeconv() */ -#include /* snprintf(), sprintf() */ -#include /* abort(), malloc(), realloc(), free() */ -#include /* memcpy(), strlen() */ -#include /* errno */ -#include /* CHAR_BIT */ -#include /* DBL_MAX_EXP, LDBL_MAX_EXP */ -#if HAVE_NL_LANGINFO -# include -#endif -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# include "wprintf-parse.h" -# else -# include "printf-parse.h" -# endif -#endif - -/* Checked size_t computations. */ -#include "xsize.h" - -#include "verify.h" - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "float+.h" -#endif - -#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnand-nolibm.h" -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnanl-nolibm.h" -# include "fpucw.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnand-nolibm.h" -# include "printf-frexp.h" -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL -# include -# include "isnanl-nolibm.h" -# include "printf-frexpl.h" -# include "fpucw.h" -#endif - -/* Default parameters. */ -#ifndef VASNPRINTF -# if WIDE_CHAR_VERSION -# define VASNPRINTF vasnwprintf -# define FCHAR_T wchar_t -# define DCHAR_T wchar_t -# define TCHAR_T wchar_t -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE wchar_t_directive -# define DIRECTIVES wchar_t_directives -# define PRINTF_PARSE wprintf_parse -# define DCHAR_CPY wmemcpy -# define DCHAR_SET wmemset -# else -# define VASNPRINTF vasnprintf -# define FCHAR_T char -# define DCHAR_T char -# define TCHAR_T char -# define DCHAR_IS_TCHAR 1 -# define DIRECTIVE char_directive -# define DIRECTIVES char_directives -# define PRINTF_PARSE printf_parse -# define DCHAR_CPY memcpy -# define DCHAR_SET memset -# endif -#endif -#if WIDE_CHAR_VERSION - /* TCHAR_T is wchar_t. */ -# define USE_SNPRINTF 1 -# if HAVE_DECL__SNWPRINTF - /* On Windows, the function swprintf() has a different signature than - on Unix; we use the function _snwprintf() or - on mingw - snwprintf() - instead. The mingw function snwprintf() has fewer bugs than the - MSVCRT function _snwprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snwprintf -# else -# define SNPRINTF _snwprintf -# endif -# else - /* Unix. */ -# define SNPRINTF swprintf -# endif -#else - /* TCHAR_T is char. */ - /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'. - But don't use it on BeOS, since BeOS snprintf produces no output if the - size argument is >= 0x3000000. - Also don't use it on Linux libc5, since there snprintf with size = 1 - writes any output without bounds, like sprintf. */ -# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1) -# define USE_SNPRINTF 1 -# else -# define USE_SNPRINTF 0 -# endif -# if HAVE_DECL__SNPRINTF - /* Windows. The mingw function snprintf() has fewer bugs than the MSVCRT - function _snprintf(), so prefer that. */ -# if defined __MINGW32__ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# else -# define SNPRINTF _snprintf -# endif -# else - /* Unix. */ -# define SNPRINTF snprintf - /* Here we need to call the native snprintf, not rpl_snprintf. */ -# undef snprintf -# endif -#endif -/* Here we need to call the native sprintf, not rpl_sprintf. */ -#undef sprintf - -/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized" - warnings in this file. Use -Dlint to suppress them. */ -#ifdef lint -# define IF_LINT(Code) Code -#else -# define IF_LINT(Code) /* empty */ -#endif - -/* Avoid some warnings from "gcc -Wshadow". - This file doesn't use the exp() and remainder() functions. */ -#undef exp -#define exp expo -#undef remainder -#define remainder rem - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && !WIDE_CHAR_VERSION -# if (HAVE_STRNLEN && !defined _AIX) -# define local_strnlen strnlen -# else -# ifndef local_strnlen_defined -# define local_strnlen_defined 1 -static size_t -local_strnlen (const char *string, size_t maxlen) -{ - const char *end = memchr (string, '\0', maxlen); - return end ? (size_t) (end - string) : maxlen; -} -# endif -# endif -#endif - -#if (((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && WIDE_CHAR_VERSION) || ((!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && !WIDE_CHAR_VERSION && DCHAR_IS_TCHAR)) && HAVE_WCHAR_T -# if HAVE_WCSLEN -# define local_wcslen wcslen -# else - /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid - a dependency towards this library, here is a local substitute. - Define this substitute only once, even if this file is included - twice in the same compilation unit. */ -# ifndef local_wcslen_defined -# define local_wcslen_defined 1 -static size_t -local_wcslen (const wchar_t *s) -{ - const wchar_t *ptr; - - for (ptr = s; *ptr != (wchar_t) 0; ptr++) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99) && HAVE_WCHAR_T && WIDE_CHAR_VERSION -# if HAVE_WCSNLEN -# define local_wcsnlen wcsnlen -# else -# ifndef local_wcsnlen_defined -# define local_wcsnlen_defined 1 -static size_t -local_wcsnlen (const wchar_t *s, size_t maxlen) -{ - const wchar_t *ptr; - - for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--) - ; - return ptr - s; -} -# endif -# endif -#endif - -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL -/* Determine the decimal-point character according to the current locale. */ -# ifndef decimal_point_char_defined -# define decimal_point_char_defined 1 -static char -decimal_point_char (void) -{ - const char *point; - /* Determine it in a multithread-safe way. We know nl_langinfo is - multithread-safe on glibc systems and Mac OS X systems, but is not required - to be multithread-safe by POSIX. sprintf(), however, is multithread-safe. - localeconv() is rarely multithread-safe. */ -# if HAVE_NL_LANGINFO && (__GLIBC__ || defined __UCLIBC__ || (defined __APPLE__ && defined __MACH__)) - point = nl_langinfo (RADIXCHAR); -# elif 1 - char pointbuf[5]; - sprintf (pointbuf, "%#.0f", 1.0); - point = &pointbuf[1]; -# else - point = localeconv () -> decimal_point; -# endif - /* The decimal point is always a single byte: either '.' or ','. */ - return (point[0] != '\0' ? point[0] : '.'); -} -# endif -#endif - -#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zero (double x) -{ - return isnand (x) || x + x == x; -} - -#endif - -#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL - -/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */ -static int -is_infinite_or_zerol (long double x) -{ - return isnanl (x) || x + x == x; -} - -#endif - -#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - -/* Converting 'long double' to decimal without rare rounding bugs requires - real bignums. We use the naming conventions of GNU gmp, but vastly simpler - (and slower) algorithms. */ - -typedef unsigned int mp_limb_t; -# define GMP_LIMB_BITS 32 -verify (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS); - -typedef unsigned long long mp_twolimb_t; -# define GMP_TWOLIMB_BITS 64 -verify (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS); - -/* Representation of a bignum >= 0. */ -typedef struct -{ - size_t nlimbs; - mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */ -} mpn_t; - -/* Compute the product of two bignums >= 0. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -multiply (mpn_t src1, mpn_t src2, mpn_t *dest) -{ - const mp_limb_t *p1; - const mp_limb_t *p2; - size_t len1; - size_t len2; - - if (src1.nlimbs <= src2.nlimbs) - { - len1 = src1.nlimbs; - p1 = src1.limbs; - len2 = src2.nlimbs; - p2 = src2.limbs; - } - else - { - len1 = src2.nlimbs; - p1 = src2.limbs; - len2 = src1.nlimbs; - p2 = src1.limbs; - } - /* Now 0 <= len1 <= len2. */ - if (len1 == 0) - { - /* src1 or src2 is zero. */ - dest->nlimbs = 0; - dest->limbs = (mp_limb_t *) malloc (1); - } - else - { - /* Here 1 <= len1 <= len2. */ - size_t dlen; - mp_limb_t *dp; - size_t k, i, j; - - dlen = len1 + len2; - dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t)); - if (dp == NULL) - return NULL; - for (k = len2; k > 0; ) - dp[--k] = 0; - for (i = 0; i < len1; i++) - { - mp_limb_t digit1 = p1[i]; - mp_twolimb_t carry = 0; - for (j = 0; j < len2; j++) - { - mp_limb_t digit2 = p2[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - carry += dp[i + j]; - dp[i + j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - dp[i + len2] = (mp_limb_t) carry; - } - /* Normalise. */ - while (dlen > 0 && dp[dlen - 1] == 0) - dlen--; - dest->nlimbs = dlen; - dest->limbs = dp; - } - return dest->limbs; -} - -/* Compute the quotient of a bignum a >= 0 and a bignum b > 0. - a is written as a = q * b + r with 0 <= r < b. q is the quotient, r - the remainder. - Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd, - q is incremented. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -divide (mpn_t a, mpn_t b, mpn_t *q) -{ - /* Algorithm: - First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]] - with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS). - If m=n=1, perform a single-precision division: - r:=0, j:=m, - while j>0 do - {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j = - = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r=n>1, perform a multiple-precision division: - We have a/b < beta^(m-n+1). - s:=intDsize-1-(highest bit in b[n-1]), 0<=s=beta/2. - For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).} - Compute q* : - q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]). - In case of overflow (q* >= beta) set q* := beta-1. - Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2] - and c3 := b[n-2] * q*. - {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow - occurred. Furthermore 0 <= c3 < beta^2. - If there was overflow and - r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2, - the next test can be skipped.} - While c3 > c2, {Here 0 <= c2 < c3 < beta^2} - Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2]. - If q* > 0: - Put r := r - b * q* * beta^j. In detail: - [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]]. - hence: u:=0, for i:=0 to n-1 do - u := u + q* * b[i], - r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry), - u:=u div beta (+ 1, if carry in subtraction) - r[n+j]:=r[n+j]-u. - {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1 - < q* + 1 <= beta, - the carry u does not overflow.} - If a negative carry occurs, put q* := q* - 1 - and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]]. - Set q[j] := q*. - Normalise [q[m-n],..,q[0]]; this yields the quotient q. - Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the - rest r. - The room for q[j] can be allocated at the memory location of r[n+j]. - Finally, round-to-even: - Shift r left by 1 bit. - If r > b or if r = b and q[0] is odd, q := q+1. - */ - const mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - const mp_limb_t *b_ptr = b.limbs; - size_t b_len = b.nlimbs; - mp_limb_t *roomptr; - mp_limb_t *tmp_roomptr = NULL; - mp_limb_t *q_ptr; - size_t q_len; - mp_limb_t *r_ptr; - size_t r_len; - - /* Allocate room for a_len+2 digits. - (Need a_len+1 digits for the real division and 1 more digit for the - final rounding of q.) */ - roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t)); - if (roomptr == NULL) - return NULL; - - /* Normalise a. */ - while (a_len > 0 && a_ptr[a_len - 1] == 0) - a_len--; - - /* Normalise b. */ - for (;;) - { - if (b_len == 0) - /* Division by zero. */ - abort (); - if (b_ptr[b_len - 1] == 0) - b_len--; - else - break; - } - - /* Here m = a_len >= 0 and n = b_len > 0. */ - - if (a_len < b_len) - { - /* m beta^(m-2) <= a/b < beta^m */ - r_ptr = roomptr; - q_ptr = roomptr + 1; - { - mp_limb_t den = b_ptr[0]; - mp_limb_t remainder = 0; - const mp_limb_t *sourceptr = a_ptr + a_len; - mp_limb_t *destptr = q_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr; - *--destptr = num / den; - remainder = num % den; - } - /* Normalise and store r. */ - if (remainder > 0) - { - r_ptr[0] = remainder; - r_len = 1; - } - else - r_len = 0; - /* Normalise q. */ - q_len = a_len; - if (q_ptr[q_len - 1] == 0) - q_len--; - } - } - else - { - /* n>1: multiple precision division. - beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==> - beta^(m-n-1) <= a/b < beta^(m-n+1). */ - /* Determine s. */ - size_t s; - { - mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */ - /* Determine s = GMP_LIMB_BITS - integer_length (msd). - Code copied from gnulib's integer_length.c. */ -# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) - s = __builtin_clz (msd); -# else -# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT - if (GMP_LIMB_BITS <= DBL_MANT_BIT) - { - /* Use 'double' operations. - Assumes an IEEE 754 'double' implementation. */ -# define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7) -# define DBL_EXP_BIAS (DBL_EXP_MASK / 2 - 1) -# define NWORDS \ - ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) - union { double value; unsigned int word[NWORDS]; } m; - - /* Use a single integer to floating-point conversion. */ - m.value = msd; - - s = GMP_LIMB_BITS - - (((m.word[DBL_EXPBIT0_WORD] >> DBL_EXPBIT0_BIT) & DBL_EXP_MASK) - - DBL_EXP_BIAS); - } - else -# undef NWORDS -# endif - { - s = 31; - if (msd >= 0x10000) - { - msd = msd >> 16; - s -= 16; - } - if (msd >= 0x100) - { - msd = msd >> 8; - s -= 8; - } - if (msd >= 0x10) - { - msd = msd >> 4; - s -= 4; - } - if (msd >= 0x4) - { - msd = msd >> 2; - s -= 2; - } - if (msd >= 0x2) - { - msd = msd >> 1; - s -= 1; - } - } -# endif - } - /* 0 <= s < GMP_LIMB_BITS. - Copy b, shifting it left by s bits. */ - if (s > 0) - { - tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t)); - if (tmp_roomptr == NULL) - { - free (roomptr); - return NULL; - } - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = tmp_roomptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - /* accu must be zero, since that was how s was determined. */ - if (accu != 0) - abort (); - } - b_ptr = tmp_roomptr; - } - /* Copy a, shifting it left by s bits, yields r. - Memory layout: - At the beginning: r = roomptr[0..a_len], - at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */ - r_ptr = roomptr; - if (s == 0) - { - memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t)); - r_ptr[a_len] = 0; - } - else - { - const mp_limb_t *sourceptr = a_ptr; - mp_limb_t *destptr = r_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = a_len; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - *destptr++ = (mp_limb_t) accu; - } - q_ptr = roomptr + b_len; - q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */ - { - size_t j = a_len - b_len; /* m-n */ - mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */ - mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */ - mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */ - ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd; - /* Division loop, traversed m-n+1 times. - j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */ - for (;;) - { - mp_limb_t q_star; - mp_limb_t c1; - if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */ - { - /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */ - mp_twolimb_t num = - ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS) - | r_ptr[j + b_len - 1]; - q_star = num / b_msd; - c1 = num % b_msd; - } - else - { - /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */ - q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */ - /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta - <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta - <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) - {<= beta !}. - If yes, jump directly to the subtraction loop. - (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta - <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */ - if (r_ptr[j + b_len] > b_msd - || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd) - /* r[j+n] >= b[n-1]+1 or - r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a - carry. */ - goto subtract; - } - /* q_star = q*, - c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, 0, decrease it by - b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2 - this can happen only twice. */ - if (c3 > c2) - { - q_star = q_star - 1; /* q* := q* - 1 */ - if (c3 - c2 > b_msdd) - q_star = q_star - 1; /* q* := q* - 1 */ - } - } - if (q_star > 0) - subtract: - { - /* Subtract r := r - b * q* * beta^j. */ - mp_limb_t cr; - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_twolimb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - /* Here 0 <= carry <= q*. */ - carry = - carry - + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++ - + (mp_limb_t) ~(*destptr); - /* Here 0 <= carry <= beta*q* + beta-1. */ - *destptr++ = ~(mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; /* <= q* */ - } - cr = (mp_limb_t) carry; - } - /* Subtract cr from r_ptr[j + b_len], then forget about - r_ptr[j + b_len]. */ - if (cr > r_ptr[j + b_len]) - { - /* Subtraction gave a carry. */ - q_star = q_star - 1; /* q* := q* - 1 */ - /* Add b back. */ - { - const mp_limb_t *sourceptr = b_ptr; - mp_limb_t *destptr = r_ptr + j; - mp_limb_t carry = 0; - size_t count; - for (count = b_len; count > 0; count--) - { - mp_limb_t source1 = *sourceptr++; - mp_limb_t source2 = *destptr; - *destptr++ = source1 + source2 + carry; - carry = - (carry - ? source1 >= (mp_limb_t) ~source2 - : source1 > (mp_limb_t) ~source2); - } - } - /* Forget about the carry and about r[j+n]. */ - } - } - /* q* is determined. Store it as q[j]. */ - q_ptr[j] = q_star; - if (j == 0) - break; - j--; - } - } - r_len = b_len; - /* Normalise q. */ - if (q_ptr[q_len - 1] == 0) - q_len--; -# if 0 /* Not needed here, since we need r only to compare it with b/2, and - b is shifted left by s bits. */ - /* Shift r right by s bits. */ - if (s > 0) - { - mp_limb_t ptr = r_ptr + r_len; - mp_twolimb_t accu = 0; - size_t count; - for (count = r_len; count > 0; count--) - { - accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS; - accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s); - *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS); - } - } -# endif - /* Normalise r. */ - while (r_len > 0 && r_ptr[r_len - 1] == 0) - r_len--; - } - /* Compare r << 1 with b. */ - if (r_len > b_len) - goto increment_q; - { - size_t i; - for (i = b_len;;) - { - mp_limb_t r_i = - (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0) - | (i < r_len ? r_ptr[i] << 1 : 0); - mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0); - if (r_i > b_i) - goto increment_q; - if (r_i < b_i) - goto keep_q; - if (i == 0) - break; - i--; - } - } - if (q_len > 0 && ((q_ptr[0] & 1) != 0)) - /* q is odd. */ - increment_q: - { - size_t i; - for (i = 0; i < q_len; i++) - if (++(q_ptr[i]) != 0) - goto keep_q; - q_ptr[q_len++] = 1; - } - keep_q: - if (tmp_roomptr != NULL) - free (tmp_roomptr); - q->limbs = q_ptr; - q->nlimbs = q_len; - return roomptr; -} - -/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal - representation. - Destroys the contents of a. - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -convert_to_decimal (mpn_t a, size_t extra_zeroes) -{ - mp_limb_t *a_ptr = a.limbs; - size_t a_len = a.nlimbs; - /* 0.03345 is slightly larger than log(2)/(9*log(10)). */ - size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1); - char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes)); - if (c_ptr != NULL) - { - char *d_ptr = c_ptr; - for (; extra_zeroes > 0; extra_zeroes--) - *d_ptr++ = '0'; - while (a_len > 0) - { - /* Divide a by 10^9, in-place. */ - mp_limb_t remainder = 0; - mp_limb_t *ptr = a_ptr + a_len; - size_t count; - for (count = a_len; count > 0; count--) - { - mp_twolimb_t num = - ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr; - *ptr = num / 1000000000; - remainder = num % 1000000000; - } - /* Store the remainder as 9 decimal digits. */ - for (count = 9; count > 0; count--) - { - *d_ptr++ = '0' + (remainder % 10); - remainder = remainder / 10; - } - /* Normalize a. */ - if (a_ptr[a_len - 1] == 0) - a_len--; - } - /* Remove leading zeroes. */ - while (d_ptr > c_ptr && d_ptr[-1] == '0') - d_ptr--; - /* But keep at least one zero. */ - if (d_ptr == c_ptr) - *d_ptr++ = '0'; - /* Terminate the string. */ - *d_ptr = '\0'; - } - return c_ptr; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_long_double (long double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - long double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'long double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0L && y < 1.0L)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess - precision. */ - if (!(y == 0.0L)) - abort (); -# endif - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - LDBL_MANT_BIT; - return m.limbs; -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0: - write x as x = 2^e * m, where m is a bignum. - Return the allocated memory in case of success, NULL in case of memory - allocation failure. */ -static void * -decode_double (double x, int *ep, mpn_t *mp) -{ - mpn_t m; - int exp; - double y; - size_t i; - - /* Allocate memory for result. */ - m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS; - m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t)); - if (m.limbs == NULL) - return NULL; - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the - latter is an integer. */ - /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs. - I'm not sure whether it's safe to cast a 'double' value between - 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only - 'double' values between 0 and 2^16 (to 'unsigned int' or 'int', - doesn't matter). */ -# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0 -# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2 - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2)); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } -# else - { - mp_limb_t d; - y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS); - d = (int) y; - y -= d; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d; - } -# endif -# endif - for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; ) - { - mp_limb_t hi, lo; - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - hi = (int) y; - y -= hi; - if (!(y >= 0.0 && y < 1.0)) - abort (); - y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2); - lo = (int) y; - y -= lo; - if (!(y >= 0.0 && y < 1.0)) - abort (); - m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo; - } - if (!(y == 0.0)) - abort (); - /* Normalise. */ - while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0) - m.nlimbs--; - *mp = m; - *ep = exp - DBL_MANT_BIT; - return m.limbs; -} - -# endif - -/* Assuming x = 2^e * m is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n) -{ - int s; - size_t extra_zeroes; - unsigned int abs_n; - unsigned int abs_s; - mp_limb_t *pow5_ptr; - size_t pow5_len; - unsigned int s_limbs; - unsigned int s_bits; - mpn_t pow5; - mpn_t z; - void *z_memory; - char *digits; - - if (memory == NULL) - return NULL; - /* x = 2^e * m, hence - y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m) - = round (2^s * 5^n * m). */ - s = e + n; - extra_zeroes = 0; - /* Factor out a common power of 10 if possible. */ - if (s > 0 && n > 0) - { - extra_zeroes = (s < n ? s : n); - s -= extra_zeroes; - n -= extra_zeroes; - } - /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes. - Before converting to decimal, we need to compute - z = round (2^s * 5^n * m). */ - /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same - sign. 2.322 is slightly larger than log(5)/log(2). */ - abs_n = (n >= 0 ? n : -n); - abs_s = (s >= 0 ? s : -s); - pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1 - + abs_s / GMP_LIMB_BITS + 1) - * sizeof (mp_limb_t)); - if (pow5_ptr == NULL) - { - free (memory); - return NULL; - } - /* Initialize with 1. */ - pow5_ptr[0] = 1; - pow5_len = 1; - /* Multiply with 5^|n|. */ - if (abs_n > 0) - { - static mp_limb_t const small_pow5[13 + 1] = - { - 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625, - 48828125, 244140625, 1220703125 - }; - unsigned int n13; - for (n13 = 0; n13 <= abs_n; n13 += 13) - { - mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13]; - size_t j; - mp_twolimb_t carry = 0; - for (j = 0; j < pow5_len; j++) - { - mp_limb_t digit2 = pow5_ptr[j]; - carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2; - pow5_ptr[j] = (mp_limb_t) carry; - carry = carry >> GMP_LIMB_BITS; - } - if (carry > 0) - pow5_ptr[pow5_len++] = (mp_limb_t) carry; - } - } - s_limbs = abs_s / GMP_LIMB_BITS; - s_bits = abs_s % GMP_LIMB_BITS; - if (n >= 0 ? s >= 0 : s <= 0) - { - /* Multiply with 2^|s|. */ - if (s_bits > 0) - { - mp_limb_t *ptr = pow5_ptr; - mp_twolimb_t accu = 0; - size_t count; - for (count = pow5_len; count > 0; count--) - { - accu += (mp_twolimb_t) *ptr << s_bits; - *ptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - { - *ptr = (mp_limb_t) accu; - pow5_len++; - } - } - if (s_limbs > 0) - { - size_t count; - for (count = pow5_len; count > 0;) - { - count--; - pow5_ptr[s_limbs + count] = pow5_ptr[count]; - } - for (count = s_limbs; count > 0;) - { - count--; - pow5_ptr[count] = 0; - } - pow5_len += s_limbs; - } - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* Multiply m with pow5. No division needed. */ - z_memory = multiply (m, pow5, &z); - } - else - { - /* Divide m by pow5 and round. */ - z_memory = divide (m, pow5, &z); - } - } - else - { - pow5.limbs = pow5_ptr; - pow5.nlimbs = pow5_len; - if (n >= 0) - { - /* n >= 0, s < 0. - Multiply m with pow5, then divide by 2^|s|. */ - mpn_t numerator; - mpn_t denominator; - void *tmp_memory; - tmp_memory = multiply (m, pow5, &numerator); - if (tmp_memory == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - /* Construct 2^|s|. */ - { - mp_limb_t *ptr = pow5_ptr + pow5_len; - size_t i; - for (i = 0; i < s_limbs; i++) - ptr[i] = 0; - ptr[s_limbs] = (mp_limb_t) 1 << s_bits; - denominator.limbs = ptr; - denominator.nlimbs = s_limbs + 1; - } - z_memory = divide (numerator, denominator, &z); - free (tmp_memory); - } - else - { - /* n < 0, s > 0. - Multiply m with 2^s, then divide by pow5. */ - mpn_t numerator; - mp_limb_t *num_ptr; - num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1) - * sizeof (mp_limb_t)); - if (num_ptr == NULL) - { - free (pow5_ptr); - free (memory); - return NULL; - } - { - mp_limb_t *destptr = num_ptr; - { - size_t i; - for (i = 0; i < s_limbs; i++) - *destptr++ = 0; - } - if (s_bits > 0) - { - const mp_limb_t *sourceptr = m.limbs; - mp_twolimb_t accu = 0; - size_t count; - for (count = m.nlimbs; count > 0; count--) - { - accu += (mp_twolimb_t) *sourceptr++ << s_bits; - *destptr++ = (mp_limb_t) accu; - accu = accu >> GMP_LIMB_BITS; - } - if (accu > 0) - *destptr++ = (mp_limb_t) accu; - } - else - { - const mp_limb_t *sourceptr = m.limbs; - size_t count; - for (count = m.nlimbs; count > 0; count--) - *destptr++ = *sourceptr++; - } - numerator.limbs = num_ptr; - numerator.nlimbs = destptr - num_ptr; - } - z_memory = divide (numerator, pow5, &z); - free (num_ptr); - } - } - free (pow5_ptr); - free (memory); - - /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */ - - if (z_memory == NULL) - return NULL; - digits = convert_to_decimal (z, extra_zeroes); - free (z_memory); - return digits; -} - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_long_double (long double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_long_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and >= 0, and n is an integer: - Returns the decimal representation of round (x * 10^n). - Return the allocated memory - containing the decimal digits in low-to-high - order, terminated with a NUL character - in case of success, NULL in case - of memory allocation failure. */ -static char * -scale10_round_decimal_double (double x, int n) -{ - int e IF_LINT(= 0); - mpn_t m; - void *memory = decode_double (x, &e, &m); - return scale10_round_decimal_decoded (e, m, memory, n); -} - -# endif - -# if NEED_PRINTF_LONG_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10l (long double x) -{ - int exp; - long double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexpl (x, &exp); - if (!(y >= 0.0L && y < 1.0L)) - abort (); - if (y == 0.0L) - return INT_MIN; - if (y < 0.5L) - { - while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0L / (1 << 16))) - { - y *= 1.0L * (1 << 16); - exp -= 16; - } - if (y < (1.0L / (1 << 8))) - { - y *= 1.0L * (1 << 8); - exp -= 8; - } - if (y < (1.0L / (1 << 4))) - { - y *= 1.0L * (1 << 4); - exp -= 4; - } - if (y < (1.0L / (1 << 2))) - { - y *= 1.0L * (1 << 2); - exp -= 2; - } - if (y < (1.0L / (1 << 1))) - { - y *= 1.0L * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5L && y < 1.0L)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -# if NEED_PRINTF_DOUBLE - -/* Assuming x is finite and > 0: - Return an approximation for n with 10^n <= x < 10^(n+1). - The approximation is usually the right n, but may be off by 1 sometimes. */ -static int -floorlog10 (double x) -{ - int exp; - double y; - double z; - double l; - - /* Split into exponential part and mantissa. */ - y = frexp (x, &exp); - if (!(y >= 0.0 && y < 1.0)) - abort (); - if (y == 0.0) - return INT_MIN; - if (y < 0.5) - { - while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2)))) - { - y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2)); - exp -= GMP_LIMB_BITS; - } - if (y < (1.0 / (1 << 16))) - { - y *= 1.0 * (1 << 16); - exp -= 16; - } - if (y < (1.0 / (1 << 8))) - { - y *= 1.0 * (1 << 8); - exp -= 8; - } - if (y < (1.0 / (1 << 4))) - { - y *= 1.0 * (1 << 4); - exp -= 4; - } - if (y < (1.0 / (1 << 2))) - { - y *= 1.0 * (1 << 2); - exp -= 2; - } - if (y < (1.0 / (1 << 1))) - { - y *= 1.0 * (1 << 1); - exp -= 1; - } - } - if (!(y >= 0.5 && y < 1.0)) - abort (); - /* Compute an approximation for l = log2(x) = exp + log2(y). */ - l = exp; - z = y; - if (z < 0.70710678118654752444) - { - z *= 1.4142135623730950488; - l -= 0.5; - } - if (z < 0.8408964152537145431) - { - z *= 1.1892071150027210667; - l -= 0.25; - } - if (z < 0.91700404320467123175) - { - z *= 1.0905077326652576592; - l -= 0.125; - } - if (z < 0.9576032806985736469) - { - z *= 1.0442737824274138403; - l -= 0.0625; - } - /* Now 0.95 <= z <= 1.01. */ - z = 1 - z; - /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...) - Four terms are enough to get an approximation with error < 10^-7. */ - l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25))); - /* Finally multiply with log(2)/log(10), yields an approximation for - log10(x). */ - l *= 0.30102999566398119523; - /* Round down to the next integer. */ - return (int) l + (l < 0 ? -1 : 0); -} - -# endif - -/* Tests whether a string of digits consists of exactly PRECISION zeroes and - a single '1' digit. */ -static int -is_borderline (const char *digits, size_t precision) -{ - for (; precision > 0; precision--, digits++) - if (*digits != '0') - return 0; - if (*digits != '1') - return 0; - digits++; - return *digits == '\0'; -} - -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 - -/* Use a different function name, to make it possible that the 'wchar_t' - parametrization and the 'char' parametrization get compiled in the same - translation unit. */ -# if WIDE_CHAR_VERSION -# define MAX_ROOM_NEEDED wmax_room_needed -# else -# define MAX_ROOM_NEEDED max_room_needed -# endif - -/* Returns the number of TCHAR_T units needed as temporary space for the result - of sprintf or SNPRINTF of a single conversion directive. */ -static inline size_t -MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conversion, - arg_type type, int flags, size_t width, int has_precision, - size_t precision, int pad_ourselves) -{ - size_t tmp_length; - - switch (conversion) - { - case 'd': case 'i': case 'u': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.30103 /* binary -> decimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Multiply by 2, as an estimate for FLAG_GROUP. */ - tmp_length = xsum (tmp_length, tmp_length); - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'o': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.333334 /* binary -> octal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 1, to account for a leading sign. */ - tmp_length = xsum (tmp_length, 1); - break; - - case 'x': case 'X': -# if HAVE_LONG_LONG_INT - if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else -# endif - if (type == TYPE_LONGINT || type == TYPE_ULONGINT) - tmp_length = - (unsigned int) (sizeof (unsigned long) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (sizeof (unsigned int) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Add 2, to account for a leading sign or alternate form. */ - tmp_length = xsum (tmp_length, 2); - break; - - case 'f': case 'F': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - else - tmp_length = - (unsigned int) (DBL_MAX_EXP - * 0.30103 /* binary -> decimal */ - * 2 /* estimate for FLAG_GROUP */ - ) - + 1 /* turn floor into ceil */ - + 10; /* sign, decimal point etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'e': case 'E': case 'g': case 'G': - tmp_length = - 12; /* sign, decimal point, exponent etc. */ - tmp_length = xsum (tmp_length, precision); - break; - - case 'a': case 'A': - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) (LDBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) (DBL_DIG - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - break; - - case 'c': -# if HAVE_WINT_T && !WIDE_CHAR_VERSION - if (type == TYPE_WIDE_CHAR) - tmp_length = MB_CUR_MAX; - else -# endif - tmp_length = 1; - break; - - case 's': -# if HAVE_WCHAR_T - if (type == TYPE_WIDE_STRING) - { -# if WIDE_CHAR_VERSION - /* ISO C says about %ls in fwprintf: - "If the precision is not specified or is greater than the size - of the array, the array shall contain a null wide character." - So if there is a precision, we must not use wcslen. */ - const wchar_t *arg = ap->arg[arg_index].a.a_wide_string; - - if (has_precision) - tmp_length = local_wcsnlen (arg, precision); - else - tmp_length = local_wcslen (arg); -# else - /* ISO C says about %ls in fprintf: - "If a precision is specified, no more than that many bytes are - written (including shift sequences, if any), and the array - shall contain a null wide character if, to equal the multibyte - character sequence length given by the precision, the function - would need to access a wide character one past the end of the - array." - So if there is a precision, we must not use wcslen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# endif - } - else -# endif - { -# if WIDE_CHAR_VERSION - /* ISO C says about %s in fwprintf: - "If the precision is not specified or is greater than the size - of the converted array, the converted array shall contain a - null wide character." - So if there is a precision, we must not use strlen. */ - /* This case has already been handled separately in VASNPRINTF. */ - abort (); -# else - /* ISO C says about %s in fprintf: - "If the precision is not specified or greater than the size of - the array, the array shall contain a null character." - So if there is a precision, we must not use strlen. */ - const char *arg = ap->arg[arg_index].a.a_string; - - if (has_precision) - tmp_length = local_strnlen (arg, precision); - else - tmp_length = strlen (arg); -# endif - } - break; - - case 'p': - tmp_length = - (unsigned int) (sizeof (void *) * CHAR_BIT - * 0.25 /* binary -> hexadecimal */ - ) - + 1 /* turn floor into ceil */ - + 2; /* account for leading 0x */ - break; - - default: - abort (); - } - - if (!pad_ourselves) - { -# if ENABLE_UNISTDIO - /* Padding considers the number of characters, therefore the number of - elements after padding may be - > max (tmp_length, width) - but is certainly - <= tmp_length + width. */ - tmp_length = xsum (tmp_length, width); -# else - /* Padding considers the number of elements, says POSIX. */ - if (tmp_length < width) - tmp_length = width; -# endif - } - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - return tmp_length; -} - -#endif - -DCHAR_T * -VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, - const FCHAR_T *format, va_list args) -{ - DIRECTIVES d; - arguments a; - - if (PRINTF_PARSE (format, &d, &a) < 0) - /* errno is already set. */ - return NULL; - -#define CLEANUP() \ - if (d.dir != d.direct_alloc_dir) \ - free (d.dir); \ - if (a.arg != a.direct_alloc_arg) \ - free (a.arg); - - if (PRINTF_FETCHARGS (args, &a) < 0) - { - CLEANUP (); - errno = EINVAL; - return NULL; - } - - { - size_t buf_neededlength; - TCHAR_T *buf; - TCHAR_T *buf_malloced; - const FCHAR_T *cp; - size_t i; - DIRECTIVE *dp; - /* Output string accumulator. */ - DCHAR_T *result; - size_t allocated; - size_t length; - - /* Allocate a small buffer that will hold a directive passed to - sprintf or snprintf. */ - buf_neededlength = - xsum4 (7, d.max_width_length, d.max_precision_length, 6); -#if HAVE_ALLOCA - if (buf_neededlength < 4000 / sizeof (TCHAR_T)) - { - buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T)); - buf_malloced = NULL; - } - else -#endif - { - size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T)); - if (size_overflow_p (buf_memsize)) - goto out_of_memory_1; - buf = (TCHAR_T *) malloc (buf_memsize); - if (buf == NULL) - goto out_of_memory_1; - buf_malloced = buf; - } - - if (resultbuf != NULL) - { - result = resultbuf; - allocated = *lengthp; - } - else - { - result = NULL; - allocated = 0; - } - length = 0; - /* Invariants: - result is either == resultbuf or == NULL or malloc-allocated. - If length > 0, then result != NULL. */ - - /* Ensures that allocated >= needed. Aborts through a jump to - out_of_memory if needed is SIZE_MAX or otherwise too big. */ -#define ENSURE_ALLOCATION(needed) \ - if ((needed) > allocated) \ - { \ - size_t memory_size; \ - DCHAR_T *memory; \ - \ - allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \ - if ((needed) > allocated) \ - allocated = (needed); \ - memory_size = xtimes (allocated, sizeof (DCHAR_T)); \ - if (size_overflow_p (memory_size)) \ - goto out_of_memory; \ - if (result == resultbuf || result == NULL) \ - memory = (DCHAR_T *) malloc (memory_size); \ - else \ - memory = (DCHAR_T *) realloc (result, memory_size); \ - if (memory == NULL) \ - goto out_of_memory; \ - if (result == resultbuf && length > 0) \ - DCHAR_CPY (memory, result, length); \ - result = memory; \ - } - - for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++) - { - if (cp != dp->dir_start) - { - size_t n = dp->dir_start - cp; - size_t augmented_length = xsum (length, n); - - ENSURE_ALLOCATION (augmented_length); - /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we - need that the format string contains only ASCII characters - if FCHAR_T and DCHAR_T are not the same type. */ - if (sizeof (FCHAR_T) == sizeof (DCHAR_T)) - { - DCHAR_CPY (result + length, (const DCHAR_T *) cp, n); - length = augmented_length; - } - else - { - do - result[length++] = (unsigned char) *cp++; - while (--n > 0); - } - } - if (i == d.count) - break; - - /* Execute a single directive. */ - if (dp->conversion == '%') - { - size_t augmented_length; - - if (!(dp->arg_index == ARG_NONE)) - abort (); - augmented_length = xsum (length, 1); - ENSURE_ALLOCATION (augmented_length); - result[length] = '%'; - length = augmented_length; - } - else - { - if (!(dp->arg_index != ARG_NONE)) - abort (); - - if (dp->conversion == 'n') - { - switch (a.arg[dp->arg_index].type) - { - case TYPE_COUNT_SCHAR_POINTER: - *a.arg[dp->arg_index].a.a_count_schar_pointer = length; - break; - case TYPE_COUNT_SHORT_POINTER: - *a.arg[dp->arg_index].a.a_count_short_pointer = length; - break; - case TYPE_COUNT_INT_POINTER: - *a.arg[dp->arg_index].a.a_count_int_pointer = length; - break; - case TYPE_COUNT_LONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longint_pointer = length; - break; -#if HAVE_LONG_LONG_INT - case TYPE_COUNT_LONGLONGINT_POINTER: - *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length; - break; -#endif - default: - abort (); - } - } -#if ENABLE_UNISTDIO - /* The unistdio extensions. */ - else if (dp->conversion == 'U') - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - switch (type) - { - case TYPE_U8_STRING: - { - const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string; - const uint8_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u8_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u8_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT8_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-8 to locale encoding. */ - converted = - u8_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-8 to UTF-16/UTF-32. */ - converted = - U8_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U16_STRING: - { - const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string; - const uint16_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u16_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u16_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT16_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-16 to locale encoding. */ - converted = - u16_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-16 to UTF-8/UTF-32. */ - converted = - U16_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - case TYPE_U32_STRING: - { - const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string; - const uint32_t *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only PRECISION characters, from the left. */ - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of - characters. */ - arg_end = arg; - characters = 0; - for (;;) - { - int count = u32_strmblen (arg_end); - if (count == 0) - break; - if (count < 0) - { - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + u32_strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_UINT32_T - { - size_t n = arg_end - arg; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_CPY (result + length, arg, n); - length += n; - } -# else - { /* Convert. */ - DCHAR_T *converted = result + length; - size_t converted_len = allocated - length; -# if DCHAR_IS_TCHAR - /* Convert from UTF-32 to locale encoding. */ - converted = - u32_conv_to_encoding (locale_charset (), - iconveh_question_mark, - arg, arg_end - arg, NULL, - converted, &converted_len); -# else - /* Convert from UTF-32 to UTF-8/UTF-16. */ - converted = - U32_TO_DCHAR (arg, arg_end - arg, - converted, &converted_len); -# endif - if (converted == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - if (converted != result + length) - { - ENSURE_ALLOCATION (xsum (length, converted_len)); - DCHAR_CPY (result + length, converted, converted_len); - free (converted); - } - length += converted_len; - } -# endif - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } - break; - - default: - abort (); - } - } -#endif -#if (!USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T - else if (dp->conversion == 's' -# if WIDE_CHAR_VERSION - && a.arg[dp->arg_index].type != TYPE_WIDE_STRING -# else - && a.arg[dp->arg_index].type == TYPE_WIDE_STRING -# endif - ) - { - /* The normal handling of the 's' directive below requires - allocating a temporary buffer. The determination of its - length (tmp_length), in the case when a precision is - specified, below requires a conversion between a char[] - string and a wchar_t[] wide string. It could be done, but - we have no guarantee that the implementation of sprintf will - use the exactly same algorithm. Without this guarantee, it - is possible to have buffer overrun bugs. In order to avoid - such bugs, we implement the entire processing of the 's' - directive ourselves. */ - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - -# if WIDE_CHAR_VERSION - /* %s in vasnwprintf. See the specification of fwprintf. */ - { - const char *arg = a.arg[dp->arg_index].a.a_string; - const char *arg_end; - size_t characters; - - if (has_precision) - { - /* Use only as many bytes as needed to produce PRECISION - wide characters, from the left. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (; precision > 0; precision--) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else if (has_width) - { - /* Use the entire string, and count the number of wide - characters. */ -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - int count; -# if HAVE_MBRTOWC - count = mbrlen (arg_end, MB_CUR_MAX, &state); -# else - count = mblen (arg_end, MB_CUR_MAX); -# endif - if (count == 0) - /* Found the terminating NUL. */ - break; - if (count < 0) - { - /* Invalid or incomplete multibyte character. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end += count; - characters++; - } - } - else - { - /* Use the entire string. */ - arg_end = arg + strlen (arg); - /* The number of characters doesn't matter. */ - characters = 0; - } - - if (has_width && width > characters - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - - if (has_precision || has_width) - { - /* We know the number of wide characters in advance. */ - size_t remaining; -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; remaining--) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - result[length++] = wc; - arg += count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_MBRTOWC - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - wchar_t wc; - int count; -# if HAVE_MBRTOWC - count = mbrtowc (&wc, arg, arg_end - arg, &state); -# else - count = mbtowc (&wc, arg, arg_end - arg); -# endif - if (count <= 0) - /* mbrtowc not consistent with mbrlen, or mbtowc - not consistent with mblen. */ - abort (); - ENSURE_ALLOCATION (xsum (length, 1)); - result[length++] = wc; - arg += count; - } - } - - if (has_width && width > characters - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - characters; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# else - /* %ls in vasnprintf. See the specification of fprintf. */ - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - const wchar_t *arg_end; - size_t characters; -# if !DCHAR_IS_TCHAR - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); - TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; -# endif - size_t w; - - if (has_precision) - { - /* Use only as many wide characters as needed to produce - at most PRECISION bytes, from the left. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - while (precision > 0) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - if (precision < count) - break; - arg_end++; - characters += count; - precision -= count; - } - } -# if DCHAR_IS_TCHAR - else if (has_width) -# else - else -# endif - { - /* Use the entire string, and count the number of - bytes. */ -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - arg_end = arg; - characters = 0; - for (;;) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg_end == 0) - /* Found the terminating null wide character. */ - break; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg_end, &state); -# else - count = wctomb (cbuf, *arg_end); -# endif - if (count < 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - arg_end++; - characters += count; - } - } -# if DCHAR_IS_TCHAR - else - { - /* Use the entire string. */ - arg_end = arg + local_wcslen (arg); - /* The number of bytes doesn't matter. */ - characters = 0; - } -# endif - -# if !DCHAR_IS_TCHAR - /* Convert the string into a piece of temporary memory. */ - tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T)); - if (tmpsrc == NULL) - goto out_of_memory; - { - TCHAR_T *tmpptr = tmpsrc; - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (tmpptr, cbuf, count); - tmpptr += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, characters, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - free (tmpsrc); - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - free (tmpsrc); -# endif - - if (has_width) - { -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, characters); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = characters; -# endif - } - else - /* w doesn't matter. */ - w = 0; - - if (has_width && width > w - && !(dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - -# if DCHAR_IS_TCHAR - if (has_precision || has_width) - { - /* We know the number of bytes in advance. */ - size_t remaining; -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - ENSURE_ALLOCATION (xsum (length, characters)); - for (remaining = characters; remaining > 0; ) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - /* Inconsistency. */ - abort (); - memcpy (result + length, cbuf, count); - length += count; - arg++; - remaining -= count; - } - if (!(arg == arg_end)) - abort (); - } - else - { -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - mbstate_t state; - memset (&state, '\0', sizeof (mbstate_t)); -# endif - while (arg < arg_end) - { - char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */ - int count; - - if (*arg == 0) - abort (); -# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t - count = wcrtomb (cbuf, *arg, &state); -# else - count = wctomb (cbuf, *arg); -# endif - if (count <= 0) - { - /* Cannot convert. */ - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EILSEQ; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, count)); - memcpy (result + length, cbuf, count); - length += count; - arg++; - } - } -# else - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - length += tmpdst_len; -# endif - - if (has_width && width > w - && (dp->flags & FLAG_LEFT)) - { - size_t n = width - w; - ENSURE_ALLOCATION (xsum (length, n)); - DCHAR_SET (result + length, ' ', n); - length += n; - } - } -# endif - } -#endif -#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'a' || dp->conversion == 'A') -# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE)) - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# endif - ) -# endif - ) - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* Allocate a temporary buffer of sufficient size. */ - if (type == TYPE_LONGDOUBLE) - tmp_length = - (unsigned int) ((LDBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - else - tmp_length = - (unsigned int) ((DBL_DIG + 1) - * 0.831 /* decimal -> hexadecimal */ - ) - + 1; /* turn floor into ceil */ - if (tmp_length < precision) - tmp_length = precision; - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - if (type == TYPE_LONGDOUBLE) - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - long double mantissa; - - if (arg > 0.0L) - mantissa = printf_frexpl (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0L; - } - - if (has_precision - && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - long double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5L : tail > 0.5L) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0L; - } - if (tail != 0.0L) - for (q = precision; q > 0; q--) - tail *= 0.0625L; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0L || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0L) - { - mantissa *= 16.0L; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } -# else - abort (); -# endif - } - else - { -# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion == 'A') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion == 'A') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { - int exponent; - double mantissa; - - if (arg > 0.0) - mantissa = printf_frexp (arg, &exponent); - else - { - exponent = 0; - mantissa = 0.0; - } - - if (has_precision - && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1) - { - /* Round the mantissa. */ - double tail = mantissa; - size_t q; - - for (q = precision; ; q--) - { - int digit = (int) tail; - tail -= digit; - if (q == 0) - { - if (digit & 1 ? tail >= 0.5 : tail > 0.5) - tail = 1 - tail; - else - tail = - tail; - break; - } - tail *= 16.0; - } - if (tail != 0.0) - for (q = precision; q > 0; q--) - tail *= 0.0625; - mantissa += tail; - } - - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - { - int digit; - - digit = (int) mantissa; - mantissa -= digit; - *p++ = '0' + digit; - if ((flags & FLAG_ALT) - || mantissa > 0.0 || precision > 0) - { - *p++ = decimal_point_char (); - /* This loop terminates because we assume - that FLT_RADIX is a power of 2. */ - while (mantissa > 0.0) - { - mantissa *= 16.0; - digit = (int) mantissa; - mantissa -= digit; - *p++ = digit - + (digit < 10 - ? '0' - : dp->conversion - 10); - if (precision > 0) - precision--; - } - while (precision > 0) - { - *p++ = '0'; - precision--; - } - } - } - *p++ = dp->conversion - 'A' + 'P'; -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - } -# else - abort (); -# endif - } - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif -#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL - else if ((dp->conversion == 'f' || dp->conversion == 'F' - || dp->conversion == 'e' || dp->conversion == 'E' - || dp->conversion == 'g' || dp->conversion == 'G' - || dp->conversion == 'a' || dp->conversion == 'A') - && (0 -# if NEED_PRINTF_DOUBLE - || a.arg[dp->arg_index].type == TYPE_DOUBLE -# elif NEED_PRINTF_INFINITE_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_DOUBLE - /* The systems (mingw) which produce wrong output - for Inf, -Inf, and NaN also do so for -0.0. - Therefore we treat this case here as well. */ - && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double)) -# endif -# if NEED_PRINTF_LONG_DOUBLE - || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE -# elif NEED_PRINTF_INFINITE_LONG_DOUBLE - || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE - /* Some systems produce wrong output for Inf, - -Inf, and NaN. Some systems in this category - (IRIX 5.3) also do so for -0.0. Therefore we - treat this case here as well. */ - && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble)) -# endif - )) - { -# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) - arg_type type = a.arg[dp->arg_index].type; -# endif - int flags = dp->flags; - int has_width; - size_t width; - int has_precision; - size_t precision; - size_t tmp_length; - DCHAR_T tmpbuf[700]; - DCHAR_T *tmp; - DCHAR_T *pad_ptr; - DCHAR_T *p; - - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } - - has_precision = 0; - precision = 0; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } - - /* POSIX specifies the default precision to be 6 for %f, %F, - %e, %E, but not for %g, %G. Implementations appear to use - the same default precision also for %g, %G. But for %a, %A, - the default precision is 0. */ - if (!has_precision) - if (!(dp->conversion == 'a' || dp->conversion == 'A')) - precision = 6; - - /* Allocate a temporary buffer of sufficient size. */ -# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1); -# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE - tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0); -# elif NEED_PRINTF_LONG_DOUBLE - tmp_length = LDBL_DIG + 1; -# elif NEED_PRINTF_DOUBLE - tmp_length = DBL_DIG + 1; -# else - tmp_length = 0; -# endif - if (tmp_length < precision) - tmp_length = precision; -# if NEED_PRINTF_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - if (!(isnanl (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10l (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif -# if NEED_PRINTF_DOUBLE -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE - if (type == TYPE_DOUBLE) -# endif - if (dp->conversion == 'f' || dp->conversion == 'F') - { - double arg = a.arg[dp->arg_index].a.a_double; - if (!(isnand (arg) || arg + arg == arg)) - { - /* arg is finite and nonzero. */ - int exponent = floorlog10 (arg < 0 ? -arg : arg); - if (exponent >= 0 && tmp_length < exponent + precision) - tmp_length = exponent + precision; - } - } -# endif - /* Account for sign, decimal point etc. */ - tmp_length = xsum (tmp_length, 12); - - if (tmp_length < width) - tmp_length = width; - - tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */ - - if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (DCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } - - pad_ptr = NULL; - p = tmp; - -# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - if (type == TYPE_LONGDOUBLE) -# endif - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - - if (isnanl (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - DECL_LONG_DOUBLE_ROUNDING - - BEGIN_LONG_DOUBLE_ROUNDING (); - - if (signbit (arg)) /* arg < 0.0L or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0L && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_LONG_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_long_double (arg, precision); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0L) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0L. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)precision - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0L) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0L. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10l (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - { - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_long_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - END_LONG_DOUBLE_ROUNDING (); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - { '%', '+', '.', '2', 'd', '\0' }; - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, "%+.2d", exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, "%+.2d", exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0L)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else if (dp->conversion == 'a' || dp->conversion == 'A') - { - *p++ = '0'; - *p++ = dp->conversion - 'A' + 'X'; - pad_ptr = p; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion - 'A' + 'P'; - *p++ = '+'; - *p++ = '0'; - } - else - abort (); -# endif - } - - END_LONG_DOUBLE_ROUNDING (); - } - } -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - else -# endif -# endif -# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE - { - double arg = a.arg[dp->arg_index].a.a_double; - - if (isnand (arg)) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'N'; *p++ = 'A'; *p++ = 'N'; - } - else - { - *p++ = 'n'; *p++ = 'a'; *p++ = 'n'; - } - } - else - { - int sign = 0; - - if (signbit (arg)) /* arg < 0.0 or negative zero */ - { - sign = -1; - arg = -arg; - } - - if (sign < 0) - *p++ = '-'; - else if (flags & FLAG_SHOWSIGN) - *p++ = '+'; - else if (flags & FLAG_SPACE) - *p++ = ' '; - - if (arg > 0.0 && arg + arg == arg) - { - if (dp->conversion >= 'A' && dp->conversion <= 'Z') - { - *p++ = 'I'; *p++ = 'N'; *p++ = 'F'; - } - else - { - *p++ = 'i'; *p++ = 'n'; *p++ = 'f'; - } - } - else - { -# if NEED_PRINTF_DOUBLE - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - char *digits; - size_t ndigits; - - digits = - scale10_round_decimal_double (arg, precision); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits > precision) - do - { - --ndigits; - *p++ = digits[ndigits]; - } - while (ndigits > precision); - else - *p++ = '0'; - /* Here ndigits <= precision. */ - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > ndigits; precision--) - *p++ = '0'; - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - int exponent; - - if (arg == 0.0) - { - exponent = 0; - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else - { - /* arg > 0.0. */ - int adjusted; - char *digits; - size_t ndigits; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)precision - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision + 1) - break; - if (ndigits < precision - || ndigits > precision + 2) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits == precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision+1. */ - if (is_borderline (digits, precision)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)precision - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision + 1) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision+1. */ - - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - while (ndigits > 0) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - - free (digits); - } - - *p++ = dp->conversion; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - if (precision == 0) - precision = 1; - /* precision >= 1. */ - - if (arg == 0.0) - /* The exponent is 0, >= -4, < precision. - Use fixed-point notation. */ - { - size_t ndigits = precision; - /* Number of trailing zeroes that have to be - dropped. */ - size_t nzeroes = - (flags & FLAG_ALT ? 0 : precision - 1); - - --ndigits; - *p++ = '0'; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = '0'; - } - } - } - else - { - /* arg > 0.0. */ - int exponent; - int adjusted; - char *digits; - size_t ndigits; - size_t nzeroes; - - exponent = floorlog10 (arg); - adjusted = 0; - for (;;) - { - digits = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent); - if (digits == NULL) - goto out_of_memory; - ndigits = strlen (digits); - - if (ndigits == precision) - break; - if (ndigits < precision - 1 - || ndigits > precision + 1) - /* The exponent was not guessed - precisely enough. */ - abort (); - if (adjusted) - /* None of two values of exponent is - the right one. Prevent an endless - loop. */ - abort (); - free (digits); - if (ndigits < precision) - exponent -= 1; - else - exponent += 1; - adjusted = 1; - } - /* Here ndigits = precision. */ - if (is_borderline (digits, precision - 1)) - { - /* Maybe the exponent guess was too high - and a smaller exponent can be reached - by turning a 10...0 into 9...9x. */ - char *digits2 = - scale10_round_decimal_double (arg, - (int)(precision - 1) - exponent + 1); - if (digits2 == NULL) - { - free (digits); - goto out_of_memory; - } - if (strlen (digits2) == precision) - { - free (digits); - digits = digits2; - exponent -= 1; - } - else - free (digits2); - } - /* Here ndigits = precision. */ - - /* Determine the number of trailing zeroes - that have to be dropped. */ - nzeroes = 0; - if ((flags & FLAG_ALT) == 0) - while (nzeroes < ndigits - && digits[nzeroes] == '0') - nzeroes++; - - /* The exponent is now determined. */ - if (exponent >= -4 - && exponent < (long)precision) - { - /* Fixed-point notation: - max(exponent,0)+1 digits, then the - decimal point, then the remaining - digits without trailing zeroes. */ - if (exponent >= 0) - { - size_t count = exponent + 1; - /* Note: count <= precision = ndigits. */ - for (; count > 0; count--) - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - size_t count = -exponent - 1; - *p++ = '0'; - *p++ = decimal_point_char (); - for (; count > 0; count--) - *p++ = '0'; - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - } - else - { - /* Exponential notation. */ - *p++ = digits[--ndigits]; - if ((flags & FLAG_ALT) || ndigits > nzeroes) - { - *p++ = decimal_point_char (); - while (ndigits > nzeroes) - { - --ndigits; - *p++ = digits[ndigits]; - } - } - *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */ -# if WIDE_CHAR_VERSION - { - static const wchar_t decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - { '%', '+', '.', '3', 'd', '\0' }; -# else - { '%', '+', '.', '2', 'd', '\0' }; -# endif - SNPRINTF (p, 6 + 1, decimal_format, exponent); - } - while (*p != '\0') - p++; -# else - { - static const char decimal_format[] = - /* Produce the same number of exponent digits - as the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - "%+.3d"; -# else - "%+.2d"; -# endif - if (sizeof (DCHAR_T) == 1) - { - sprintf ((char *) p, decimal_format, exponent); - while (*p != '\0') - p++; - } - else - { - char expbuf[6 + 1]; - const char *ep; - sprintf (expbuf, decimal_format, exponent); - for (ep = expbuf; (*p = *ep) != '\0'; ep++) - p++; - } - } -# endif - } - - free (digits); - } - } - else - abort (); -# else - /* arg is finite. */ - if (!(arg == 0.0)) - abort (); - - pad_ptr = p; - - if (dp->conversion == 'f' || dp->conversion == 'F') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - } - else if (dp->conversion == 'e' || dp->conversion == 'E') - { - *p++ = '0'; - if ((flags & FLAG_ALT) || precision > 0) - { - *p++ = decimal_point_char (); - for (; precision > 0; precision--) - *p++ = '0'; - } - *p++ = dp->conversion; /* 'e' or 'E' */ - *p++ = '+'; - /* Produce the same number of exponent digits as - the native printf implementation. */ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *p++ = '0'; -# endif - *p++ = '0'; - *p++ = '0'; - } - else if (dp->conversion == 'g' || dp->conversion == 'G') - { - *p++ = '0'; - if (flags & FLAG_ALT) - { - size_t ndigits = - (precision > 0 ? precision - 1 : 0); - *p++ = decimal_point_char (); - for (; ndigits > 0; --ndigits) - *p++ = '0'; - } - } - else - abort (); -# endif - } - } - } -# endif - - /* The generated string now extends from tmp to p, with the - zero padding insertion point being at pad_ptr. */ - if (has_width && p - tmp < width) - { - size_t pad = width - (p - tmp); - DCHAR_T *end = p + pad; - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > tmp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - - p = end; - } - - { - size_t count = p - tmp; - - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); - - /* Make room for the result. */ - if (count >= allocated - length) - { - size_t n = xsum (length, count); - - ENSURE_ALLOCATION (n); - } - - /* Append the result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); - if (tmp != tmpbuf) - free (tmp); - length += count; - } - } -#endif - else - { - arg_type type = a.arg[dp->arg_index].type; - int flags = dp->flags; -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int has_width; - size_t width; -#endif -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - int has_precision; - size_t precision; -#endif -#if NEED_PRINTF_UNBOUNDED_PRECISION - int prec_ourselves; -#else -# define prec_ourselves 0 -#endif -#if NEED_PRINTF_FLAG_LEFTADJUST -# define pad_ourselves 1 -#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - int pad_ourselves; -#else -# define pad_ourselves 0 -#endif - TCHAR_T *fbp; - unsigned int prefix_count; - int prefixes[2] IF_LINT (= { 0 }); - int orig_errno; -#if !USE_SNPRINTF - size_t tmp_length; - TCHAR_T tmpbuf[700]; - TCHAR_T *tmp; -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - has_width = 0; - width = 0; - if (dp->width_start != dp->width_end) - { - if (dp->width_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->width_arg_index].a.a_int; - if (arg < 0) - { - /* "A negative field width is taken as a '-' flag - followed by a positive field width." */ - flags |= FLAG_LEFT; - width = (unsigned int) (-arg); - } - else - width = arg; - } - else - { - const FCHAR_T *digitp = dp->width_start; - - do - width = xsum (xtimes (width, 10), *digitp++ - '0'); - while (digitp != dp->width_end); - } - has_width = 1; - } -#endif - -#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDED_PRECISION - has_precision = 0; - precision = 6; - if (dp->precision_start != dp->precision_end) - { - if (dp->precision_arg_index != ARG_NONE) - { - int arg; - - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - arg = a.arg[dp->precision_arg_index].a.a_int; - /* "A negative precision is taken as if the precision - were omitted." */ - if (arg >= 0) - { - precision = arg; - has_precision = 1; - } - } - else - { - const FCHAR_T *digitp = dp->precision_start + 1; - - precision = 0; - while (digitp != dp->precision_end) - precision = xsum (xtimes (precision, 10), *digitp++ - '0'); - has_precision = 1; - } - } -#endif - - /* Decide whether to handle the precision ourselves. */ -#if NEED_PRINTF_UNBOUNDED_PRECISION - switch (dp->conversion) - { - case 'd': case 'i': case 'u': - case 'o': - case 'x': case 'X': case 'p': - prec_ourselves = has_precision && (precision > 0); - break; - default: - prec_ourselves = 0; - break; - } -#endif - - /* Decide whether to perform the padding ourselves. */ -#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION) - switch (dp->conversion) - { -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need - to perform the padding after this conversion. Functions - with unistdio extensions perform the padding based on - character count rather than element count. */ - case 'c': case 's': -# endif -# if NEED_PRINTF_FLAG_ZERO - case 'f': case 'F': case 'e': case 'E': case 'g': case 'G': - case 'a': case 'A': -# endif - pad_ourselves = 1; - break; - default: - pad_ourselves = prec_ourselves; - break; - } -#endif - -#if !USE_SNPRINTF - /* Allocate a temporary buffer of sufficient size for calling - sprintf. */ - tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, dp->conversion, type, - flags, width, has_precision, precision, - pad_ourselves); - - if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T)) - tmp = tmpbuf; - else - { - size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T)); - - if (size_overflow_p (tmp_memsize)) - /* Overflow, would lead to out of memory. */ - goto out_of_memory; - tmp = (TCHAR_T *) malloc (tmp_memsize); - if (tmp == NULL) - /* Out of memory. */ - goto out_of_memory; - } -#endif - - /* Construct the format string for calling snprintf or - sprintf. */ - fbp = buf; - *fbp++ = '%'; -#if NEED_PRINTF_FLAG_GROUPING - /* The underlying implementation doesn't support the ' flag. - Produce no grouping characters in this case; this is - acceptable because the grouping is locale dependent. */ -#else - if (flags & FLAG_GROUP) - *fbp++ = '\''; -#endif - if (flags & FLAG_LEFT) - *fbp++ = '-'; - if (flags & FLAG_SHOWSIGN) - *fbp++ = '+'; - if (flags & FLAG_SPACE) - *fbp++ = ' '; - if (flags & FLAG_ALT) - *fbp++ = '#'; -#if __GLIBC__ >= 2 && !defined __UCLIBC__ - if (flags & FLAG_LOCALIZED) - *fbp++ = 'I'; -#endif - if (!pad_ourselves) - { - if (flags & FLAG_ZERO) - *fbp++ = '0'; - if (dp->width_start != dp->width_end) - { - size_t n = dp->width_end - dp->width_start; - /* The width specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->width_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - if (!prec_ourselves) - { - if (dp->precision_start != dp->precision_end) - { - size_t n = dp->precision_end - dp->precision_start; - /* The precision specification is known to consist only - of standard ASCII characters. */ - if (sizeof (FCHAR_T) == sizeof (TCHAR_T)) - { - memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T)); - fbp += n; - } - else - { - const FCHAR_T *mp = dp->precision_start; - do - *fbp++ = (unsigned char) *mp++; - while (--n > 0); - } - } - } - - switch (type) - { -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - case TYPE_ULONGLONGINT: -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - *fbp++ = 'I'; - *fbp++ = '6'; - *fbp++ = '4'; - break; -# else - *fbp++ = 'l'; - /*FALLTHROUGH*/ -# endif -#endif - case TYPE_LONGINT: - case TYPE_ULONGINT: -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: -#endif -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: -#endif - *fbp++ = 'l'; - break; - case TYPE_LONGDOUBLE: - *fbp++ = 'L'; - break; - default: - break; - } -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - *fbp = 'f'; - else -#endif - *fbp = dp->conversion; -#if USE_SNPRINTF -# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) - fbp[1] = '%'; - fbp[2] = 'n'; - fbp[3] = '\0'; -# else - /* On glibc2 systems from glibc >= 2.3 - probably also older - ones - we know that snprintf's return value conforms to - ISO C 99: the tests gl_SNPRINTF_RETVAL_C99 and - gl_SNPRINTF_TRUNCATION_C99 pass. - Therefore we can avoid using %n in this situation. - On glibc2 systems from 2004-10-18 or newer, the use of %n - in format strings in writable memory may crash the program - (if compiled with _FORTIFY_SOURCE=2), so we should avoid it - in this situation. */ - /* On native Windows systems (such as mingw), we can avoid using - %n because: - - Although the gl_SNPRINTF_TRUNCATION_C99 test fails, - snprintf does not write more than the specified number - of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes - '4', '5', '6' into buf, not '4', '5', '\0'.) - - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf - allows us to recognize the case of an insufficient - buffer size: it returns -1 in this case. - On native Windows systems (such as mingw) where the OS is - Windows Vista, the use of %n in format strings by default - crashes the program. See - and - - So we should avoid %n in this situation. */ - fbp[1] = '\0'; -# endif -#else - fbp[1] = '\0'; -#endif - - /* Construct the arguments for calling snprintf or sprintf. */ - prefix_count = 0; - if (!pad_ourselves && dp->width_arg_index != ARG_NONE) - { - if (!(a.arg[dp->width_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int; - } - if (!prec_ourselves && dp->precision_arg_index != ARG_NONE) - { - if (!(a.arg[dp->precision_arg_index].type == TYPE_INT)) - abort (); - prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int; - } - -#if USE_SNPRINTF - /* The SNPRINTF result is appended after result[0..length]. - The latter is an array of DCHAR_T; SNPRINTF appends an - array of TCHAR_T to it. This is possible because - sizeof (TCHAR_T) divides sizeof (DCHAR_T) and - alignof (TCHAR_T) <= alignof (DCHAR_T). */ -# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T)) - /* Ensure that maxlen below will be >= 2. Needed on BeOS, - where an snprintf() with maxlen==1 acts like sprintf(). */ - ENSURE_ALLOCATION (xsum (length, - (2 + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR)); - /* Prepare checking whether snprintf returns the count - via %n. */ - *(TCHAR_T *) (result + length) = '\0'; -#endif - - orig_errno = errno; - - for (;;) - { - int count = -1; - -#if USE_SNPRINTF - int retcount = 0; - size_t maxlen = allocated - length; - /* SNPRINTF can fail if its second argument is - > INT_MAX. */ - if (maxlen > INT_MAX / TCHARS_PER_DCHAR) - maxlen = INT_MAX / TCHARS_PER_DCHAR; - maxlen = maxlen * TCHARS_PER_DCHAR; -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - arg, &count); \ - break; \ - case 1: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], arg, &count); \ - break; \ - case 2: \ - retcount = SNPRINTF ((TCHAR_T *) (result + length), \ - maxlen, buf, \ - prefixes[0], prefixes[1], arg, \ - &count); \ - break; \ - default: \ - abort (); \ - } -#else -# define SNPRINTF_BUF(arg) \ - switch (prefix_count) \ - { \ - case 0: \ - count = sprintf (tmp, buf, arg); \ - break; \ - case 1: \ - count = sprintf (tmp, buf, prefixes[0], arg); \ - break; \ - case 2: \ - count = sprintf (tmp, buf, prefixes[0], prefixes[1],\ - arg); \ - break; \ - default: \ - abort (); \ - } -#endif - - errno = 0; - switch (type) - { - case TYPE_SCHAR: - { - int arg = a.arg[dp->arg_index].a.a_schar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UCHAR: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uchar; - SNPRINTF_BUF (arg); - } - break; - case TYPE_SHORT: - { - int arg = a.arg[dp->arg_index].a.a_short; - SNPRINTF_BUF (arg); - } - break; - case TYPE_USHORT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_ushort; - SNPRINTF_BUF (arg); - } - break; - case TYPE_INT: - { - int arg = a.arg[dp->arg_index].a.a_int; - SNPRINTF_BUF (arg); - } - break; - case TYPE_UINT: - { - unsigned int arg = a.arg[dp->arg_index].a.a_uint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGINT: - { - long int arg = a.arg[dp->arg_index].a.a_longint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGINT: - { - unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_LONG_LONG_INT - case TYPE_LONGLONGINT: - { - long long int arg = a.arg[dp->arg_index].a.a_longlongint; - SNPRINTF_BUF (arg); - } - break; - case TYPE_ULONGLONGINT: - { - unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_DOUBLE: - { - double arg = a.arg[dp->arg_index].a.a_double; - SNPRINTF_BUF (arg); - } - break; - case TYPE_LONGDOUBLE: - { - long double arg = a.arg[dp->arg_index].a.a_longdouble; - SNPRINTF_BUF (arg); - } - break; - case TYPE_CHAR: - { - int arg = a.arg[dp->arg_index].a.a_char; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WINT_T - case TYPE_WIDE_CHAR: - { - wint_t arg = a.arg[dp->arg_index].a.a_wide_char; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_STRING: - { - const char *arg = a.arg[dp->arg_index].a.a_string; - SNPRINTF_BUF (arg); - } - break; -#if HAVE_WCHAR_T - case TYPE_WIDE_STRING: - { - const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string; - SNPRINTF_BUF (arg); - } - break; -#endif - case TYPE_POINTER: - { - void *arg = a.arg[dp->arg_index].a.a_pointer; - SNPRINTF_BUF (arg); - } - break; - default: - abort (); - } - -#if USE_SNPRINTF - /* Portability: Not all implementations of snprintf() - are ISO C 99 compliant. Determine the number of - bytes that snprintf() has produced or would have - produced. */ - if (count >= 0) - { - /* Verify that snprintf() has NUL-terminated its - result. */ - if (count < maxlen - && ((TCHAR_T *) (result + length)) [count] != '\0') - abort (); - /* Portability hack. */ - if (retcount > count) - count = retcount; - } - else - { - /* snprintf() doesn't understand the '%n' - directive. */ - if (fbp[1] != '\0') - { - /* Don't use the '%n' directive; instead, look - at the snprintf() return value. */ - fbp[1] = '\0'; - continue; - } - else - { - /* Look at the snprintf() return value. */ - if (retcount < 0) - { -# if !HAVE_SNPRINTF_RETVAL_C99 - /* HP-UX 10.20 snprintf() is doubly deficient: - It doesn't understand the '%n' directive, - *and* it returns -1 (rather than the length - that would have been required) when the - buffer is too small. - But a failure at this point can also come - from other reasons than a too small buffer, - such as an invalid wide string argument to - the %ls directive, or possibly an invalid - floating-point argument. */ - size_t tmp_length = - MAX_ROOM_NEEDED (&a, dp->arg_index, - dp->conversion, type, flags, - width, has_precision, - precision, pad_ourselves); - - if (maxlen < tmp_length) - { - /* Make more room. But try to do through - this reallocation only once. */ - size_t bigger_need = - xsum (length, - xsum (tmp_length, - TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - /* And always grow proportionally. - (There may be several arguments, each - needing a little more room than the - previous one.) */ - size_t bigger_need2 = - xsum (xtimes (allocated, 2), 12); - if (bigger_need < bigger_need2) - bigger_need = bigger_need2; - ENSURE_ALLOCATION (bigger_need); - continue; - } -# endif - } - else - count = retcount; - } - } -#endif - - /* Attempt to handle failure. */ - if (count < 0) - { - /* SNPRINTF or sprintf failed. Save and use the errno - that it has set, if any. */ - int saved_errno = errno; - - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = - (saved_errno != 0 - ? saved_errno - : (dp->conversion == 'c' || dp->conversion == 's' - ? EILSEQ - : EINVAL)); - return NULL; - } - -#if USE_SNPRINTF - /* Handle overflow of the allocated buffer. - If such an overflow occurs, a C99 compliant snprintf() - returns a count >= maxlen. However, a non-compliant - snprintf() function returns only count = maxlen - 1. To - cover both cases, test whether count >= maxlen - 1. */ - if ((unsigned int) count + 1 >= maxlen) - { - /* If maxlen already has attained its allowed maximum, - allocating more memory will not increase maxlen. - Instead of looping, bail out. */ - if (maxlen == INT_MAX / TCHARS_PER_DCHAR) - goto overflow; - else - { - /* Need at least (count + 1) * sizeof (TCHAR_T) - bytes. (The +1 is for the trailing NUL.) - But ask for (count + 2) * sizeof (TCHAR_T) - bytes, so that in the next round, we likely get - maxlen > (unsigned int) count + 1 - and so we don't get here again. - And allocate proportionally, to avoid looping - eternally if snprintf() reports a too small - count. */ - size_t n = - xmax (xsum (length, - ((unsigned int) count + 2 - + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR), - xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - continue; - } - } -#endif - -#if NEED_PRINTF_UNBOUNDED_PRECISION - if (prec_ourselves) - { - /* Handle the precision. */ - TCHAR_T *prec_ptr = -# if USE_SNPRINTF - (TCHAR_T *) (result + length); -# else - tmp; -# endif - size_t prefix_count; - size_t move; - - prefix_count = 0; - /* Put the additional zeroes after the sign. */ - if (count >= 1 - && (*prec_ptr == '-' || *prec_ptr == '+' - || *prec_ptr == ' ')) - prefix_count = 1; - /* Put the additional zeroes after the 0x prefix if - (flags & FLAG_ALT) || (dp->conversion == 'p'). */ - else if (count >= 2 - && prec_ptr[0] == '0' - && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X')) - prefix_count = 2; - - move = count - prefix_count; - if (precision > move) - { - /* Insert zeroes. */ - size_t insert = precision - move; - TCHAR_T *prec_end; - -# if USE_SNPRINTF - size_t n = - xsum (length, - (count + insert + TCHARS_PER_DCHAR - 1) - / TCHARS_PER_DCHAR); - length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - ENSURE_ALLOCATION (n); - length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR; - prec_ptr = (TCHAR_T *) (result + length); -# endif - - prec_end = prec_ptr + count; - prec_ptr += prefix_count; - - while (prec_end > prec_ptr) - { - prec_end--; - prec_end[insert] = prec_end[0]; - } - - prec_end += insert; - do - *--prec_end = '0'; - while (prec_end > prec_ptr); - - count += insert; - } - } -#endif - -#if !USE_SNPRINTF - if (count >= tmp_length) - /* tmp_length was incorrectly calculated - fix the - code above! */ - abort (); -#endif - -#if !DCHAR_IS_TCHAR - /* Convert from TCHAR_T[] to DCHAR_T[]. */ - if (dp->conversion == 'c' || dp->conversion == 's') - { - /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING - TYPE_WIDE_STRING. - The result string is not certainly ASCII. */ - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t tmpdst_len; - /* This code assumes that TCHAR_T is 'char'. */ - verify (sizeof (TCHAR_T) == 1); -# if USE_SNPRINTF - tmpsrc = (TCHAR_T *) (result + length); -# else - tmpsrc = tmp; -# endif - tmpdst = - DCHAR_CONV_FROM_ENCODING (locale_charset (), - iconveh_question_mark, - tmpsrc, count, - NULL, - NULL, &tmpdst_len); - if (tmpdst == NULL) - { - int saved_errno = errno; - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = saved_errno; - return NULL; - } - ENSURE_ALLOCATION (xsum (length, tmpdst_len)); - DCHAR_CPY (result + length, tmpdst, tmpdst_len); - free (tmpdst); - count = tmpdst_len; - } - else - { - /* The result string is ASCII. - Simple 1:1 conversion. */ -# if USE_SNPRINTF - /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a - no-op conversion, in-place on the array starting - at (result + length). */ - if (sizeof (DCHAR_T) != sizeof (TCHAR_T)) -# endif - { - const TCHAR_T *tmpsrc; - DCHAR_T *tmpdst; - size_t n; - -# if USE_SNPRINTF - if (result == resultbuf) - { - tmpsrc = (TCHAR_T *) (result + length); - /* ENSURE_ALLOCATION will not move tmpsrc - (because it's part of resultbuf). */ - ENSURE_ALLOCATION (xsum (length, count)); - } - else - { - /* ENSURE_ALLOCATION will move the array - (because it uses realloc(). */ - ENSURE_ALLOCATION (xsum (length, count)); - tmpsrc = (TCHAR_T *) (result + length); - } -# else - tmpsrc = tmp; - ENSURE_ALLOCATION (xsum (length, count)); -# endif - tmpdst = result + length; - /* Copy backwards, because of overlapping. */ - tmpsrc += count; - tmpdst += count; - for (n = count; n > 0; n--) - *--tmpdst = (unsigned char) *--tmpsrc; - } - } -#endif - -#if DCHAR_IS_TCHAR && !USE_SNPRINTF - /* Make room for the result. */ - if (count > allocated - length) - { - /* Need at least count elements. But allocate - proportionally. */ - size_t n = - xmax (xsum (length, count), xtimes (allocated, 2)); - - ENSURE_ALLOCATION (n); - } -#endif - - /* Here count <= allocated - length. */ - - /* Perform padding. */ -#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION - if (pad_ourselves && has_width) - { - size_t w; -# if ENABLE_UNISTDIO - /* Outside POSIX, it's preferable to compare the width - against the number of _characters_ of the converted - value. */ - w = DCHAR_MBSNLEN (result + length, count); -# else - /* The width is compared against the number of _bytes_ - of the converted value, says POSIX. */ - w = count; -# endif - if (w < width) - { - size_t pad = width - w; - - /* Make room for the result. */ - if (xsum (count, pad) > allocated - length) - { - /* Need at least count + pad elements. But - allocate proportionally. */ - size_t n = - xmax (xsum3 (length, count, pad), - xtimes (allocated, 2)); - -# if USE_SNPRINTF - length += count; - ENSURE_ALLOCATION (n); - length -= count; -# else - ENSURE_ALLOCATION (n); -# endif - } - /* Here count + pad <= allocated - length. */ - - { -# if !DCHAR_IS_TCHAR || USE_SNPRINTF - DCHAR_T * const rp = result + length; -# else - DCHAR_T * const rp = tmp; -# endif - DCHAR_T *p = rp + count; - DCHAR_T *end = p + pad; - DCHAR_T *pad_ptr; -# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO - if (dp->conversion == 'c' - || dp->conversion == 's') - /* No zero-padding for string directives. */ - pad_ptr = NULL; - else -# endif - { - pad_ptr = (*rp == '-' ? rp + 1 : rp); - /* No zero-padding of "inf" and "nan". */ - if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z') - || (*pad_ptr >= 'a' && *pad_ptr <= 'z')) - pad_ptr = NULL; - } - /* The generated string now extends from rp to p, - with the zero padding insertion point being at - pad_ptr. */ - - count = count + pad; /* = end - rp */ - - if (flags & FLAG_LEFT) - { - /* Pad with spaces on the right. */ - for (; pad > 0; pad--) - *p++ = ' '; - } - else if ((flags & FLAG_ZERO) && pad_ptr != NULL) - { - /* Pad with zeroes. */ - DCHAR_T *q = end; - - while (p > pad_ptr) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = '0'; - } - else - { - /* Pad with spaces on the left. */ - DCHAR_T *q = end; - - while (p > rp) - *--q = *--p; - for (; pad > 0; pad--) - *p++ = ' '; - } - } - } - } -#endif - - /* Here still count <= allocated - length. */ - -#if !DCHAR_IS_TCHAR || USE_SNPRINTF - /* The snprintf() result did fit. */ -#else - /* Append the sprintf() result. */ - memcpy (result + length, tmp, count * sizeof (DCHAR_T)); -#endif -#if !USE_SNPRINTF - if (tmp != tmpbuf) - free (tmp); -#endif - -#if NEED_PRINTF_DIRECTIVE_F - if (dp->conversion == 'F') - { - /* Convert the %f result to upper case for %F. */ - DCHAR_T *rp = result + length; - size_t rc; - for (rc = count; rc > 0; rc--, rp++) - if (*rp >= 'a' && *rp <= 'z') - *rp = *rp - 'a' + 'A'; - } -#endif - - length += count; - break; - } - errno = orig_errno; -#undef pad_ourselves -#undef prec_ourselves - } - } - } - - /* Add the final NUL. */ - ENSURE_ALLOCATION (xsum (length, 1)); - result[length] = '\0'; - - if (result != resultbuf && length + 1 < allocated) - { - /* Shrink the allocated memory if possible. */ - DCHAR_T *memory; - - memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T)); - if (memory != NULL) - result = memory; - } - - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - *lengthp = length; - /* Note that we can produce a big string of a length > INT_MAX. POSIX - says that snprintf() fails with errno = EOVERFLOW in this case, but - that's only because snprintf() returns an 'int'. This function does - not have this limitation. */ - return result; - -#if USE_SNPRINTF - overflow: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - CLEANUP (); - errno = EOVERFLOW; - return NULL; -#endif - - out_of_memory: - if (!(result == resultbuf || result == NULL)) - free (result); - if (buf_malloced != NULL) - free (buf_malloced); - out_of_memory_1: - CLEANUP (); - errno = ENOMEM; - return NULL; - } -} - -#undef MAX_ROOM_NEEDED -#undef TCHARS_PER_DCHAR -#undef SNPRINTF -#undef USE_SNPRINTF -#undef DCHAR_SET -#undef DCHAR_CPY -#undef PRINTF_PARSE -#undef DIRECTIVES -#undef DIRECTIVE -#undef DCHAR_IS_TCHAR -#undef TCHAR_T -#undef DCHAR_T -#undef FCHAR_T -#undef VASNPRINTF diff --git a/gnulib/lib/vasnprintf.h b/gnulib/lib/vasnprintf.h deleted file mode 100644 index f6cb1e4..0000000 --- a/gnulib/lib/vasnprintf.h +++ /dev/null @@ -1,79 +0,0 @@ -/* vsprintf with automatic memory allocation. - 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 - 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 . */ - -#ifndef _VASNPRINTF_H -#define _VASNPRINTF_H - -/* Get va_list. */ -#include - -/* Get size_t. */ -#include - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The __-protected variants of the attributes 'format' and 'printf' are - accepted by gcc versions 2.6.4 (effectively 2.7) and later. - We enable _GL_ATTRIBUTE_FORMAT only if these are supported too, because - gnulib and libintl do '#define printf __printf__' when they override - the 'printf' function. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec)) -#else -# define _GL_ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Write formatted output to a string dynamically allocated with malloc(). - You can pass a preallocated buffer for the result in RESULTBUF and its - size in *LENGTHP; otherwise you pass RESULTBUF = NULL. - If successful, return the address of the string (this may be = RESULTBUF - if no dynamic memory allocation was necessary) and set *LENGTHP to the - number of resulting bytes, excluding the trailing NUL. Upon error, set - errno and return NULL. - - When dynamic memory allocation occurs, the preallocated buffer is left - alone (with possibly modified contents). This makes it possible to use - a statically allocated or stack-allocated buffer, like this: - - char buf[100]; - size_t len = sizeof (buf); - char *output = vasnprintf (buf, &len, format, args); - if (output == NULL) - ... error handling ...; - else - { - ... use the output string ...; - if (output != buf) - free (output); - } - */ -#if REPLACE_VASNPRINTF -# define asnprintf rpl_asnprintf -# define vasnprintf rpl_vasnprintf -#endif -extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) - _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 4)); -extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args) - _GL_ATTRIBUTE_FORMAT ((__printf__, 3, 0)); - -#ifdef __cplusplus -} -#endif - -#endif /* _VASNPRINTF_H */ diff --git a/gnulib/lib/vasprintf.c b/gnulib/lib/vasprintf.c deleted file mode 100644 index 0ac17a6..0000000 --- a/gnulib/lib/vasprintf.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Formatted output to strings. - 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 - 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 . */ - -#include - -/* Specification. */ -#ifdef IN_LIBASPRINTF -# include "vasprintf.h" -#else -# include -#endif - -#include -#include -#include - -#include "vasnprintf.h" - -int -vasprintf (char **resultp, const char *format, va_list args) -{ - size_t length; - char *result = vasnprintf (NULL, &length, format, args); - if (result == NULL) - return -1; - - if (length > INT_MAX) - { - free (result); - errno = EOVERFLOW; - return -1; - } - - *resultp = result; - /* Return the number of resulting bytes, excluding the trailing NUL. */ - return length; -} diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h deleted file mode 100644 index f87a08c..0000000 --- a/gnulib/lib/verify.h +++ /dev/null @@ -1,241 +0,0 @@ -/* Compile-time assert-like macros. - - 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 - 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 . */ - -/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */ - -#ifndef _GL_VERIFY_H -# define _GL_VERIFY_H - - -/* Define _GL_HAVE__STATIC_ASSERT to 1 if _Static_assert works as per C11. - This is supported by GCC 4.6.0 and later, in C mode, and its use - here generates easier-to-read diagnostics when verify (R) fails. - - Define _GL_HAVE_STATIC_ASSERT to 1 if static_assert works as per C++11. - This will likely be supported by future GCC versions, in C++ mode. - - Use this only with GCC. If we were willing to slow 'configure' - down we could also use it with other compilers, but since this - affects only the quality of diagnostics, why bother? */ -# if (4 < __GNUC__ || (__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. - - If _Static_assert works, verify (R) uses it directly. Similarly, - _GL_VERIFY_TRUE works by packaging a _Static_assert inside a struct - that is an operand of sizeof. - - The code below uses several ideas for C++ compilers, and for C - compilers that do not support _Static_assert: - - * The first step is ((R) ? 1 : -1). Given an expression R, of - integral or boolean or floating-point type, this yields an - expression of integral type, whose value is later verified to be - constant and nonnegative. - - * Next this expression W is wrapped in a type - struct _gl_verify_type { - unsigned int _gl_verify_error_if_negative: W; - }. - If W is negative, this yields a compile-time error. No compiler can - deal with a bit-field of negative size. - - One might think that an array size check would have the same - effect, that is, that the type struct { unsigned int dummy[W]; } - would work as well. However, inside a function, some compilers - (such as C++ compilers and GNU C) allow local parameters and - variables inside array size expressions. With these compilers, - an array size check would not properly diagnose this misuse of - the verify macro: - - void function (int n) { verify (n < 0); } - - * For the verify macro, the struct _gl_verify_type will need to - somehow be embedded into a declaration. To be portable, this - declaration must declare an object, a constant, a function, or a - typedef name. If the declared entity uses the type directly, - such as in - - struct dummy {...}; - typedef struct {...} dummy; - extern struct {...} *dummy; - extern void dummy (struct {...} *); - extern struct {...} *dummy (void); - - two uses of the verify macro would yield colliding declarations - if the entity names are not disambiguated. A workaround is to - attach the current line number to the entity name: - - #define _GL_CONCAT0(x, y) x##y - #define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) - extern struct {...} * _GL_CONCAT (dummy, __LINE__); - - But this has the problem that two invocations of verify from - within the same macro would collide, since the __LINE__ value - would be the same for both invocations. (The GCC __COUNTER__ - macro solves this problem, but is not portable.) - - A solution is to use the sizeof operator. It yields a number, - getting rid of the identity of the type. Declarations like - - extern int dummy [sizeof (struct {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - - can be repeated. - - * Should the implementation use a named struct or an unnamed struct? - Which of the following alternatives can be used? - - extern int dummy [sizeof (struct {...})]; - extern int dummy [sizeof (struct _gl_verify_type {...})]; - extern void dummy (int [sizeof (struct {...})]); - extern void dummy (int [sizeof (struct _gl_verify_type {...})]); - extern int (*dummy (void)) [sizeof (struct {...})]; - extern int (*dummy (void)) [sizeof (struct _gl_verify_type {...})]; - - In the second and sixth case, the struct type is exported to the - outer scope; two such declarations therefore collide. GCC warns - about the first, third, and fourth cases. So the only remaining - possibility is the fifth case: - - extern int (*dummy (void)) [sizeof (struct {...})]; - - * GCC warns about duplicate declarations of the dummy function if - -Wredundant_decls is used. GCC 4.3 and later have a builtin - __COUNTER__ macro that can let us generate unique identifiers for - each dummy function, to suppress this warning. - - * This implementation exploits the fact that older versions of GCC, - which do not support _Static_assert, also do not warn about the - last declaration mentioned above. - - * In C++, any struct definition inside sizeof is invalid. - Use a template type to work around the problem. */ - -/* Concatenate two preprocessor tokens. */ -# define _GL_CONCAT(x, y) _GL_CONCAT0 (x, y) -# define _GL_CONCAT0(x, y) x##y - -/* _GL_COUNTER is an integer, preferably one that changes each time we - use it. Use __COUNTER__ if it works, falling back on __LINE__ - otherwise. __LINE__ isn't perfect, but it's better than a - constant. */ -# if defined __COUNTER__ && __COUNTER__ != __COUNTER__ -# define _GL_COUNTER __COUNTER__ -# else -# define _GL_COUNTER __LINE__ -# endif - -/* Generate a symbol with the given prefix, making it unique if - possible. */ -# define _GL_GENSYM(prefix) _GL_CONCAT (prefix, _GL_COUNTER) - -/* Verify requirement R at compile-time, as an integer constant expression - that returns 1. If R is false, fail at compile-time, preferably - with a diagnostic that includes the string-literal DIAGNOSTIC. */ - -# define _GL_VERIFY_TRUE(R, DIAGNOSTIC) \ - (!!sizeof (_GL_VERIFY_TYPE (R, DIAGNOSTIC))) - -# ifdef __cplusplus -# if !GNULIB_defined_struct__gl_verify_type -template - struct _gl_verify_type { - unsigned int _gl_verify_error_if_negative: w; - }; -# define GNULIB_defined_struct__gl_verify_type 1 -# endif -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - _gl_verify_type<(R) ? 1 : -1> -# elif defined _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { \ - _Static_assert (R, DIAGNOSTIC); \ - int _gl_dummy; \ - } -# else -# define _GL_VERIFY_TYPE(R, DIAGNOSTIC) \ - struct { unsigned int _gl_verify_error_if_negative: (R) ? 1 : -1; } -# endif - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. If R is false, fail at compile-time, preferably - with a diagnostic that includes the string-literal DIAGNOSTIC. - - Unfortunately, unlike C11, this implementation must appear as an - ordinary declaration, and cannot appear inside struct { ... }. */ - -# ifdef _GL_HAVE__STATIC_ASSERT -# define _GL_VERIFY _Static_assert -# else -# define _GL_VERIFY(R, DIAGNOSTIC) \ - extern int (*_GL_GENSYM (_gl_verify_function) (void)) \ - [_GL_VERIFY_TRUE (R, DIAGNOSTIC)] -# endif - -/* _GL_STATIC_ASSERT_H is defined if this code is copied into assert.h. */ -# ifdef _GL_STATIC_ASSERT_H -# if !defined _GL_HAVE__STATIC_ASSERT && !defined _Static_assert -# define _Static_assert(R, DIAGNOSTIC) _GL_VERIFY (R, DIAGNOSTIC) -# endif -# if !defined _GL_HAVE_STATIC_ASSERT && !defined static_assert -# define static_assert _Static_assert /* C11 requires this #define. */ -# endif -# endif - -/* @assert.h omit start@ */ - -/* Each of these macros verifies that its argument R is nonzero. To - be portable, R should be an integer constant expression. Unlike - assert (R), there is no run-time overhead. - - There are two macros, since no single macro can be used in all - contexts in C. verify_true (R) is for scalar contexts, including - integer constant expression contexts. verify (R) is for declaration - contexts, e.g., the top level. */ - -/* Verify requirement R at compile-time, as an integer constant expression. - Return 1. This is equivalent to verify_expr (R, 1). - - verify_true is obsolescent; please use verify_expr instead. */ - -# define verify_true(R) _GL_VERIFY_TRUE (R, "verify_true (" #R ")") - -/* Verify requirement R at compile-time. Return the value of the - expression E. */ - -# define verify_expr(R, E) \ - (_GL_VERIFY_TRUE (R, "verify_expr (" #R ", " #E ")") ? (E) : (E)) - -/* Verify requirement R at compile-time, as a declaration without a - trailing ';'. */ - -# define verify(R) _GL_VERIFY (R, "verify (" #R ")") - -/* @assert.h omit end@ */ - -#endif diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h deleted file mode 100644 index fa37325..0000000 --- a/gnulib/lib/wchar.in.h +++ /dev/null @@ -1,1028 +0,0 @@ -/* A substitute for ISO C99 , for platforms that have issues. - - 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 Eric Blake. */ - -/* - * ISO C 99 for platforms that have issues. - * - * - * For now, this just ensures proper prerequisite inclusion order and - * the declaration of wcwidth(). - */ - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H -/* Special invocation convention: - - Inside glibc and uClibc header files. - - On HP-UX 11.00 we have a sequence of nested includes - -> -> , and the latter includes , - once indirectly -> -> -> - and once directly. In both situations 'wint_t' is not yet defined, - therefore we cannot provide the function overrides; instead include only - the system's . - - On IRIX 6.5, similarly, we have an include -> , and - the latter includes . But here, we have no way to detect whether - is completely included or is still being included. */ - -#@INCLUDE_NEXT@ @NEXT_WCHAR_H@ - -#else -/* Normal invocation convention. */ - -#ifndef _@GUARD_PREFIX@_WCHAR_H - -#define _GL_ALREADY_INCLUDING_WCHAR_H - -#if @HAVE_FEATURES_H@ -# include /* for __GLIBC__ */ -#endif - -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . - In some builds of uClibc, is nonexistent and wchar_t is defined - by . - But avoid namespace pollution on glibc systems. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -#endif -#ifndef __GLIBC__ -# include -# include -#endif - -/* Include the original if it exists. - Some builds of uClibc lack it. */ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_WCHAR_H@ -# @INCLUDE_NEXT@ @NEXT_WCHAR_H@ -#endif - -#undef _GL_ALREADY_INCLUDING_WCHAR_H - -#ifndef _@GUARD_PREFIX@_WCHAR_H -#define _@GUARD_PREFIX@_WCHAR_H - -/* The __attribute__ feature is available in gcc versions 2.5 and later. - The attribute __pure__ was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_ARG_NONNULL is copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - - -/* Define wint_t and WEOF. (Also done in wctype.in.h.) */ -#if !@HAVE_WINT_T@ && !defined wint_t -# define wint_t int -# ifndef WEOF -# define WEOF -1 -# endif -#else -/* MSVC defines wint_t as 'unsigned short' in . - This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be - "unchanged by default argument promotions". Override it. */ -# if defined _MSC_VER -# if !GNULIB_defined_wint_t -# include -typedef unsigned int rpl_wint_t; -# undef wint_t -# define wint_t rpl_wint_t -# define GNULIB_defined_wint_t 1 -# endif -# endif -# ifndef WEOF -# define WEOF ((wint_t) -1) -# endif -#endif - - -/* Override mbstate_t if it is too small. - On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for - implementing mbrtowc for encodings like UTF-8. */ -#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@ -# if !GNULIB_defined_mbstate_t -typedef int rpl_mbstate_t; -# undef mbstate_t -# define mbstate_t rpl_mbstate_t -# define GNULIB_defined_mbstate_t 1 -# endif -#endif - - -/* Convert a single-byte character to a wide character. */ -#if @GNULIB_BTOWC@ -# if @REPLACE_BTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef btowc -# define btowc rpl_btowc -# endif -_GL_FUNCDECL_RPL (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); -_GL_CXXALIAS_RPL (btowc, wint_t, (int c)); -# else -# if !@HAVE_BTOWC@ -_GL_FUNCDECL_SYS (btowc, wint_t, (int c) _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (btowc, wint_t, (int c)); -# endif -_GL_CXXALIASWARN (btowc); -#elif defined GNULIB_POSIXCHECK -# undef btowc -# if HAVE_RAW_DECL_BTOWC -_GL_WARN_ON_USE (btowc, "btowc is unportable - " - "use gnulib module btowc for portability"); -# endif -#endif - - -/* Convert a wide character to a single-byte character. */ -#if @GNULIB_WCTOB@ -# if @REPLACE_WCTOB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wctob -# define wctob rpl_wctob -# endif -_GL_FUNCDECL_RPL (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); -_GL_CXXALIAS_RPL (wctob, int, (wint_t wc)); -# else -# if !defined wctob && !@HAVE_DECL_WCTOB@ -/* wctob is provided by gnulib, or wctob exists but is not declared. */ -_GL_FUNCDECL_SYS (wctob, int, (wint_t wc) _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wctob, int, (wint_t wc)); -# endif -_GL_CXXALIASWARN (wctob); -#elif defined GNULIB_POSIXCHECK -# undef wctob -# if HAVE_RAW_DECL_WCTOB -_GL_WARN_ON_USE (wctob, "wctob is unportable - " - "use gnulib module wctob for portability"); -# endif -#endif - - -/* Test whether *PS is in the initial state. */ -#if @GNULIB_MBSINIT@ -# if @REPLACE_MBSINIT@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsinit -# define mbsinit rpl_mbsinit -# endif -_GL_FUNCDECL_RPL (mbsinit, int, (const mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbsinit, int, (const mbstate_t *ps)); -# else -# if !@HAVE_MBSINIT@ -_GL_FUNCDECL_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbsinit, int, (const mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsinit); -#elif defined GNULIB_POSIXCHECK -# undef mbsinit -# if HAVE_RAW_DECL_MBSINIT -_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - " - "use gnulib module mbsinit for portability"); -# endif -#endif - - -/* Convert a multibyte character to a wide character. */ -#if @GNULIB_MBRTOWC@ -# if @REPLACE_MBRTOWC@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrtowc -# define mbrtowc rpl_mbrtowc -# endif -_GL_FUNCDECL_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRTOWC@ -_GL_FUNCDECL_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrtowc, size_t, - (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrtowc); -#elif defined GNULIB_POSIXCHECK -# undef mbrtowc -# if HAVE_RAW_DECL_MBRTOWC -_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - " - "use gnulib module mbrtowc for portability"); -# endif -#endif - - -/* Recognize a multibyte character. */ -#if @GNULIB_MBRLEN@ -# if @REPLACE_MBRLEN@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbrlen -# define mbrlen rpl_mbrlen -# endif -_GL_FUNCDECL_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -_GL_CXXALIAS_RPL (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# else -# if !@HAVE_MBRLEN@ -_GL_FUNCDECL_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (mbrlen, size_t, (const char *s, size_t n, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbrlen); -#elif defined GNULIB_POSIXCHECK -# undef mbrlen -# if HAVE_RAW_DECL_MBRLEN -_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - " - "use gnulib module mbrlen for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSRTOWCS@ -# if @REPLACE_MBSRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsrtowcs -# define mbsrtowcs rpl_mbsrtowcs -# endif -_GL_FUNCDECL_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSRTOWCS@ -_GL_FUNCDECL_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsrtowcs -# if HAVE_RAW_DECL_MBSRTOWCS -_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - " - "use gnulib module mbsrtowcs for portability"); -# endif -#endif - - -/* Convert a string to a wide string. */ -#if @GNULIB_MBSNRTOWCS@ -# if @REPLACE_MBSNRTOWCS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef mbsnrtowcs -# define mbsnrtowcs rpl_mbsnrtowcs -# endif -_GL_FUNCDECL_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_MBSNRTOWCS@ -_GL_FUNCDECL_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (mbsnrtowcs, size_t, - (wchar_t *dest, const char **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (mbsnrtowcs); -#elif defined GNULIB_POSIXCHECK -# undef mbsnrtowcs -# if HAVE_RAW_DECL_MBSNRTOWCS -_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - " - "use gnulib module mbsnrtowcs for portability"); -# endif -#endif - - -/* Convert a wide character to a multibyte character. */ -#if @GNULIB_WCRTOMB@ -# if @REPLACE_WCRTOMB@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcrtomb -# define wcrtomb rpl_wcrtomb -# endif -_GL_FUNCDECL_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -_GL_CXXALIAS_RPL (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# else -# if !@HAVE_WCRTOMB@ -_GL_FUNCDECL_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIAS_SYS (wcrtomb, size_t, (char *s, wchar_t wc, mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcrtomb); -#elif defined GNULIB_POSIXCHECK -# undef wcrtomb -# if HAVE_RAW_DECL_WCRTOMB -_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - " - "use gnulib module wcrtomb for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSRTOMBS@ -# if @REPLACE_WCSRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsrtombs -# define wcsrtombs rpl_wcsrtombs -# endif -_GL_FUNCDECL_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSRTOMBS@ -_GL_FUNCDECL_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsrtombs -# if HAVE_RAW_DECL_WCSRTOMBS -_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - " - "use gnulib module wcsrtombs for portability"); -# endif -#endif - - -/* Convert a wide string to a string. */ -#if @GNULIB_WCSNRTOMBS@ -# if @REPLACE_WCSNRTOMBS@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcsnrtombs -# define wcsnrtombs rpl_wcsnrtombs -# endif -_GL_FUNCDECL_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -_GL_CXXALIAS_RPL (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# else -# if !@HAVE_WCSNRTOMBS@ -_GL_FUNCDECL_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps) - _GL_ARG_NONNULL ((2))); -# endif -_GL_CXXALIAS_SYS (wcsnrtombs, size_t, - (char *dest, const wchar_t **srcp, size_t srclen, size_t len, - mbstate_t *ps)); -# endif -_GL_CXXALIASWARN (wcsnrtombs); -#elif defined GNULIB_POSIXCHECK -# undef wcsnrtombs -# if HAVE_RAW_DECL_WCSNRTOMBS -_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - " - "use gnulib module wcsnrtombs for portability"); -# endif -#endif - - -/* Return the number of screen columns needed for WC. */ -#if @GNULIB_WCWIDTH@ -# if @REPLACE_WCWIDTH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcwidth -# define wcwidth rpl_wcwidth -# endif -_GL_FUNCDECL_RPL (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); -_GL_CXXALIAS_RPL (wcwidth, int, (wchar_t)); -# else -# if !@HAVE_DECL_WCWIDTH@ -/* wcwidth exists but is not declared. */ -_GL_FUNCDECL_SYS (wcwidth, int, (wchar_t) _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcwidth, int, (wchar_t)); -# endif -_GL_CXXALIASWARN (wcwidth); -#elif defined GNULIB_POSIXCHECK -# undef wcwidth -# if HAVE_RAW_DECL_WCWIDTH -_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - " - "use gnulib module wcwidth for portability"); -# endif -#endif - - -/* Search N wide characters of S for C. */ -#if @GNULIB_WMEMCHR@ -# if !@HAVE_WMEMCHR@ -_GL_FUNCDECL_SYS (wmemchr, wchar_t *, (const wchar_t *s, wchar_t c, size_t n) - _GL_ATTRIBUTE_PURE); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wmemchr (const wchar_t *, wchar_t, size_t); - wchar_t * std::wmemchr (wchar_t *, wchar_t, size_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wmemchr, - wchar_t *, (const wchar_t *, wchar_t, size_t), - const wchar_t *, (const wchar_t *, wchar_t, size_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wmemchr, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -_GL_CXXALIASWARN1 (wmemchr, const wchar_t *, - (const wchar_t *s, wchar_t c, size_t n)); -# else -_GL_CXXALIASWARN (wmemchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wmemchr -# if HAVE_RAW_DECL_WMEMCHR -_GL_WARN_ON_USE (wmemchr, "wmemchr is unportable - " - "use gnulib module wmemchr for portability"); -# endif -#endif - - -/* Compare N wide characters of S1 and S2. */ -#if @GNULIB_WMEMCMP@ -# if !@HAVE_WMEMCMP@ -_GL_FUNCDECL_SYS (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wmemcmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wmemcmp); -#elif defined GNULIB_POSIXCHECK -# undef wmemcmp -# if HAVE_RAW_DECL_WMEMCMP -_GL_WARN_ON_USE (wmemcmp, "wmemcmp is unportable - " - "use gnulib module wmemcmp for portability"); -# endif -#endif - - -/* Copy N wide characters of SRC to DEST. */ -#if @GNULIB_WMEMCPY@ -# if !@HAVE_WMEMCPY@ -_GL_FUNCDECL_SYS (wmemcpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemcpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wmemcpy); -#elif defined GNULIB_POSIXCHECK -# undef wmemcpy -# if HAVE_RAW_DECL_WMEMCPY -_GL_WARN_ON_USE (wmemcpy, "wmemcpy is unportable - " - "use gnulib module wmemcpy for portability"); -# endif -#endif - - -/* Copy N wide characters of SRC to DEST, guaranteeing correct behavior for - overlapping memory areas. */ -#if @GNULIB_WMEMMOVE@ -# if !@HAVE_WMEMMOVE@ -_GL_FUNCDECL_SYS (wmemmove, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemmove, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wmemmove); -#elif defined GNULIB_POSIXCHECK -# undef wmemmove -# if HAVE_RAW_DECL_WMEMMOVE -_GL_WARN_ON_USE (wmemmove, "wmemmove is unportable - " - "use gnulib module wmemmove for portability"); -# endif -#endif - - -/* Set N wide characters of S to C. */ -#if @GNULIB_WMEMSET@ -# if !@HAVE_WMEMSET@ -_GL_FUNCDECL_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -# endif -_GL_CXXALIAS_SYS (wmemset, wchar_t *, (wchar_t *s, wchar_t c, size_t n)); -_GL_CXXALIASWARN (wmemset); -#elif defined GNULIB_POSIXCHECK -# undef wmemset -# if HAVE_RAW_DECL_WMEMSET -_GL_WARN_ON_USE (wmemset, "wmemset is unportable - " - "use gnulib module wmemset for portability"); -# endif -#endif - - -/* Return the number of wide characters in S. */ -#if @GNULIB_WCSLEN@ -# if !@HAVE_WCSLEN@ -_GL_FUNCDECL_SYS (wcslen, size_t, (const wchar_t *s) _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcslen, size_t, (const wchar_t *s)); -_GL_CXXALIASWARN (wcslen); -#elif defined GNULIB_POSIXCHECK -# undef wcslen -# if HAVE_RAW_DECL_WCSLEN -_GL_WARN_ON_USE (wcslen, "wcslen is unportable - " - "use gnulib module wcslen for portability"); -# endif -#endif - - -/* Return the number of wide characters in S, but at most MAXLEN. */ -#if @GNULIB_WCSNLEN@ -# if !@HAVE_WCSNLEN@ -_GL_FUNCDECL_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcsnlen, size_t, (const wchar_t *s, size_t maxlen)); -_GL_CXXALIASWARN (wcsnlen); -#elif defined GNULIB_POSIXCHECK -# undef wcsnlen -# if HAVE_RAW_DECL_WCSNLEN -_GL_WARN_ON_USE (wcsnlen, "wcsnlen is unportable - " - "use gnulib module wcsnlen for portability"); -# endif -#endif - - -/* Copy SRC to DEST. */ -#if @GNULIB_WCSCPY@ -# if !@HAVE_WCSCPY@ -_GL_FUNCDECL_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcscpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcscpy); -#elif defined GNULIB_POSIXCHECK -# undef wcscpy -# if HAVE_RAW_DECL_WCSCPY -_GL_WARN_ON_USE (wcscpy, "wcscpy is unportable - " - "use gnulib module wcscpy for portability"); -# endif -#endif - - -/* Copy SRC to DEST, returning the address of the terminating L'\0' in DEST. */ -#if @GNULIB_WCPCPY@ -# if !@HAVE_WCPCPY@ -_GL_FUNCDECL_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcpcpy, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcpcpy); -#elif defined GNULIB_POSIXCHECK -# undef wcpcpy -# if HAVE_RAW_DECL_WCPCPY -_GL_WARN_ON_USE (wcpcpy, "wcpcpy is unportable - " - "use gnulib module wcpcpy for portability"); -# endif -#endif - - -/* Copy no more than N wide characters of SRC to DEST. */ -#if @GNULIB_WCSNCPY@ -# if !@HAVE_WCSNCPY@ -_GL_FUNCDECL_SYS (wcsncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcsncpy); -#elif defined GNULIB_POSIXCHECK -# undef wcsncpy -# if HAVE_RAW_DECL_WCSNCPY -_GL_WARN_ON_USE (wcsncpy, "wcsncpy is unportable - " - "use gnulib module wcsncpy for portability"); -# endif -#endif - - -/* Copy no more than N characters of SRC to DEST, returning the address of - the last character written into DEST. */ -#if @GNULIB_WCPNCPY@ -# if !@HAVE_WCPNCPY@ -_GL_FUNCDECL_SYS (wcpncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcpncpy, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcpncpy); -#elif defined GNULIB_POSIXCHECK -# undef wcpncpy -# if HAVE_RAW_DECL_WCPNCPY -_GL_WARN_ON_USE (wcpncpy, "wcpncpy is unportable - " - "use gnulib module wcpncpy for portability"); -# endif -#endif - - -/* Append SRC onto DEST. */ -#if @GNULIB_WCSCAT@ -# if !@HAVE_WCSCAT@ -_GL_FUNCDECL_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); -# endif -_GL_CXXALIAS_SYS (wcscat, wchar_t *, (wchar_t *dest, const wchar_t *src)); -_GL_CXXALIASWARN (wcscat); -#elif defined GNULIB_POSIXCHECK -# undef wcscat -# if HAVE_RAW_DECL_WCSCAT -_GL_WARN_ON_USE (wcscat, "wcscat is unportable - " - "use gnulib module wcscat for portability"); -# endif -#endif - - -/* Append no more than N wide characters of SRC onto DEST. */ -#if @GNULIB_WCSNCAT@ -# if !@HAVE_WCSNCAT@ -_GL_FUNCDECL_SYS (wcsncat, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsncat, wchar_t *, - (wchar_t *dest, const wchar_t *src, size_t n)); -_GL_CXXALIASWARN (wcsncat); -#elif defined GNULIB_POSIXCHECK -# undef wcsncat -# if HAVE_RAW_DECL_WCSNCAT -_GL_WARN_ON_USE (wcsncat, "wcsncat is unportable - " - "use gnulib module wcsncat for portability"); -# endif -#endif - - -/* Compare S1 and S2. */ -#if @GNULIB_WCSCMP@ -# if !@HAVE_WCSCMP@ -_GL_FUNCDECL_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcscmp, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscmp); -#elif defined GNULIB_POSIXCHECK -# undef wcscmp -# if HAVE_RAW_DECL_WCSCMP -_GL_WARN_ON_USE (wcscmp, "wcscmp is unportable - " - "use gnulib module wcscmp for portability"); -# endif -#endif - - -/* Compare no more than N wide characters of S1 and S2. */ -#if @GNULIB_WCSNCMP@ -# if !@HAVE_WCSNCMP@ -_GL_FUNCDECL_SYS (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcsncmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsncmp); -#elif defined GNULIB_POSIXCHECK -# undef wcsncmp -# if HAVE_RAW_DECL_WCSNCMP -_GL_WARN_ON_USE (wcsncmp, "wcsncmp is unportable - " - "use gnulib module wcsncmp for portability"); -# endif -#endif - - -/* Compare S1 and S2, ignoring case. */ -#if @GNULIB_WCSCASECMP@ -# if !@HAVE_WCSCASECMP@ -_GL_FUNCDECL_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcscasecmp, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscasecmp); -#elif defined GNULIB_POSIXCHECK -# undef wcscasecmp -# if HAVE_RAW_DECL_WCSCASECMP -_GL_WARN_ON_USE (wcscasecmp, "wcscasecmp is unportable - " - "use gnulib module wcscasecmp for portability"); -# endif -#endif - - -/* Compare no more than N chars of S1 and S2, ignoring case. */ -#if @GNULIB_WCSNCASECMP@ -# if !@HAVE_WCSNCASECMP@ -_GL_FUNCDECL_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcsncasecmp, int, - (const wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsncasecmp); -#elif defined GNULIB_POSIXCHECK -# undef wcsncasecmp -# if HAVE_RAW_DECL_WCSNCASECMP -_GL_WARN_ON_USE (wcsncasecmp, "wcsncasecmp is unportable - " - "use gnulib module wcsncasecmp for portability"); -# endif -#endif - - -/* Compare S1 and S2, both interpreted as appropriate to the LC_COLLATE - category of the current locale. */ -#if @GNULIB_WCSCOLL@ -# if !@HAVE_WCSCOLL@ -_GL_FUNCDECL_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); -# endif -_GL_CXXALIAS_SYS (wcscoll, int, (const wchar_t *s1, const wchar_t *s2)); -_GL_CXXALIASWARN (wcscoll); -#elif defined GNULIB_POSIXCHECK -# undef wcscoll -# if HAVE_RAW_DECL_WCSCOLL -_GL_WARN_ON_USE (wcscoll, "wcscoll is unportable - " - "use gnulib module wcscoll for portability"); -# endif -#endif - - -/* Transform S2 into array pointed to by S1 such that if wcscmp is applied - to two transformed strings the result is the as applying 'wcscoll' to the - original strings. */ -#if @GNULIB_WCSXFRM@ -# if !@HAVE_WCSXFRM@ -_GL_FUNCDECL_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); -# endif -_GL_CXXALIAS_SYS (wcsxfrm, size_t, (wchar_t *s1, const wchar_t *s2, size_t n)); -_GL_CXXALIASWARN (wcsxfrm); -#elif defined GNULIB_POSIXCHECK -# undef wcsxfrm -# if HAVE_RAW_DECL_WCSXFRM -_GL_WARN_ON_USE (wcsxfrm, "wcsxfrm is unportable - " - "use gnulib module wcsxfrm for portability"); -# endif -#endif - - -/* Duplicate S, returning an identical malloc'd string. */ -#if @GNULIB_WCSDUP@ -# if !@HAVE_WCSDUP@ -_GL_FUNCDECL_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -# endif -_GL_CXXALIAS_SYS (wcsdup, wchar_t *, (const wchar_t *s)); -_GL_CXXALIASWARN (wcsdup); -#elif defined GNULIB_POSIXCHECK -# undef wcsdup -# if HAVE_RAW_DECL_WCSDUP -_GL_WARN_ON_USE (wcsdup, "wcsdup is unportable - " - "use gnulib module wcsdup for portability"); -# endif -#endif - - -/* Find the first occurrence of WC in WCS. */ -#if @GNULIB_WCSCHR@ -# if !@HAVE_WCSCHR@ -_GL_FUNCDECL_SYS (wcschr, wchar_t *, (const wchar_t *wcs, wchar_t wc) - _GL_ATTRIBUTE_PURE); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcschr (const wchar_t *, wchar_t); - wchar_t * std::wcschr (wchar_t *, wchar_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcschr, - wchar_t *, (const wchar_t *, wchar_t), - const wchar_t *, (const wchar_t *, wchar_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcschr, wchar_t *, (wchar_t *wcs, wchar_t wc)); -_GL_CXXALIASWARN1 (wcschr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else -_GL_CXXALIASWARN (wcschr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcschr -# if HAVE_RAW_DECL_WCSCHR -_GL_WARN_ON_USE (wcschr, "wcschr is unportable - " - "use gnulib module wcschr for portability"); -# endif -#endif - - -/* Find the last occurrence of WC in WCS. */ -#if @GNULIB_WCSRCHR@ -# if !@HAVE_WCSRCHR@ -_GL_FUNCDECL_SYS (wcsrchr, wchar_t *, (const wchar_t *wcs, wchar_t wc) - _GL_ATTRIBUTE_PURE); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcsrchr (const wchar_t *, wchar_t); - wchar_t * std::wcsrchr (wchar_t *, wchar_t); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcsrchr, - wchar_t *, (const wchar_t *, wchar_t), - const wchar_t *, (const wchar_t *, wchar_t)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcsrchr, wchar_t *, (wchar_t *wcs, wchar_t wc)); -_GL_CXXALIASWARN1 (wcsrchr, const wchar_t *, (const wchar_t *wcs, wchar_t wc)); -# else -_GL_CXXALIASWARN (wcsrchr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcsrchr -# if HAVE_RAW_DECL_WCSRCHR -_GL_WARN_ON_USE (wcsrchr, "wcsrchr is unportable - " - "use gnulib module wcsrchr for portability"); -# endif -#endif - - -/* Return the length of the initial segmet of WCS which consists entirely - of wide characters not in REJECT. */ -#if @GNULIB_WCSCSPN@ -# if !@HAVE_WCSCSPN@ -_GL_FUNCDECL_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcscspn, size_t, (const wchar_t *wcs, const wchar_t *reject)); -_GL_CXXALIASWARN (wcscspn); -#elif defined GNULIB_POSIXCHECK -# undef wcscspn -# if HAVE_RAW_DECL_WCSCSPN -_GL_WARN_ON_USE (wcscspn, "wcscspn is unportable - " - "use gnulib module wcscspn for portability"); -# endif -#endif - - -/* Return the length of the initial segmet of WCS which consists entirely - of wide characters in ACCEPT. */ -#if @GNULIB_WCSSPN@ -# if !@HAVE_WCSSPN@ -_GL_FUNCDECL_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcsspn, size_t, (const wchar_t *wcs, const wchar_t *accept)); -_GL_CXXALIASWARN (wcsspn); -#elif defined GNULIB_POSIXCHECK -# undef wcsspn -# if HAVE_RAW_DECL_WCSSPN -_GL_WARN_ON_USE (wcsspn, "wcsspn is unportable - " - "use gnulib module wcsspn for portability"); -# endif -#endif - - -/* Find the first occurrence in WCS of any character in ACCEPT. */ -#if @GNULIB_WCSPBRK@ -# if !@HAVE_WCSPBRK@ -_GL_FUNCDECL_SYS (wcspbrk, wchar_t *, - (const wchar_t *wcs, const wchar_t *accept) - _GL_ATTRIBUTE_PURE); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcspbrk (const wchar_t *, const wchar_t *); - wchar_t * std::wcspbrk (wchar_t *, const wchar_t *); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcspbrk, - wchar_t *, (const wchar_t *, const wchar_t *), - const wchar_t *, (const wchar_t *, const wchar_t *)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcspbrk, wchar_t *, - (wchar_t *wcs, const wchar_t *accept)); -_GL_CXXALIASWARN1 (wcspbrk, const wchar_t *, - (const wchar_t *wcs, const wchar_t *accept)); -# else -_GL_CXXALIASWARN (wcspbrk); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcspbrk -# if HAVE_RAW_DECL_WCSPBRK -_GL_WARN_ON_USE (wcspbrk, "wcspbrk is unportable - " - "use gnulib module wcspbrk for portability"); -# endif -#endif - - -/* Find the first occurrence of NEEDLE in HAYSTACK. */ -#if @GNULIB_WCSSTR@ -# if !@HAVE_WCSSTR@ -_GL_FUNCDECL_SYS (wcsstr, wchar_t *, - (const wchar_t *haystack, const wchar_t *needle) - _GL_ATTRIBUTE_PURE); -# endif - /* On some systems, this function is defined as an overloaded function: - extern "C++" { - const wchar_t * std::wcsstr (const wchar_t *, const wchar_t *); - wchar_t * std::wcsstr (wchar_t *, const wchar_t *); - } */ -_GL_CXXALIAS_SYS_CAST2 (wcsstr, - wchar_t *, (const wchar_t *, const wchar_t *), - const wchar_t *, (const wchar_t *, const wchar_t *)); -# if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 10) && !defined __UCLIBC__) \ - && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) -_GL_CXXALIASWARN1 (wcsstr, wchar_t *, - (wchar_t *haystack, const wchar_t *needle)); -_GL_CXXALIASWARN1 (wcsstr, const wchar_t *, - (const wchar_t *haystack, const wchar_t *needle)); -# else -_GL_CXXALIASWARN (wcsstr); -# endif -#elif defined GNULIB_POSIXCHECK -# undef wcsstr -# if HAVE_RAW_DECL_WCSSTR -_GL_WARN_ON_USE (wcsstr, "wcsstr is unportable - " - "use gnulib module wcsstr for portability"); -# endif -#endif - - -/* Divide WCS into tokens separated by characters in DELIM. */ -#if @GNULIB_WCSTOK@ -# if !@HAVE_WCSTOK@ -_GL_FUNCDECL_SYS (wcstok, wchar_t *, - (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); -# endif -_GL_CXXALIAS_SYS (wcstok, wchar_t *, - (wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)); -_GL_CXXALIASWARN (wcstok); -#elif defined GNULIB_POSIXCHECK -# undef wcstok -# if HAVE_RAW_DECL_WCSTOK -_GL_WARN_ON_USE (wcstok, "wcstok is unportable - " - "use gnulib module wcstok for portability"); -# endif -#endif - - -/* Determine number of column positions required for first N wide - characters (or fewer if S ends before this) in S. */ -#if @GNULIB_WCSWIDTH@ -# if @REPLACE_WCSWIDTH@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# undef wcswidth -# define wcswidth rpl_wcswidth -# endif -_GL_FUNCDECL_RPL (wcswidth, int, (const wchar_t *s, size_t n) - _GL_ATTRIBUTE_PURE); -_GL_CXXALIAS_RPL (wcswidth, int, (const wchar_t *s, size_t n)); -# else -# if !@HAVE_WCSWIDTH@ -_GL_FUNCDECL_SYS (wcswidth, int, (const wchar_t *s, size_t n) - _GL_ATTRIBUTE_PURE); -# endif -_GL_CXXALIAS_SYS (wcswidth, int, (const wchar_t *s, size_t n)); -# endif -_GL_CXXALIASWARN (wcswidth); -#elif defined GNULIB_POSIXCHECK -# undef wcswidth -# if HAVE_RAW_DECL_WCSWIDTH -_GL_WARN_ON_USE (wcswidth, "wcswidth is unportable - " - "use gnulib module wcswidth for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_WCHAR_H */ -#endif /* _@GUARD_PREFIX@_WCHAR_H */ -#endif diff --git a/gnulib/lib/wcrtomb.c b/gnulib/lib/wcrtomb.c deleted file mode 100644 index f15b545..0000000 --- a/gnulib/lib/wcrtomb.c +++ /dev/null @@ -1,53 +0,0 @@ -/* Convert wide character to multibyte character. - 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 - 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 - -#include -#include - - -size_t -wcrtomb (char *s, wchar_t wc, mbstate_t *ps) -{ - /* This implementation of wcrtomb on top of wctomb() supports only - stateless encodings. ps must be in the initial state. */ - if (ps != NULL && !mbsinit (ps)) - { - errno = EINVAL; - return (size_t)(-1); - } - - if (s == NULL) - /* We know the NUL wide character corresponds to the NUL character. */ - return 1; - else - { - int ret = wctomb (s, wc); - - if (ret >= 0) - return ret; - else - { - errno = EILSEQ; - return (size_t)(-1); - } - } -} diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h deleted file mode 100644 index 373adc5..0000000 --- a/gnulib/lib/wctype.in.h +++ /dev/null @@ -1,498 +0,0 @@ -/* A substitute for ISO C99 , for platforms that lack it. - - 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 - 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 Bruno Haible and Paul Eggert. */ - -/* - * ISO C 99 for platforms that lack it. - * - * - * iswctype, towctrans, towlower, towupper, wctrans, wctype, - * wctrans_t, and wctype_t are not yet implemented. - */ - -#ifndef _@GUARD_PREFIX@_WCTYPE_H - -#if __GNUC__ >= 3 -@PRAGMA_SYSTEM_HEADER@ -#endif -@PRAGMA_COLUMNS@ - -#if @HAVE_WINT_T@ -/* Solaris 2.5 has a bug: must be included before . - Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -# include -# include -# include -# include -#endif - -/* Include the original if it exists. - BeOS 5 has the functions but no . */ -/* The include_next requires a split double-inclusion guard. */ -#if @HAVE_WCTYPE_H@ -# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@ -#endif - -#ifndef _@GUARD_PREFIX@_WCTYPE_H -#define _@GUARD_PREFIX@_WCTYPE_H - -/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */ - -/* The definition of _GL_WARN_ON_USE is copied here. */ - -/* Solaris 2.6 includes which includes which - #defines a number of identifiers in the application namespace. Revert - these #defines. */ -#ifdef __sun -# undef multibyte -# undef eucw1 -# undef eucw2 -# undef eucw3 -# undef scrw1 -# undef scrw2 -# undef scrw3 -#endif - -/* Define wint_t and WEOF. (Also done in wchar.in.h.) */ -#if !@HAVE_WINT_T@ && !defined wint_t -# define wint_t int -# ifndef WEOF -# define WEOF -1 -# endif -#else -/* MSVC defines wint_t as 'unsigned short' in . - This is too small: ISO C 99 section 7.24.1.(2) says that wint_t must be - "unchanged by default argument promotions". Override it. */ -# if defined _MSC_VER -# if !GNULIB_defined_wint_t -# include -typedef unsigned int rpl_wint_t; -# undef wint_t -# define wint_t rpl_wint_t -# define GNULIB_defined_wint_t 1 -# endif -# endif -# ifndef WEOF -# define WEOF ((wint_t) -1) -# endif -#endif - - -#if !GNULIB_defined_wctype_functions - -/* FreeBSD 4.4 to 4.11 has but lacks the functions. - Linux libc5 has and the functions but they are broken. - Assume all 11 functions (all isw* except iswblank) are implemented the - same way, or not at all. */ -# if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@ - -/* IRIX 5.3 has macros but no functions, its isw* macros refer to an - undefined variable _ctmp_ and to macros like _P, and they - refer to system functions like _iswctype that are not in the - standard C library. Rather than try to get ancient buggy - implementations like this to work, just disable them. */ -# undef iswalnum -# undef iswalpha -# undef iswblank -# undef iswcntrl -# undef iswdigit -# undef iswgraph -# undef iswlower -# undef iswprint -# undef iswpunct -# undef iswspace -# undef iswupper -# undef iswxdigit -# undef towlower -# undef towupper - -/* Linux libc5 has and the functions but they are broken. */ -# if @REPLACE_ISWCNTRL@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define iswalnum rpl_iswalnum -# define iswalpha rpl_iswalpha -# define iswblank rpl_iswblank -# define iswcntrl rpl_iswcntrl -# define iswdigit rpl_iswdigit -# define iswgraph rpl_iswgraph -# define iswlower rpl_iswlower -# define iswprint rpl_iswprint -# define iswpunct rpl_iswpunct -# define iswspace rpl_iswspace -# define iswupper rpl_iswupper -# define iswxdigit rpl_iswxdigit -# endif -# endif -# if @REPLACE_TOWLOWER@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define towlower rpl_towlower -# define towupper rpl_towupper -# endif -# endif - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswalnum -# else -iswalnum -# endif - (wint_t wc) -{ - return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswalpha -# else -iswalpha -# endif - (wint_t wc) -{ - return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswblank -# else -iswblank -# endif - (wint_t wc) -{ - return wc == ' ' || wc == '\t'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswcntrl -# else -iswcntrl -# endif - (wint_t wc) -{ - return (wc & ~0x1f) == 0 || wc == 0x7f; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswdigit -# else -iswdigit -# endif - (wint_t wc) -{ - return wc >= '0' && wc <= '9'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswgraph -# else -iswgraph -# endif - (wint_t wc) -{ - return wc >= '!' && wc <= '~'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswlower -# else -iswlower -# endif - (wint_t wc) -{ - return wc >= 'a' && wc <= 'z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswprint -# else -iswprint -# endif - (wint_t wc) -{ - return wc >= ' ' && wc <= '~'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswpunct -# else -iswpunct -# endif - (wint_t wc) -{ - return (wc >= '!' && wc <= '~' - && !((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'))); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswspace -# else -iswspace -# endif - (wint_t wc) -{ - return (wc == ' ' || wc == '\t' - || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r'); -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswupper -# else -iswupper -# endif - (wint_t wc) -{ - return wc >= 'A' && wc <= 'Z'; -} - -static inline int -# if @REPLACE_ISWCNTRL@ -rpl_iswxdigit -# else -iswxdigit -# endif - (wint_t wc) -{ - return ((wc >= '0' && wc <= '9') - || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F')); -} - -static inline wint_t -# if @REPLACE_TOWLOWER@ -rpl_towlower -# else -towlower -# endif - (wint_t wc) -{ - return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc); -} - -static inline wint_t -# if @REPLACE_TOWLOWER@ -rpl_towupper -# else -towupper -# endif - (wint_t wc) -{ - return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc); -} - -# elif @GNULIB_ISWBLANK@ && (! @HAVE_ISWBLANK@ || @REPLACE_ISWBLANK@) -/* Only the iswblank function is missing. */ - -# if @REPLACE_ISWBLANK@ -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define iswblank rpl_iswblank -# endif -_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc)); -# else -_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc)); -# endif - -# endif - -# if defined __MINGW32__ - -/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t. - The functions towlower and towupper are implemented in the MSVCRT library - to take a wchar_t argument and return a wchar_t result. mingw declares - these functions to take a wint_t argument and return a wint_t result. - This means that: - 1. When the user passes an argument outside the range 0x0000..0xFFFF, the - function will look only at the lower 16 bits. This is allowed according - to POSIX. - 2. The return value is returned in the lower 16 bits of the result register. - The upper 16 bits are random: whatever happened to be in that part of the - result register. We need to fix this by adding a zero-extend from - wchar_t to wint_t after the call. */ - -static inline wint_t -rpl_towlower (wint_t wc) -{ - return (wint_t) (wchar_t) towlower (wc); -} -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define towlower rpl_towlower -# endif - -static inline wint_t -rpl_towupper (wint_t wc) -{ - return (wint_t) (wchar_t) towupper (wc); -} -# if !(defined __cplusplus && defined GNULIB_NAMESPACE) -# define towupper rpl_towupper -# endif - -# endif /* __MINGW32__ */ - -# define GNULIB_defined_wctype_functions 1 -#endif - -#if @REPLACE_ISWCNTRL@ -_GL_CXXALIAS_RPL (iswalnum, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswalpha, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswcntrl, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswdigit, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswgraph, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswlower, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswprint, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswpunct, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswspace, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswupper, int, (wint_t wc)); -_GL_CXXALIAS_RPL (iswxdigit, int, (wint_t wc)); -#else -_GL_CXXALIAS_SYS (iswalnum, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswalpha, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswcntrl, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswdigit, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswgraph, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswlower, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswprint, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswpunct, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswspace, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswupper, int, (wint_t wc)); -_GL_CXXALIAS_SYS (iswxdigit, int, (wint_t wc)); -#endif -_GL_CXXALIASWARN (iswalnum); -_GL_CXXALIASWARN (iswalpha); -_GL_CXXALIASWARN (iswcntrl); -_GL_CXXALIASWARN (iswdigit); -_GL_CXXALIASWARN (iswgraph); -_GL_CXXALIASWARN (iswlower); -_GL_CXXALIASWARN (iswprint); -_GL_CXXALIASWARN (iswpunct); -_GL_CXXALIASWARN (iswspace); -_GL_CXXALIASWARN (iswupper); -_GL_CXXALIASWARN (iswxdigit); - -#if @GNULIB_ISWBLANK@ -# if @REPLACE_ISWCNTRL@ || @REPLACE_ISWBLANK@ -_GL_CXXALIAS_RPL (iswblank, int, (wint_t wc)); -# else -_GL_CXXALIAS_SYS (iswblank, int, (wint_t wc)); -# endif -_GL_CXXALIASWARN (iswblank); -#endif - -#if !@HAVE_WCTYPE_T@ -# if !GNULIB_defined_wctype_t -typedef void * wctype_t; -# define GNULIB_defined_wctype_t 1 -# endif -#endif - -/* Get a descriptor for a wide character property. */ -#if @GNULIB_WCTYPE@ -# if !@HAVE_WCTYPE_T@ -_GL_FUNCDECL_SYS (wctype, wctype_t, (const char *name)); -# endif -_GL_CXXALIAS_SYS (wctype, wctype_t, (const char *name)); -_GL_CXXALIASWARN (wctype); -#elif defined GNULIB_POSIXCHECK -# undef wctype -# if HAVE_RAW_DECL_WCTYPE -_GL_WARN_ON_USE (wctype, "wctype is unportable - " - "use gnulib module wctype for portability"); -# endif -#endif - -/* Test whether a wide character has a given property. - The argument WC must be either a wchar_t value or WEOF. - The argument DESC must have been returned by the wctype() function. */ -#if @GNULIB_ISWCTYPE@ -# if !@HAVE_WCTYPE_T@ -_GL_FUNCDECL_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -# endif -_GL_CXXALIAS_SYS (iswctype, int, (wint_t wc, wctype_t desc)); -_GL_CXXALIASWARN (iswctype); -#elif defined GNULIB_POSIXCHECK -# undef iswctype -# if HAVE_RAW_DECL_ISWCTYPE -_GL_WARN_ON_USE (iswctype, "iswctype is unportable - " - "use gnulib module iswctype for portability"); -# endif -#endif - -#if @REPLACE_TOWLOWER@ || defined __MINGW32__ -_GL_CXXALIAS_RPL (towlower, wint_t, (wint_t wc)); -_GL_CXXALIAS_RPL (towupper, wint_t, (wint_t wc)); -#else -_GL_CXXALIAS_SYS (towlower, wint_t, (wint_t wc)); -_GL_CXXALIAS_SYS (towupper, wint_t, (wint_t wc)); -#endif -_GL_CXXALIASWARN (towlower); -_GL_CXXALIASWARN (towupper); - -#if !@HAVE_WCTRANS_T@ -# if !GNULIB_defined_wctrans_t -typedef void * wctrans_t; -# define GNULIB_defined_wctrans_t 1 -# endif -#endif - -/* Get a descriptor for a wide character case conversion. */ -#if @GNULIB_WCTRANS@ -# if !@HAVE_WCTRANS_T@ -_GL_FUNCDECL_SYS (wctrans, wctrans_t, (const char *name)); -# endif -_GL_CXXALIAS_SYS (wctrans, wctrans_t, (const char *name)); -_GL_CXXALIASWARN (wctrans); -#elif defined GNULIB_POSIXCHECK -# undef wctrans -# if HAVE_RAW_DECL_WCTRANS -_GL_WARN_ON_USE (wctrans, "wctrans is unportable - " - "use gnulib module wctrans for portability"); -# endif -#endif - -/* Perform a given case conversion on a wide character. - The argument WC must be either a wchar_t value or WEOF. - The argument DESC must have been returned by the wctrans() function. */ -#if @GNULIB_TOWCTRANS@ -# if !@HAVE_WCTRANS_T@ -_GL_FUNCDECL_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -# endif -_GL_CXXALIAS_SYS (towctrans, wint_t, (wint_t wc, wctrans_t desc)); -_GL_CXXALIASWARN (towctrans); -#elif defined GNULIB_POSIXCHECK -# undef towctrans -# if HAVE_RAW_DECL_TOWCTRANS -_GL_WARN_ON_USE (towctrans, "towctrans is unportable - " - "use gnulib module towctrans for portability"); -# endif -#endif - - -#endif /* _@GUARD_PREFIX@_WCTYPE_H */ -#endif /* _@GUARD_PREFIX@_WCTYPE_H */ diff --git a/gnulib/lib/xsize.h b/gnulib/lib/xsize.h deleted file mode 100644 index 92985ae..0000000 --- a/gnulib/lib/xsize.h +++ /dev/null @@ -1,107 +0,0 @@ -/* xsize.h -- Checked size_t computations. - - 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 - 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 . */ - -#ifndef _XSIZE_H -#define _XSIZE_H - -/* Get size_t. */ -#include - -/* Get SIZE_MAX. */ -#include -#if HAVE_STDINT_H -# include -#endif - -/* The size of memory objects is often computed through expressions of - type size_t. Example: - void* p = malloc (header_size + n * element_size). - These computations can lead to overflow. When this happens, malloc() - returns a piece of memory that is way too small, and the program then - crashes while attempting to fill the memory. - To avoid this, the functions and macros in this file check for overflow. - The convention is that SIZE_MAX represents overflow. - malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc - implementation that uses mmap --, it's recommended to use size_overflow_p() - or size_in_bounds_p() before invoking malloc(). - The example thus becomes: - size_t size = xsum (header_size, xtimes (n, element_size)); - void *p = (size_in_bounds_p (size) ? malloc (size) : NULL); -*/ - -/* Convert an arbitrary value >= 0 to type size_t. */ -#define xcast_size_t(N) \ - ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX) - -/* Sum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum (size_t size1, size_t size2) -{ - size_t sum = size1 + size2; - return (sum >= size1 ? sum : SIZE_MAX); -} - -/* Sum of three sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum3 (size_t size1, size_t size2, size_t size3) -{ - return xsum (xsum (size1, size2), size3); -} - -/* Sum of four sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xsum4 (size_t size1, size_t size2, size_t size3, size_t size4) -{ - return xsum (xsum (xsum (size1, size2), size3), size4); -} - -/* Maximum of two sizes, with overflow check. */ -static inline size_t -#if __GNUC__ >= 3 -__attribute__ ((__pure__)) -#endif -xmax (size_t size1, size_t size2) -{ - /* No explicit check is needed here, because for any n: - max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */ - return (size1 >= size2 ? size1 : size2); -} - -/* Multiplication of a count with an element size, with overflow check. - The count must be >= 0 and the element size must be > 0. - This is a macro, not an inline function, so that it works correctly even - when N is of a wider type and N > SIZE_MAX. */ -#define xtimes(N, ELSIZE) \ - ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX) - -/* Check for overflow. */ -#define size_overflow_p(SIZE) \ - ((SIZE) == SIZE_MAX) -/* Check against overflow. */ -#define size_in_bounds_p(SIZE) \ - ((SIZE) != SIZE_MAX) - -#endif /* _XSIZE_H */ diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4 deleted file mode 100644 index d978cb8..0000000 --- a/gnulib/m4/00gnulib.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# 00gnulib.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. - -dnl This file must be named something that sorts before all other -dnl gnulib-provided .m4 files. It is needed until such time as we can -dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics. - -# AC_DEFUN_ONCE([NAME], VALUE) -# ---------------------------- -# Define NAME to expand to VALUE on the first use (whether by direct -# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses. -# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This -# definition is slower than the version in Autoconf 2.64, because it -# can only use interfaces that existed since 2.59; but it achieves the -# same effect. Quoting is necessary to avoid confusing Automake. -m4_version_prereq([2.63.263], [], -[m4_define([AC][_DEFUN_ONCE], - [AC][_DEFUN([$1], - [AC_REQUIRE([_gl_DEFUN_ONCE([$1])], - [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl -[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])]) - -# gl_00GNULIB -# ----------- -# Witness macro that this file has been included. Needed to force -# Automake to include this file prior to all other gnulib .m4 files. -AC_DEFUN([gl_00GNULIB]) diff --git a/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4 deleted file mode 100644 index 656924b..0000000 --- a/gnulib/m4/alloca.m4 +++ /dev/null @@ -1,121 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_ALLOCA], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - if test $ac_cv_func_alloca_works = no; then - gl_PREREQ_ALLOCA - fi - - # Define an additional variable used in the Makefile substitution. - if test $ac_cv_working_alloca_h = yes; then - AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [ - AC_EGREP_CPP([Need own alloca], [ -#if defined __GNUC__ || defined _AIX || defined _MSC_VER - Need own alloca -#endif - ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no]) - ]) - if test $gl_cv_rpl_alloca = yes; then - dnl OK, alloca can be implemented through a compiler built-in. - AC_DEFINE([HAVE_ALLOCA], [1], - [Define to 1 if you have 'alloca' after including , - a header that may be supplied by this distribution.]) - ALLOCA_H=alloca.h - else - dnl alloca exists as a library function, i.e. it is slow and probably - dnl a memory leak. Don't define HAVE_ALLOCA in this case. - ALLOCA_H= - fi - else - ALLOCA_H=alloca.h - fi - AC_SUBST([ALLOCA_H]) - AM_CONDITIONAL([GL_GENERATE_ALLOCA_H], [test -n "$ALLOCA_H"]) -]) - -# Prerequisites of lib/alloca.c. -# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA. -AC_DEFUN([gl_PREREQ_ALLOCA], [:]) - -# This works around a bug in autoconf <= 2.68. -# See . - -m4_version_prereq([2.69], [] ,[ - -# This is taken from the following Autoconf patch: -# http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6cd9f12520b0d6f76d3230d7565feba1ecf29497 - -# _AC_LIBOBJ_ALLOCA -# ----------------- -# Set up the LIBOBJ replacement of 'alloca'. Well, not exactly -# AC_LIBOBJ since we actually set the output variable 'ALLOCA'. -# Nevertheless, for Automake, AC_LIBSOURCES it. -m4_define([_AC_LIBOBJ_ALLOCA], -[# The SVR3 libPW and SVR4 libucb both contain incompatible functions -# that cause trouble. Some versions do not even contain alloca or -# contain a buggy version. If you still want to use their alloca, -# use ar to extract alloca.o from them instead of compiling alloca.c. -AC_LIBSOURCES(alloca.c) -AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])dnl -AC_DEFINE(C_ALLOCA, 1, [Define to 1 if using 'alloca.c'.]) - -AC_CACHE_CHECK(whether 'alloca.c' needs Cray hooks, ac_cv_os_cray, -[AC_EGREP_CPP(webecray, -[#if defined CRAY && ! defined CRAY2 -webecray -#else -wenotbecray -#endif -], ac_cv_os_cray=yes, ac_cv_os_cray=no)]) -if test $ac_cv_os_cray = yes; then - for ac_func in _getb67 GETB67 getb67; do - AC_CHECK_FUNC($ac_func, - [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func, - [Define to one of '_getb67', 'GETB67', - 'getb67' for Cray-2 and Cray-YMP - systems. This function is required for - 'alloca.c' support on those systems.]) - break]) - done -fi - -AC_CACHE_CHECK([stack direction for C alloca], - [ac_cv_c_stack_direction], -[AC_RUN_IFELSE([AC_LANG_SOURCE( -[AC_INCLUDES_DEFAULT -int -find_stack_direction (int *addr, int depth) -{ - int dir, dummy = 0; - if (! addr) - addr = &dummy; - *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; - dir = depth ? find_stack_direction (addr, depth - 1) : 0; - return dir + dummy; -} - -int -main (int argc, char **argv) -{ - return find_stack_direction (0, argc + !argv + 20) < 0; -}])], - [ac_cv_c_stack_direction=1], - [ac_cv_c_stack_direction=-1], - [ac_cv_c_stack_direction=0])]) -AH_VERBATIM([STACK_DIRECTION], -[/* If using the C implementation of alloca, define if you know the - direction of stack growth for your system; otherwise it will be - automatically deduced at runtime. - STACK_DIRECTION > 0 => grows toward higher addresses - STACK_DIRECTION < 0 => grows toward lower addresses - STACK_DIRECTION = 0 => direction of growth unknown */ -@%:@undef STACK_DIRECTION])dnl -AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction) -])# _AC_LIBOBJ_ALLOCA -]) diff --git a/gnulib/m4/argz.m4 b/gnulib/m4/argz.m4 deleted file mode 100644 index 38f1e61..0000000 --- a/gnulib/m4/argz.m4 +++ /dev/null @@ -1,80 +0,0 @@ -# Portability macros for glibc argz. -*- Autoconf -*- -# -# 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 11 argz.m4 - -AC_DEFUN([gl_FUNC_ARGZ], -[gl_PREREQ_ARGZ - -AC_REQUIRE([AC_C_RESTRICT]) - -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.]) - AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h - does not typedef error_t.])], - [#if defined(HAVE_ARGZ_H) -# include -#endif]) - -ARGZ_H= -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 -dnl on "known bad" systems). Could use a runtime check, but -dnl (a) detecting malloc issues is notoriously unreliable -dnl (b) only known system that declares argz functions, -dnl provides them, yet they are broken, is cygwin -dnl releases prior to 5-May-2007 (1.5.24 and earlier) -dnl So, it's more straightforward simply to special case -dnl this for known bad systems. -AS_IF([test -z "$ARGZ_H"], - [AC_CACHE_CHECK( - [if argz actually works], - [lt_cv_sys_argz_works], - [[case $host_os in #( - *cygwin*) - lt_cv_sys_argz_works=no - if test "$cross_compiling" != no; then - lt_cv_sys_argz_works="guessing no" - else - lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/' - save_IFS=$IFS - IFS=-. - set x `uname -r | sed -e "$lt_sed_extract_leading_digits"` - IFS=$save_IFS - lt_os_major=${2-0} - lt_os_minor=${3-0} - lt_os_micro=${4-0} - if test "$lt_os_major" -gt 1 \ - || { test "$lt_os_major" -eq 1 \ - && { test "$lt_os_minor" -gt 5 \ - || { test "$lt_os_minor" -eq 5 \ - && test "$lt_os_micro" -gt 24; }; }; }; then - lt_cv_sys_argz_works=yes - fi - fi - ;; #( - *) lt_cv_sys_argz_works=yes ;; - esac]]) - 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_SUBST([ARGZ_H]) -AM_CONDITIONAL([GL_GENERATE_ARGZ_H], [test -n "$ARGZ_H"]) -]) - -# Prerequisites of lib/argz.c. -AC_DEFUN([gl_PREREQ_ARGZ], [:]) diff --git a/gnulib/m4/btowc.m4 b/gnulib/m4/btowc.m4 deleted file mode 100644 index e565321..0000000 --- a/gnulib/m4/btowc.m4 +++ /dev/null @@ -1,116 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_BTOWC], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - dnl Check whether is usable at all, first. Otherwise the test - dnl program below may lead to an endless loop. See - dnl . - AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - - AC_CHECK_FUNCS_ONCE([btowc]) - if test $ac_cv_func_btowc = no; then - HAVE_BTOWC=0 - else - - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - - dnl Cygwin 1.7.2 btowc('\0') is WEOF, not 0. - AC_CACHE_CHECK([whether btowc(0) is correct], - [gl_cv_func_btowc_nul], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (btowc ('\0') != 0) - return 1; - return 0; -}]])], - [gl_cv_func_btowc_nul=yes], - [gl_cv_func_btowc_nul=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess no on Cygwin. - cygwin*) gl_cv_func_btowc_nul="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_nul="guessing yes" ;; - esac -changequote([,])dnl - ]) - ]) - - dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF. - AC_CACHE_CHECK([whether btowc(EOF) is correct], - [gl_cv_func_btowc_eof], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on IRIX. - irix*) gl_cv_func_btowc_eof="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_btowc_eof="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (btowc (EOF) != WEOF) - return 1; - } - return 0; -}]])], - [gl_cv_func_btowc_eof=yes], - [gl_cv_func_btowc_eof=no], - [:]) - fi - ]) - - case "$gl_cv_func_btowc_nul" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - case "$gl_cv_func_btowc_eof" in - *yes) ;; - *) REPLACE_BTOWC=1 ;; - esac - fi -]) - -# Prerequisites of lib/btowc.c. -AC_DEFUN([gl_PREREQ_BTOWC], [ - : -]) diff --git a/gnulib/m4/canonicalize.m4 b/gnulib/m4/canonicalize.m4 deleted file mode 100644 index ea51ac4..0000000 --- a/gnulib/m4/canonicalize.m4 +++ /dev/null @@ -1,124 +0,0 @@ -# canonicalize.m4 serial 26 - -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. - -# Provides canonicalize_file_name and canonicalize_filename_mode, but does -# not provide or fix realpath. -AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name]) - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - else - case "$gl_cv_func_realpath_works" in - *yes) ;; - *) REPLACE_CANONICALIZE_FILE_NAME=1 ;; - esac - fi -]) - -# Provides canonicalize_file_name and realpath. -AC_DEFUN([gl_CANONICALIZE_LGPL], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE]) - if test $ac_cv_func_canonicalize_file_name = no; then - HAVE_CANONICALIZE_FILE_NAME=0 - if test $ac_cv_func_realpath = no; then - HAVE_REALPATH=0 - else - case "$gl_cv_func_realpath_works" in - *yes) ;; - *) REPLACE_REALPATH=1 ;; - esac - fi - else - case "$gl_cv_func_realpath_works" in - *yes) - ;; - *) - REPLACE_CANONICALIZE_FILE_NAME=1 - REPLACE_REALPATH=1 - ;; - esac - fi -]) - -# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation -# (no REPLACE_CANONICALIZE_FILE_NAME, no REPLACE_REALPATH, no AC_LIBOBJ). -AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], -[ - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink]) - AC_REQUIRE([gl_DOUBLE_SLASH_ROOT]) - AC_REQUIRE([gl_FUNC_REALPATH_WORKS]) - AC_CHECK_HEADERS_ONCE([sys/param.h]) -]) - -# Check whether realpath works. Assume that if a platform has both -# realpath and canonicalize_file_name, but the former is broken, then -# so is the latter. -AC_DEFUN([gl_FUNC_REALPATH_WORKS], -[ - AC_CHECK_FUNCS_ONCE([realpath]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [ - touch conftest.a - mkdir conftest.d - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ - ]GL_NOCRASH[ - #include - #include - ]], [[ - int result = 0; - { - char *name = realpath ("conftest.a", NULL); - if (!(name && *name == '/')) - result |= 1; - } - { - char *name = realpath ("conftest.b/../conftest.a", NULL); - if (name != NULL) - result |= 2; - } - { - char *name = realpath ("conftest.a/", NULL); - if (name != NULL) - result |= 4; - } - { - char *name1 = realpath (".", NULL); - char *name2 = realpath ("conftest.d//./..", NULL); - if (strcmp (name1, name2) != 0) - result |= 8; - } - return result; - ]]) - ], - [gl_cv_func_realpath_works=yes], - [gl_cv_func_realpath_works=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_realpath_works="guessing no" ;; - esac - ]) - rm -rf conftest.a conftest.d - ]) - case "$gl_cv_func_realpath_works" in - *yes) - AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath() - can malloc memory, always gives an absolute path, and handles - trailing slash correctly.]) - ;; - esac -]) diff --git a/gnulib/m4/close.m4 b/gnulib/m4/close.m4 deleted file mode 100644 index 379e70d..0000000 --- a/gnulib/m4/close.m4 +++ /dev/null @@ -1,33 +0,0 @@ -# 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 deleted file mode 100644 index cf53d24..0000000 --- a/gnulib/m4/codeset.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# codeset.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2000-2002, 2006, 2008-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_DEFUN([AM_LANGINFO_CODESET], -[ - AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[char* cs = nl_langinfo(CODESET); return !cs;]])], - [am_cv_langinfo_codeset=yes], - [am_cv_langinfo_codeset=no]) - ]) - if test $am_cv_langinfo_codeset = yes; then - AC_DEFINE([HAVE_LANGINFO_CODESET], [1], - [Define if you have and nl_langinfo(CODESET).]) - fi -]) diff --git a/gnulib/m4/configmake.m4 b/gnulib/m4/configmake.m4 deleted file mode 100644 index 8c82371..0000000 --- a/gnulib/m4/configmake.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# configmake.m4 serial 1 -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. - -# gl_CONFIGMAKE_PREP -# ------------------ -# Guarantee all of the standard directory variables, even when used with -# autoconf 2.59 (datarootdir wasn't supported until 2.59c) or automake -# 1.9.6 (pkglibexecdir wasn't supported until 1.10b.). -AC_DEFUN([gl_CONFIGMAKE_PREP], -[ - dnl Technically, datadir should default to datarootdir. But if - dnl autoconf is too old to provide datarootdir, then reversing the - dnl definition is a reasonable compromise. Only AC_SUBST a variable - dnl if it was not already defined earlier by autoconf. - if test "x$datarootdir" = x; then - AC_SUBST([datarootdir], ['${datadir}']) - fi - dnl Copy the approach used in autoconf 2.60. - if test "x$docdir" = x; then - AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], - ['${datarootdir}/doc/${PACKAGE_TARNAME}'], - ['${datarootdir}/doc/${PACKAGE}'])]) - fi - dnl The remaining variables missing from autoconf 2.59 are easier. - if test "x$htmldir" = x; then - AC_SUBST([htmldir], ['${docdir}']) - fi - if test "x$dvidir" = x; then - AC_SUBST([dvidir], ['${docdir}']) - fi - if test "x$pdfdir" = x; then - AC_SUBST([pdfdir], ['${docdir}']) - fi - if test "x$psdir" = x; then - AC_SUBST([psdir], ['${docdir}']) - fi - if test "x$lispdir" = x; then - AC_SUBST([lispdir], ['${datarootdir}/emacs/site-lisp']) - fi - if test "x$localedir" = x; then - AC_SUBST([localedir], ['${datarootdir}/locale']) - fi - - dnl Automake 1.9.6 only lacks pkglibexecdir; and since 1.11 merely - dnl provides it without AC_SUBST, this blind use of AC_SUBST is safe. - AC_SUBST([pkglibexecdir], ['${libexecdir}/${PACKAGE}']) -]) diff --git a/gnulib/m4/ctype.m4 b/gnulib/m4/ctype.m4 deleted file mode 100644 index c1a4f22..0000000 --- a/gnulib/m4/ctype.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# ctype_h.m4 serial 6 -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_CTYPE_H], -[ - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_NEXT_HEADERS([ctype.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [isblank]) -]) - -AC_DEFUN([gl_CTYPE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_CTYPE_H_DEFAULTS], -[ - GNULIB_ISBLANK=0; AC_SUBST([GNULIB_ISBLANK]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK]) -]) diff --git a/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4 deleted file mode 100644 index 1e03751..0000000 --- a/gnulib/m4/double-slash-root.m4 +++ /dev/null @@ -1,38 +0,0 @@ -# double-slash-root.m4 serial 4 -*- Autoconf -*- -dnl Copyright (C) 2006, 2008-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_SLASH_ROOT], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root], - [ if test x"$cross_compiling" = xyes ; then - # When cross-compiling, there is no way to tell whether // is special - # short of a list of hosts. However, the only known hosts to date - # that have a distinct // are Apollo DomainOS (too old to port to), - # Cygwin, and z/OS. If anyone knows of another system for which // has - # special semantics and is distinct from /, please report it to - # . - case $host in - *-cygwin | i370-ibm-openedition) - gl_cv_double_slash_root=yes ;; - *) - # Be optimistic and assume that / and // are the same when we - # don't know. - gl_cv_double_slash_root='unknown, assuming no' ;; - esac - else - set x `ls -di / // 2>/dev/null` - if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then - gl_cv_double_slash_root=no - else - gl_cv_double_slash_root=yes - fi - fi]) - if test "$gl_cv_double_slash_root" = yes; then - AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1], - [Define to 1 if // is a file system root distinct from /.]) - fi -]) diff --git a/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4 deleted file mode 100644 index fc86e80..0000000 --- a/gnulib/m4/dup2.m4 +++ /dev/null @@ -1,81 +0,0 @@ -#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. - -AC_DEFUN([gl_FUNC_DUP2], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - m4_ifdef([gl_FUNC_DUP2_OBSOLETE], [ - AC_CHECK_FUNCS_ONCE([dup2]) - if test $ac_cv_func_dup2 = no; then - HAVE_DUP2=0 - fi - ], [ - AC_DEFINE([HAVE_DUP2], [1], [Define to 1 if you have the 'dup2' function.]) - ]) - if test $HAVE_DUP2 = 1; then - AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works], - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include -#include -#include ]], - [int result = 0; -#ifdef FD_CLOEXEC - if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) - result |= 1; -#endif - if (dup2 (1, 1) == 0) - result |= 2; -#ifdef FD_CLOEXEC - if (fcntl (1, F_GETFD) != FD_CLOEXEC) - result |= 4; -#endif - close (0); - if (dup2 (0, 0) != -1) - result |= 8; - /* Many gnulib modules require POSIX conformance of EBADF. */ - if (dup2 (2, 1000000) == -1 && errno != EBADF) - result |= 16; - return result; - ]) - ], - [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no], - [case "$host_os" in - mingw*) # on this platform, dup2 always returns 0 for success - gl_cv_func_dup2_works="guessing no" ;; - cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 - gl_cv_func_dup2_works="guessing no" ;; - linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a - # closed fd may yield -EBADF instead of -1 / errno=EBADF. - gl_cv_func_dup2_works="guessing no" ;; - freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. - gl_cv_func_dup2_works="guessing no" ;; - haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. - gl_cv_func_dup2_works="guessing no" ;; - *) gl_cv_func_dup2_works="guessing yes" ;; - esac]) - ]) - case "$gl_cv_func_dup2_works" in - *yes) ;; - *) - REPLACE_DUP2=1 - ;; - esac - fi - dnl Replace dup2() for supporting the gnulib-defined fchdir() function, - dnl to keep fchdir's bookkeeping up-to-date. - m4_ifdef([gl_FUNC_FCHDIR], [ - gl_TEST_FCHDIR - if test $HAVE_FCHDIR = 0; then - if test $HAVE_DUP2 = 1; then - REPLACE_DUP2=1 - fi - fi - ]) -]) - -# Prerequisites of lib/dup2.c. -AC_DEFUN([gl_PREREQ_DUP2], []) diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4 deleted file mode 100644 index 75f17e2..0000000 --- a/gnulib/m4/eealloc.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# eealloc.m4 serial 2 -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. - -AC_DEFUN([gl_EEALLOC], -[ - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([gl_EEREALLOC]) - AC_REQUIRE([AC_C_INLINE]) -]) - -AC_DEFUN([gl_EEMALLOC], -[ - _AC_FUNC_MALLOC_IF( - [gl_cv_func_malloc_0_nonnull=1], - [gl_cv_func_malloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull], - [If malloc(0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) - -AC_DEFUN([gl_EEREALLOC], -[ - _AC_FUNC_REALLOC_IF( - [gl_cv_func_realloc_0_nonnull=1], - [gl_cv_func_realloc_0_nonnull=0]) - AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull], - [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this - to 0.]) -]) diff --git a/gnulib/m4/environ.m4 b/gnulib/m4/environ.m4 deleted file mode 100644 index 8eb57c9..0000000 --- a/gnulib/m4/environ.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - -AC_DEFUN_ONCE([gl_ENVIRON], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - dnl Persuade glibc to declare environ. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_HEADERS_ONCE([unistd.h]) - gt_CHECK_VAR_DECL( - [#if HAVE_UNISTD_H - #include - #endif - /* mingw, BeOS, Haiku declare environ in , not in . */ - #include - ], - [environ]) - if test $gt_cv_var_environ_declaration != yes; then - HAVE_DECL_ENVIRON=0 - fi -]) - -# Check if a variable is properly declared. -# gt_CHECK_VAR_DECL(includes,variable) -AC_DEFUN([gt_CHECK_VAR_DECL], -[ - define([gt_cv_var], [gt_cv_var_]$2[_declaration]) - AC_MSG_CHECKING([if $2 is properly declared]) - AC_CACHE_VAL([gt_cv_var], [ - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[$1 - extern struct { int foo; } $2;]], - [[$2.foo = 1;]])], - [gt_cv_var=no], - [gt_cv_var=yes])]) - AC_MSG_RESULT([$gt_cv_var]) - if test $gt_cv_var = yes; then - AC_DEFINE([HAVE_]m4_translit($2, [a-z], [A-Z])[_DECL], 1, - [Define if you have the declaration of $2.]) - fi - undefine([gt_cv_var]) -]) diff --git a/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4 deleted file mode 100644 index 1e76ba2..0000000 --- a/gnulib/m4/errno_h.m4 +++ /dev/null @@ -1,134 +0,0 @@ -# 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. - -AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [ - AC_EGREP_CPP([booboo],[ -#include -#if !defined ETXTBSY -booboo -#endif -#if !defined ENOMSG -booboo -#endif -#if !defined EIDRM -booboo -#endif -#if !defined ENOLINK -booboo -#endif -#if !defined EPROTO -booboo -#endif -#if !defined EMULTIHOP -booboo -#endif -#if !defined EBADMSG -booboo -#endif -#if !defined EOVERFLOW -booboo -#endif -#if !defined ENOTSUP -booboo -#endif -#if !defined ENETRESET -booboo -#endif -#if !defined ECONNABORTED -booboo -#endif -#if !defined ESTALE -booboo -#endif -#if !defined EDQUOT -booboo -#endif -#if !defined ECANCELED -booboo -#endif -#if !defined EOWNERDEAD -booboo -#endif -#if !defined ENOTRECOVERABLE -booboo -#endif - ], - [gl_cv_header_errno_h_complete=no], - [gl_cv_header_errno_h_complete=yes]) - ]) - if test $gl_cv_header_errno_h_complete = yes; then - ERRNO_H='' - else - gl_NEXT_HEADERS([errno.h]) - ERRNO_H='errno.h' - fi - AC_SUBST([ERRNO_H]) - AM_CONDITIONAL([GL_GENERATE_ERRNO_H], [test -n "$ERRNO_H"]) - gl_REPLACE_ERRNO_VALUE([EMULTIHOP]) - gl_REPLACE_ERRNO_VALUE([ENOLINK]) - gl_REPLACE_ERRNO_VALUE([EOVERFLOW]) -]) - -# Assuming $1 = EOVERFLOW. -# The EOVERFLOW errno value ought to be defined in , according to -# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and -# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined. -# Check for the value of EOVERFLOW. -# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE. -AC_DEFUN([gl_REPLACE_ERRNO_VALUE], -[ - if test -n "$ERRNO_H"; then - AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [ - AC_EGREP_CPP([yes],[ -#include -#ifdef ]$1[ -yes -#endif - ], - [gl_cv_header_errno_h_]$1[=yes], - [gl_cv_header_errno_h_]$1[=no]) - if test $gl_cv_header_errno_h_]$1[ = no; then - AC_EGREP_CPP([yes],[ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -#ifdef ]$1[ -yes -#endif - ], [gl_cv_header_errno_h_]$1[=hidden]) - if test $gl_cv_header_errno_h_]$1[ = hidden; then - dnl The macro exists but is hidden. - dnl Define it to the same value. - AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [ -#define _XOPEN_SOURCE_EXTENDED 1 -#include -/* The following two lines are a workaround against an autoconf-2.52 bug. */ -#include -#include -]) - fi - fi - ]) - case $gl_cv_header_errno_h_]$1[ in - yes | no) - ]$1[_HIDDEN=0; ]$1[_VALUE= - ;; - *) - ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1[" - ;; - esac - AC_SUBST($1[_HIDDEN]) - AC_SUBST($1[_VALUE]) - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gnulib/m4/exponentd.m4 b/gnulib/m4/exponentd.m4 deleted file mode 100644 index 0ae4ccf..0000000 --- a/gnulib/m4/exponentd.m4 +++ /dev/null @@ -1,116 +0,0 @@ -# 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 deleted file mode 100644 index 6d17d8a..0000000 --- a/gnulib/m4/extensions.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# serial 12 -*- Autoconf -*- -# Enable extensions on systems that normally disable them. - -# 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. - -# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS -# Autoconf. Perhaps we can remove this once we can assume Autoconf -# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly -# enough in this area it's likely we'll need to redefine -# AC_USE_SYSTEM_EXTENSIONS for quite some time. - -# If autoconf reports a warning -# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS -# the fix is -# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked -# but always AC_REQUIREd, -# 2) to ensure that for each occurrence of -# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -# or -# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) -# the corresponding gnulib module description has 'extensions' among -# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS -# invocation occurs in gl_EARLY, not in gl_INIT. - -# AC_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -# Remember that #undef in AH_VERBATIM gets replaced with #define by -# AC_DEFINE. The goal here is to define all known feature-enabling -# macros, then, if reports of conflicts are made, disable macros that -# cause problems on some platforms (such as __EXTENSIONS__). -AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], -[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl -AC_BEFORE([$0], [AC_RUN_IFELSE])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=]) - if test "$MINIX" = yes; then - AC_DEFINE([_POSIX_SOURCE], [1], - [Define to 1 if you need to in order for 'stat' and other - things to work.]) - AC_DEFINE([_POSIX_1_SOURCE], [2], - [Define to 2 if the system does not provide POSIX.1 features - except with this defined.]) - AC_DEFINE([_MINIX], [1], - [Define to 1 if on MINIX.]) - fi - - dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500, - dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already - dnl provided. - case "$host_os" in - hpux*) - AC_DEFINE([_XOPEN_SOURCE], [500], - [Define to 500 only on HP-UX.]) - ;; - esac - - AH_VERBATIM([__EXTENSIONS__], -[/* Enable extensions on AIX 3, Interix. */ -#ifndef _ALL_SOURCE -# undef _ALL_SOURCE -#endif -/* Enable 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 -#endif -/* Enable threading extensions on Solaris. */ -#ifndef _POSIX_PTHREAD_SEMANTICS -# undef _POSIX_PTHREAD_SEMANTICS -#endif -/* Enable extensions on HP NonStop. */ -#ifndef _TANDEM_SOURCE -# undef _TANDEM_SOURCE -#endif -/* Enable general extensions on Solaris. */ -#ifndef __EXTENSIONS__ -# undef __EXTENSIONS__ -#endif -]) - AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__], - [ac_cv_safe_to_define___extensions__], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[ -# define __EXTENSIONS__ 1 - ]AC_INCLUDES_DEFAULT])], - [ac_cv_safe_to_define___extensions__=yes], - [ac_cv_safe_to_define___extensions__=no])]) - test $ac_cv_safe_to_define___extensions__ = yes && - AC_DEFINE([__EXTENSIONS__]) - AC_DEFINE([_ALL_SOURCE]) - AC_DEFINE([_DARWIN_C_SOURCE]) - AC_DEFINE([_GNU_SOURCE]) - AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) - AC_DEFINE([_TANDEM_SOURCE]) -])# AC_USE_SYSTEM_EXTENSIONS - -# gl_USE_SYSTEM_EXTENSIONS -# ------------------------ -# Enable extensions on systems that normally disable them, -# typically due to standards-conformance issues. -AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], -[ - dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS. - dnl gnulib does not need it. But if it gets required by third-party macros - dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a - dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS". - dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE, - dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck. - AC_REQUIRE([AC_GNU_SOURCE]) - - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4 deleted file mode 100644 index 9862741..0000000 --- a/gnulib/m4/fcntl-o.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# 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. - -dnl Written by Paul Eggert. - -# Test whether the flags O_NOATIME and O_NOFOLLOW actually work. -# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. -# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. -AC_DEFUN([gl_FCNTL_O_FLAGS], -[ - dnl Persuade glibc to define O_NOATIME and O_NOFOLLOW. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CHECK_FUNCS_ONCE([symlink]) - AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #if HAVE_UNISTD_H - # include - #else /* on Windows with MSVC */ - # include - # include - # defined sleep(n) _sleep ((n) * 1000) - #endif - #include - #ifndef O_NOATIME - #define O_NOATIME 0 - #endif - #ifndef O_NOFOLLOW - #define O_NOFOLLOW 0 - #endif - static int const constants[] = - { - O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, - O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY - }; - ]], - [[ - int result = !constants; - #if HAVE_SYMLINK - { - static char const sym[] = "conftest.sym"; - if (symlink (".", sym) != 0) - result |= 2; - else - { - int fd = open (sym, O_RDONLY | O_NOFOLLOW); - if (fd >= 0) - { - close (fd); - result |= 4; - } - } - unlink (sym); - } - #endif - { - static char const file[] = "confdefs.h"; - int fd = open (file, O_RDONLY | O_NOATIME); - if (fd < 0) - result |= 8; - else - { - struct stat st0; - if (fstat (fd, &st0) != 0) - result |= 16; - else - { - char c; - sleep (1); - if (read (fd, &c, 1) != 1) - result |= 24; - else - { - if (close (fd) != 0) - result |= 32; - else - { - struct stat st1; - if (stat (file, &st1) != 0) - result |= 40; - else - if (st0.st_atime != st1.st_atime) - result |= 64; - } - } - } - } - } - return result;]])], - [gl_cv_header_working_fcntl_h=yes], - [case $? in #( - 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( - 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( - 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( - *) gl_cv_header_working_fcntl_h='no';; - esac], - [gl_cv_header_working_fcntl_h=cross-compiling])]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOATIME* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val], - [Define to 1 if O_NOATIME works.]) - - case $gl_cv_header_working_fcntl_h in #( - *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( - *) ac_val=1;; - esac - AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val], - [Define to 1 if O_NOFOLLOW works.]) -]) diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4 deleted file mode 100644 index cac28ae..0000000 --- a/gnulib/m4/fcntl_h.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# serial 15 -# Configure fcntl.h. -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. - -dnl Written by Paul Eggert. - -AC_DEFUN([gl_FCNTL_H], -[ - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - AC_REQUIRE([gl_FCNTL_O_FLAGS]) - gl_NEXT_HEADERS([fcntl.h]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, if it is not common - dnl enough to be declared everywhere. - gl_WARN_ON_USE_PREPARE([[#include - ]], [fcntl openat]) -]) - -AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_FCNTL_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_FCNTL_H_DEFAULTS], -[ - GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL]) - GNULIB_NONBLOCKING=0; AC_SUBST([GNULIB_NONBLOCKING]) - GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN]) - GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL]) - HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT]) - REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL]) - REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN]) - REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT]) -]) diff --git a/gnulib/m4/fdopen.m4 b/gnulib/m4/fdopen.m4 deleted file mode 100644 index 14f1554..0000000 --- a/gnulib/m4/fdopen.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# 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 deleted file mode 100644 index 51c9c7b..0000000 --- a/gnulib/m4/float_h.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# 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. - -AC_DEFUN([gl_FLOAT_H], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - FLOAT_H= - REPLACE_FLOAT_LDBL=0 - case "$host_os" in - aix* | beos* | openbsd* | mirbsd* | irix*) - FLOAT_H=float.h - ;; - freebsd*) - case "$host_cpu" in -changequote(,)dnl - i[34567]86 ) -changequote([,])dnl - FLOAT_H=float.h - ;; - x86_64 ) - # On x86_64 systems, the C compiler may still be generating - # 32-bit code. - AC_EGREP_CPP([yes], - [#if defined __LP64__ || defined __x86_64__ || defined __amd64__ - yes - #endif], - [], - [FLOAT_H=float.h]) - ;; - esac - ;; - linux*) - case "$host_cpu" in - powerpc*) - FLOAT_H=float.h - ;; - esac - ;; - esac - case "$host_os" in - aix* | freebsd* | linux*) - if test -n "$FLOAT_H"; then - REPLACE_FLOAT_LDBL=1 - fi - ;; - esac - - dnl Test against glibc-2.7 Linux/SPARC64 bug. - REPLACE_ITOLD=0 - AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works], - [gl_cv_func_itold_works], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -int i = -1; -volatile long double ld; -int main () -{ - ld += i * 1.0L; - if (ld > 0) - return 1; - return 0; -}]])], - [gl_cv_func_itold_works=yes], - [gl_cv_func_itold_works=no], - [case "$host" in - sparc*-*-linux*) - AC_EGREP_CPP([yes], - [#if defined __LP64__ || defined __arch64__ - yes - #endif], - [gl_cv_func_itold_works="guessing no"], - [gl_cv_func_itold_works="guessing yes"]) - ;; - *) gl_cv_func_itold_works="guessing yes" ;; - esac - ]) - ]) - case "$gl_cv_func_itold_works" in - *no) - REPLACE_ITOLD=1 - dnl We add the workaround to but also to , - dnl to increase the chances that the fix function gets pulled in. - FLOAT_H=float.h - ;; - esac - - if test -n "$FLOAT_H"; then - gl_NEXT_HEADERS([float.h]) - fi - AC_SUBST([FLOAT_H]) - AM_CONDITIONAL([GL_GENERATE_FLOAT_H], [test -n "$FLOAT_H"]) - AC_SUBST([REPLACE_ITOLD]) -]) diff --git a/gnulib/m4/fnmatch.m4 b/gnulib/m4/fnmatch.m4 deleted file mode 100644 index e46b6e5..0000000 --- a/gnulib/m4/fnmatch.m4 +++ /dev/null @@ -1,156 +0,0 @@ -# Check for fnmatch - serial 9. - -# 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. - -# Autoconf defines AC_FUNC_FNMATCH, but that is obsolescent. -# New applications should use the macros below instead. - -# Request a POSIX compliant fnmatch function. -AC_DEFUN([gl_FUNC_FNMATCH_POSIX], -[ - m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX]) - - dnl Persuade glibc to declare FNM_CASEFOLD etc. - dnl This is only needed if gl_fnmatch_required = GNU. It would be possible - dnl to avoid this dependency for gl_FUNC_FNMATCH_POSIX by putting - dnl gl_FUNC_FNMATCH_GNU into a separate .m4 file. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - FNMATCH_H= - gl_fnmatch_required_lowercase=` - echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]' - ` - gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" - AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch], - [$gl_fnmatch_cache_var], - [dnl Some versions of Solaris, SCO, and the GNU C Library - dnl have a broken or incompatible fnmatch. - dnl So we run a test program. If we are cross-compiling, take no chance. - dnl Thanks to John Oleynick, François Pinard, and Paul Eggert for this - dnl test. - if test $gl_fnmatch_required = GNU; then - gl_fnmatch_gnu_start= - gl_fnmatch_gnu_end= - else - gl_fnmatch_gnu_start='#if 0' - gl_fnmatch_gnu_end='#endif' - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - static int - y (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == 0; - } - static int - n (char const *pattern, char const *string, int flags) - { - return fnmatch (pattern, string, flags) == FNM_NOMATCH; - } - ]], - [[char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; - char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; - static char const A_1[] = { 'A' - 1, 0 }; - static char const A01[] = { 'A' + 1, 0 }; - static char const a_1[] = { 'a' - 1, 0 }; - static char const a01[] = { 'a' + 1, 0 }; - static char const bs_1[] = { '\\\\' - 1, 0 }; - static char const bs01[] = { '\\\\' + 1, 0 }; - int result = 0; - if (!n ("a*", "", 0)) - return 1; - if (!y ("a*", "abc", 0)) - return 1; - if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ - return 1; - if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) - return 2; - if (!y ("a\\\\bc", "abc", 0)) - return 3; - if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) - return 3; - if (!y ("*x", ".x", 0)) - return 4; - if (!n ("*x", ".x", FNM_PERIOD)) - return 4; - if (!y (Apat, "\\\\", 0)) - return 5; - if (!y (Apat, "A", 0)) - return 5; - if (!y (apat, "\\\\", 0)) - return 5; - if (!y (apat, "a", 0)) - return 5; - if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, a01, 0) == ('a' < '\\\\'))) - return 5; - if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) - return 5; - if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) - return 5; - if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) - return 5; - if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) - return 5; - $gl_fnmatch_gnu_start - if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) - result |= 8; - if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) - result |= 16; - if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) - result |= 32; - if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) - result |= 64; - $gl_fnmatch_gnu_end - return result; - ]])], - [eval "$gl_fnmatch_cache_var=yes"], - [eval "$gl_fnmatch_cache_var=no"], - [eval "$gl_fnmatch_cache_var=\"guessing no\""]) - ]) - eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" - if test "$gl_fnmatch_result" = yes; then - dnl Not strictly necessary. Only to avoid spurious leftover files if people - dnl don't do "make distclean". - rm -f "$gl_source_base/fnmatch.h" - else - FNMATCH_H=fnmatch.h - fi - AC_SUBST([FNMATCH_H]) - AM_CONDITIONAL([GL_GENERATE_FNMATCH_H], [test -n "$FNMATCH_H"]) -]) - -# Request a POSIX compliant fnmatch function with GNU extensions. -AC_DEFUN([gl_FUNC_FNMATCH_GNU], -[ - m4_divert_text([INIT_PREPARE], [gl_fnmatch_required=GNU]) - - AC_REQUIRE([gl_FUNC_FNMATCH_POSIX]) -]) - -AC_DEFUN([gl_PREREQ_FNMATCH], -[ - dnl We must choose a different name for our function, since on ELF systems - dnl a broken fnmatch() in libc.so would override our fnmatch() if it is - dnl compiled into a shared library. - AC_DEFINE_UNQUOTED([fnmatch], [${gl_fnmatch_required_lowercase}_fnmatch], - [Define to a replacement function name for fnmatch().]) - dnl Prerequisites of lib/fnmatch.c. - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_DECLS([isblank], [], [], [[#include ]]) - AC_CHECK_FUNCS_ONCE([btowc isblank iswctype mbsrtowcs mempcpy wmemchr wmemcpy wmempcpy]) - AC_CHECK_HEADERS_ONCE([wctype.h]) -]) diff --git a/gnulib/m4/fpieee.m4 b/gnulib/m4/fpieee.m4 deleted file mode 100644 index 82fd778..0000000 --- a/gnulib/m4/fpieee.m4 +++ /dev/null @@ -1,54 +0,0 @@ -# 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 deleted file mode 100644 index 3ab3297..0000000 --- a/gnulib/m4/fstat.m4 +++ /dev/null @@ -1,39 +0,0 @@ -# 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 deleted file mode 100644 index 50b96c6..0000000 --- a/gnulib/m4/getcwd.m4 +++ /dev/null @@ -1,155 +0,0 @@ -# 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 deleted file mode 100644 index a6f4872..0000000 --- a/gnulib/m4/getdelim.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# getdelim.m4 serial 10 - -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, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ([2.59]) - -AC_DEFUN([gl_FUNC_GETDELIM], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - - dnl Persuade glibc to declare getdelim(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([getdelim]) - - AC_CHECK_FUNCS_ONCE([getdelim]) - if test $ac_cv_func_getdelim = yes; then - HAVE_GETDELIM=1 - dnl Found it in some library. Verify that it works. - AC_CACHE_CHECK([for working getdelim function], [gl_cv_func_working_getdelim], - [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getdelim (&line, &siz, '\n', in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getdelim (&line, &siz, '\n', in) == -1) - return 3; - } - return 0; - } - ]])], [gl_cv_func_working_getdelim=yes] dnl The library version works. - , [gl_cv_func_working_getdelim=no] dnl The library version does NOT work. - , dnl We're cross compiling. Assume it works on glibc2 systems. - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - ], - [gl_cv_func_working_getdelim="guessing yes"], - [gl_cv_func_working_getdelim="guessing no"])] - )]) - case "$gl_cv_func_working_getdelim" in - *no) - REPLACE_GETDELIM=1 - ;; - esac - else - HAVE_GETDELIM=0 - fi - - if test $ac_cv_have_decl_getdelim = no; then - HAVE_DECL_GETDELIM=0 - fi -]) - -# Prerequisites of lib/getdelim.c. -AC_DEFUN([gl_PREREQ_GETDELIM], -[ - AC_CHECK_FUNCS([flockfile funlockfile]) - AC_CHECK_DECLS([getc_unlocked]) -]) diff --git a/gnulib/m4/getline.m4 b/gnulib/m4/getline.m4 deleted file mode 100644 index 72fbc9d..0000000 --- a/gnulib/m4/getline.m4 +++ /dev/null @@ -1,96 +0,0 @@ -# getline.m4 serial 26 - -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 -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -AC_PREREQ([2.59]) - -dnl See if there's a working, system-supplied version of the getline function. -dnl We can't just do AC_REPLACE_FUNCS([getline]) because some systems -dnl have a function by that name in -linet that doesn't have anything -dnl to do with the function we need. -AC_DEFUN([gl_FUNC_GETLINE], -[ - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - - dnl Persuade glibc to declare getline(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([getline]) - - gl_getline_needs_run_time_check=no - AC_CHECK_FUNC([getline], - [dnl Found it in some library. Verify that it works. - gl_getline_needs_run_time_check=yes], - [am_cv_func_working_getline=no]) - if test $gl_getline_needs_run_time_check = yes; then - AC_CACHE_CHECK([for working getline function], [am_cv_func_working_getline], - [echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data - AC_RUN_IFELSE([AC_LANG_SOURCE([[ -# include -# include -# include - int main () - { - FILE *in = fopen ("./conftest.data", "r"); - if (!in) - return 1; - { - /* Test result for a NULL buffer and a zero size. - Based on a test program from Karl Heuer. */ - char *line = NULL; - size_t siz = 0; - int len = getline (&line, &siz, in); - if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) - return 2; - } - { - /* Test result for a NULL buffer and a non-zero size. - This crashes on FreeBSD 8.0. */ - char *line = NULL; - size_t siz = (size_t)(~0) / 4; - if (getline (&line, &siz, in) == -1) - return 3; - } - return 0; - } - ]])], [am_cv_func_working_getline=yes] dnl The library version works. - , [am_cv_func_working_getline=no] dnl The library version does NOT work. - , dnl We're cross compiling. Assume it works on glibc2 systems. - [AC_EGREP_CPP([Lucky GNU user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ >= 2) && !defined __UCLIBC__ - Lucky GNU user - #endif -#endif - ], - [am_cv_func_working_getline="guessing yes"], - [am_cv_func_working_getline="guessing no"])] - )]) - fi - - if test $ac_cv_have_decl_getline = no; then - HAVE_DECL_GETLINE=0 - fi - - case "$am_cv_func_working_getline" in - *no) - dnl Set REPLACE_GETLINE always: Even if we have not found the broken - dnl getline function among $LIBS, it may exist in libinet and the - dnl executable may be linked with -linet. - REPLACE_GETLINE=1 - ;; - esac -]) - -# Prerequisites of lib/getline.c. -AC_DEFUN([gl_PREREQ_GETLINE], -[ - : -]) diff --git a/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4 deleted file mode 100644 index f6902b5..0000000 --- a/gnulib/m4/getopt.m4 +++ /dev/null @@ -1,368 +0,0 @@ -# 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. - -# Request a POSIX compliant getopt function. -AC_DEFUN([gl_FUNC_GETOPT_POSIX], -[ - m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX]) - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([gl_GETOPT_CHECK_HEADERS]) - dnl Other modules can request the gnulib implementation of the getopt - dnl functions unconditionally, by defining gl_REPLACE_GETOPT_ALWAYS. - dnl argp.m4 does this. - m4_ifdef([gl_REPLACE_GETOPT_ALWAYS], [ - REPLACE_GETOPT=1 - ], [ - REPLACE_GETOPT=0 - if test -n "$gl_replace_getopt"; then - REPLACE_GETOPT=1 - fi - ]) - if test $REPLACE_GETOPT = 1; then - dnl Arrange for getopt.h to be created. - gl_GETOPT_SUBSTITUTE_HEADER - fi -]) - -# Request a POSIX compliant getopt function with GNU extensions (such as -# options with optional arguments) and the functions getopt_long, -# getopt_long_only. -AC_DEFUN([gl_FUNC_GETOPT_GNU], -[ - m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU]) - - AC_REQUIRE([gl_FUNC_GETOPT_POSIX]) -]) - -# Determine whether to replace the entire getopt facility. -AC_DEFUN([gl_GETOPT_CHECK_HEADERS], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([AC_PROG_AWK]) dnl for awk that supports ENVIRON - - dnl Persuade Solaris to declare optarg, optind, opterr, optopt. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - gl_CHECK_NEXT_HEADERS([getopt.h]) - if test $ac_cv_header_getopt_h = yes; then - HAVE_GETOPT_H=1 - else - HAVE_GETOPT_H=0 - fi - AC_SUBST([HAVE_GETOPT_H]) - - gl_replace_getopt= - - dnl Test whether is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes]) - fi - - dnl Test whether the function getopt_long is available. - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes]) - fi - - dnl POSIX 2008 does not specify leading '+' behavior, but see - dnl http://austingroupbugs.net/view.php?id=191 for a recommendation on - dnl the next version of POSIX. For now, we only guarantee leading '+' - dnl behavior with getopt-gnu. - if test -z "$gl_replace_getopt"; then - AC_CACHE_CHECK([whether getopt is POSIX compatible], - [gl_cv_func_getopt_posix], - [ - dnl Merging these three different test programs into a single one - dnl would require a reset mechanism. On BSD systems, it can be done - dnl through 'optreset'; on some others (glibc), it can be done by - dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1, - dnl Solaris 9, musl libc), there is no such mechanism. - if test $cross_compiling = no; then - dnl Sanity check. Succeeds everywhere (except on MSVC, - dnl which lacks and getopt() entirely). - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char a[] = "-a"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, a, foo, bar, NULL }; - int c; - - c = getopt (4, argv, "ab"); - if (!(c == 'a')) - return 1; - c = getopt (4, argv, "ab"); - if (!(c == -1)) - return 2; - if (!(optind == 2)) - return 3; - return 0; -} -]])], - [gl_cv_func_getopt_posix=maybe], - [gl_cv_func_getopt_posix=no]) - if test $gl_cv_func_getopt_posix = maybe; then - dnl Sanity check with '+'. Succeeds everywhere (except on MSVC, - dnl which lacks and getopt() entirely). - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char donald[] = "donald"; - static char p[] = "-p"; - static char billy[] = "billy"; - static char duck[] = "duck"; - static char a[] = "-a"; - static char bar[] = "bar"; - char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; - int c; - - c = getopt (7, argv, "+abp:q:"); - if (!(c == -1)) - return 4; - if (!(strcmp (argv[0], "program") == 0)) - return 5; - if (!(strcmp (argv[1], "donald") == 0)) - return 6; - if (!(strcmp (argv[2], "-p") == 0)) - return 7; - if (!(strcmp (argv[3], "billy") == 0)) - return 8; - if (!(strcmp (argv[4], "duck") == 0)) - return 9; - if (!(strcmp (argv[5], "-a") == 0)) - return 10; - if (!(strcmp (argv[6], "bar") == 0)) - return 11; - if (!(optind == 1)) - return 12; - return 0; -} -]])], - [gl_cv_func_getopt_posix=maybe], - [gl_cv_func_getopt_posix=no]) - fi - if test $gl_cv_func_getopt_posix = maybe; then - dnl Detect Mac OS X 10.5, AIX 7.1, mingw bug. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include - -int -main () -{ - static char program[] = "program"; - static char ab[] = "-ab"; - char *argv[3] = { program, ab, NULL }; - if (getopt (2, argv, "ab:") != 'a') - return 13; - if (getopt (2, argv, "ab:") != '?') - return 14; - if (optopt != 'b') - return 15; - if (optind != 2) - return 16; - return 0; -} -]])], - [gl_cv_func_getopt_posix=yes], - [gl_cv_func_getopt_posix=no]) - fi - else - case "$host_os" in - darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; - *) gl_cv_func_getopt_posix="guessing yes";; - esac - fi - ]) - case "$gl_cv_func_getopt_posix" in - *no) gl_replace_getopt=yes ;; - esac - fi - - if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then - AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu], - [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the - # optstring is necessary for programs like m4 that have POSIX-mandated - # semantics for supporting options interspersed with files. - # Also, since getopt_long is a GNU extension, we require optind=0. - # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; - # so take care to revert to the correct (non-)export state. -dnl GNU Coding Standards currently allow awk but not env; besides, env -dnl is ambiguous with environment values that contain newlines. - gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' - case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" - #include - #include - ]GL_NOCRASH[ - ]], [[ - int result = 0; - - nocrash_init(); - - /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, - and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, - OSF/1 5.1, Solaris 10. */ - { - static char conftest[] = "conftest"; - static char plus[] = "-+"; - char *argv[3] = { conftest, plus, NULL }; - opterr = 0; - if (getopt (2, argv, "+a") != '?') - result |= 1; - } - /* This code succeeds on glibc 2.8, mingw, - and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, - IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ - { - static char program[] = "program"; - static char p[] = "-p"; - static char foo[] = "foo"; - static char bar[] = "bar"; - char *argv[] = { program, p, foo, bar, NULL }; - - optind = 1; - if (getopt (4, argv, "p::") != 'p') - result |= 2; - else if (optarg != NULL) - result |= 4; - else if (getopt (4, argv, "p::") != -1) - result |= 6; - else if (optind != 2) - result |= 8; - } - /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ - { - static char program[] = "program"; - static char foo[] = "foo"; - static char p[] = "-p"; - char *argv[] = { program, foo, p, NULL }; - optind = 0; - if (getopt (3, argv, "-p") != 1) - result |= 16; - else if (getopt (3, argv, "-p") != 'p') - result |= 16; - } - /* This code fails on glibc 2.11. */ - { - static char program[] = "program"; - static char b[] = "-b"; - static char a[] = "-a"; - char *argv[] = { program, b, a, NULL }; - optind = opterr = 0; - if (getopt (3, argv, "+:a:b") != 'b') - result |= 32; - else if (getopt (3, argv, "+:a:b") != ':') - result |= 32; - } - /* This code dumps core on glibc 2.14. */ - { - static char program[] = "program"; - static char w[] = "-W"; - static char dummy[] = "dummy"; - char *argv[] = { program, w, dummy, NULL }; - optind = opterr = 1; - if (getopt (3, argv, "W;") != 'W') - result |= 64; - } - return result; - ]])], - [gl_cv_func_getopt_gnu=yes], - [gl_cv_func_getopt_gnu=no], - [dnl Cross compiling. Assume the worst, even on glibc platforms. - gl_cv_func_getopt_gnu="guessing no" - ]) - case $gl_had_POSIXLY_CORRECT in - exported) ;; - yes) AS_UNSET([POSIXLY_CORRECT]); POSIXLY_CORRECT=1 ;; - *) AS_UNSET([POSIXLY_CORRECT]) ;; - esac - ]) - if test "$gl_cv_func_getopt_gnu" != yes; then - gl_replace_getopt=yes - else - AC_CACHE_CHECK([for working GNU getopt_long function], - [gl_cv_func_getopt_long_gnu], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include - #include - ]], - [[static const struct option long_options[] = - { - { "xtremely-",no_argument, NULL, 1003 }, - { "xtra", no_argument, NULL, 1001 }, - { "xtreme", no_argument, NULL, 1002 }, - { "xtremely", no_argument, NULL, 1003 }, - { NULL, 0, NULL, 0 } - }; - /* This code fails on OpenBSD 5.0. */ - { - static char program[] = "program"; - static char xtremel[] = "--xtremel"; - char *argv[] = { program, xtremel, NULL }; - int option_index; - optind = 1; opterr = 0; - if (getopt_long (2, argv, "", long_options, &option_index) != 1003) - return 1; - } - return 0; - ]])], - [gl_cv_func_getopt_long_gnu=yes], - [gl_cv_func_getopt_long_gnu=no], - [dnl Cross compiling. Guess no on OpenBSD, yes otherwise. - case "$host_os" in - openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; - *) gl_cv_func_getopt_long_gnu="guessing yes";; - esac - ]) - ]) - case "$gl_cv_func_getopt_long_gnu" in - *yes) ;; - *) gl_replace_getopt=yes ;; - esac - fi - fi -]) - -AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], -[ - GETOPT_H=getopt.h - AC_DEFINE([__GETOPT_PREFIX], [[rpl_]], - [Define to rpl_ if the getopt replacement functions and variables - should be used.]) - AC_SUBST([GETOPT_H]) -]) - -# Prerequisites of lib/getopt*. -AC_DEFUN([gl_PREREQ_GETOPT], -[ - AC_CHECK_DECLS_ONCE([getenv]) -]) diff --git a/gnulib/m4/getpagesize.m4 b/gnulib/m4/getpagesize.m4 deleted file mode 100644 index 156133a..0000000 --- a/gnulib/m4/getpagesize.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_GETPAGESIZE], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS([getpagesize]) - if test $ac_cv_func_getpagesize = no; then - HAVE_GETPAGESIZE=0 - AC_CHECK_HEADERS([OS.h]) - if test $ac_cv_header_OS_h = yes; then - HAVE_OS_H=1 - fi - AC_CHECK_HEADERS([sys/param.h]) - if test $ac_cv_header_sys_param_h = yes; then - HAVE_SYS_PARAM_H=1 - fi - fi - case "$host_os" in - mingw*) - REPLACE_GETPAGESIZE=1 - ;; - esac - dnl Also check whether it's declared. - dnl mingw has getpagesize() in libgcc.a but doesn't declare it. - AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0]) -]) diff --git a/gnulib/m4/gettimeofday.m4 b/gnulib/m4/gettimeofday.m4 deleted file mode 100644 index eda9702..0000000 --- a/gnulib/m4/gettimeofday.m4 +++ /dev/null @@ -1,140 +0,0 @@ -# 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 deleted file mode 100644 index c938fb1..0000000 --- a/gnulib/m4/glibc21.m4 +++ /dev/null @@ -1,34 +0,0 @@ -# glibc21.m4 serial 5 -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, -dnl with or without modifications, as long as this notice is preserved. - -# Test for the GNU C Library, version 2.1 or newer, or uClibc. -# From Bruno Haible. - -AC_DEFUN([gl_GLIBC21], - [ - AC_CACHE_CHECK([whether we are using the GNU C Library >= 2.1 or uClibc], - [ac_cv_gnu_library_2_1], - [AC_EGREP_CPP([Lucky], - [ -#include -#ifdef __GNU_LIBRARY__ - #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) - Lucky GNU user - #endif -#endif -#ifdef __UCLIBC__ - Lucky user -#endif - ], - [ac_cv_gnu_library_2_1=yes], - [ac_cv_gnu_library_2_1=no]) - ] - ) - AC_SUBST([GLIBC21]) - GLIBC21="$ac_cv_gnu_library_2_1" - ] -) diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4 deleted file mode 100644 index 15d2b2b..0000000 --- a/gnulib/m4/gnulib-common.m4 +++ /dev/null @@ -1,373 +0,0 @@ -# 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. - -# gl_COMMON -# is expanded unconditionally through gnulib-tool magic. -AC_DEFUN([gl_COMMON], [ - dnl Use AC_REQUIRE here, so that the code is expanded once only. - AC_REQUIRE([gl_00GNULIB]) - AC_REQUIRE([gl_COMMON_BODY]) -]) -AC_DEFUN([gl_COMMON_BODY], [ - AH_VERBATIM([_Noreturn], -[/* The _Noreturn keyword of C11. */ -#if ! (defined _Noreturn \ - || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__)) -# if (3 <= __GNUC__ || (__GNUC__ == 2 && 8 <= __GNUC_MINOR__) \ - || 0x5110 <= __SUNPRO_C) -# define _Noreturn __attribute__ ((__noreturn__)) -# elif defined _MSC_VER && 1200 <= _MSC_VER -# define _Noreturn __declspec (noreturn) -# else -# define _Noreturn -# endif -#endif -]) - AH_VERBATIM([isoc99_inline], -[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports - the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of - earlier versions), but does not display it by setting __GNUC_STDC_INLINE__. - __APPLE__ && __MACH__ test for Mac OS X. - __APPLE_CC__ tests for the Apple compiler and its version. - __STDC_VERSION__ tests for the C99 mode. */ -#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__ -# define __GNUC_STDC_INLINE__ 1 -#endif]) - AH_VERBATIM([unused_parameter], -[/* Define as a marker that can be attached to declarations that might not - be used. This helps to reduce warnings, such as from - GCC -Wunused-parameter. */ -#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7) -# define _GL_UNUSED __attribute__ ((__unused__)) -#else -# define _GL_UNUSED -#endif -/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name - is a misnomer outside of parameter lists. */ -#define _UNUSED_PARAMETER_ _GL_UNUSED - -/* The __pure__ attribute was added in gcc 2.96. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) -# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__)) -#else -# define _GL_ATTRIBUTE_PURE /* empty */ -#endif - -/* The __const__ attribute was added in gcc 2.95. */ -#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 95) -# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__)) -#else -# define _GL_ATTRIBUTE_CONST /* empty */ -#endif -]) - dnl Preparation for running test programs: - dnl Tell glibc to write diagnostics from -D_FORTIFY_SOURCE=2 to stderr, not - dnl to /dev/tty, so they can be redirected to log files. Such diagnostics - dnl arise e.g., in the macros gl_PRINTF_DIRECTIVE_N, gl_SNPRINTF_DIRECTIVE_N. - LIBC_FATAL_STDERR_=1 - export LIBC_FATAL_STDERR_ -]) - -# gl_MODULE_INDICATOR_CONDITION -# expands to a C preprocessor expression that evaluates to 1 or 0, depending -# whether a gnulib module that has been requested shall be considered present -# or not. -m4_define([gl_MODULE_INDICATOR_CONDITION], [1]) - -# gl_MODULE_INDICATOR_SET_VARIABLE([modulename]) -# sets the shell variable that indicates the presence of the given module to -# a C preprocessor expression that will evaluate to 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE], -[ - gl_MODULE_INDICATOR_SET_VARIABLE_AUX( - [GNULIB_[]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])], - [gl_MODULE_INDICATOR_CONDITION]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX([variable]) -# modifies the shell variable to include the gl_MODULE_INDICATOR_CONDITION. -# The shell variable's value is a C preprocessor expression that evaluates -# to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX], -[ - m4_if(m4_defn([gl_MODULE_INDICATOR_CONDITION]), [1], - [ - dnl Simplify the expression VALUE || 1 to 1. - $1=1 - ], - [gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([$1], - [gl_MODULE_INDICATOR_CONDITION])]) -]) - -# gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR([variable], [condition]) -# modifies the shell variable to include the given condition. The shell -# variable's value is a C preprocessor expression that evaluates to 0 or 1. -AC_DEFUN([gl_MODULE_INDICATOR_SET_VARIABLE_AUX_OR], -[ - dnl Simplify the expression 1 || CONDITION to 1. - if test "$[]$1" != 1; then - dnl Simplify the expression 0 || CONDITION to CONDITION. - if test "$[]$1" = 0; then - $1=$2 - else - $1="($[]$1 || $2)" - fi - fi -]) - -# gl_MODULE_INDICATOR([modulename]) -# defines a C macro indicating the presence of the given module -# in a location where it can be used. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 0 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR], -[ - AC_DEFINE_UNQUOTED([GNULIB_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), - [gl_MODULE_INDICATOR_CONDITION], - [Define to a C preprocessor expression that evaluates to 1 or 0, - depending whether the gnulib module $1 shall be considered present.]) -]) - -# gl_MODULE_INDICATOR_FOR_TESTS([modulename]) -# defines a C macro indicating the presence of the given module -# in lib or tests. This is useful to determine whether the module -# should be tested. -# | Value | Value | -# | in lib/ | in tests/ | -# --------------------------------------------+---------+-----------+ -# Module present among main modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module present among tests-related modules: | 1 | 1 | -# --------------------------------------------+---------+-----------+ -# Module not present at all: | 0 | 0 | -# --------------------------------------------+---------+-----------+ -AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], -[ - AC_DEFINE([GNULIB_TEST_]m4_translit([[$1]], - [abcdefghijklmnopqrstuvwxyz./-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1], - [Define to 1 when the gnulib module $1 should be tested.]) -]) - -# gl_ASSERT_NO_GNULIB_POSIXCHECK -# asserts that there will never be a need to #define GNULIB_POSIXCHECK. -# and thereby enables an optimization of configure and config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_POSIXCHECK], -[ - dnl Override gl_WARN_ON_USE_PREPARE. - dnl But hide this definition from 'aclocal'. - AC_DEFUN([gl_W][ARN_ON_USE_PREPARE], []) -]) - -# gl_ASSERT_NO_GNULIB_TESTS -# asserts that there will be no gnulib tests in the scope of the configure.ac -# and thereby enables an optimization of config.h. -# Used by Emacs. -AC_DEFUN([gl_ASSERT_NO_GNULIB_TESTS], -[ - dnl Override gl_MODULE_INDICATOR_FOR_TESTS. - AC_DEFUN([gl_MODULE_INDICATOR_FOR_TESTS], []) -]) - -# Test whether exists. -# Set HAVE_FEATURES_H. -AC_DEFUN([gl_FEATURES_H], -[ - AC_CHECK_HEADERS_ONCE([features.h]) - if test $ac_cv_header_features_h = yes; then - HAVE_FEATURES_H=1 - else - HAVE_FEATURES_H=0 - fi - AC_SUBST([HAVE_FEATURES_H]) -]) - -# m4_foreach_w -# is a backport of autoconf-2.59c's m4_foreach_w. -# Remove this macro when we can assume autoconf >= 2.60. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - -# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH]) -# ---------------------------------------------------- -# Backport of autoconf-2.63b's macro. -# Remove this macro when we can assume autoconf >= 2.64. -m4_ifndef([AS_VAR_IF], -[m4_define([AS_VAR_IF], -[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])]) - -# gl_PROG_CC_C99 -# Modifies the value of the shell variable CC in an attempt to make $CC -# understand ISO C99 source code. -# This is like AC_PROG_CC_C99, except that -# - AC_PROG_CC_C99 did not exist in Autoconf versions < 2.60, -# - AC_PROG_CC_C99 does not mix well with AC_PROG_CC_STDC -# , -# but many more packages use AC_PROG_CC_STDC than AC_PROG_CC_C99 -# . -# Remaining problems: -# - When AC_PROG_CC_STDC is invoked twice, it adds the C99 enabling options -# to CC twice -# . -# - AC_PROG_CC_STDC is likely to change now that C11 is an ISO standard. -AC_DEFUN([gl_PROG_CC_C99], -[ - dnl Change that version number to the minimum Autoconf version that supports - dnl mixing AC_PROG_CC_C99 calls with AC_PROG_CC_STDC calls. - m4_version_prereq([9.0], - [AC_REQUIRE([AC_PROG_CC_C99])], - [AC_REQUIRE([AC_PROG_CC_STDC])]) -]) - -# gl_PROG_AR_RANLIB -# Determines the values for AR, ARFLAGS, RANLIB that fit with the compiler. -# The user can set the variables AR, ARFLAGS, RANLIB if he wants to override -# the values. -AC_DEFUN([gl_PROG_AR_RANLIB], -[ - dnl Minix 3 comes with two toolchains: The Amsterdam Compiler Kit compiler - dnl as "cc", and GCC as "gcc". They have different object file formats and - dnl library formats. In particular, the GNU binutils programs ar, ranlib - dnl produce libraries that work only with gcc, not with cc. - AC_REQUIRE([AC_PROG_CC]) - AC_CACHE_CHECK([for Minix Amsterdam compiler], [gl_cv_c_amsterdam_compiler], - [ - AC_EGREP_CPP([Amsterdam], - [ -#ifdef __ACK__ -Amsterdam -#endif - ], - [gl_cv_c_amsterdam_compiler=yes], - [gl_cv_c_amsterdam_compiler=no]) - ]) - if test -z "$AR"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - AR='cc -c.a' - if test -z "$ARFLAGS"; then - ARFLAGS='-o' - fi - else - dnl Use the Automake-documented default values for AR and ARFLAGS, - dnl but prefer ${host}-ar over ar (useful for cross-compiling). - AC_CHECK_TOOL([AR], [ar], [ar]) - if test -z "$ARFLAGS"; then - ARFLAGS='cru' - fi - fi - else - if test -z "$ARFLAGS"; then - ARFLAGS='cru' - fi - fi - AC_SUBST([AR]) - AC_SUBST([ARFLAGS]) - if test -z "$RANLIB"; then - if test $gl_cv_c_amsterdam_compiler = yes; then - RANLIB=':' - else - dnl Use the ranlib program if it is available. - AC_PROG_RANLIB - fi - fi - AC_SUBST([RANLIB]) -]) - -# AC_PROG_MKDIR_P -# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix -# for interoperability with automake-1.9.6 from autoconf-2.62. -# Remove this macro when we can assume autoconf >= 2.62 or -# autoconf >= 2.60 && automake >= 1.10. -m4_ifdef([AC_PROG_MKDIR_P], [ - dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed. - m4_define([AC_PROG_MKDIR_P], - m4_defn([AC_PROG_MKDIR_P])[ - AC_SUBST([MKDIR_P])])], [ - dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P. - AC_DEFUN_ONCE([AC_PROG_MKDIR_P], - [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake - MKDIR_P='$(mkdir_p)' - AC_SUBST([MKDIR_P])])]) - -# AC_C_RESTRICT -# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61, -# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++ -# works. -# This definition can be removed once autoconf >= 2.62 can be assumed. -m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.62]),[-1],[ -AC_DEFUN([AC_C_RESTRICT], -[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict], - [ac_cv_c_restrict=no - # The order here caters to the fact that C++ does not require restrict. - for ac_kw in __restrict __restrict__ _Restrict restrict; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM( - [[typedef int * int_ptr; - int foo (int_ptr $ac_kw ip) { - return ip[0]; - }]], - [[int s[1]; - int * $ac_kw t = s; - t[0] = 0; - return foo(t)]])], - [ac_cv_c_restrict=$ac_kw]) - test "$ac_cv_c_restrict" != no && break - done - ]) - AH_VERBATIM([restrict], -[/* Define to the equivalent of the C99 'restrict' keyword, or to - nothing if this is not supported. Do not define if restrict is - supported directly. */ -#undef restrict -/* Work around a bug in Sun C++: it does not support _Restrict, even - though the corresponding Sun C compiler does, which causes - "#define restrict _Restrict" in the previous line. Perhaps some future - version of Sun C++ will work with _Restrict; if so, it'll probably - define __RESTRICT, just as Sun C does. */ -#if defined __SUNPRO_CC && !defined __RESTRICT -# define _Restrict -#endif]) - case $ac_cv_c_restrict in - restrict) ;; - no) AC_DEFINE([restrict], []) ;; - *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;; - esac -]) -]) - -# gl_BIGENDIAN -# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd. -# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some -# macros invoke AC_C_BIGENDIAN with arguments. -AC_DEFUN([gl_BIGENDIAN], -[ - AC_C_BIGENDIAN -]) - -# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it) -# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not -# output a spurious "(cached)" mark in the midst of other configure output. -# This macro should be used instead of AC_CACHE_VAL when it is not surrounded -# by an AC_MSG_CHECKING/AC_MSG_RESULT pair. -AC_DEFUN([gl_CACHE_VAL_SILENT], -[ - saved_as_echo_n="$as_echo_n" - as_echo_n=':' - AC_CACHE_VAL([$1], [$2]) - as_echo_n="$saved_as_echo_n" -]) diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4 deleted file mode 100644 index b1c95fe..0000000 --- a/gnulib/m4/gnulib-comp.m4 +++ /dev/null @@ -1,1204 +0,0 @@ -# DO NOT EDIT! GENERATED AUTOMATICALLY! -# 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 . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. -# -# This file represents the compiled summary of the specification in -# gnulib-cache.m4. It lists the computed macro invocations that need -# to be invoked from configure.ac. -# In projects that use version control, this file can be treated like -# other built files. - - -# This macro should be invoked from ./configure.ac, in the section -# "Checks for programs", right after AC_PROG_CC, and certainly before -# any checks for libraries, header files, types and library functions. -AC_DEFUN([gl_EARLY], -[ - m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace - m4_pattern_allow([^gl_ES$])dnl a valid locale name - m4_pattern_allow([^gl_LIBOBJS$])dnl a variable - m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable - AC_REQUIRE([gl_PROG_AR_RANLIB]) - # 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: - 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: - # 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: - 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: - # 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: - gl_THREADLIB_EARLY - # 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: -]) - -# This macro should be invoked from ./configure.ac, in the section -# "Check for header files, types and library functions". -AC_DEFUN([gl_INIT], -[ - AM_CONDITIONAL([GL_COND_LIBTOOL], [true]) - gl_cond_libtool=true - gl_m4_base='gnulib/m4' - m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) - m4_pushdef([gl_LIBSOURCES_LIST], []) - m4_pushdef([gl_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gnulib/lib' -changequote(,)dnl -LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'` -changequote([, ])dnl -AC_SUBST([LTALLOCA]) -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])[ || - for gl_file in ]gl_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gl_LIBSOURCES_DIR]) - m4_popdef([gl_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gl_libobjs= - gl_ltlibobjs= - if test -n "$gl_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gl_libobjs="$gl_libobjs $i.$ac_objext" - gl_ltlibobjs="$gl_ltlibobjs $i.lo" - done - fi - AC_SUBST([gl_LIBOBJS], [$gl_libobjs]) - AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs]) - ]) - gltests_libdeps= - gltests_ltlibdeps= - m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) - m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) - m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) - m4_pushdef([gltests_LIBSOURCES_LIST], []) - m4_pushdef([gltests_LIBSOURCES_DIR], []) - gl_COMMON - gl_source_base='gnulib/tests' -changequote(,)dnl - gltests_WITNESS=IN_`echo "${PACKAGE-$PACKAGE_TARNAME}" | LC_ALL=C tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | LC_ALL=C sed -e 's/[^A-Z0-9_]/_/g'`_GNULIB_TESTS -changequote([, ])dnl - AC_SUBST([gltests_WITNESS]) - gl_module_indicator_condition=$gltests_WITNESS - m4_pushdef([gl_MODULE_INDICATOR_CONDITION], [$gl_module_indicator_condition]) -AC_REQUIRE([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])[ || - for gl_file in ]gltests_LIBSOURCES_LIST[ ; do - if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then - echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 - exit 1 - fi - done])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) - ]) - m4_popdef([gltests_LIBSOURCES_DIR]) - m4_popdef([gltests_LIBSOURCES_LIST]) - m4_popdef([AC_LIBSOURCES]) - m4_popdef([AC_REPLACE_FUNCS]) - m4_popdef([AC_LIBOBJ]) - AC_CONFIG_COMMANDS_PRE([ - gltests_libobjs= - gltests_ltlibobjs= - if test -n "$gltests_LIBOBJS"; then - # Remove the extension. - sed_drop_objext='s/\.o$//;s/\.obj$//' - for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do - gltests_libobjs="$gltests_libobjs $i.$ac_objext" - gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" - done - fi - AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs]) - AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs]) - ]) - LIBTESTS_LIBDEPS="$gltests_libdeps" - AC_SUBST([LIBTESTS_LIBDEPS]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_LIBOBJ], [ - AS_LITERAL_IF([$1], [gl_LIBSOURCES([$1.c])])dnl - gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gl_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gl_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gl_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gl_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gl_LIBSOURCES_DIR], [gnulib/lib]) - m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# Like AC_LIBOBJ, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_LIBOBJ], [ - AS_LITERAL_IF([$1], [gltests_LIBSOURCES([$1.c])])dnl - gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" -]) - -# Like AC_REPLACE_FUNCS, except that the module name goes -# into gltests_LIBOBJS instead of into LIBOBJS. -AC_DEFUN([gltests_REPLACE_FUNCS], [ - m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl - AC_CHECK_FUNCS([$1], , [gltests_LIBOBJ($ac_func)]) -]) - -# Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parameterization, -# and alloca is special cased (for the alloca-opt module). -# We could also entirely rely on EXTRA_lib..._SOURCES. -AC_DEFUN([gltests_LIBSOURCES], [ - m4_foreach([_gl_NAME], [$1], [ - m4_if(_gl_NAME, [alloca.c], [], [ - m4_define([gltests_LIBSOURCES_DIR], [gnulib/tests]) - m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) - ]) - ]) -]) - -# This macro records the list of files which have been installed by -# gnulib-tool and may be removed by future gnulib-tool invocations. -AC_DEFUN([gl_FILE_LIST], [ - build-aux/config.rpath - build-aux/gitlog-to-changelog - 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 - lib/argz.in.h - lib/asnprintf.c - lib/asprintf.c - lib/btowc.c - lib/canonicalize-lgpl.c - lib/config.charset - 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 - lib/fnmatch_loop.c - lib/getdelim.c - lib/getfilecon.c - lib/getline.c - lib/getopt.c - lib/getopt.in.h - 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 - lib/malloca.h - lib/malloca.valgrind - lib/mbrtowc.c - lib/mbsinit.c - lib/mbsrtowcs-impl.h - lib/mbsrtowcs-state.c - lib/mbsrtowcs.c - lib/mbtowc-impl.h - lib/mbtowc.c - 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 - lib/ref-del.sin - lib/regcomp.c - lib/regex.c - lib/regex.h - lib/regex_internal.c - lib/regex_internal.h - lib/regexec.c - lib/safe-alloc.c - lib/safe-alloc.h - lib/se-context.in.h - lib/se-selinux.in.h - lib/size_max.h - lib/stat.c - lib/stdbool.in.h - lib/stddef.in.h - lib/stdint.in.h - lib/stdio.in.h - lib/stdlib.in.h - 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 - lib/strnlen.c - lib/strnlen1.c - 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 - lib/vasnprintf.h - lib/vasprintf.c - lib/verify.h - lib/wchar.in.h - lib/wcrtomb.c - lib/wctype.in.h - lib/xsize.h - m4/00gnulib.m4 - m4/alloca.m4 - m4/argz.m4 - m4/btowc.m4 - m4/canonicalize.m4 - m4/close.m4 - m4/codeset.m4 - m4/configmake.m4 - m4/ctype.m4 - m4/double-slash-root.m4 - m4/dup2.m4 - 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 - m4/lib-prefix.m4 - m4/localcharset.m4 - m4/locale-fr.m4 - m4/locale-ja.m4 - m4/locale-tr.m4 - m4/locale-zh.m4 - m4/locale_h.m4 - m4/localeconv.m4 - m4/localename.m4 - m4/lock.m4 - m4/longlong.m4 - m4/lstat.m4 - m4/malloc.m4 - m4/malloca.m4 - m4/math_h.m4 - m4/mbrtowc.m4 - m4/mbsinit.m4 - m4/mbsrtowcs.m4 - m4/mbstate_t.m4 - 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 - m4/safe-alloc.m4 - m4/selinux-context-h.m4 - m4/selinux-selinux-h.m4 - m4/setenv.m4 - m4/setlocale.m4 - m4/size_max.m4 - m4/ssize_t.m4 - m4/stat.m4 - m4/stdbool.m4 - m4/stddef_h.m4 - m4/stdint.m4 - m4/stdint_h.m4 - m4/stdio_h.m4 - m4/stdlib_h.m4 - m4/stpcpy.m4 - m4/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 - m4/unistd_h.m4 - m4/vasnprintf.m4 - m4/vasprintf.m4 - m4/warn-on-use.m4 - m4/wchar_h.m4 - m4/wchar_t.m4 - m4/wcrtomb.m4 - m4/wctob.m4 - m4/wctomb.m4 - m4/wctype_h.m4 - m4/wint_t.m4 - m4/xsize.m4 - m4/yield.m4 - tests/init.sh - tests/macros.h - tests/signature.h - tests/test-alloca-opt.c - tests/test-binary-io.c - tests/test-binary-io.sh - tests/test-btowc.c - tests/test-btowc1.sh - tests/test-btowc2.sh - tests/test-c-ctype.c - tests/test-c-strcase.sh - tests/test-c-strcasecmp.c - tests/test-c-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 - tests/test-lstat.h - tests/test-malloc-gnu.c - tests/test-malloca.c - tests/test-mbrtowc-w32-1.sh - tests/test-mbrtowc-w32-2.sh - tests/test-mbrtowc-w32-3.sh - tests/test-mbrtowc-w32-4.sh - tests/test-mbrtowc-w32-5.sh - tests/test-mbrtowc-w32.c - tests/test-mbrtowc.c - tests/test-mbrtowc1.sh - tests/test-mbrtowc2.sh - tests/test-mbrtowc3.sh - tests/test-mbrtowc4.sh - tests/test-mbsinit.c - tests/test-mbsinit.sh - tests/test-mbsrtowcs.c - tests/test-mbsrtowcs1.sh - tests/test-mbsrtowcs2.sh - tests/test-mbsrtowcs3.sh - tests/test-mbsrtowcs4.sh - tests/test-memchr.c - tests/test-nl_langinfo.c - 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 - tests/test-setenv.c - tests/test-setlocale1.c - tests/test-setlocale1.sh - tests/test-setlocale2.c - tests/test-setlocale2.sh - tests/test-stat.c - tests/test-stat.h - tests/test-stdbool.c - tests/test-stddef.c - tests/test-stdint.c - tests/test-stdio.c - tests/test-stdlib.c - tests/test-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 - tests/test-vasnprintf.c - tests/test-vasprintf.c - tests/test-verify.c - tests/test-verify.sh - tests/test-wchar.c - tests/test-wcrtomb-w32-1.sh - tests/test-wcrtomb-w32-2.sh - tests/test-wcrtomb-w32-3.sh - tests/test-wcrtomb-w32-4.sh - tests/test-wcrtomb-w32-5.sh - tests/test-wcrtomb-w32.c - tests/test-wcrtomb.c - tests/test-wcrtomb.sh - tests/test-wctype-h.c - tests/zerosize-ptr.h - tests=lib/binary-io.h - tests=lib/c-ctype.c - tests=lib/c-ctype.h - 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/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 - tests=lib/glthread/thread.c - tests=lib/glthread/thread.h - tests=lib/glthread/threadlib.c - tests=lib/glthread/yield.h - tests=lib/ignore-value.h - tests=lib/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 - tests=lib/setenv.c - tests=lib/setlocale.c - tests=lib/symlink.c - tests=lib/unsetenv.c - tests=lib/wctob.c - tests=lib/wctomb-impl.h - tests=lib/wctomb.c -]) diff --git a/gnulib/m4/include_next.m4 b/gnulib/m4/include_next.m4 deleted file mode 100644 index a60a261..0000000 --- a/gnulib/m4/include_next.m4 +++ /dev/null @@ -1,270 +0,0 @@ -# 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. - -dnl From Paul Eggert and Derek Price. - -dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER. -dnl -dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to -dnl 'include' otherwise. -dnl -dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler -dnl supports it in the special case that it is the first include directive in -dnl the given file, or to 'include' otherwise. -dnl -dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next, -dnl so as to avoid GCC warnings when the gcc option -pedantic is used. -dnl '#pragma GCC system_header' has the same effect as if the file was found -dnl through the include search path specified with '-isystem' options (as -dnl opposed to the search path specified with '-I' options). Namely, gcc -dnl does not warn about some things, and on some systems (Solaris and Interix) -dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side -dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead -dnl of plain '__STDC__'. -dnl -dnl PRAGMA_COLUMNS can be used in files that override system header files, so -dnl as to avoid compilation errors on HP NonStop systems when the gnulib file -dnl is included by a system header file that does a "#pragma COLUMNS 80" (which -dnl has the effect of truncating the lines of that file and all files that it -dnl includes to 80 columns) and the gnulib file has lines longer than 80 -dnl columns. - -AC_DEFUN([gl_INCLUDE_NEXT], -[ - AC_LANG_PREPROC_REQUIRE() - AC_CACHE_CHECK([whether the preprocessor supports include_next], - [gl_cv_have_include_next], - [rm -rf conftestd1a conftestd1b conftestd2 - mkdir conftestd1a conftestd1b conftestd2 - dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on - dnl AIX 6.1 support include_next when used as first preprocessor directive - dnl in a file, but not when preceded by another include directive. Check - dnl for this bug by including . - dnl Additionally, with this same compiler, include_next is a no-op when - dnl used in a header file that was included by specifying its absolute - dnl file name. Despite these two bugs, include_next is used in the - dnl compiler's . By virtue of the second bug, we need to use - dnl include_next as well in this case. - cat < conftestd1a/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd1b/conftest.h -#define DEFINED_IN_CONFTESTD1 -#include -#include_next -#ifdef DEFINED_IN_CONFTESTD2 -int foo; -#else -#error "include_next doesn't work" -#endif -EOF - cat < conftestd2/conftest.h -#ifndef DEFINED_IN_CONFTESTD1 -#error "include_next test doesn't work" -#endif -#define DEFINED_IN_CONFTESTD2 -EOF - gl_save_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" -dnl We intentionally avoid using AC_LANG_SOURCE here. - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=yes], - [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" - AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include ]], - [gl_cv_have_include_next=buggy], - [gl_cv_have_include_next=no]) - ]) - CPPFLAGS="$gl_save_CPPFLAGS" - rm -rf conftestd1a conftestd1b conftestd2 - ]) - PRAGMA_SYSTEM_HEADER= - if test $gl_cv_have_include_next = yes; then - INCLUDE_NEXT=include_next - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - if test -n "$GCC"; then - PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' - fi - else - if test $gl_cv_have_include_next = buggy; then - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next - else - INCLUDE_NEXT=include - INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include - fi - fi - AC_SUBST([INCLUDE_NEXT]) - AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE]) - AC_SUBST([PRAGMA_SYSTEM_HEADER]) - AC_CACHE_CHECK([whether system header files limit the line length], - [gl_cv_pragma_columns], - [dnl HP NonStop systems, which define __TANDEM, have this misfeature. - AC_EGREP_CPP([choke me], - [ -#ifdef __TANDEM -choke me -#endif - ], - [gl_cv_pragma_columns=yes], - [gl_cv_pragma_columns=no]) - ]) - if test $gl_cv_pragma_columns = yes; then - PRAGMA_COLUMNS="#pragma COLUMNS 10000" - else - PRAGMA_COLUMNS= - fi - AC_SUBST([PRAGMA_COLUMNS]) -]) - -# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------------ -# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be -# ''; otherwise define it to be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# Also, if #include_next works as first preprocessing directive in a file, -# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be ''; otherwise define it to -# be -# '"///usr/include/foo.h"', or whatever other absolute file name is suitable. -# That way, a header file with the following line: -# #@INCLUDE_NEXT@ @NEXT_FOO_H@ -# or -# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@ -# behaves (after sed substitution) as if it contained -# #include_next -# even if the compiler does not support include_next. -# The three "///" are to pacify Sun C 5.8, which otherwise would say -# "warning: #include of /usr/include/... may be non-portable". -# Use '""', not '<>', so that the /// cannot be confused with a C99 comment. -# Note: This macro assumes that the header file is not empty after -# preprocessing, i.e. it does not only define preprocessor macros but also -# provides some type/enum definitions or function/variable declarations. -# -# This macro also checks whether each header exists, by invoking -# AC_CHECK_HEADERS_ONCE or AC_CHECK_HEADERS on each argument. -AC_DEFUN([gl_CHECK_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [check]) -]) - -# gl_NEXT_HEADERS(HEADER1 HEADER2 ...) -# ------------------------------------ -# Like gl_CHECK_NEXT_HEADERS, except do not check whether the headers exist. -# This is suitable for headers like that are standardized by C89 -# and therefore can be assumed to exist. -AC_DEFUN([gl_NEXT_HEADERS], -[ - gl_NEXT_HEADERS_INTERNAL([$1], [assume]) -]) - -# The guts of gl_CHECK_NEXT_HEADERS and gl_NEXT_HEADERS. -AC_DEFUN([gl_NEXT_HEADERS_INTERNAL], -[ - AC_REQUIRE([gl_INCLUDE_NEXT]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - m4_if([$2], [check], - [AC_CHECK_HEADERS_ONCE([$1]) - ]) - -dnl FIXME: gl_next_header and gl_header_exists must be used unquoted -dnl until we can assume autoconf 2.64 or newer. - m4_foreach_w([gl_HEADER_NAME], [$1], - [AS_VAR_PUSHDEF([gl_next_header], - [gl_cv_next_]m4_defn([gl_HEADER_NAME])) - if test $gl_cv_have_include_next = yes; then - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - else - AC_CACHE_CHECK( - [absolute name of <]m4_defn([gl_HEADER_NAME])[>], - m4_defn([gl_next_header]), - [m4_if([$2], [check], - [AS_VAR_PUSHDEF([gl_header_exists], - [ac_cv_header_]m4_defn([gl_HEADER_NAME])) - if test AS_VAR_GET(gl_header_exists) = yes; then - AS_VAR_POPDEF([gl_header_exists]) - ]) - AC_LANG_CONFTEST( - [AC_LANG_SOURCE( - [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]] - )]) - dnl AIX "xlc -E" and "cc -E" omit #line directives for header - dnl files that contain only a #include of other header files and - dnl no non-comment tokens of their own. This leads to a failure - dnl to detect the absolute name of , , - dnl and others. The workaround is to force preservation - dnl of comments through option -C. This ensures all necessary - dnl #line directives are present. GCC supports option -C as well. - case "$host_os" in - aix*) gl_absname_cpp="$ac_cpp -C" ;; - *) gl_absname_cpp="$ac_cpp" ;; - esac -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, - ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD | - sed -n "$gl_absolute_header_sed"`'"']) - m4_if([$2], [check], - [else - AS_VAR_SET(gl_next_header, ['<'gl_HEADER_NAME'>']) - fi - ]) - ]) - fi - AC_SUBST( - AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])), - [AS_VAR_GET(gl_next_header)]) - if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' - gl_next_as_first_directive='<'gl_HEADER_NAME'>' - else - # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' - gl_next_as_first_directive=AS_VAR_GET(gl_next_header) - fi - AC_SUBST( - AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])), - [$gl_next_as_first_directive]) - AS_VAR_POPDEF([gl_next_header])]) -]) - -# Autoconf 2.68 added warnings for our use of AC_COMPILE_IFELSE; -# this fallback is safe for all earlier autoconf versions. -m4_define_default([AC_LANG_DEFINES_PROVIDED]) diff --git a/gnulib/m4/intlmacosx.m4 b/gnulib/m4/intlmacosx.m4 deleted file mode 100644 index d4da190..0000000 --- a/gnulib/m4/intlmacosx.m4 +++ /dev/null @@ -1,56 +0,0 @@ -# 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. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Checks for special options needed on Mac OS X. -dnl Defines INTL_MACOSX_LIBS. -AC_DEFUN([gt_INTL_MACOSX], -[ - dnl Check for API introduced in Mac OS X 10.2. - AC_CACHE_CHECK([for CFPreferencesCopyAppValue], - [gt_cv_func_CFPreferencesCopyAppValue], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFPreferencesCopyAppValue(NULL, NULL)]])], - [gt_cv_func_CFPreferencesCopyAppValue=yes], - [gt_cv_func_CFPreferencesCopyAppValue=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then - AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1], - [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.]) - fi - dnl Check for API introduced in Mac OS X 10.3. - AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent], - [gt_save_LIBS="$LIBS" - LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[CFLocaleCopyCurrent();]])], - [gt_cv_func_CFLocaleCopyCurrent=yes], - [gt_cv_func_CFLocaleCopyCurrent=no]) - LIBS="$gt_save_LIBS"]) - if test $gt_cv_func_CFLocaleCopyCurrent = yes; then - AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1], - [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.]) - fi - INTL_MACOSX_LIBS= - if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then - INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" - fi - AC_SUBST([INTL_MACOSX_LIBS]) -]) diff --git a/gnulib/m4/intmax_t.m4 b/gnulib/m4/intmax_t.m4 deleted file mode 100644 index c1a4a75..0000000 --- a/gnulib/m4/intmax_t.m4 +++ /dev/null @@ -1,67 +0,0 @@ -# intmax_t.m4 serial 8 -dnl Copyright (C) 1997-2004, 2006-2007, 2009-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, -dnl with or without modifications, as long as this notice is preserved. - -dnl From Paul Eggert. - -AC_PREREQ([2.53]) - -# Define intmax_t to 'long' or 'long long' -# if it is not already defined in or . - -AC_DEFUN([gl_AC_TYPE_INTMAX_T], -[ - dnl For simplicity, we assume that a header file defines 'intmax_t' if and - dnl only if it defines 'uintmax_t'. - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if and don't define.]) - else - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in or .]) - fi -]) - -dnl An alternative would be to explicitly test for 'intmax_t'. - -AC_DEFUN([gt_AC_TYPE_INTMAX_T], -[ - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -#include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -#include -#endif - ]], - [[intmax_t x = -1; return !x;]])], - [gt_cv_c_intmax_t=yes], - [gt_cv_c_intmax_t=no])]) - if test $gt_cv_c_intmax_t = yes; then - AC_DEFINE([HAVE_INTMAX_T], [1], - [Define if you have the 'intmax_t' type in or .]) - else - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - test $ac_cv_type_long_long_int = yes \ - && ac_type='long long' \ - || ac_type='long' - AC_DEFINE_UNQUOTED([intmax_t], [$ac_type], - [Define to long or long long if and don't define.]) - fi -]) diff --git a/gnulib/m4/inttypes-pri.m4 b/gnulib/m4/inttypes-pri.m4 deleted file mode 100644 index 977206f..0000000 --- a/gnulib/m4/inttypes-pri.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# inttypes-pri.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1997-2002, 2006, 2008-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 deleted file mode 100644 index eec4f41..0000000 --- a/gnulib/m4/inttypes.m4 +++ /dev/null @@ -1,157 +0,0 @@ -# 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 deleted file mode 100644 index 91c7bca..0000000 --- a/gnulib/m4/inttypes_h.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# inttypes_h.m4 serial 10 -dnl Copyright (C) 1997-2004, 2006, 2008-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 Paul Eggert. - -# Define HAVE_INTTYPES_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_INTTYPES_H], -[ - AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_inttypes_h=yes], - [gl_cv_header_inttypes_h=no])]) - if test $gl_cv_header_inttypes_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1], - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/gnulib/m4/isblank.m4 b/gnulib/m4/isblank.m4 deleted file mode 100644 index 98e926d..0000000 --- a/gnulib/m4/isblank.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_ISBLANK], -[ - dnl Persuade glibc to declare isblank(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([gl_CTYPE_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([isblank]) - if test $ac_cv_func_isblank = no; then - HAVE_ISBLANK=0 - fi -]) diff --git a/gnulib/m4/langinfo_h.m4 b/gnulib/m4/langinfo_h.m4 deleted file mode 100644 index b93fe70..0000000 --- a/gnulib/m4/langinfo_h.m4 +++ /dev/null @@ -1,105 +0,0 @@ -# langinfo_h.m4 serial 7 -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_LANGINFO_H], -[ - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - - dnl Persuade glibc-2.0.6 to define CODESET. - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([langinfo.h]) - - dnl Determine whether exists. It is missing on mingw and BeOS. - HAVE_LANGINFO_CODESET=0 - HAVE_LANGINFO_T_FMT_AMPM=0 - HAVE_LANGINFO_ERA=0 - HAVE_LANGINFO_YESEXPR=0 - AC_CHECK_HEADERS_ONCE([langinfo.h]) - if test $ac_cv_header_langinfo_h = yes; then - HAVE_LANGINFO_H=1 - dnl Determine what defines. CODESET and ERA etc. are missing - dnl on OpenBSD 3.8. T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3. - AC_CACHE_CHECK([whether langinfo.h defines CODESET], - [gl_cv_header_langinfo_codeset], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = CODESET; -]])], - [gl_cv_header_langinfo_codeset=yes], - [gl_cv_header_langinfo_codeset=no]) - ]) - if test $gl_cv_header_langinfo_codeset = yes; then - HAVE_LANGINFO_CODESET=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM], - [gl_cv_header_langinfo_t_fmt_ampm], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = T_FMT_AMPM; -]])], - [gl_cv_header_langinfo_t_fmt_ampm=yes], - [gl_cv_header_langinfo_t_fmt_ampm=no]) - ]) - if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then - HAVE_LANGINFO_T_FMT_AMPM=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines ERA], - [gl_cv_header_langinfo_era], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = ERA; -]])], - [gl_cv_header_langinfo_era=yes], - [gl_cv_header_langinfo_era=no]) - ]) - if test $gl_cv_header_langinfo_era = yes; then - HAVE_LANGINFO_ERA=1 - fi - AC_CACHE_CHECK([whether langinfo.h defines YESEXPR], - [gl_cv_header_langinfo_yesexpr], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([[#include -int a = YESEXPR; -]])], - [gl_cv_header_langinfo_yesexpr=yes], - [gl_cv_header_langinfo_yesexpr=no]) - ]) - if test $gl_cv_header_langinfo_yesexpr = yes; then - HAVE_LANGINFO_YESEXPR=1 - fi - else - HAVE_LANGINFO_H=0 - fi - AC_SUBST([HAVE_LANGINFO_H]) - AC_SUBST([HAVE_LANGINFO_CODESET]) - AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM]) - AC_SUBST([HAVE_LANGINFO_ERA]) - AC_SUBST([HAVE_LANGINFO_YESEXPR]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [nl_langinfo]) -]) - -AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_LANGINFO_H_DEFAULTS], -[ - GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO]) - REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO]) -]) diff --git a/gnulib/m4/largefile.m4 b/gnulib/m4/largefile.m4 deleted file mode 100644 index a88850a..0000000 --- a/gnulib/m4/largefile.m4 +++ /dev/null @@ -1,149 +0,0 @@ -# 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 deleted file mode 100644 index 4ed0eb6..0000000 --- a/gnulib/m4/lcmessage.m4 +++ /dev/null @@ -1,35 +0,0 @@ -# lcmessage.m4 serial 7 (gettext-0.18.2) -dnl Copyright (C) 1995-2002, 2004-2005, 2008-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, -dnl with or without modifications, as long as this notice is preserved. -dnl -dnl This file can can be used in projects which are not available under -dnl the GNU General Public License or the GNU Library General Public -dnl License but which still want to provide support for the GNU gettext -dnl functionality. -dnl Please note that the actual code of the GNU gettext library is covered -dnl by the GNU Library General Public License, and the rest of the GNU -dnl gettext package package is covered by the GNU General Public License. -dnl They are *not* in the public domain. - -dnl Authors: -dnl Ulrich Drepper , 1995. - -# Check whether LC_MESSAGES is available in . - -AC_DEFUN([gt_LC_MESSAGES], -[ - AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[return LC_MESSAGES]])], - [gt_cv_val_LC_MESSAGES=yes], - [gt_cv_val_LC_MESSAGES=no])]) - if test $gt_cv_val_LC_MESSAGES = yes; then - AC_DEFINE([HAVE_LC_MESSAGES], [1], - [Define if your file defines LC_MESSAGES.]) - fi -]) diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4 deleted file mode 100644 index 4e1374d..0000000 --- a/gnulib/m4/lib-ld.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# lib-ld.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 1996-2003, 2009-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 Subroutines of libtool.m4, -dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision -dnl with libtool.m4. - -dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. -AC_DEFUN([AC_LIB_PROG_LD_GNU], -[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld], -[# I'd rather use --version here, but apparently some GNU ld's only accept -v. -case `$LD -v 2>&1 /dev/null 2>&1 \ - && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ - || PATH_SEPARATOR=';' - } -fi -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by GCC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]* | [A-Za-z]:[\\/]*)] - [re_direlt='/[^/][^/]*/\.\./'] - # Canonicalize the path of ld - ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` - while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do - ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL([acl_cv_path_LD], -[if test -z "$LD"; then - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" - for ac_dir in $PATH; do - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - acl_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some GNU ld's only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in - *GNU* | *'with BFD'*) - test "$with_gnu_ld" != no && break ;; - *) - test "$with_gnu_ld" != yes && break ;; - esac - fi - done - IFS="$ac_save_ifs" -else - acl_cv_path_LD="$LD" # Let the user override the test with a path. -fi]) -LD="$acl_cv_path_LD" -if test -n "$LD"; then - AC_MSG_RESULT([$LD]) -else - AC_MSG_RESULT([no]) -fi -test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) -AC_LIB_PROG_LD_GNU -]) diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4 deleted file mode 100644 index d11b4b4..0000000 --- a/gnulib/m4/lib-link.m4 +++ /dev/null @@ -1,777 +0,0 @@ -# lib-link.m4 serial 26 (gettext-0.18.2) -dnl Copyright (C) 2001-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.54]) - -dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and -dnl augments the CPPFLAGS variable. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - ac_cv_lib[]Name[]_libs="$LIB[]NAME" - ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" - ac_cv_lib[]Name[]_cppflags="$INC[]NAME" - ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX" - ]) - LIB[]NAME="$ac_cv_lib[]Name[]_libs" - LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" - INC[]NAME="$ac_cv_lib[]Name[]_cppflags" - LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the - dnl results of this search when this library appears as a dependency. - HAVE_LIB[]NAME=yes - popdef([NAME]) - popdef([Name]) -]) - -dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message]) -dnl searches for libname and the libraries corresponding to explicit and -dnl implicit dependencies, together with the specified include files and -dnl the ability to compile and link the specified testcode. The missing-message -dnl defaults to 'no' and may contain additional hints for the user. -dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} -dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and -dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs -dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. -dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname -dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], -[ - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - AC_REQUIRE([AC_LIB_RPATH]) - pushdef([Name],[m4_translit([$1],[./+-], [____])]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - - dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME - dnl accordingly. - AC_LIB_LINKFLAGS_BODY([$1], [$2]) - - dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, - dnl because if the user has installed lib[]Name and not disabled its use - dnl via --without-lib[]Name-prefix, he wants to use it. - ac_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) - - AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ - ac_save_LIBS="$LIBS" - dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS, - dnl because these -l options might require -L options that are present in - dnl LIBS. -l options benefit only from the -L options listed before it. - dnl Otherwise, add it to the front of LIBS, because it may be a static - dnl library that depends on another static library that is present in LIBS. - dnl Static libraries benefit only from the static libraries listed after - dnl it. - case " $LIB[]NAME" in - *" -l"*) LIBS="$LIBS $LIB[]NAME" ;; - *) LIBS="$LIB[]NAME $LIBS" ;; - esac - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[$3]], [[$4]])], - [ac_cv_lib[]Name=yes], - [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])']) - LIBS="$ac_save_LIBS" - ]) - if test "$ac_cv_lib[]Name" = yes; then - HAVE_LIB[]NAME=yes - AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.]) - AC_MSG_CHECKING([how to link with lib[]$1]) - AC_MSG_RESULT([$LIB[]NAME]) - else - HAVE_LIB[]NAME=no - dnl If $LIB[]NAME didn't lead to a usable library, we don't need - dnl $INC[]NAME either. - CPPFLAGS="$ac_save_CPPFLAGS" - LIB[]NAME= - LTLIB[]NAME= - LIB[]NAME[]_PREFIX= - fi - AC_SUBST([HAVE_LIB]NAME) - AC_SUBST([LIB]NAME) - AC_SUBST([LTLIB]NAME) - AC_SUBST([LIB]NAME[_PREFIX]) - popdef([NAME]) - popdef([Name]) -]) - -dnl Determine the platform dependent parameters needed to use rpath: -dnl acl_libext, -dnl acl_shlibext, -dnl acl_libname_spec, -dnl acl_library_names_spec, -dnl acl_hardcode_libdir_flag_spec, -dnl acl_hardcode_libdir_separator, -dnl acl_hardcode_direct, -dnl acl_hardcode_minus_L. -AC_DEFUN([AC_LIB_RPATH], -[ - dnl Tell automake >= 1.10 to complain if config.rpath is missing. - m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) - AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS - AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld - AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host - AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir - AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [ - CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ - ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh - . ./conftest.sh - rm -f ./conftest.sh - acl_cv_rpath=done - ]) - wl="$acl_cv_wl" - acl_libext="$acl_cv_libext" - acl_shlibext="$acl_cv_shlibext" - acl_libname_spec="$acl_cv_libname_spec" - acl_library_names_spec="$acl_cv_library_names_spec" - acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" - acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" - acl_hardcode_direct="$acl_cv_hardcode_direct" - acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" - dnl Determine whether the user wants rpath handling at all. - AC_ARG_ENABLE([rpath], - [ --disable-rpath do not hardcode runtime library paths], - :, enable_rpath=yes) -]) - -dnl AC_LIB_FROMPACKAGE(name, package) -dnl declares that libname comes from the given package. The configure file -dnl will then not have a --with-libname-prefix option but a -dnl --with-package-prefix option. Several libraries can come from the same -dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar -dnl macro call that searches for libname. -AC_DEFUN([AC_LIB_FROMPACKAGE], -[ - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_frompackage_]NAME, [$2]) - popdef([NAME]) - pushdef([PACK],[$2]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - define([acl_libsinpackage_]PACKUP, - m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1]) - popdef([PACKUP]) - popdef([PACK]) -]) - -dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and -dnl the libraries corresponding to explicit and implicit dependencies. -dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. -dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found -dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem. -AC_DEFUN([AC_LIB_LINKFLAGS_BODY], -[ - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - pushdef([NAME],[m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])]) - pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-], - [ABCDEFGHIJKLMNOPQRSTUVWXYZ____])]) - pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])]) - dnl Autoconf >= 2.61 supports dots in --with options. - pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[m4_translit(PACK,[.],[_])],PACK)]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_ARG_WITH(P_A_C_K[-prefix], -[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib - --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - if test "$acl_libdirstem2" != "$acl_libdirstem" \ - && ! test -d "$withval/$acl_libdirstem"; then - additional_libdir="$withval/$acl_libdirstem2" - fi - fi - fi -]) - dnl Search the library and its dependencies in $additional_libdir and - dnl $LDFLAGS. Using breadth-first-seach. - LIB[]NAME= - LTLIB[]NAME= - INC[]NAME= - LIB[]NAME[]_PREFIX= - dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been - dnl computed. So it has to be reset here. - HAVE_LIB[]NAME= - rpathdirs= - ltrpathdirs= - names_already_handled= - names_next_round='$1 $2' - while test -n "$names_next_round"; do - names_this_round="$names_next_round" - names_next_round= - for name in $names_this_round; do - already_handled= - for n in $names_already_handled; do - if test "$n" = "$name"; then - already_handled=yes - break - fi - done - if test -z "$already_handled"; then - names_already_handled="$names_already_handled $name" - dnl See if it was already located by an earlier AC_LIB_LINKFLAGS - dnl or AC_LIB_HAVE_LINKFLAGS call. - uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` - eval value=\"\$HAVE_LIB$uppername\" - if test -n "$value"; then - if test "$value" = yes; then - eval value=\"\$LIB$uppername\" - test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" - eval value=\"\$LTLIB$uppername\" - test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" - else - dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined - dnl that this library doesn't exist. So just drop it. - : - fi - else - dnl Search the library lib$name in $additional_libdir and $LDFLAGS - dnl and the already constructed $LIBNAME/$LTLIBNAME. - found_dir= - found_la= - found_so= - found_a= - eval libname=\"$acl_libname_spec\" # typically: libname=lib$name - if test -n "$acl_shlibext"; then - shrext=".$acl_shlibext" # typically: shrext=.so - else - shrext= - fi - if test $use_additional = yes; then - dir="$additional_libdir" - dnl The same code as in the loop below: - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - fi - if test "X$found_dir" = "X"; then - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - case "$x" in - -L*) - dir=`echo "X$x" | sed -e 's/^X-L//'` - dnl First look for a shared library. - if test -n "$acl_shlibext"; then - if test -f "$dir/$libname$shrext"; then - found_dir="$dir" - found_so="$dir/$libname$shrext" - else - if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then - ver=`(cd "$dir" && \ - for f in "$libname$shrext".*; do echo "$f"; done \ - | sed -e "s,^$libname$shrext\\\\.,," \ - | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ - | sed 1q ) 2>/dev/null` - if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then - found_dir="$dir" - found_so="$dir/$libname$shrext.$ver" - fi - else - eval library_names=\"$acl_library_names_spec\" - for f in $library_names; do - if test -f "$dir/$f"; then - found_dir="$dir" - found_so="$dir/$f" - break - fi - done - fi - fi - fi - dnl Then look for a static library. - if test "X$found_dir" = "X"; then - if test -f "$dir/$libname.$acl_libext"; then - found_dir="$dir" - found_a="$dir/$libname.$acl_libext" - fi - fi - if test "X$found_dir" != "X"; then - if test -f "$dir/$libname.la"; then - found_la="$dir/$libname.la" - fi - fi - ;; - esac - if test "X$found_dir" != "X"; then - break - fi - done - fi - if test "X$found_dir" != "X"; then - dnl Found the library. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" - if test "X$found_so" != "X"; then - dnl Linking with a shared library. We attempt to hardcode its - dnl directory into the executable's runpath, unless it's the - dnl standard /usr/lib. - if test "$enable_rpath" = no \ - || test "X$found_dir" = "X/usr/$acl_libdirstem" \ - || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then - dnl No hardcoding is needed. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $found_dir" - fi - dnl The hardcoding into $LIBNAME is system dependent. - if test "$acl_hardcode_direct" = yes; then - dnl Using DIR/libNAME.so during linking hardcodes DIR into the - dnl resulting binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode DIR into the resulting - dnl binary. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $found_dir" - fi - else - dnl Rely on "-L$found_dir". - dnl But don't add it if it's already contained in the LDFLAGS - dnl or the already constructed $LIBNAME - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$found_dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" - fi - if test "$acl_hardcode_minus_L" != no; then - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" - else - dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH - dnl here, because this doesn't fit in flags passed to the - dnl compiler. So give up. No hardcoding. This affects only - dnl very old systems. - dnl FIXME: Not sure whether we should use - dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" - dnl here. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - fi - fi - fi - fi - else - if test "X$found_a" != "X"; then - dnl Linking with a static library. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" - else - dnl We shouldn't come here, but anyway it's good to have a - dnl fallback. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" - fi - fi - dnl Assume the include files are nearby. - additional_includedir= - case "$found_dir" in - */$acl_libdirstem | */$acl_libdirstem/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - */$acl_libdirstem2 | */$acl_libdirstem2/) - basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` - if test "$name" = '$1'; then - LIB[]NAME[]_PREFIX="$basedir" - fi - additional_includedir="$basedir/include" - ;; - esac - if test "X$additional_includedir" != "X"; then - dnl Potentially add $additional_includedir to $INCNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's /usr/local/include and we are using GCC on Linux, - dnl 3. if it's already present in $CPPFLAGS or the already - dnl constructed $INCNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - for x in $CPPFLAGS $INC[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $INCNAME. - INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" - fi - fi - fi - fi - fi - dnl Look for dependencies. - if test -n "$found_la"; then - dnl Read the .la file. It defines the variables - dnl dlname, library_names, old_library, dependency_libs, current, - dnl age, revision, installed, dlopen, dlpreopen, libdir. - save_libdir="$libdir" - case "$found_la" in - */* | *\\*) . "$found_la" ;; - *) . "./$found_la" ;; - esac - libdir="$save_libdir" - dnl We use only dependency_libs. - for dep in $dependency_libs; do - case "$dep" in - -L*) - additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` - dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's /usr/local/lib and we are using GCC on Linux, - dnl 3. if it's already present in $LDFLAGS or the already - dnl constructed $LIBNAME, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ - && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then - haveit= - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ - || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - haveit= - for x in $LDFLAGS $LIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LIBNAME. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" - fi - fi - haveit= - for x in $LDFLAGS $LTLIB[]NAME; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LTLIBNAME. - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" - fi - fi - fi - fi - ;; - -R*) - dir=`echo "X$dep" | sed -e 's/^X-R//'` - if test "$enable_rpath" != no; then - dnl Potentially add DIR to rpathdirs. - dnl The rpathdirs will be appended to $LIBNAME at the end. - haveit= - for x in $rpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - rpathdirs="$rpathdirs $dir" - fi - dnl Potentially add DIR to ltrpathdirs. - dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. - haveit= - for x in $ltrpathdirs; do - if test "X$x" = "X$dir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - ltrpathdirs="$ltrpathdirs $dir" - fi - fi - ;; - -l*) - dnl Handle this in the next round. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` - ;; - *.la) - dnl Handle this in the next round. Throw away the .la's - dnl directory; it is already contained in a preceding -L - dnl option. - names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` - ;; - *) - dnl Most likely an immediate library name. - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" - ;; - esac - done - fi - else - dnl Didn't find the library; assume it is in the system directories - dnl known to the linker and runtime loader. (All the system - dnl directories known to the linker should also be known to the - dnl runtime loader, otherwise the system is severely misconfigured.) - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" - fi - fi - fi - done - done - if test "X$rpathdirs" != "X"; then - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user must - dnl pass all path elements in one option. We can arrange that for a - dnl single library, but not when more than one $LIBNAMEs are used. - alldirs= - for found_dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" - done - dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl. - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - else - dnl The -rpath options are cumulative. - for found_dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$found_dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" - done - fi - fi - if test "X$ltrpathdirs" != "X"; then - dnl When using libtool, the option that works for both libraries and - dnl executables is -R. The -R options are cumulative. - for found_dir in $ltrpathdirs; do - LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" - done - fi - popdef([P_A_C_K]) - popdef([PACKLIBS]) - popdef([PACKUP]) - popdef([PACK]) - popdef([NAME]) -]) - -dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, -dnl unless already present in VAR. -dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes -dnl contains two or three consecutive elements that belong together. -AC_DEFUN([AC_LIB_APPENDTOVAR], -[ - for element in [$2]; do - haveit= - for x in $[$1]; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X$element"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - [$1]="${[$1]}${[$1]:+ }$element" - fi - done -]) - -dnl For those cases where a variable contains several -L and -l options -dnl referring to unknown libraries and directories, this macro determines the -dnl necessary additional linker options for the runtime path. -dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) -dnl sets LDADDVAR to linker options needed together with LIBSVALUE. -dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, -dnl otherwise linking without libtool is assumed. -AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], -[ - AC_REQUIRE([AC_LIB_RPATH]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - $1= - if test "$enable_rpath" != no; then - if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then - dnl Use an explicit option to hardcode directories into the resulting - dnl binary. - rpathdirs= - next= - for opt in $2; do - if test -n "$next"; then - dir="$next" - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= - else - case $opt in - -L) next=yes ;; - -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` - dnl No need to hardcode the standard /usr/lib. - if test "X$dir" != "X/usr/$acl_libdirstem" \ - && test "X$dir" != "X/usr/$acl_libdirstem2"; then - rpathdirs="$rpathdirs $dir" - fi - next= ;; - *) next= ;; - esac - fi - done - if test "X$rpathdirs" != "X"; then - if test -n ""$3""; then - dnl libtool is used for linking. Use -R options. - for dir in $rpathdirs; do - $1="${$1}${$1:+ }-R$dir" - done - else - dnl The linker is used for linking directly. - if test -n "$acl_hardcode_libdir_separator"; then - dnl Weird platform: only the last -rpath option counts, the user - dnl must pass all path elements in one option. - alldirs= - for dir in $rpathdirs; do - alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir" - done - acl_save_libdir="$libdir" - libdir="$alldirs" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="$flag" - else - dnl The -rpath options are cumulative. - for dir in $rpathdirs; do - acl_save_libdir="$libdir" - libdir="$dir" - eval flag=\"$acl_hardcode_libdir_flag_spec\" - libdir="$acl_save_libdir" - $1="${$1}${$1:+ }$flag" - done - fi - fi - fi - fi - fi - AC_SUBST([$1]) -]) diff --git a/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4 deleted file mode 100644 index 007aa05..0000000 --- a/gnulib/m4/lib-prefix.m4 +++ /dev/null @@ -1,224 +0,0 @@ -# lib-prefix.m4 serial 7 (gettext-0.18) -dnl Copyright (C) 2001-2005, 2008-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. - -dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and -dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't -dnl require excessive bracketing. -ifdef([AC_HELP_STRING], -[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], -[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) - -dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed -dnl to access previously installed libraries. The basic assumption is that -dnl a user will want packages to use other packages he previously installed -dnl with the same --prefix option. -dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate -dnl libraries, but is otherwise very convenient. -AC_DEFUN([AC_LIB_PREFIX], -[ - AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) - AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) - dnl By default, look in $includedir and $libdir. - use_additional=yes - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - AC_LIB_ARG_WITH([lib-prefix], -[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib - --without-lib-prefix don't search for libraries in includedir and libdir], -[ - if test "X$withval" = "Xno"; then - use_additional=no - else - if test "X$withval" = "X"; then - AC_LIB_WITH_FINAL_PREFIX([ - eval additional_includedir=\"$includedir\" - eval additional_libdir=\"$libdir\" - ]) - else - additional_includedir="$withval/include" - additional_libdir="$withval/$acl_libdirstem" - fi - fi -]) - if test $use_additional = yes; then - dnl Potentially add $additional_includedir to $CPPFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/include, - dnl 2. if it's already present in $CPPFLAGS, - dnl 3. if it's /usr/local/include and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_includedir" != "X/usr/include"; then - haveit= - for x in $CPPFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-I$additional_includedir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_includedir" = "X/usr/local/include"; then - if test -n "$GCC"; then - case $host_os in - linux* | gnu* | k*bsd*-gnu) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_includedir"; then - dnl Really add $additional_includedir to $CPPFLAGS. - CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" - fi - fi - fi - fi - dnl Potentially add $additional_libdir to $LDFLAGS. - dnl But don't add it - dnl 1. if it's the standard /usr/lib, - dnl 2. if it's already present in $LDFLAGS, - dnl 3. if it's /usr/local/lib and we are using GCC on Linux, - dnl 4. if it doesn't exist as a directory. - if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then - haveit= - for x in $LDFLAGS; do - AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) - if test "X$x" = "X-L$additional_libdir"; then - haveit=yes - break - fi - done - if test -z "$haveit"; then - if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then - if test -n "$GCC"; then - case $host_os in - linux*) haveit=yes;; - esac - fi - fi - if test -z "$haveit"; then - if test -d "$additional_libdir"; then - dnl Really add $additional_libdir to $LDFLAGS. - LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" - fi - fi - fi - fi - fi -]) - -dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, -dnl acl_final_exec_prefix, containing the values to which $prefix and -dnl $exec_prefix will expand at the end of the configure script. -AC_DEFUN([AC_LIB_PREPARE_PREFIX], -[ - dnl Unfortunately, prefix and exec_prefix get only finally determined - dnl at the end of configure. - if test "X$prefix" = "XNONE"; then - acl_final_prefix="$ac_default_prefix" - else - acl_final_prefix="$prefix" - fi - if test "X$exec_prefix" = "XNONE"; then - acl_final_exec_prefix='${prefix}' - else - acl_final_exec_prefix="$exec_prefix" - fi - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the -dnl variables prefix and exec_prefix bound to the values they will have -dnl at the end of the configure script. -AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], -[ - acl_save_prefix="$prefix" - prefix="$acl_final_prefix" - acl_save_exec_prefix="$exec_prefix" - exec_prefix="$acl_final_exec_prefix" - $1 - exec_prefix="$acl_save_exec_prefix" - prefix="$acl_save_prefix" -]) - -dnl AC_LIB_PREPARE_MULTILIB creates -dnl - a variable acl_libdirstem, containing the basename of the libdir, either -dnl "lib" or "lib64" or "lib/64", -dnl - a variable acl_libdirstem2, as a secondary possible value for -dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or -dnl "lib/amd64". -AC_DEFUN([AC_LIB_PREPARE_MULTILIB], -[ - dnl There is no formal standard regarding lib and lib64. - dnl On glibc systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine - dnl the compiler's default mode by looking at the compiler's library search - dnl path. If at least one of its elements ends in /lib64 or points to a - dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI. - dnl Otherwise we use the default, namely "lib". - dnl On Solaris systems, the current practice is that on a system supporting - dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under - dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or - dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib. - AC_REQUIRE([AC_CANONICAL_HOST]) - acl_libdirstem=lib - acl_libdirstem2= - case "$host_os" in - solaris*) - dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment - dnl . - dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link." - dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the - dnl symlink is missing, so we set acl_libdirstem2 too. - AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit], - [AC_EGREP_CPP([sixtyfour bits], [ -#ifdef _LP64 -sixtyfour bits -#endif - ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no]) - ]) - if test $gl_cv_solaris_64bit = yes; then - acl_libdirstem=lib/64 - case "$host_cpu" in - sparc*) acl_libdirstem2=lib/sparcv9 ;; - i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; - esac - fi - ;; - *) - searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` - if test -n "$searchpath"; then - acl_save_IFS="${IFS= }"; IFS=":" - for searchdir in $searchpath; do - if test -d "$searchdir"; then - case "$searchdir" in - */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; - */../ | */.. ) - # Better ignore directories of this form. They are misleading. - ;; - *) searchdir=`cd "$searchdir" && pwd` - case "$searchdir" in - */lib64 ) acl_libdirstem=lib64 ;; - esac ;; - esac - fi - done - IFS="$acl_save_IFS" - fi - ;; - esac - test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" -]) diff --git a/gnulib/m4/libtool.m4 b/gnulib/m4/libtool.m4 deleted file mode 100644 index 126202f..0000000 --- a/gnulib/m4/libtool.m4 +++ /dev/null @@ -1,7992 +0,0 @@ -# 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, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is free software; the Free Software Foundation gives -# unlimited permission to copy and/or distribute it, with or without -# modifications, as long as this notice is preserved. - -m4_define([_LT_COPYING], [dnl -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# Written by Gordon Matzigkeit, 1996 -# -# This file is part of GNU Libtool. -# -# GNU Libtool is free software; you can 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 (at your option) any later version. -# -# As a special exception to the GNU General Public License, -# if you distribute this file as part of a program or library that -# is built using GNU Libtool, you may include this file under the -# same distribution terms that you use for the rest of that program. -# -# GNU Libtool is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Libtool; see the file COPYING. If not, a copy -# can be downloaded from http://www.gnu.org/licenses/gpl.html, or -# obtained by writing to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -]) - -# serial 57 LT_INIT - - -# LT_PREREQ(VERSION) -# ------------------ -# Complain and exit if this libtool version is less that VERSION. -m4_defun([LT_PREREQ], -[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, - [m4_default([$3], - [m4_fatal([Libtool version $1 or higher is required], - 63)])], - [$2])]) - - -# _LT_CHECK_BUILDDIR -# ------------------ -# Complain if the absolute build directory name contains unusual characters -m4_defun([_LT_CHECK_BUILDDIR], -[case `pwd` in - *\ * | *\ *) - AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; -esac -]) - - -# LT_INIT([OPTIONS]) -# ------------------ -AC_DEFUN([LT_INIT], -[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT -AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl -AC_BEFORE([$0], [LT_LANG])dnl -AC_BEFORE([$0], [LT_OUTPUT])dnl -AC_BEFORE([$0], [LTDL_INIT])dnl -m4_require([_LT_CHECK_BUILDDIR])dnl - -dnl Autoconf doesn't catch unexpanded LT_ macros by default: -m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl -m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl -dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 -dnl unless we require an AC_DEFUNed macro: -AC_REQUIRE([LTOPTIONS_VERSION])dnl -AC_REQUIRE([LTSUGAR_VERSION])dnl -AC_REQUIRE([LTVERSION_VERSION])dnl -AC_REQUIRE([LTOBSOLETE_VERSION])dnl -m4_require([_LT_PROG_LTMAIN])dnl - -_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) - -dnl Parse OPTIONS -_LT_SET_OPTIONS([$0], [$1]) - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' -AC_SUBST(LIBTOOL)dnl - -_LT_SETUP - -# Only expand once: -m4_define([LT_INIT]) -])# LT_INIT - -# Old names: -AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) -AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PROG_LIBTOOL], []) -dnl AC_DEFUN([AM_PROG_LIBTOOL], []) - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -m4_defun([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` -]) - - -# _LT_FILEUTILS_DEFAULTS -# ---------------------- -# It is okay to use these file commands and assume they have been set -# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. -m4_defun([_LT_FILEUTILS_DEFAULTS], -[: ${CP="cp -f"} -: ${MV="mv -f"} -: ${RM="rm -f"} -])# _LT_FILEUTILS_DEFAULTS - - -# _LT_SETUP -# --------- -m4_defun([_LT_SETUP], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -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 -dnl -_LT_DECL([], [build_alias], [0], [The build system])dnl -_LT_DECL([], [build], [0])dnl -_LT_DECL([], [build_os], [0])dnl -dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -dnl -AC_REQUIRE([AC_PROG_LN_S])dnl -test -z "$LN_S" && LN_S="ln -s" -_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl -dnl -AC_REQUIRE([LT_CMD_MAX_LEN])dnl -_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl -_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl -dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl -m4_require([_LT_CMD_RELOAD])dnl -m4_require([_LT_CHECK_MAGIC_METHOD])dnl -m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl -m4_require([_LT_CMD_OLD_ARCHIVE])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_WITH_SYSROOT])dnl - -_LT_CONFIG_LIBTOOL_INIT([ -# See if we are running on zsh, and set the options which allow our -# commands through without removal of \ escapes INIT. -if test -n "\${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi -]) -if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST -fi - -_LT_CHECK_OBJDIR - -m4_require([_LT_TAG_COMPILER])dnl - -case $host_os in -aix3*) - # AIX sometimes has problems with the GCC collect2 program. For some - # reason, if we set the COLLECT_NAMES environment variable, the problems - # vanish in a puff of smoke. - if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES - fi - ;; -esac - -# Global variables: -ofile=libtool -can_build_shared=yes - -# All known linkers require a `.a' archive for static linking (except MSVC, -# which needs '.lib'). -libext=a - -with_gnu_ld="$lt_cv_prog_gnu_ld" - -old_CC="$CC" -old_CFLAGS="$CFLAGS" - -# Set sane defaults for various variables -test -z "$CC" && CC=cc -test -z "$LTCC" && LTCC=$CC -test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS -test -z "$LD" && LD=ld -test -z "$ac_objext" && ac_objext=o - -_LT_CC_BASENAME([$compiler]) - -# Only perform the check for file, if the check method requires it -test -z "$MAGIC_CMD" && MAGIC_CMD=file -case $deplibs_check_method in -file_magic*) - if test "$file_magic_cmd" = '$MAGIC_CMD'; then - _LT_PATH_MAGIC - fi - ;; -esac - -# Use C for the default configuration in the libtool script -LT_SUPPORTED_TAG([CC]) -_LT_LANG_C_CONFIG -_LT_LANG_DEFAULT_CONFIG -_LT_CONFIG_COMMANDS -])# _LT_SETUP - - -# _LT_PREPARE_SED_QUOTE_VARS -# -------------------------- -# Define a few sed substitution that help us do robust quoting. -m4_defun([_LT_PREPARE_SED_QUOTE_VARS], -[# Backslashify metacharacters that are still active within -# double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' -]) - -# _LT_PROG_LTMAIN -# --------------- -# Note that this code is called both from `configure', and `config.status' -# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, -# `config.status' has no value for ac_aux_dir unless we are using Automake, -# so we pass a copy along to make sure it has a sensible value anyway. -m4_defun([_LT_PROG_LTMAIN], -[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl -_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) -ltmain="$ac_aux_dir/ltmain.sh" -])# _LT_PROG_LTMAIN - - -## ------------------------------------- ## -## Accumulate code for creating libtool. ## -## ------------------------------------- ## - -# So that we can recreate a full libtool script including additional -# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS -# in macros and then make a single call at the end using the `libtool' -# label. - - -# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) -# ---------------------------------------- -# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL_INIT], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_INIT], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_INIT]) - - -# _LT_CONFIG_LIBTOOL([COMMANDS]) -# ------------------------------ -# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. -m4_define([_LT_CONFIG_LIBTOOL], -[m4_ifval([$1], - [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], - [$1 -])])]) - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) - - -# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) -# ----------------------------------------------------- -m4_defun([_LT_CONFIG_SAVE_COMMANDS], -[_LT_CONFIG_LIBTOOL([$1]) -_LT_CONFIG_LIBTOOL_INIT([$2]) -]) - - -# _LT_FORMAT_COMMENT([COMMENT]) -# ----------------------------- -# Add leading comment marks to the start of each line, and a trailing -# full-stop to the whole comment if one is not present already. -m4_define([_LT_FORMAT_COMMENT], -[m4_ifval([$1], [ -m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], - [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) -)]) - - - -## ------------------------ ## -## FIXME: Eliminate VARNAME ## -## ------------------------ ## - - -# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) -# ------------------------------------------------------------------- -# CONFIGNAME is the name given to the value in the libtool script. -# VARNAME is the (base) name used in the configure script. -# VALUE may be 0, 1 or 2 for a computed quote escaped value based on -# VARNAME. Any other value will be used directly. -m4_define([_LT_DECL], -[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], - [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], - [m4_ifval([$1], [$1], [$2])]) - lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) - m4_ifval([$4], - [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) - lt_dict_add_subkey([lt_decl_dict], [$2], - [tagged?], [m4_ifval([$5], [yes], [no])])]) -]) - - -# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) -# -------------------------------------------------------- -m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) - - -# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_tag_varnames], -[_lt_decl_filter([tagged?], [yes], $@)]) - - -# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) -# --------------------------------------------------------- -m4_define([_lt_decl_filter], -[m4_case([$#], - [0], [m4_fatal([$0: too few arguments: $#])], - [1], [m4_fatal([$0: too few arguments: $#: $1])], - [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], - [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], - [lt_dict_filter([lt_decl_dict], $@)])[]dnl -]) - - -# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) -# -------------------------------------------------- -m4_define([lt_decl_quote_varnames], -[_lt_decl_filter([value], [1], $@)]) - - -# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_dquote_varnames], -[_lt_decl_filter([value], [2], $@)]) - - -# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) -# --------------------------------------------------- -m4_define([lt_decl_varnames_tagged], -[m4_assert([$# <= 2])dnl -_$0(m4_quote(m4_default([$1], [[, ]])), - m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), - m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) -m4_define([_lt_decl_varnames_tagged], -[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) - - -# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) -# ------------------------------------------------ -m4_define([lt_decl_all_varnames], -[_$0(m4_quote(m4_default([$1], [[, ]])), - m4_if([$2], [], - m4_quote(lt_decl_varnames), - m4_quote(m4_shift($@))))[]dnl -]) -m4_define([_lt_decl_all_varnames], -[lt_join($@, lt_decl_varnames_tagged([$1], - lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl -]) - - -# _LT_CONFIG_STATUS_DECLARE([VARNAME]) -# ------------------------------------ -# Quote a variable value, and forward it to `config.status' so that its -# declaration there will have the same value as in `configure'. VARNAME -# must have a single quote delimited value for this to work. -m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) - - -# _LT_CONFIG_STATUS_DECLARATIONS -# ------------------------------ -# We delimit libtool config variables with single quotes, so when -# we write them to config.status, we have to be sure to quote all -# embedded single quotes properly. In configure, this macro expands -# each variable declared with _LT_DECL (and _LT_TAGDECL) into: -# -# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' -m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], -[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), - [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAGS -# ---------------- -# Output comment and list of tags supported by the script -m4_defun([_LT_LIBTOOL_TAGS], -[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl -available_tags="_LT_TAGS"dnl -]) - - -# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) -# ----------------------------------- -# Extract the dictionary values for VARNAME (optionally with TAG) and -# expand to a commented shell variable setting: -# -# # Some comment about what VAR is for. -# visible_name=$lt_internal_name -m4_define([_LT_LIBTOOL_DECLARE], -[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], - [description])))[]dnl -m4_pushdef([_libtool_name], - m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl -m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), - [0], [_libtool_name=[$]$1], - [1], [_libtool_name=$lt_[]$1], - [2], [_libtool_name=$lt_[]$1], - [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl -m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl -]) - - -# _LT_LIBTOOL_CONFIG_VARS -# ----------------------- -# Produce commented declarations of non-tagged libtool config variables -# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' -# script. Tagged libtool config variables (even for the LIBTOOL CONFIG -# section) are produced by _LT_LIBTOOL_TAG_VARS. -m4_defun([_LT_LIBTOOL_CONFIG_VARS], -[m4_foreach([_lt_var], - m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) - - -# _LT_LIBTOOL_TAG_VARS(TAG) -# ------------------------- -m4_define([_LT_LIBTOOL_TAG_VARS], -[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), - [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) - - -# _LT_TAGVAR(VARNAME, [TAGNAME]) -# ------------------------------ -m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) - - -# _LT_CONFIG_COMMANDS -# ------------------- -# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of -# variables for single and double quote escaping we saved from calls -# to _LT_DECL, we can put quote escaped variables declarations -# into `config.status', and then the shell code to quote escape them in -# for loops in `config.status'. Finally, any additional code accumulated -# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. -m4_defun([_LT_CONFIG_COMMANDS], -[AC_PROVIDE_IFELSE([LT_OUTPUT], - dnl If the libtool generation code has been placed in $CONFIG_LT, - dnl instead of duplicating it all over again into config.status, - dnl then we will have config.status run $CONFIG_LT later, so it - dnl needs to know what name is stored there: - [AC_CONFIG_COMMANDS([libtool], - [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], - dnl If the libtool generation code is destined for config.status, - dnl expand the accumulated commands and init code now: - [AC_CONFIG_COMMANDS([libtool], - [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) -])#_LT_CONFIG_COMMANDS - - -# Initialize. -m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], -[ - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -sed_quote_subst='$sed_quote_subst' -double_quote_subst='$double_quote_subst' -delay_variable_subst='$delay_variable_subst' -_LT_CONFIG_STATUS_DECLARATIONS -LTCC='$LTCC' -LTCFLAGS='$LTCFLAGS' -compiler='$compiler_DEFAULT' - -# A function that is used when there is no print builtin or printf. -func_fallback_echo () -{ - eval 'cat <<_LTECHO_EOF -\$[]1 -_LTECHO_EOF' -} - -# Quote evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -# Double-quote double-evaled strings. -for var in lt_decl_all_varnames([[ \ -]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in - *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" - ;; - *) - eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" - ;; - esac -done - -_LT_OUTPUT_LIBTOOL_INIT -]) - -# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) -# ------------------------------------ -# Generate a child script FILE with all initialization necessary to -# reuse the environment learned by the parent script, and make the -# file executable. If COMMENT is supplied, it is inserted after the -# `#!' sequence but before initialization text begins. After this -# macro, additional text can be appended to FILE to form the body of -# the child script. The macro ends with non-zero status if the -# file could not be fully written (such as if the disk is full). -m4_ifdef([AS_INIT_GENERATED], -[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], -[m4_defun([_LT_GENERATED_FILE_INIT], -[m4_require([AS_PREPARE])]dnl -[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl -[lt_write_fail=0 -cat >$1 <<_ASEOF || lt_write_fail=1 -#! $SHELL -# Generated by $as_me. -$2 -SHELL=\${CONFIG_SHELL-$SHELL} -export SHELL -_ASEOF -cat >>$1 <<\_ASEOF || lt_write_fail=1 -AS_SHELL_SANITIZE -_AS_PREPARE -exec AS_MESSAGE_FD>&1 -_ASEOF -test $lt_write_fail = 0 && chmod +x $1[]dnl -m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT - -# LT_OUTPUT -# --------- -# This macro allows early generation of the libtool script (before -# AC_OUTPUT is called), incase it is used in configure for compilation -# tests. -AC_DEFUN([LT_OUTPUT], -[: ${CONFIG_LT=./config.lt} -AC_MSG_NOTICE([creating $CONFIG_LT]) -_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], -[# Run this file to recreate a libtool stub with the current configuration.]) - -cat >>"$CONFIG_LT" <<\_LTEOF -lt_cl_silent=false -exec AS_MESSAGE_LOG_FD>>config.log -{ - echo - AS_BOX([Running $as_me.]) -} >&AS_MESSAGE_LOG_FD - -lt_cl_help="\ -\`$as_me' creates a local libtool stub from the current configuration, -for use in further configure time tests before the real libtool is -generated. - -Usage: $[0] [[OPTIONS]] - - -h, --help print this help, then exit - -V, --version print version number, then exit - -q, --quiet do not print progress messages - -d, --debug don't remove temporary files - -Report bugs to ." - -lt_cl_version="\ -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) 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." - -while test $[#] != 0 -do - case $[1] in - --version | --v* | -V ) - echo "$lt_cl_version"; exit 0 ;; - --help | --h* | -h ) - echo "$lt_cl_help"; exit 0 ;; - --debug | --d* | -d ) - debug=: ;; - --quiet | --q* | --silent | --s* | -q ) - lt_cl_silent=: ;; - - -*) AC_MSG_ERROR([unrecognized option: $[1] -Try \`$[0] --help' for more information.]) ;; - - *) AC_MSG_ERROR([unrecognized argument: $[1] -Try \`$[0] --help' for more information.]) ;; - esac - shift -done - -if $lt_cl_silent; then - exec AS_MESSAGE_FD>/dev/null -fi -_LTEOF - -cat >>"$CONFIG_LT" <<_LTEOF -_LT_OUTPUT_LIBTOOL_COMMANDS_INIT -_LTEOF - -cat >>"$CONFIG_LT" <<\_LTEOF -AC_MSG_NOTICE([creating $ofile]) -_LT_OUTPUT_LIBTOOL_COMMANDS -AS_EXIT(0) -_LTEOF -chmod +x "$CONFIG_LT" - -# configure is writing to config.log, but config.lt does its own redirection, -# appending to config.log, which fails on DOS, as config.log is still kept -# open by configure. Here we exec the FD to /dev/null, effectively closing -# config.log, so it can be properly (re)opened and appended to by config.lt. -lt_cl_success=: -test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" -exec AS_MESSAGE_LOG_FD>/dev/null -$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false -exec AS_MESSAGE_LOG_FD>>config.log -$lt_cl_success || AS_EXIT(1) -])# LT_OUTPUT - - -# _LT_CONFIG(TAG) -# --------------- -# If TAG is the built-in tag, create an initial libtool script with a -# default configuration from the untagged config vars. Otherwise add code -# to config.status for appending the configuration named by TAG from the -# matching tagged config vars. -m4_defun([_LT_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_CONFIG_SAVE_COMMANDS([ - m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl - m4_if(_LT_TAG, [C], [ - # See if we are running on zsh, and set the options which allow our - # commands through without removal of \ escapes. - if test -n "${ZSH_VERSION+set}" ; then - setopt NO_GLOB_SUBST - fi - - cfgfile="${ofile}T" - trap "$RM \"$cfgfile\"; exit 1" 1 2 15 - $RM "$cfgfile" - - cat <<_LT_EOF >> "$cfgfile" -#! $SHELL - -# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. -# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION -# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: -# NOTE: Changes made to this file will be lost: look at ltmain.sh. -# -_LT_COPYING -_LT_LIBTOOL_TAGS - -# ### BEGIN LIBTOOL CONFIG -_LT_LIBTOOL_CONFIG_VARS -_LT_LIBTOOL_TAG_VARS -# ### END LIBTOOL CONFIG - -_LT_EOF - - case $host_os in - aix3*) - cat <<\_LT_EOF >> "$cfgfile" -# AIX sometimes has problems with the GCC collect2 program. For some -# reason, if we set the COLLECT_NAMES environment variable, the problems -# vanish in a puff of smoke. -if test "X${COLLECT_NAMES+set}" != Xset; then - COLLECT_NAMES= - export COLLECT_NAMES -fi -_LT_EOF - ;; - esac - - _LT_PROG_LTMAIN - - # We use sed instead of cat because bash on DJGPP gets confused if - # if finds mixed CR/LF and LF-only lines. Since sed operates in - # text mode, it properly converts lines to CR/LF. This bash problem - # is reportedly fixed, but why not run on old versions too? - sed '$q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - _LT_PROG_REPLACE_SHELLFNS - - mv -f "$cfgfile" "$ofile" || - (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") - chmod +x "$ofile" -], -[cat <<_LT_EOF >> "$ofile" - -dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded -dnl in a comment (ie after a #). -# ### BEGIN LIBTOOL TAG CONFIG: $1 -_LT_LIBTOOL_TAG_VARS(_LT_TAG) -# ### END LIBTOOL TAG CONFIG: $1 -_LT_EOF -])dnl /m4_if -], -[m4_if([$1], [], [ - PACKAGE='$PACKAGE' - VERSION='$VERSION' - TIMESTAMP='$TIMESTAMP' - RM='$RM' - ofile='$ofile'], []) -])dnl /_LT_CONFIG_SAVE_COMMANDS -])# _LT_CONFIG - - -# LT_SUPPORTED_TAG(TAG) -# --------------------- -# Trace this macro to discover what tags are supported by the libtool -# --tag option, using: -# autoconf --trace 'LT_SUPPORTED_TAG:$1' -AC_DEFUN([LT_SUPPORTED_TAG], []) - - -# C support is built-in for now -m4_define([_LT_LANG_C_enabled], []) -m4_define([_LT_TAGS], []) - - -# LT_LANG(LANG) -# ------------- -# Enable libtool support for the given language if not already enabled. -AC_DEFUN([LT_LANG], -[AC_BEFORE([$0], [LT_OUTPUT])dnl -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)], - [Windows Resource], [_LT_LANG(RC)], - [m4_ifdef([_LT_LANG_]$1[_CONFIG], - [_LT_LANG($1)], - [m4_fatal([$0: unsupported language: "$1"])])])dnl -])# LT_LANG - - -# _LT_LANG(LANGNAME) -# ------------------ -m4_defun([_LT_LANG], -[m4_ifdef([_LT_LANG_]$1[_enabled], [], - [LT_SUPPORTED_TAG([$1])dnl - m4_append([_LT_TAGS], [$1 ])dnl - m4_define([_LT_LANG_]$1[_enabled], [])dnl - _LT_LANG_$1_CONFIG($1)])dnl -])# _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], -[AC_PROVIDE_IFELSE([AC_PROG_CXX], - [LT_LANG(CXX)], - [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) - -AC_PROVIDE_IFELSE([AC_PROG_F77], - [LT_LANG(F77)], - [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) - -AC_PROVIDE_IFELSE([AC_PROG_FC], - [LT_LANG(FC)], - [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) - -dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal -dnl pulling things in needlessly. -AC_PROVIDE_IFELSE([AC_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], - [LT_LANG(GCJ)], - [AC_PROVIDE_IFELSE([LT_PROG_GCJ], - [LT_LANG(GCJ)], - [m4_ifdef([AC_PROG_GCJ], - [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) - m4_ifdef([A][M_PROG_GCJ], - [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(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)])]) -])# _LT_LANG_DEFAULT_CONFIG - -# Obsolete macros: -AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_CXX], []) -dnl AC_DEFUN([AC_LIBTOOL_F77], []) -dnl AC_DEFUN([AC_LIBTOOL_FC], []) -dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) -dnl AC_DEFUN([AC_LIBTOOL_RC], []) - - -# _LT_TAG_COMPILER -# ---------------- -m4_defun([_LT_TAG_COMPILER], -[AC_REQUIRE([AC_PROG_CC])dnl - -_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl -_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl -_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl -_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl - -# If no C compiler was specified, use CC. -LTCC=${LTCC-"$CC"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_TAG_COMPILER - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -m4_defun([_LT_COMPILER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$RM conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -m4_defun([_LT_LINKER_BOILERPLATE], -[m4_require([_LT_DECL_SED])dnl -ac_outfile=conftest.$ac_objext -echo "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$RM -r conftest* -])# _LT_LINKER_BOILERPLATE - -# _LT_REQUIRED_DARWIN_CHECKS -# ------------------------- -m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ - case $host_os in - rhapsody* | darwin*) - AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) - AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) - AC_CHECK_TOOL([LIPO], [lipo], [:]) - AC_CHECK_TOOL([OTOOL], [otool], [:]) - AC_CHECK_TOOL([OTOOL64], [otool64], [:]) - _LT_DECL([], [DSYMUTIL], [1], - [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) - _LT_DECL([], [NMEDIT], [1], - [Tool to change global to local symbols on Mac OS X]) - _LT_DECL([], [LIPO], [1], - [Tool to manipulate fat objects and archives on Mac OS X]) - _LT_DECL([], [OTOOL], [1], - [ldd/readelf like tool for Mach-O binaries on Mac OS X]) - _LT_DECL([], [OTOOL64], [1], - [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) - - AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], - [lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - # 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 - fi - 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 - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [lt_cv_ld_exported_symbols_list=yes], - [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 -int forced_loaded() { return 2;} -_LT_EOF - echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD - $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD - echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD - $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD - echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD - $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD - cat > conftest.c << _LT_EOF -int main() { return 0;} -_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 -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 - fi - rm -f conftest.err libconftest.a conftest conftest.c - rm -rf conftest.dSYM - ]) - case $host_os in - rhapsody* | darwin1.[[012]]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[[012]]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac -]) - - -# _LT_DARWIN_LINKER_FEATURES([TAG]) -# --------------------------------- -# Checks for linker and compiler features on darwin -m4_defun([_LT_DARWIN_LINKER_FEATURES], -[ - m4_require([_LT_REQUIRED_DARWIN_CHECKS]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_automatic, $1)=yes - _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 - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" - case $cc_basename in - ifort*) _lt_dar_can_shared=yes ;; - *) _lt_dar_can_shared=$GCC ;; - esac - if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=func_echo_all - _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" - _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" - _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" - m4_if([$1], [CXX], -[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then - _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" - _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" - fi -],[]) - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi -]) - -# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) -# ---------------------------------- -# Links a minimal program and checks the executable -# for the system default hardcoded library path. In most cases, -# this is /usr/lib:/lib, but when the MPI compilers are used -# the location of the communication and MPI libs are included too. -# If we don't find anything, use the default library path according -# to the aix ld manual. -# Store the results from the different compilers for each TAGNAME. -# Allow to override them for all tags through lt_cv_aix_libpath. -m4_defun([_LT_SYS_MODULE_PATH_AIX], -[m4_require([_LT_DECL_SED])dnl -if test "${lt_cv_aix_libpath+set}" = set; then - aix_libpath=$lt_cv_aix_libpath -else - AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], - [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ - lt_aix_libpath_sed='[ - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\([^ ]*\) *$/\1/ - p - } - }]' - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - # Check for a 64-bit object if we didn't find anything. - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` - fi],[]) - if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then - _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" - fi - ]) - aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) -fi -])# _LT_SYS_MODULE_PATH_AIX - - -# _LT_SHELL_INIT(ARG) -# ------------------- -m4_define([_LT_SHELL_INIT], -[m4_divert_text([M4SH-INIT], [$1 -])])# _LT_SHELL_INIT - - - -# _LT_PROG_ECHO_BACKSLASH -# ----------------------- -# Find how we can fake an echo command that does not interpret backslash. -# In particular, with Autoconf 2.60 or later we add some code to the start -# of the generated configure script which will find a shell with a builtin -# printf (which we can use as an echo command). -m4_defun([_LT_PROG_ECHO_BACKSLASH], -[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO -ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - -AC_MSG_CHECKING([how to print strings]) -# Test print first, because it will be a builtin if present. -if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ - test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='print -r --' -elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then - ECHO='printf %s\n' -else - # Use this function as a fallback that always works. - func_fallback_echo () - { - eval 'cat <<_LTECHO_EOF -$[]1 -_LTECHO_EOF' - } - ECHO='func_fallback_echo' -fi - -# func_echo_all arg... -# Invoke $ECHO with all args, space-separated. -func_echo_all () -{ - $ECHO "$*" -} - -case "$ECHO" in - printf*) AC_MSG_RESULT([printf]) ;; - print*) AC_MSG_RESULT([print -r]) ;; - *) AC_MSG_RESULT([cat]) ;; -esac - -m4_ifdef([_AS_DETECT_SUGGESTED], -[_AS_DETECT_SUGGESTED([ - test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( - ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO - ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO - PATH=/empty FPATH=/empty; export PATH FPATH - test "X`printf %s $ECHO`" = "X$ECHO" \ - || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) - -_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) -])# _LT_PROG_ECHO_BACKSLASH - - -# _LT_WITH_SYSROOT -# ---------------- -AC_DEFUN([_LT_WITH_SYSROOT], -[AC_MSG_CHECKING([for sysroot]) -AC_ARG_WITH([sysroot], -[ --with-sysroot[=DIR] Search for dependent libraries within DIR - (or the compiler's sysroot if not specified).], -[], [with_sysroot=no]) - -dnl lt_sysroot will always be passed unquoted. We quote it here -dnl in case the user passed a directory name. -lt_sysroot= -case ${with_sysroot} in #( - yes) - if test "$GCC" = yes; then - lt_sysroot=`$CC --print-sysroot 2>/dev/null` - fi - ;; #( - /*) - lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` - ;; #( - no|'') - ;; #( - *) - AC_MSG_RESULT([${with_sysroot}]) - AC_MSG_ERROR([The sysroot must be an absolute path.]) - ;; -esac - - AC_MSG_RESULT([${lt_sysroot:-no}]) -_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl -[dependent libraries, and in which our libraries should be installed.])]) - -# _LT_ENABLE_LOCK -# --------------- -m4_defun([_LT_ENABLE_LOCK], -[AC_ARG_ENABLE([libtool-lock], - [AS_HELP_STRING([--disable-libtool-lock], - [avoid locking (might break parallel builds)])]) -test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes - -# Some flags need to be propagated to the compiler or linker for good -# libtool support. -case $host in -ia64-*-hpux*) - # 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.$ac_objext` in - *ELF-32*) - HPUX_IA64_MODE="32" - ;; - *ELF-64*) - HPUX_IA64_MODE="64" - ;; - esac - fi - rm -rf conftest* - ;; -*-*-irix6*) - # Find out which ABI we are using. - echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - if test "$lt_cv_prog_gnu_ld" = yes; then - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -melf32bsmip" - ;; - *N32*) - LD="${LD-ld} -melf32bmipn32" - ;; - *64-bit*) - LD="${LD-ld} -melf64bmip" - ;; - esac - else - case `/usr/bin/file conftest.$ac_objext` in - *32-bit*) - LD="${LD-ld} -32" - ;; - *N32*) - LD="${LD-ld} -n32" - ;; - *64-bit*) - LD="${LD-ld} -64" - ;; - esac - fi - fi - rm -rf conftest* - ;; - -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 - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.o` in - *32-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_i386_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_i386" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf32lppclinux" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf32ppclinux" - ;; - s390x-*linux*) - LD="${LD-ld} -m elf_s390" - ;; - sparc64-*linux*) - LD="${LD-ld} -m elf32_sparc" - ;; - esac - ;; - *64-bit*) - case $host in - x86_64-*kfreebsd*-gnu) - LD="${LD-ld} -m elf_x86_64_fbsd" - ;; - x86_64-*linux*) - LD="${LD-ld} -m elf_x86_64" - ;; - powerpcle-*linux*) - LD="${LD-ld} -m elf64lppc" - ;; - powerpc-*linux*) - LD="${LD-ld} -m elf64ppc" - ;; - s390*-*linux*|s390*-*tpf*) - LD="${LD-ld} -m elf64_s390" - ;; - sparc*-*linux*) - LD="${LD-ld} -m elf64_sparc" - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -*-*-sco3.2v5*) - # On SCO OpenServer 5, we need -belf to get full-featured binaries. - SAVE_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS -belf" - AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, - [AC_LANG_PUSH(C) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) - AC_LANG_POP]) - if test x"$lt_cv_cc_needs_belf" != x"yes"; then - # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf - CFLAGS="$SAVE_CFLAGS" - fi - ;; -*-*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*) - 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" - fi - ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; -esac - -need_locks="$enable_libtool_lock" -])# _LT_ENABLE_LOCK - - -# _LT_PROG_AR -# ----------- -m4_defun([_LT_PROG_AR], -[AC_CHECK_TOOLS(AR, [ar], false) -: ${AR=ar} -: ${AR_FLAGS=cru} -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) - -AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], - [lt_cv_ar_at_file=no - AC_COMPILE_IFELSE([AC_LANG_PROGRAM], - [echo conftest.$ac_objext > conftest.lst - lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -eq 0; then - # Ensure the archiver fails upon bogus file names. - rm -f conftest.$ac_objext libconftest.a - AC_TRY_EVAL([lt_ar_try]) - if test "$ac_status" -ne 0; then - lt_cv_ar_at_file=@ - fi - fi - rm -f conftest.* libconftest.a - ]) - ]) - -if test "x$lt_cv_ar_at_file" = xno; then - archiver_list_spec= -else - archiver_list_spec=$lt_cv_ar_at_file -fi -_LT_DECL([], [archiver_list_spec], [1], - [How to feed a file listing to the archiver]) -])# _LT_PROG_AR - - -# _LT_CMD_OLD_ARCHIVE -# ------------------- -m4_defun([_LT_CMD_OLD_ARCHIVE], -[_LT_PROG_AR - -AC_CHECK_TOOL(STRIP, strip, :) -test -z "$STRIP" && STRIP=: -_LT_DECL([], [STRIP], [1], [A symbol stripping program]) - -AC_CHECK_TOOL(RANLIB, ranlib, :) -test -z "$RANLIB" && RANLIB=: -_LT_DECL([], [RANLIB], [1], - [Commands used to install an old-style archive]) - -# Determine commands to create old-style static archives. -old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' -old_postinstall_cmds='chmod 644 $oldlib' -old_postuninstall_cmds= - -if test -n "$RANLIB"; then - case $host_os in - openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" -fi - -case $host_os in - darwin*) - lock_old_archive_extraction=yes ;; - *) - lock_old_archive_extraction=no ;; -esac -_LT_DECL([], [old_postinstall_cmds], [2]) -_LT_DECL([], [old_postuninstall_cmds], [2]) -_LT_TAGDECL([], [old_archive_cmds], [2], - [Commands used to build an old-style archive]) -_LT_DECL([], [lock_old_archive_extraction], [0], - [Whether to use a lock for old archive extraction]) -])# _LT_CMD_OLD_ARCHIVE - - -# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------------------- -# Check whether the given compiler option works -AC_DEFUN([_LT_COMPILER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - lt_compiler_flag="$3" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - # The option is referenced via a variable to avoid confusing sed. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s "$ac_outfile"; then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings other than the usual output. - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - fi - $RM conftest* -]) - -if test x"[$]$2" = xyes; then - m4_if([$5], , :, [$5]) -else - m4_if([$6], , :, [$6]) -fi -])# _LT_COMPILER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) - - -# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, -# [ACTION-SUCCESS], [ACTION-FAILURE]) -# ---------------------------------------------------- -# Check whether the given linker option works -AC_DEFUN([_LT_LINKER_OPTION], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_SED])dnl -AC_CACHE_CHECK([$1], [$2], - [$2=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $3" - echo "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker can only warn and ignore the option if not recognized - # So say no if there are warnings - if test -s conftest.err; then - # Append any errors to the config.log. - cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - else - $2=yes - fi - fi - $RM -r conftest* - LDFLAGS="$save_LDFLAGS" -]) - -if test x"[$]$2" = xyes; then - m4_if([$4], , :, [$4]) -else - m4_if([$5], , :, [$5]) -fi -])# _LT_LINKER_OPTION - -# Old name: -AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) - - -# LT_CMD_MAX_LEN -#--------------- -AC_DEFUN([LT_CMD_MAX_LEN], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -# find the maximum length of command line arguments -AC_MSG_CHECKING([the maximum length of command line arguments]) -AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl - i=0 - teststring="ABCD" - - case $build_os in - msdosdjgpp*) - # On DJGPP, this test can blow up pretty badly due to problems in libc - # (any single argument exceeding 2000 bytes causes a buffer overrun - # during glob expansion). Even if it were fixed, the result of this - # check would be larger than it should be. - lt_cv_sys_max_cmd_len=12288; # 12K is about right - ;; - - gnu*) - # Under GNU Hurd, this test is not required because there is - # no limit to the length of command line arguments. - # Libtool will interpret -1 as no limit whatsoever - lt_cv_sys_max_cmd_len=-1; - ;; - - cygwin* | mingw* | cegcc*) - # On Win9x/ME, this test blows up -- it succeeds, but takes - # about 5 minutes as the teststring grows exponentially. - # Worse, since 9x/ME are not pre-emptively multitasking, - # you end up with a "frozen" computer, even though with patience - # the test eventually succeeds (with a max line length of 256k). - # Instead, let's just punt: use the minimum linelength reported by - # all of the supported platforms: 8192 (on NT/2K/XP). - lt_cv_sys_max_cmd_len=8192; - ;; - - mint*) - # On MiNT this can take a long time and run out of memory. - lt_cv_sys_max_cmd_len=8192; - ;; - - amigaos*) - # On AmigaOS with pdksh, this test takes hours, literally. - # So we just punt and use a minimum line length of 8192. - lt_cv_sys_max_cmd_len=8192; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - 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 - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` - if test -n "$lt_cv_sys_max_cmd_len"; then - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - else - # Make teststring a little bigger before we do anything with it. - # a 1K string should be a reasonable start. - for i in 1 2 3 4 5 6 7 8 ; do - teststring=$teststring$teststring - done - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - # 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"`env echo "$teststring$teststring" 2>/dev/null` \ - = "X$teststring$teststring"; } >/dev/null 2>&1 && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - # Only check the string length outside the loop. - lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` - teststring= - # Add a significant safety factor because C++ compilers can tack on - # massive amounts of additional arguments before passing them to the - # linker. It appears as though 1/2 is a usable value. - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` - fi - ;; - esac -]) -if test -n $lt_cv_sys_max_cmd_len ; then - AC_MSG_RESULT($lt_cv_sys_max_cmd_len) -else - AC_MSG_RESULT(none) -fi -max_cmd_len=$lt_cv_sys_max_cmd_len -_LT_DECL([], [max_cmd_len], [0], - [What is the maximum length of a command?]) -])# LT_CMD_MAX_LEN - -# Old name: -AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) - - -# _LT_HEADER_DLFCN -# ---------------- -m4_defun([_LT_HEADER_DLFCN], -[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl -])# _LT_HEADER_DLFCN - - -# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, -# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) -# ---------------------------------------------------------------- -m4_defun([_LT_TRY_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "$cross_compiling" = yes; then : - [$4] -else - lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 - lt_status=$lt_dlunknown - cat > conftest.$ac_ext <<_LT_EOF -[#line $LINENO "configure" -#include "confdefs.h" - -#if HAVE_DLFCN_H -#include -#endif - -#include - -#ifdef RTLD_GLOBAL -# define LT_DLGLOBAL RTLD_GLOBAL -#else -# ifdef DL_GLOBAL -# define LT_DLGLOBAL DL_GLOBAL -# else -# define LT_DLGLOBAL 0 -# endif -#endif - -/* We may have to define LT_DLLAZY_OR_NOW in the command line if we - find out it does not work in some platform. */ -#ifndef LT_DLLAZY_OR_NOW -# ifdef RTLD_LAZY -# define LT_DLLAZY_OR_NOW RTLD_LAZY -# else -# ifdef DL_LAZY -# define LT_DLLAZY_OR_NOW DL_LAZY -# else -# ifdef RTLD_NOW -# define LT_DLLAZY_OR_NOW RTLD_NOW -# else -# ifdef DL_NOW -# define LT_DLLAZY_OR_NOW DL_NOW -# else -# define LT_DLLAZY_OR_NOW 0 -# endif -# endif -# endif -# endif -#endif - -/* When -fvisbility=hidden is used, assume the code has been annotated - correspondingly for the symbols needed. */ -#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) -int fnord () __attribute__((visibility("default"))); -#endif - -int fnord () { return 42; } -int main () -{ - void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); - int status = $lt_dlunknown; - - if (self) - { - if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else - { - if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; - else puts (dlerror ()); - } - /* dlclose (self); */ - } - else - puts (dlerror ()); - - return status; -}] -_LT_EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|x*) $3 ;; - esac - else : - # compilation failed - $3 - fi -fi -rm -fr conftest* -])# _LT_TRY_DLOPEN_SELF - - -# LT_SYS_DLOPEN_SELF -# ------------------ -AC_DEFUN([LT_SYS_DLOPEN_SELF], -[m4_require([_LT_HEADER_DLFCN])dnl -if test "x$enable_dlopen" != xyes; then - enable_dlopen=unknown - enable_dlopen_self=unknown - enable_dlopen_self_static=unknown -else - lt_cv_dlopen=no - lt_cv_dlopen_libs= - - case $host_os in - beos*) - lt_cv_dlopen="load_add_on" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ;; - - mingw* | pw32* | cegcc*) - lt_cv_dlopen="LoadLibrary" - lt_cv_dlopen_libs= - ;; - - cygwin*) - lt_cv_dlopen="dlopen" - lt_cv_dlopen_libs= - ;; - - darwin*) - # if libdl is installed we need to link against it - AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ - lt_cv_dlopen="dyld" - lt_cv_dlopen_libs= - lt_cv_dlopen_self=yes - ]) - ;; - - *) - AC_CHECK_FUNC([shl_load], - [lt_cv_dlopen="shl_load"], - [AC_CHECK_LIB([dld], [shl_load], - [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], - [AC_CHECK_FUNC([dlopen], - [lt_cv_dlopen="dlopen"], - [AC_CHECK_LIB([dl], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], - [AC_CHECK_LIB([svld], [dlopen], - [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], - [AC_CHECK_LIB([dld], [dld_link], - [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) - ]) - ]) - ]) - ]) - ]) - ;; - esac - - if test "x$lt_cv_dlopen" != xno; then - enable_dlopen=yes - else - enable_dlopen=no - fi - - case $lt_cv_dlopen in - dlopen) - save_CPPFLAGS="$CPPFLAGS" - test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" - - save_LDFLAGS="$LDFLAGS" - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" - - save_LIBS="$LIBS" - LIBS="$lt_cv_dlopen_libs $LIBS" - - AC_CACHE_CHECK([whether a program can dlopen itself], - lt_cv_dlopen_self, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, - lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) - ]) - - if test "x$lt_cv_dlopen_self" = xyes; then - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - AC_CACHE_CHECK([whether a statically linked program can dlopen itself], - lt_cv_dlopen_self_static, [dnl - _LT_TRY_DLOPEN_SELF( - lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, - lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) - ]) - fi - - CPPFLAGS="$save_CPPFLAGS" - LDFLAGS="$save_LDFLAGS" - LIBS="$save_LIBS" - ;; - esac - - case $lt_cv_dlopen_self in - yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; - *) enable_dlopen_self=unknown ;; - esac - - case $lt_cv_dlopen_self_static in - yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; - *) enable_dlopen_self_static=unknown ;; - esac -fi -_LT_DECL([dlopen_support], [enable_dlopen], [0], - [Whether dlopen is supported]) -_LT_DECL([dlopen_self], [enable_dlopen_self], [0], - [Whether dlopen of programs is supported]) -_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], - [Whether dlopen of statically linked programs is supported]) -])# LT_SYS_DLOPEN_SELF - -# Old name: -AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) - - -# _LT_COMPILER_C_O([TAGNAME]) -# --------------------------- -# Check to see if options -c and -o are simultaneously supported by compiler. -# This macro does not hard code the compiler like AC_PROG_CC_C_O. -m4_defun([_LT_COMPILER_C_O], -[m4_require([_LT_DECL_SED])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no - $RM -r conftest 2>/dev/null - mkdir conftest - cd conftest - mkdir out - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - lt_compiler_flag="-o out/conftest2.$ac_objext" - # Insert the option either (1) after the last *FLAGS variable, or - # (2) before a word containing "conftest.", or (3) at the end. - # Note that $ac_compile itself does not contain backslashes and begins - # with a dollar sign (not a hyphen), so the echo should work correctly. - lt_compile=`echo "$ac_compile" | $SED \ - -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - if (exit $ac_status) && test -s out/conftest2.$ac_objext - then - # The compiler can only warn and ignore the option if not recognized - # So say no if there are warnings - $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $RM conftest* - # SGI C++ compiler will create directory out/ii_files/ for - # template instantiation - test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files - $RM out/* && rmdir out - cd .. - $RM -r conftest - $RM conftest* -]) -_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], - [Does compiler simultaneously support -c and -o options?]) -])# _LT_COMPILER_C_O - - -# _LT_COMPILER_FILE_LOCKS([TAGNAME]) -# ---------------------------------- -# Check to see if we can do hard links to lock some files if needed -m4_defun([_LT_COMPILER_FILE_LOCKS], -[m4_require([_LT_ENABLE_LOCK])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -_LT_COMPILER_C_O([$1]) - -hard_links="nottested" -if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then - # do not overwrite the value of need_locks provided by the user - AC_MSG_CHECKING([if we can lock with hard links]) - hard_links=yes - $RM conftest* - ln conftest.a conftest.b 2>/dev/null && hard_links=no - touch conftest.a - ln conftest.a conftest.b 2>&5 || hard_links=no - ln conftest.a conftest.b 2>/dev/null && hard_links=no - AC_MSG_RESULT([$hard_links]) - if test "$hard_links" = no; then - AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) - need_locks=warn - fi -else - need_locks=no -fi -_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) -])# _LT_COMPILER_FILE_LOCKS - - -# _LT_CHECK_OBJDIR -# ---------------- -m4_defun([_LT_CHECK_OBJDIR], -[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], -[rm -f .libs 2>/dev/null -mkdir .libs 2>/dev/null -if test -d .libs; then - lt_cv_objdir=.libs -else - # MS-DOS does not allow filenames that begin with a dot. - lt_cv_objdir=_libs -fi -rmdir .libs 2>/dev/null]) -objdir=$lt_cv_objdir -_LT_DECL([], [objdir], [0], - [The name of the directory that contains temporary libtool files])dnl -m4_pattern_allow([LT_OBJDIR])dnl -AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", - [Define to the sub-directory in which libtool stores uninstalled libraries.]) -])# _LT_CHECK_OBJDIR - - -# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) -# -------------------------------------- -# Check hardcoding attributes. -m4_defun([_LT_LINKER_HARDCODE_LIBPATH], -[AC_MSG_CHECKING([how to hardcode library paths into programs]) -_LT_TAGVAR(hardcode_action, $1)= -if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || - test -n "$_LT_TAGVAR(runpath_var, $1)" || - test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then - - # We can hardcode non-existent directories. - if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && - # If the only mechanism to avoid hardcoding is shlibpath_var, we - # have to relink, otherwise we might link with an installed library - # when we should be linking with a yet-to-be-installed one - ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && - test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then - # Linking always hardcodes the temporary library directory. - _LT_TAGVAR(hardcode_action, $1)=relink - else - # We can link without hardcoding, and we can hardcode nonexisting dirs. - _LT_TAGVAR(hardcode_action, $1)=immediate - fi -else - # We cannot hardcode anything, or else we can only hardcode existing - # directories. - _LT_TAGVAR(hardcode_action, $1)=unsupported -fi -AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) - -if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || - test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then - # Fast installation is not supported - enable_fast_install=no -elif test "$shlibpath_overrides_runpath" = yes || - test "$enable_shared" = no; then - # Fast installation is not necessary - enable_fast_install=needless -fi -_LT_TAGDECL([], [hardcode_action], [0], - [How to hardcode a shared library path into an executable]) -])# _LT_LINKER_HARDCODE_LIBPATH - - -# _LT_CMD_STRIPLIB -# ---------------- -m4_defun([_LT_CMD_STRIPLIB], -[m4_require([_LT_DECL_EGREP]) -striplib= -old_striplib= -AC_MSG_CHECKING([whether stripping libraries is possible]) -if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then - test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" - test -z "$striplib" && striplib="$STRIP --strip-unneeded" - AC_MSG_RESULT([yes]) -else -# FIXME - insert some real tests, host_os isn't really good enough - case $host_os in - darwin*) - if test -n "$STRIP" ; then - striplib="$STRIP -x" - old_striplib="$STRIP -S" - AC_MSG_RESULT([yes]) - else - AC_MSG_RESULT([no]) - fi - ;; - *) - AC_MSG_RESULT([no]) - ;; - esac -fi -_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) -_LT_DECL([], [striplib], [1]) -])# _LT_CMD_STRIPLIB - - -# _LT_SYS_DYNAMIC_LINKER([TAG]) -# ----------------------------- -# PORTME Fill in your ld.so characteristics -m4_defun([_LT_SYS_DYNAMIC_LINKER], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_OBJDUMP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CHECK_SHELL_FEATURES])dnl -AC_MSG_CHECKING([dynamic linker characteristics]) -m4_if([$1], - [], [ -if test "$GCC" = yes; then - case $host_os in - darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; - *) lt_awk_arg="/^libraries:/" ;; - esac - case $host_os in - mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; - *) lt_sed_strip_eq="s,=/,/,g" ;; - esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` - case $lt_search_path_spec in - *\;*) - # if the path contains ";" then we assume it to be the separator - # otherwise default to the standard path separator (i.e. ":") - it is - # assumed that no part of a normal pathname contains ";" but that should - # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` - ;; - *) - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` - ;; - esac - # Ok, now we have the path, separated by spaces, we can step through it - # and add multilib dir if necessary. - lt_tmp_lt_search_path_spec= - lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` - for lt_sys_path in $lt_search_path_spec; do - if test -d "$lt_sys_path/$lt_multi_os_dir"; then - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" - else - test -d "$lt_sys_path" && \ - lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" - fi - done - lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' -BEGIN {RS=" "; FS="/|\n";} { - lt_foo=""; - lt_count=0; - for (lt_i = NF; lt_i > 0; lt_i--) { - if ($lt_i != "" && $lt_i != ".") { - if ($lt_i == "..") { - lt_count++; - } else { - if (lt_count == 0) { - lt_foo="/" $lt_i lt_foo; - } else { - lt_count--; - } - } - } - } - if (lt_foo != "") { lt_freq[[lt_foo]]++; } - if (lt_freq[[lt_foo]] == 1) { print lt_foo; } -}'` - # AWK program above erroneously prepends '/' to C:/dos/paths - # for these hosts. - case $host_os in - mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ - $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; - esac - sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` -else - sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" -fi]) -library_names_spec= -libname_spec='lib$name' -soname_spec= -shrext_cmds=".so" -postinstall_cmds= -postuninstall_cmds= -finish_cmds= -finish_eval= -shlibpath_var= -shlibpath_overrides_runpath=unknown -version_type=none -dynamic_linker="$host_os ld.so" -sys_lib_dlsearch_path_spec="/lib /usr/lib" -need_lib_prefix=unknown -hardcode_into_libs=no - -# when you set need_version to no, make sure it does not cause -set_version -# flags to be left without arguments -need_version=unknown - -case $host_os in -aix3*) - 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 - - # AIX 3 has no versioning support, so we append a major version to the name. - soname_spec='${libname}${release}${shared_ext}$major' - ;; - -aix[[4-9]]*) - version_type=linux # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - hardcode_into_libs=yes - if test "$host_cpu" = ia64; then - # AIX 5 supports IA64 - library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - else - # With GCC up to 2.95.x, collect2 would create an import file - # for dependence libraries. The import file would start with - # the line `#! .'. This would cause the generated library to - # depend on `.', always an invalid library. This was fixed in - # development snapshots of GCC prior to 3.0. - case $host_os in - aix4 | aix4.[[01]] | aix4.[[01]].*) - if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' - echo ' yes ' - echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then - : - else - can_build_shared=no - fi - ;; - esac - # AIX (on Power*) has no versioning support, so currently we can not hardcode correct - # soname into executable. Probably we can add versioning support to - # collect2, so additional links can be useful in future. - if test "$aix_use_runtimelinking" = yes; then - # If using run time linking (on AIX 4.2 or later) use lib.so - # instead of lib.a to let people know that these are not - # typical AIX shared libraries. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - else - # We preserve .a as extension for shared libraries through AIX4.2 - # and later when we are not doing run time linking. - library_names_spec='${libname}${release}.a $libname.a' - soname_spec='${libname}${release}${shared_ext}$major' - fi - shlibpath_var=LIBPATH - fi - ;; - -amigaos*) - case $host_cpu in - powerpc) - # Since July 2007 AmigaOS4 officially supports .so libraries. - # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - ;; - m68k) - library_names_spec='$libname.ixlibrary $libname.a' - # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' - ;; - esac - ;; - -beos*) - library_names_spec='${libname}${shared_ext}' - dynamic_linker="$host_os ld.so" - shlibpath_var=LIBRARY_PATH - ;; - -bsdi[[45]]*) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" - sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" - # the default ld.so.conf also contains /usr/contrib/lib and - # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow - # libtool to hard-code these into programs - ;; - -cygwin* | mingw* | pw32* | cegcc*) - version_type=windows - shrext_cmds=".dll" - need_version=no - need_lib_prefix=no - - case $GCC,$cc_basename in - yes,*) - # gcc - library_names_spec='$libname.dll.a' - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname~ - chmod a+x \$dldir/$dlname~ - if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then - eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; - fi' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - - case $host_os in - cygwin*) - # Cygwin DLLs use 'cyg' prefix rather than 'lib' - soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) - ;; - mingw* | cegcc*) - # MinGW DLLs use traditional 'lib' prefix - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - pw32*) - # pw32 DLLs use 'pw' prefix rather than 'lib' - library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - ;; - esac - dynamic_linker='Win32 ld.exe' - ;; - - *,cl*) - # Native MSVC - libname_spec='$name' - soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - library_names_spec='${libname}.dll.lib' - - case $build_os in - mingw*) - sys_lib_search_path_spec= - lt_save_ifs=$IFS - IFS=';' - for lt_path in $LIB - do - IFS=$lt_save_ifs - # Let DOS variable expansion print the short 8.3 style file name. - lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` - sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" - done - IFS=$lt_save_ifs - # Convert to MSYS style. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` - ;; - cygwin*) - # Convert to unix form, then to dos form, then back to unix form - # but this time dos style (no spaces!) so that the unix form looks - # like /cygdrive/c/PROGRA~1:/cygdr... - sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` - sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` - sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - ;; - *) - sys_lib_search_path_spec="$LIB" - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi - # FIXME: find the short name or the path components, as spaces are - # common. (e.g. "Program Files" -> "PROGRA~1") - ;; - esac - - # DLL is installed to $(libdir)/../bin by postinstall_cmds - postinstall_cmds='base_file=`basename \${file}`~ - dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ - dldir=$destdir/`dirname \$dlpath`~ - test -d \$dldir || mkdir -p \$dldir~ - $install_prog $dir/$dlname \$dldir/$dlname' - postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ - dlpath=$dir/\$dldll~ - $RM \$dlpath' - shlibpath_overrides_runpath=yes - dynamic_linker='Win32 link.exe' - ;; - - *) - # Assume MSVC wrapper - library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' - dynamic_linker='Win32 ld.exe' - ;; - esac - # FIXME: first we should search . and the directory the executable is in - shlibpath_var=PATH - ;; - -darwin* | rhapsody*) - dynamic_linker="$host_os dyld" - version_type=darwin - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' - soname_spec='${libname}${release}${major}$shared_ext' - shlibpath_overrides_runpath=yes - shlibpath_var=DYLD_LIBRARY_PATH - shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' -m4_if([$1], [],[ - sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) - sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' - ;; - -dgux*) - 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 - ;; - -freebsd* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[23]].*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - version_type=freebsd-$objformat - case $version_type in - freebsd-elf*) - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - need_version=no - need_lib_prefix=no - ;; - freebsd-*) - library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' - need_version=yes - ;; - esac - shlibpath_var=LD_LIBRARY_PATH - case $host_os in - freebsd2.*) - shlibpath_overrides_runpath=yes - ;; - freebsd3.[[01]]* | freebsdelf3.[[01]]*) - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - *) # from 4.6 on, and DragonFly - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - esac - ;; - -gnu*) - 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 # correct to gnu/linux during the next big refactor - need_lib_prefix=no - need_version=no - dynamic_linker="$host_os runtime_loader" - 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=LIBRARY_PATH - shlibpath_overrides_runpath=yes - sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' - hardcode_into_libs=yes - ;; - -hpux9* | hpux10* | hpux11*) - # Give a soname corresponding to the major version so that dld.sl refuses to - # link against other versions. - version_type=sunos - need_lib_prefix=no - need_version=no - case $host_cpu in - ia64*) - shrext_cmds='.so' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.so" - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - if test "X$HPUX_IA64_MODE" = X32; then - sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" - else - sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" - fi - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - hppa*64*) - shrext_cmds='.sl' - hardcode_into_libs=yes - dynamic_linker="$host_os dld.sl" - shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH - shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" - sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec - ;; - *) - shrext_cmds='.sl' - dynamic_linker="$host_os dld.sl" - shlibpath_var=SHLIB_PATH - shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - ;; - esac - # HP-UX runs *really* slowly unless shared libraries are mode 555, ... - postinstall_cmds='chmod 555 $lib' - # or fails outright, so override atomically: - install_override_mode=555 - ;; - -interix[[3-9]]*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -irix5* | irix6* | nonstopux*) - case $host_os in - nonstopux*) version_type=nonstopux ;; - *) - if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux # correct to gnu/linux during the next big refactor - else - version_type=irix - fi ;; - esac - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' - case $host_os in - irix5* | nonstopux*) - libsuff= shlibsuff= - ;; - *) - case $LD in # libtool.m4 will add one of these switches to LD - *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") - libsuff= shlibsuff= libmagic=32-bit;; - *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") - libsuff=32 shlibsuff=N32 libmagic=N32;; - *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") - libsuff=64 shlibsuff=64 libmagic=64-bit;; - *) libsuff= shlibsuff= libmagic=never-match;; - esac - ;; - esac - shlibpath_var=LD_LIBRARY${shlibsuff}_PATH - shlibpath_overrides_runpath=no - sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" - sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" - hardcode_into_libs=yes - ;; - -# No shared lib support for Linux oldld, aout, or coff. -linux*oldld* | linux*aout* | linux*coff*) - dynamic_linker=no - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - 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' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - - # Some binutils ld are patched to set DT_RUNPATH - AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], - [lt_cv_shlibpath_overrides_runpath=no - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [lt_cv_shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir - ]) - shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath - - # This implies no fast_install, which is unacceptable. - # Some rework will be needed to allow for fast_install - # before this can be enabled. - hardcode_into_libs=yes - - # Add ABI-specific directories to the system library path. - sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" - - fi - - # We used to test for /lib/ld.so.1 and disable shared libraries on - # powerpc, because MkLinux only supported shared libraries with the - # GNU dynamic linker. Since this was broken with cross compilers, - # most powerpc-linux boxes support dynamic linking these days and - # people can always --disable-shared, the test was removed, and we - # assume the GNU/Linux dynamic linker is in use. - dynamic_linker='GNU/Linux ld.so' - ;; - -netbsd*) - version_type=sunos - need_lib_prefix=no - need_version=no - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - dynamic_linker='NetBSD (a.out) ld.so' - else - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - dynamic_linker='NetBSD ld.elf_so' - fi - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - ;; - -newsos6) - 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 - ;; - -*nto* | *qnx*) - version_type=qnx - 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 - dynamic_linker='ldqnx.so' - ;; - -openbsd*) - version_type=sunos - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' - shlibpath_var=LD_LIBRARY_PATH - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - case $host_os in - openbsd2.[[89]] | openbsd2.[[89]].*) - shlibpath_overrides_runpath=no - ;; - *) - shlibpath_overrides_runpath=yes - ;; - esac - else - shlibpath_overrides_runpath=yes - fi - ;; - -os2*) - libname_spec='$name' - shrext_cmds=".dll" - need_lib_prefix=no - library_names_spec='$libname${shared_ext} $libname.a' - dynamic_linker='OS/2 ld.exe' - shlibpath_var=LIBPATH - ;; - -osf3* | osf4* | osf5*) - version_type=osf - need_lib_prefix=no - need_version=no - soname_spec='${libname}${release}${shared_ext}$major' - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' - shlibpath_var=LD_LIBRARY_PATH - sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" - sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" - ;; - -rdos*) - dynamic_linker=no - ;; - -solaris*) - 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=yes - hardcode_into_libs=yes - # ldd complains unless libraries are executable - postinstall_cmds='chmod +x $lib' - ;; - -sunos4*) - version_type=sunos - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' - finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - if test "$with_gnu_ld" = yes; then - need_lib_prefix=no - fi - need_version=yes - ;; - -sysv4 | sysv4.3*) - 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 - case $host_vendor in - sni) - shlibpath_overrides_runpath=no - need_lib_prefix=no - runpath_var=LD_RUN_PATH - ;; - siemens) - need_lib_prefix=no - ;; - motorola) - need_lib_prefix=no - need_version=no - shlibpath_overrides_runpath=no - sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' - ;; - esac - ;; - -sysv4*MP*) - if test -d /usr/nec ;then - 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 - fi - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=yes - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -tpf*) - # TPF is a cross-target only. Preferred cross-host = GNU/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}' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -uts4*) - 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 - ;; - -*) - dynamic_linker=no - ;; -esac -AC_MSG_RESULT([$dynamic_linker]) -test "$dynamic_linker" = no && can_build_shared=no - -variables_saved_for_relink="PATH $shlibpath_var $runpath_var" -if test "$GCC" = yes; then - variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" -fi - -if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then - sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" -fi -if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then - sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" -fi - -_LT_DECL([], [variables_saved_for_relink], [1], - [Variables whose values should be saved in libtool wrapper scripts and - restored at link time]) -_LT_DECL([], [need_lib_prefix], [0], - [Do we need the "lib" prefix for modules?]) -_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) -_LT_DECL([], [version_type], [0], [Library versioning type]) -_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) -_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) -_LT_DECL([], [shlibpath_overrides_runpath], [0], - [Is shlibpath searched before the hard-coded library search path?]) -_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) -_LT_DECL([], [library_names_spec], [1], - [[List of archive names. First name is the real one, the rest are links. - The last name is the one that the linker finds with -lNAME]]) -_LT_DECL([], [soname_spec], [1], - [[The coded name of the library, if different from the real name]]) -_LT_DECL([], [install_override_mode], [1], - [Permission mode override for installation of shared libraries]) -_LT_DECL([], [postinstall_cmds], [2], - [Command to use after installation of a shared archive]) -_LT_DECL([], [postuninstall_cmds], [2], - [Command to use after uninstallation of a shared archive]) -_LT_DECL([], [finish_cmds], [2], - [Commands used to finish a libtool library installation in a directory]) -_LT_DECL([], [finish_eval], [1], - [[As "finish_cmds", except a single script fragment to be evaled but - not shown]]) -_LT_DECL([], [hardcode_into_libs], [0], - [Whether we should hardcode library paths into libraries]) -_LT_DECL([], [sys_lib_search_path_spec], [2], - [Compile-time system search path for libraries]) -_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], - [Run-time system search path for libraries]) -])# _LT_SYS_DYNAMIC_LINKER - - -# _LT_PATH_TOOL_PREFIX(TOOL) -# -------------------------- -# find a file program which can recognize shared library -AC_DEFUN([_LT_PATH_TOOL_PREFIX], -[m4_require([_LT_DECL_EGREP])dnl -AC_MSG_CHECKING([for $1]) -AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, -[case $MAGIC_CMD in -[[\\/*] | ?:[\\/]*]) - lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. - ;; -*) - lt_save_MAGIC_CMD="$MAGIC_CMD" - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR -dnl $ac_dummy forces splitting on constant user-supplied paths. -dnl POSIX.2 word splitting is done only on the output of word expansions, -dnl not every word. This closes a longstanding sh security hole. - ac_dummy="m4_if([$2], , $PATH, [$2])" - for ac_dir in $ac_dummy; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f $ac_dir/$1; then - lt_cv_path_MAGIC_CMD="$ac_dir/$1" - if test -n "$file_magic_test_file"; then - case $deplibs_check_method in - "file_magic "*) - file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` - MAGIC_CMD="$lt_cv_path_MAGIC_CMD" - if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | - $EGREP "$file_magic_regex" > /dev/null; then - : - else - cat <<_LT_EOF 1>&2 - -*** Warning: the command libtool uses to detect shared libraries, -*** $file_magic_cmd, produces output that libtool cannot recognize. -*** The result is that libtool may fail to recognize shared libraries -*** as such. This will affect the creation of libtool libraries that -*** depend on shared libraries, but programs linked with such libtool -*** libraries will work regardless of this problem. Nevertheless, you -*** may want to report the problem to your system manager and/or to -*** bug-libtool@gnu.org - -_LT_EOF - fi ;; - esac - fi - break - fi - done - IFS="$lt_save_ifs" - MAGIC_CMD="$lt_save_MAGIC_CMD" - ;; -esac]) -MAGIC_CMD="$lt_cv_path_MAGIC_CMD" -if test -n "$MAGIC_CMD"; then - AC_MSG_RESULT($MAGIC_CMD) -else - AC_MSG_RESULT(no) -fi -_LT_DECL([], [MAGIC_CMD], [0], - [Used to examine libraries when file_magic_cmd begins with "file"])dnl -])# _LT_PATH_TOOL_PREFIX - -# Old name: -AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) - - -# _LT_PATH_MAGIC -# -------------- -# find a file program which can recognize a shared library -m4_defun([_LT_PATH_MAGIC], -[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) -if test -z "$lt_cv_path_MAGIC_CMD"; then - if test -n "$ac_tool_prefix"; then - _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) - else - MAGIC_CMD=: - fi -fi -])# _LT_PATH_MAGIC - - -# LT_PATH_LD -# ---------- -# find the pathname to the GNU or non-GNU linker -AC_DEFUN([LT_PATH_LD], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PROG_ECHO_BACKSLASH])dnl - -AC_ARG_WITH([gnu-ld], - [AS_HELP_STRING([--with-gnu-ld], - [assume the C compiler uses GNU ld @<:@default=no@:>@])], - [test "$withval" = no || with_gnu_ld=yes], - [with_gnu_ld=no])dnl - -ac_prog=ld -if test "$GCC" = yes; then - # Check if gcc -print-prog-name=ld gives a path. - AC_MSG_CHECKING([for ld used by $CC]) - case $host in - *-*-mingw*) - # gcc leaves a trailing carriage return which upsets mingw - ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; - *) - ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; - esac - case $ac_prog in - # Accept absolute paths. - [[\\/]]* | ?:[[\\/]]*) - re_direlt='/[[^/]][[^/]]*/\.\./' - # Canonicalize the pathname of ld - ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` - while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do - ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` - done - test -z "$LD" && LD="$ac_prog" - ;; - "") - # If it fails, then pretend we aren't using GCC. - ac_prog=ld - ;; - *) - # If it is relative, then search for the first ld in PATH. - with_gnu_ld=unknown - ;; - esac -elif test "$with_gnu_ld" = yes; then - AC_MSG_CHECKING([for GNU ld]) -else - AC_MSG_CHECKING([for non-GNU ld]) -fi -AC_CACHE_VAL(lt_cv_path_LD, -[if test -z "$LD"; then - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then - lt_cv_path_LD="$ac_dir/$ac_prog" - # Check to see if the program is GNU ld. I'd rather use --version, - # but apparently some variants of GNU ld only accept -v. - # Break only if it was the GNU/non-GNU ld that we prefer. - case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then - lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' - lt_cv_file_magic_cmd='func_win32_libid' - else - # Keep this pattern in sync with the one in func_win32_libid. - lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' - lt_cv_file_magic_cmd='$OBJDUMP -f' - fi - ;; - -cegcc*) - # use the weaker test based on 'objdump'. See mingw*. - lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' - lt_cv_file_magic_cmd='$OBJDUMP -f' - ;; - -darwin* | rhapsody*) - lt_cv_deplibs_check_method=pass_all - ;; - -freebsd* | dragonfly*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - case $host_cpu in - i*86 ) - # Not sure whether the presence of OpenBSD here was a mistake. - # Let's accept both of them until this is cleared up. - lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` - ;; - esac - else - lt_cv_deplibs_check_method=pass_all - fi - ;; - -gnu*) - lt_cv_deplibs_check_method=pass_all - ;; - -haiku*) - lt_cv_deplibs_check_method=pass_all - ;; - -hpux10.20* | hpux11*) - lt_cv_file_magic_cmd=/usr/bin/file - case $host_cpu in - ia64*) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' - lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so - ;; - hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] - lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl - ;; - *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' - lt_cv_file_magic_test_file=/usr/lib/libc.sl - ;; - esac - ;; - -interix[[3-9]]*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -irix5* | irix6* | nonstopux*) - case $LD in - *-32|*"-32 ") libmagic=32-bit;; - *-n32|*"-n32 ") libmagic=N32;; - *-64|*"-64 ") libmagic=64-bit;; - *) libmagic=never-match;; - esac - lt_cv_deplibs_check_method=pass_all - ;; - -# This must be glibc/ELF. -linux* | k*bsd*-gnu | kopensolaris*-gnu) - lt_cv_deplibs_check_method=pass_all - ;; - -netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' - fi - ;; - -newos6*) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' - lt_cv_file_magic_cmd=/usr/bin/file - lt_cv_file_magic_test_file=/usr/lib/libnls.so - ;; - -*nto* | *qnx*) - lt_cv_deplibs_check_method=pass_all - ;; - -openbsd*) - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -rdos*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - case $host_vendor in - motorola) - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' - lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` - ;; - ncr) - lt_cv_deplibs_check_method=pass_all - ;; - sequent) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' - ;; - sni) - lt_cv_file_magic_cmd='/bin/file' - lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" - lt_cv_file_magic_test_file=/lib/libc.so - ;; - siemens) - lt_cv_deplibs_check_method=pass_all - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -tpf*) - lt_cv_deplibs_check_method=pass_all - ;; -esac -]) - -file_magic_glob= -want_nocaseglob=no -if test "$build" = "$host"; then - case $host_os in - mingw* | pw32*) - if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then - want_nocaseglob=yes - else - file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` - fi - ;; - esac -fi - -file_magic_cmd=$lt_cv_file_magic_cmd -deplibs_check_method=$lt_cv_deplibs_check_method -test -z "$deplibs_check_method" && deplibs_check_method=unknown - -_LT_DECL([], [deplibs_check_method], [1], - [Method to check whether dependent libraries are shared objects]) -_LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method = "file_magic"]) -_LT_DECL([], [file_magic_glob], [1], - [How to find potential files when deplibs_check_method = "file_magic"]) -_LT_DECL([], [want_nocaseglob], [1], - [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) -])# _LT_CHECK_MAGIC_METHOD - - -# LT_PATH_NM -# ---------- -# find the pathname to a BSD- or MS-compatible name lister -AC_DEFUN([LT_PATH_NM], -[AC_REQUIRE([AC_PROG_CC])dnl -AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, -[if test -n "$NM"; then - # Let the user override the test. - lt_cv_path_NM="$NM" -else - lt_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_nm" - if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then - # Check to see if the nm accepts a BSD-compat flag. - # Adding the `sed 1q' prevents false positives on HP-UX, which says: - # nm: unknown option "B" ignored - # Tru64's nm complains that /dev/null is an invalid object file - case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in - */dev/null* | *'Invalid file or object type'*) - lt_cv_path_NM="$tmp_nm -B" - break - ;; - *) - case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in - */dev/null*) - lt_cv_path_NM="$tmp_nm -p" - break - ;; - *) - lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but - continue # so that we can try to find one that supports BSD flags - ;; - esac - ;; - esac - fi - done - IFS="$lt_save_ifs" - done - : ${lt_cv_path_NM=no} -fi]) -if test "$lt_cv_path_NM" != "no"; then - NM="$lt_cv_path_NM" -else - # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$DUMPBIN"; then : - # Let the user override the test. - else - AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) - case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in - *COFF*) - DUMPBIN="$DUMPBIN -symbols" - ;; - *) - DUMPBIN=: - ;; - esac - fi - AC_SUBST([DUMPBIN]) - if test "$DUMPBIN" != ":"; then - NM="$DUMPBIN" - fi -fi -test -z "$NM" && NM=nm -AC_SUBST([NM]) -_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl - -AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], - [lt_cv_nm_interface="BSD nm" - echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) - (eval "$ac_compile" 2>conftest.err) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) - (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) - cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) - cat conftest.out >&AS_MESSAGE_LOG_FD - if $GREP 'External.*some_variable' conftest.out > /dev/null; then - lt_cv_nm_interface="MS dumpbin" - fi - rm -f conftest*]) -])# LT_PATH_NM - -# Old names: -AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) -AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_PROG_NM], []) -dnl AC_DEFUN([AC_PROG_NM], []) - -# _LT_CHECK_SHAREDLIB_FROM_LINKLIB -# -------------------------------- -# how to determine the name of the shared library -# associated with a specific link library. -# -- PORTME fill in with the dynamic library characteristics -m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], -[m4_require([_LT_DECL_EGREP]) -m4_require([_LT_DECL_OBJDUMP]) -m4_require([_LT_DECL_DLLTOOL]) -AC_CACHE_CHECK([how to associate runtime and link libraries], -lt_cv_sharedlib_from_linklib_cmd, -[lt_cv_sharedlib_from_linklib_cmd='unknown' - -case $host_os in -cygwin* | mingw* | pw32* | cegcc*) - # two different shell functions defined in ltmain.sh - # decide which to use based on capabilities of $DLLTOOL - case `$DLLTOOL --help 2>&1` in - *--identify-strict*) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib - ;; - *) - lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback - ;; - esac - ;; -*) - # fallback: assume linklib IS sharedlib - lt_cv_sharedlib_from_linklib_cmd="$ECHO" - ;; -esac -]) -sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd -test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO - -_LT_DECL([], [sharedlib_from_linklib_cmd], [1], - [Command to associate shared and link libraries]) -])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB - - -# _LT_PATH_MANIFEST_TOOL -# ---------------------- -# locate the manifest tool -m4_defun([_LT_PATH_MANIFEST_TOOL], -[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) -test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt -AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], - [lt_cv_path_mainfest_tool=no - echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD - $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out - cat conftest.err >&AS_MESSAGE_LOG_FD - if $GREP 'Manifest Tool' conftest.out > /dev/null; then - lt_cv_path_mainfest_tool=yes - fi - rm -f conftest*]) -if test "x$lt_cv_path_mainfest_tool" != xyes; then - MANIFEST_TOOL=: -fi -_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl -])# _LT_PATH_MANIFEST_TOOL - - -# LT_LIB_M -# -------- -# check for math library -AC_DEFUN([LT_LIB_M], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -LIBM= -case $host in -*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) - # These system don't have libm, or don't need it - ;; -*-ncr-sysv4.3*) - AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") - AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") - ;; -*) - AC_CHECK_LIB(m, cos, LIBM="-lm") - ;; -esac -AC_SUBST([LIBM]) -])# LT_LIB_M - -# Old name: -AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_CHECK_LIBM], []) - - -# _LT_COMPILER_NO_RTTI([TAGNAME]) -# ------------------------------- -m4_defun([_LT_COMPILER_NO_RTTI], -[m4_require([_LT_TAG_COMPILER])dnl - -_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - -if test "$GCC" = yes; then - case $cc_basename in - nvcc*) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; - *) - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; - esac - - _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], - lt_cv_prog_compiler_rtti_exceptions, - [-fno-rtti -fno-exceptions], [], - [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) -fi -_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], - [Compiler flag to turn off builtin functions]) -])# _LT_COMPILER_NO_RTTI - - -# _LT_CMD_GLOBAL_SYMBOLS -# ---------------------- -m4_defun([_LT_CMD_GLOBAL_SYMBOLS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_PROG_CC])dnl -AC_REQUIRE([AC_PROG_AWK])dnl -AC_REQUIRE([LT_PATH_NM])dnl -AC_REQUIRE([LT_PATH_LD])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_TAG_COMPILER])dnl - -# Check for command to grab the raw symbol name followed by C symbol from nm. -AC_MSG_CHECKING([command to parse $NM output from $compiler object]) -AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], -[ -# These are sane defaults that work on at least a few old systems. -# [They come from Ultrix. What could be older than Ultrix?!! ;)] - -# Character class describing NM global symbol codes. -symcode='[[BCDEGRST]]' - -# Regexp to match symbols that can be accessed directly from C. -sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' - -# Define system-specific variables. -case $host_os in -aix*) - symcode='[[BCDT]]' - ;; -cygwin* | mingw* | pw32* | cegcc*) - symcode='[[ABCDGISTW]]' - ;; -hpux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDEGRST]]' - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -sysv4) - symcode='[[DFNSTU]]' - ;; -esac - -# If we're using GNU nm, then use its standard symbol codes. -case `$NM -V 2>&1` in -*GNU* | *'with BFD'*) - symcode='[[ABCDGIRSTW]]' ;; -esac - -# Transform an extracted symbol line into a proper C declaration. -# Some systems (esp. on ia64) link data and code symbols differently, -# so use this general approach. -lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" - -# Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" - -# Handle CRLF in mingw tool chain -opt_cr= -case $build_os in -mingw*) - opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp - ;; -esac - -# Try without a prefix underscore, then with it. -for ac_symprfx in "" "_"; do - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # Write the raw and C identifiers. - if test "$lt_cv_nm_interface" = "MS dumpbin"; then - # Fake it for dumpbin and say T for any non-static function - # and D for any global variable. - # Also find C++ and __fastcall symbols from MSVC++, - # 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};"\ -" {if(hide[section]) next};"\ -" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ -" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ -" s[1]~/^[@?]/{print s[1], s[1]; next};"\ -" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ -" ' prfx=^$ac_symprfx]" - else - lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" - fi - lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" - - # Check to see that the pipe works correctly. - pipe_works=no - - rm -f conftest* - cat > conftest.$ac_ext <<_LT_EOF -#ifdef __cplusplus -extern "C" { -#endif -char nm_test_var; -void nm_test_func(void); -void nm_test_func(void){} -#ifdef __cplusplus -} -#endif -int main(){nm_test_var='a';nm_test_func();return(0);} -_LT_EOF - - if AC_TRY_EVAL(ac_compile); then - # Now try to grab the symbols. - nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then - # Try sorting and uniquifying the output. - if sort "$nlist" | uniq > "$nlist"T; then - mv -f "$nlist"T "$nlist" - else - rm -f "$nlist"T - fi - - # Make sure that we snagged all the symbols we need. - if $GREP ' nm_test_var$' "$nlist" >/dev/null; then - if $GREP ' nm_test_func$' "$nlist" >/dev/null; then - cat <<_LT_EOF > conftest.$ac_ext -/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ -#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) -/* DATA imports from DLLs on WIN32 con't be const, because runtime - relocations are performed -- see ld's documentation on pseudo-relocs. */ -# define LT@&t@_DLSYM_CONST -#elif defined(__osf__) -/* This system does not cope well with relocations in const data. */ -# define LT@&t@_DLSYM_CONST -#else -# define LT@&t@_DLSYM_CONST const -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -_LT_EOF - # Now generate the symbol file. - eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' - - cat <<_LT_EOF >> conftest.$ac_ext - -/* The mapping between symbol names and symbols. */ -LT@&t@_DLSYM_CONST struct { - const char *name; - void *address; -} -lt__PROGRAM__LTX_preloaded_symbols[[]] = -{ - { "@PROGRAM@", (void *) 0 }, -_LT_EOF - $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext - cat <<\_LT_EOF >> conftest.$ac_ext - {0, (void *) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt__PROGRAM__LTX_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif -_LT_EOF - # Now try linking the two files. - mv conftest.$ac_objext conftstm.$ac_objext - lt_globsym_save_LIBS=$LIBS - lt_globsym_save_CFLAGS=$CFLAGS - LIBS="conftstm.$ac_objext" - CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then - pipe_works=yes - fi - LIBS=$lt_globsym_save_LIBS - CFLAGS=$lt_globsym_save_CFLAGS - else - echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD - fi - else - echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD - fi - else - echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD - cat conftest.$ac_ext >&5 - fi - rm -rf conftest* conftst* - - # Do not use the global_symbol_pipe unless it works. - if test "$pipe_works" = yes; then - break - else - lt_cv_sys_global_symbol_pipe= - fi -done -]) -if test -z "$lt_cv_sys_global_symbol_pipe"; then - lt_cv_sys_global_symbol_to_cdecl= -fi -if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then - AC_MSG_RESULT(failed) -else - AC_MSG_RESULT(ok) -fi - -# Response file support. -if test "$lt_cv_nm_interface" = "MS dumpbin"; then - nm_file_list_spec='@' -elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then - nm_file_list_spec='@' -fi - -_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], - [Take the output of nm and produce a listing of raw symbols and C names]) -_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], - [Transform the output of nm in a proper C declaration]) -_LT_DECL([global_symbol_to_c_name_address], - [lt_cv_sys_global_symbol_to_c_name_address], [1], - [Transform the output of nm in a C name address pair]) -_LT_DECL([global_symbol_to_c_name_address_lib_prefix], - [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], - [Transform the output of nm in a C name address pair when lib prefix is needed]) -_LT_DECL([], [nm_file_list_spec], [1], - [Specify filename containing input files for $NM]) -]) # _LT_CMD_GLOBAL_SYMBOLS - - -# _LT_COMPILER_PIC([TAGNAME]) -# --------------------------- -m4_defun([_LT_COMPILER_PIC], -[m4_require([_LT_TAG_COMPILER])dnl -_LT_TAGVAR(lt_prog_compiler_wl, $1)= -_LT_TAGVAR(lt_prog_compiler_pic, $1)= -_LT_TAGVAR(lt_prog_compiler_static, $1)= - -m4_if([$1], [CXX], [ - # C++ specific cases for pic, static, wl, etc. - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - *djgpp*) - # DJGPP does not support shared libraries at all - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - else - case $host_os in - aix[[4-9]]*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - chorus*) - case $cc_basename in - cxch68*) - # Green Hills C++ Compiler - # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" - ;; - esac - ;; - mingw* | cygwin* | os2* | pw32* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - dgux*) - case $cc_basename in - ec++*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - ghcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - freebsd* | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - if test "$host_cpu" != ia64; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - fi - ;; - aCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - irix5* | irix6* | nonstopux*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - # CC pic flag -KPIC is the default. - ;; - *) - ;; - esac - ;; - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # KAI C++ Compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - ecpc* ) - # old Intel C++ for x86_64 which still supported -KPIC. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - icpc* ) - # Intel C++, used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - cxx*) - # Compaq C++ - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) - # IBM XL 8.0, 9.0 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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)='-Qoption ld ' - ;; - esac - ;; - esac - ;; - lynxos*) - ;; - m88k*) - ;; - mvs*) - case $cc_basename in - cxx*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' - ;; - *) - ;; - esac - ;; - netbsd*) - ;; - *qnx* | *nto*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' - ;; - RCC*) - # Rational C++ 2.4.1 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - cxx*) - # Digital/Compaq C++ - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # Make sure the PIC flag is empty. It appears that all Alpha - # Linux and Compaq Tru64 Unix objects are PIC. - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - *) - ;; - esac - ;; - psos*) - ;; - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _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 ' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - ;; - *) - ;; - esac - ;; - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - lcc*) - # Lucid - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - ;; - *) - ;; - esac - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - esac - ;; - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - ;; - *) - ;; - esac - ;; - vxworks*) - ;; - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -], -[ - if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - - case $host_os in - aix*) - # All AIX code is PIC. - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - m68k) - # FIXME: we need at least 68020 code to build shared libraries, but - # adding the `-m68020' flag to GCC prevents building anything better, - # like `-m68040'. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' - ;; - esac - ;; - - beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) - # PIC is the default for these OSes. - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - # Although the cygwin gcc ignores -fPIC, still need this for old-style - # (--disable-auto-import) libraries - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - darwin* | rhapsody*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' - ;; - - haiku*) - # PIC is the default for Haiku. - # The "-static" flag exists, but is broken. - _LT_TAGVAR(lt_prog_compiler_static, $1)= - ;; - - hpux*) - # PIC is the default for 64-bit PA HP-UX, but not for 32-bit - # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag - # sets the default TLS model and affects inlining. - case $host_cpu in - hppa*64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - ;; - - interix[[3-9]]*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - msdosdjgpp*) - # Just because we use GCC doesn't mean we suddenly get shared libraries - # on systems that don't support them. - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - enable_shared=no - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic - fi - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - ;; - esac - - case $cc_basename in - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - 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 - # PORTME Check for flag to pass linker flags through the system compiler. - case $host_os in - aix*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - if test "$host_cpu" = ia64; then - # AIX 5 now supports IA64 processor - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - else - _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' - fi - ;; - - mingw* | cygwin* | pw32* | os2* | cegcc*) - # This hack is so that the source file can tell whether it is being - # built for inclusion in a dll (and should export symbols for example). - m4_if([$1], [GCJ], [], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) - ;; - - hpux9* | hpux10* | hpux11*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but - # not for PA HP-UX. - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - # Is there a better lt_prog_compiler_static that works with the bundled CC? - _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' - ;; - - irix5* | irix6* | nonstopux*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # PIC (with -KPIC) is the default. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - # old Intel for x86_64 which still supported -KPIC. - ecc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # icc used to be incompatible with GCC. - # ICC 10 doesn't accept -KPIC any more. - icc* | ifort*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' - ;; - # Lahey Fortran 8.1. - lf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' - _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' - ;; - nagfor*) - # NAG Fortran compiler - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - ccc*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All Alpha code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - xl* | bgxl* | bgf* | mpixl*) - # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *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 - ;; - - newsos6) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *nto* | *qnx*) - # QNX uses GNU C++, but need to define -shared option too, otherwise - # it will coredump. - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' - ;; - - osf3* | osf4* | osf5*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - # All OSF/1 code is PIC. - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - rdos*) - _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' - ;; - - solaris*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - sunos4*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - sysv4*MP*) - if test -d /usr/nec ;then - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - fi - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - unicos*) - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - uts4*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' - _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - - *) - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - esac - fi -]) -case $host_os in - # For platforms which do not support PIC, -DPIC is meaningless: - *djgpp*) - _LT_TAGVAR(lt_prog_compiler_pic, $1)= - ;; - *) - _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" - ;; -esac - -AC_CACHE_CHECK([for $compiler option to produce PIC], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], - [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) - -# -# Check to make sure the PIC flag actually works. -# -if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then - _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], - [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], - [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], - [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in - "" | " "*) ;; - *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; - esac], - [_LT_TAGVAR(lt_prog_compiler_pic, $1)= - _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) -fi -_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], - [Additional compiler flags for building library objects]) - -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) -# -# Check to make sure the static flag actually works. -# -wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" -_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) -_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], - [Compiler flag to prevent dynamic linking]) -])# _LT_COMPILER_PIC - - -# _LT_LINKER_SHLIBS([TAGNAME]) -# ---------------------------- -# See if the linker supports building shared libraries. -m4_defun([_LT_LINKER_SHLIBS], -[AC_REQUIRE([LT_PATH_LD])dnl -AC_REQUIRE([LT_PATH_NM])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_DECL_SED])dnl -m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl -m4_require([_LT_TAG_COMPILER])dnl -AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) -m4_if([$1], [CXX], [ - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - case $host_os in - aix[[4-9]]*) - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global defined - # symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - ;; - pw32*) - _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; - cygwin* | mingw* | cegcc*) - case $cc_basename in - 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'] - ;; - esac - ;; - *) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; - esac -], [ - runpath_var= - _LT_TAGVAR(allow_undefined_flag, $1)= - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(archive_cmds, $1)= - _LT_TAGVAR(archive_expsym_cmds, $1)= - _LT_TAGVAR(compiler_needs_object, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - _LT_TAGVAR(hardcode_automatic, $1)=no - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_separator, $1)= - _LT_TAGVAR(hardcode_minus_L, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(inherit_rpath, $1)=no - _LT_TAGVAR(link_all_deplibs, $1)=unknown - _LT_TAGVAR(module_cmds, $1)= - _LT_TAGVAR(module_expsym_cmds, $1)= - _LT_TAGVAR(old_archive_from_new_cmds, $1)= - _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= - _LT_TAGVAR(thread_safe_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - # include_expsyms should be a list of space-separated symbols to be *always* - # included in the symbol list - _LT_TAGVAR(include_expsyms, $1)= - # exclude_expsyms can be an extended regexp of symbols to exclude - # it will be wrapped by ` (' and `)$', so one must not match beginning or - # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', - # as well as any symbol that contains `d'. - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] - # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out - # platforms (ab)use it in PIC code, but their linkers get confused if - # the symbol is explicitly referenced. Since portable code cannot - # rely on this symbol name, it's probably fine to never include it in - # preloaded symbol tables. - # Exclude shared library initialization/finalization symbols. -dnl Note also adjust exclude_expsyms for C++ above. - extract_expsyms_cmds= - - case $host_os in - cygwin* | mingw* | pw32* | cegcc*) - # FIXME: the MSVC++ port hasn't been tested in a loooong time - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - if test "$GCC" != yes; then - with_gnu_ld=no - fi - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - openbsd*) - with_gnu_ld=no - ;; - esac - - _LT_TAGVAR(ld_shlibs, $1)=yes - - # On some targets, GNU ld is compatible enough with the native linker - # that we're better off using the native interface for both. - lt_use_gnu_ld_interface=no - if test "$with_gnu_ld" = yes; then - case $host_os in - aix*) - # The AIX port of GNU ld has always aspired to compatibility - # with the native linker. However, as the warning in the GNU ld - # block says, versions before 2.19.5* couldn't really create working - # shared libraries, regardless of the interface used. - case `$LD -v 2>&1` in - *\ \(GNU\ Binutils\)\ 2.19.5*) ;; - *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; - *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - ;; - *) - lt_use_gnu_ld_interface=yes - ;; - esac - fi - - if test "$lt_use_gnu_ld_interface" = yes; then - # If archive_cmds runs LD, not CC, wlarc should be empty - wlarc='${wl}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - # ancient GNU ld didn't support --whole-archive et. al. - if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - supports_anon_versioning=no - case `$LD -v 2>&1` in - *GNU\ gold*) supports_anon_versioning=yes ;; - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 - *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... - *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... - *\ 2.11.*) ;; # other 2.11 versions - *) supports_anon_versioning=yes ;; - esac - - # See if GNU ld supports shared libraries. - case $host_os in - aix[[3-9]]*) - # On AIX/PPC, the GNU linker is very broken - if test "$host_cpu" != ia64; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: the GNU linker, at least up to release 2.19, is reported -*** to be unable to reliably create shared libraries on AIX. -*** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to install binutils -*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. -*** You will then need to restart the configuration process. - -_LT_EOF - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _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'] - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) - tmp_diet=no - if test "$host_os" = linux-dietlibc; then - case $cc_basename in - diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) - esac - fi - if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ - && test "$tmp_diet" = no - then - tmp_addflag=' $pic_flag' - tmp_sharedflag='-shared' - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95* | pgfortran*) - # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - lf95*) # Lahey Fortran 8.1 - _LT_TAGVAR(whole_archive_flag_spec, $1)= - tmp_sharedflag='--shared' ;; - xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) - tmp_sharedflag='-qmkshrobj' - tmp_addflag= ;; - nvcc*) # Cuda Compiler Driver 2.2 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - ;; - esac - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - tmp_sharedflag='-G' ;; - *Sun\ F*) # Sun Fortran 8.3 - tmp_sharedflag='-G' ;; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - - case $cc_basename in - 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)='${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~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' - fi - ;; - esac - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' - wlarc= - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - fi - ;; - - solaris*) - if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: The releases 2.8.* of the GNU linker cannot reliably -*** create shared libraries on Solaris systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.9.1 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - sunos4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - - if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then - runpath_var= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - # PORTME fill in a description of your system's linker (not GNU ld) - case $host_os in - aix3*) - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' - # Note: this linker hardcodes the directories in LIBPATH if there - # are no directories specified by -L. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then - # Neither direct hardcoding nor static linking is supported with a - # broken collect2. - _LT_TAGVAR(hardcode_direct, $1)=unsupported - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - # If we're using GNU nm, then we don't want the "-C" option. - # -C means demangle to AIX nm, but means don't demangle with GNU nm - # Also, AIX nm treats weak defined symbols like other global - # defined symbols, whereas GNU nm marks them as "W". - if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - else - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' - fi - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then - aix_use_runtimelinking=yes - break - fi - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GCC" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - ;; - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - amigaos*) - case $host_cpu in - powerpc) - # see comment about AmigaOS4 .so support - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='' - ;; - m68k) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - ;; - - bsdi[[45]]*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic - ;; - - cygwin* | mingw* | pw32* | cegcc*) - # When not using gcc, we currently assume that we are using - # Microsoft Visual C++. - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - case $cc_basename in - cl*) - # Native MSVC - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # Assume MSVC wrapper - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - esac - ;; - - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $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 - # extra space). - freebsd2.2*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # Unfortunately, older versions of FreeBSD 2 do not have this feature. - 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 - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - # FreeBSD 3 and greater uses gcc -shared to do shared libraries. - freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - hpux9*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - - hpux10*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - fi - ;; - - hpux11*) - if test "$GCC" = yes && test "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - else - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - m4_if($1, [], [ - # Older versions of the 11.00 compiler do not understand -b yet - # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) - _LT_LINKER_OPTION([if $CC understands -b], - _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], - [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], - [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - - # hardcode_minus_L: Not really in the search PATH, - # but as the default location of the library. - _LT_TAGVAR(hardcode_minus_L, $1)=yes - ;; - esac - fi - ;; - - irix5* | irix6* | nonstopux*) - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - # Try to use the -exported_symbol ld option, if it does not - # work, assume that -exports_file does not work either and - # implicitly export all symbols. - # This should be the same for all languages, so no per-tag cache variable. - AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], - [lt_cv_irix_exported_symbol], - [save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE( - [AC_LANG_SOURCE( - [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], - [C++], [[int foo (void) { return 0; }]], - [Fortran 77], [[ - subroutine foo - end]], - [Fortran], [[ - subroutine foo - end]])])], - [lt_cv_irix_exported_symbol=yes], - [lt_cv_irix_exported_symbol=no]) - LDFLAGS="$save_LDFLAGS"]) - if test "$lt_cv_irix_exported_symbol" = yes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - fi - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out - else - _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - newsos6) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *nto* | *qnx*) - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - else - case $host_os in - openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - ;; - esac - fi - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - os2*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' - _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' - ;; - - osf3*) - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - osf4* | osf5*) # as osf3* with the addition of -msym flag - if test "$GCC" = yes; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - else - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' - - # Both c and cxx compiler support -rpath directly - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)='no' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - ;; - - solaris*) - _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' - if test "$GCC" = yes; then - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - else - case `$CC -V 2>&1` in - *"Compilers 5.0"*) - wlarc='' - _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' - ;; - *) - wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' - ;; - esac - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. GCC discards it without `$wl', - # but is careful enough not to reorder. - # Supported since Solaris 2.6 (maybe 2.5.1?) - if test "$GCC" = yes; then - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - fi - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - sunos4*) - if test "x$host_vendor" = xsequent; then - # Use $CC to link under sequent, because it throws in some extra .o - # files that make .init and .fini sections work. - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' - fi - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4) - case $host_vendor in - sni) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? - ;; - siemens) - ## LD is ld it makes a PLAMLIB - ## CC just makes a GrossModule. - _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' - _LT_TAGVAR(hardcode_direct, $1)=no - ;; - motorola) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie - ;; - esac - runpath_var='LD_RUN_PATH' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - sysv4.3*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' - ;; - - sysv4*MP*) - if test -d /usr/nec; then - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var=LD_RUN_PATH - hardcode_runpath_var=yes - _LT_TAGVAR(ld_shlibs, $1)=yes - fi - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - uts4*) - _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - - *) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - if test x$host_vendor = xsni; then - case $host in - sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' - ;; - esac - fi - fi -]) -AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) -test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - -_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld - -_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl -_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl -_LT_DECL([], [extract_expsyms_cmds], [2], - [The commands to extract the exported symbol list from a shared archive]) - -# -# Do we need to explicitly link libc? -# -case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in -x|xyes) - # Assume -lc should be added - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - - if test "$enable_shared" = yes && test "$GCC" = yes; then - case $_LT_TAGVAR(archive_cmds, $1) in - *'~'*) - # FIXME: we may have to deal with multi-command sequences. - ;; - '$CC '*) - # Test whether the compiler implicitly links with -lc since on some - # systems, -lgcc has to come before -lc. If gcc already passes -lc - # to ld, don't add -lc before -lgcc. - AC_CACHE_CHECK([whether -lc should be explicitly linked in], - [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), - [$RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - ]) - _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) - ;; - esac - fi - ;; -esac - -_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], - [Whether or not to add -lc for building shared libraries]) -_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], - [enable_shared_with_static_runtimes], [0], - [Whether or not to disallow shared libs when runtime libs are static]) -_LT_TAGDECL([], [export_dynamic_flag_spec], [1], - [Compiler flag to allow reflexive dlopens]) -_LT_TAGDECL([], [whole_archive_flag_spec], [1], - [Compiler flag to generate shared objects directly from archives]) -_LT_TAGDECL([], [compiler_needs_object], [1], - [Whether the compiler copes with passing no objects directly]) -_LT_TAGDECL([], [old_archive_from_new_cmds], [2], - [Create an old-style archive from a shared archive]) -_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], - [Create a temporary old-style archive to link instead of a shared archive]) -_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) -_LT_TAGDECL([], [archive_expsym_cmds], [2]) -_LT_TAGDECL([], [module_cmds], [2], - [Commands used to build a loadable module if different from building - a shared archive.]) -_LT_TAGDECL([], [module_expsym_cmds], [2]) -_LT_TAGDECL([], [with_gnu_ld], [1], - [Whether we are building with GNU ld or not]) -_LT_TAGDECL([], [allow_undefined_flag], [1], - [Flag that allows shared libraries with undefined symbols to be built]) -_LT_TAGDECL([], [no_undefined_flag], [1], - [Flag that enforces no undefined symbols]) -_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_separator], [1], - [Whether we need a single "-rpath" flag with a separated argument]) -_LT_TAGDECL([], [hardcode_direct], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary]) -_LT_TAGDECL([], [hardcode_direct_absolute], [0], - [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes - DIR into the resulting binary and the resulting library dependency is - "absolute", i.e impossible to change by setting ${shlibpath_var} if the - library is relocated]) -_LT_TAGDECL([], [hardcode_minus_L], [0], - [Set to "yes" if using the -LDIR flag during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_shlibpath_var], [0], - [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR - into the resulting binary]) -_LT_TAGDECL([], [hardcode_automatic], [0], - [Set to "yes" if building a shared library automatically hardcodes DIR - into the library and all subsequent libraries and executables linked - against it]) -_LT_TAGDECL([], [inherit_rpath], [0], - [Set to yes if linker adds runtime paths of dependent libraries - to runtime path list]) -_LT_TAGDECL([], [link_all_deplibs], [0], - [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [always_export_symbols], [0], - [Set to "yes" if exported symbols are required]) -_LT_TAGDECL([], [export_symbols_cmds], [2], - [The commands to list exported symbols]) -_LT_TAGDECL([], [exclude_expsyms], [1], - [Symbols that should not be listed in the preloaded symbols]) -_LT_TAGDECL([], [include_expsyms], [1], - [Symbols that must always be exported]) -_LT_TAGDECL([], [prelink_cmds], [2], - [Commands necessary for linking programs (against libraries) with templates]) -_LT_TAGDECL([], [postlink_cmds], [2], - [Commands necessary for finishing linking programs]) -_LT_TAGDECL([], [file_list_spec], [1], - [Specify filename containing input files]) -dnl FIXME: Not yet implemented -dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], -dnl [Compiler flag to generate thread safe objects]) -])# _LT_LINKER_SHLIBS - - -# _LT_LANG_C_CONFIG([TAG]) -# ------------------------ -# Ensure that the configuration variables for a C compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_C_CONFIG], -[m4_require([_LT_DECL_EGREP])dnl -lt_save_CC="$CC" -AC_LANG_PUSH(C) - -# Source file extension for C test sources. -ac_ext=c - -# Object file extension for compiled C test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="int some_variable = 0;" - -# Code to be used in simple link tests -lt_simple_link_test_code='int main(){return(0);}' - -_LT_TAG_COMPILER -# Save the default compiler, since it gets overwritten when the other -# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. -compiler_DEFAULT=$CC - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -## 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_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - LT_SYS_DLOPEN_SELF - _LT_CMD_STRIPLIB - - # Report which library types will actually be built - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_CONFIG($1) -fi -AC_LANG_POP -CC="$lt_save_CC" -])# _LT_LANG_C_CONFIG - - -# _LT_LANG_CXX_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a C++ compiler are suitably -# defined. These variables are subsequently used by _LT_CONFIG to write -# the compiler configuration to `libtool'. -m4_defun([_LT_LANG_CXX_CONFIG], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -m4_require([_LT_DECL_EGREP])dnl -m4_require([_LT_PATH_MANIFEST_TOOL])dnl -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi - -AC_LANG_PUSH(C++) -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_LT_TAGVAR(compiler_needs_object, $1)=no -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for C++ test sources. -ac_ext=cpp - -# Object file extension for compiled C++ test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the CXX compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_caught_CXX_error" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="int some_variable = 0;" - - # Code to be used in simple link tests - lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' - - # 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_LD=$LD - lt_save_GCC=$GCC - GCC=$GXX - lt_save_with_gnu_ld=$with_gnu_ld - lt_save_path_LD=$lt_cv_path_LD - if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then - lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx - else - $as_unset lt_cv_prog_gnu_ld - fi - if test -n "${lt_cv_path_LDCXX+set}"; then - lt_cv_path_LD=$lt_cv_path_LDCXX - else - $as_unset lt_cv_path_LD - fi - test -z "${LDCXX+set}" || LD=$LDCXX - CC=${CXX-"c++"} - CFLAGS=$CXXFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - # We don't want -fno-exception when compiling C++ code, so set the - # no_builtin_flag separately - if test "$GXX" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' - else - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= - fi - - if test "$GXX" = yes; then - # Set up default GNU C++ configuration - - LT_PATH_LD - - # Check if GNU C++ uses GNU ld as the underlying linker, since the - # archiving commands below assume that GNU ld is being used. - if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # If archive_cmds runs LD, not CC, wlarc should be empty - # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to - # investigate it a little bit more. (MM) - wlarc='${wl}' - - # ancient GNU ld didn't support --whole-archive et. al. - if eval "`$CC -print-prog-name=ld` --help 2>&1" | - $GREP 'no-whole-archive' > /dev/null; then - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - else - _LT_TAGVAR(whole_archive_flag_spec, $1)= - fi - else - with_gnu_ld=no - wlarc= - - # A generic and very simple default shared library creation - # command for GNU C++ for the case where it uses the native - # linker, instead of GNU ld. If possible, this setting should - # overridden to take advantage of the native linker features on - # the platform it is being used on. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - fi - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - GXX=no - with_gnu_ld=no - wlarc= - fi - - # PORTME: fill in a description of your system's C++ link characteristics - AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) - _LT_TAGVAR(ld_shlibs, $1)=yes - case $host_os in - aix3*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aix[[4-9]]*) - if test "$host_cpu" = ia64; then - # On IA64, the linker does run time linking by default, so we don't - # have to do anything special. - aix_use_runtimelinking=no - exp_sym_flag='-Bexport' - no_entry_flag="" - else - aix_use_runtimelinking=no - - # Test if we are trying to use run time linking or normal - # AIX style linking. If -brtl is somewhere in LDFLAGS, we - # need to do runtime linking. - case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) - for ld_flag in $LDFLAGS; do - case $ld_flag in - *-brtl*) - aix_use_runtimelinking=yes - break - ;; - esac - done - ;; - esac - - exp_sym_flag='-bexport' - no_entry_flag='-bnoentry' - fi - - # When large executables or shared objects are built, AIX ld can - # have problems creating the table of contents. If linking a library - # or program results in "error TOC overflow" add -mminimal-toc to - # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not - # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. - - _LT_TAGVAR(archive_cmds, $1)='' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' - - if test "$GXX" = yes; then - case $host_os in aix4.[[012]]|aix4.[[012]].*) - # We only want to do this on AIX 4.2 and lower, the check - # below for broken collect2 doesn't work under 4.3+ - collect2name=`${CC} -print-prog-name=collect2` - if test -f "$collect2name" && - strings "$collect2name" | $GREP resolve_lib_name >/dev/null - then - # We have reworked collect2 - : - else - # We have old collect2 - _LT_TAGVAR(hardcode_direct, $1)=unsupported - # It fails to find uninstalled libraries when the uninstalled - # path is not listed in the libpath. Setting hardcode_minus_L - # to unsupported forces relinking - _LT_TAGVAR(hardcode_minus_L, $1)=yes - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)= - fi - esac - shared_flag='-shared' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - else - # not using gcc - if test "$host_cpu" = ia64; then - # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release - # chokes on -Wl,-G. The following line is correct: - shared_flag='-G' - else - if test "$aix_use_runtimelinking" = yes; then - shared_flag='${wl}-G' - else - shared_flag='${wl}-bM:SRE' - fi - fi - fi - - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' - # It seems that -bexpall does not export symbols beginning with - # underscore (_), so it is better to generate a list of symbols to - # export. - _LT_TAGVAR(always_export_symbols, $1)=yes - if test "$aix_use_runtimelinking" = yes; then - # Warning - without using the other runtime loading flags (-brtl), - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(allow_undefined_flag, $1)='-berok' - # Determine the default libpath from the value encoded in an empty - # executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" - else - if test "$host_cpu" = ia64; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' - _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" - else - # Determine the default libpath from the value encoded in an - # empty executable. - _LT_SYS_MODULE_PATH_AIX([$1]) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - # Warning - without using the other run time loading flags, - # -berok will link without error, but may produce a broken library. - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - if test "$with_gnu_ld" = yes; then - # We only use this code for GNU lds that support --whole-archive. - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - else - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - fi - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared - # libraries. - _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - chorus*) - case $cc_basename in - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - cygwin* | mingw* | pw32* | cegcc*) - case $GXX,$cc_basename in - ,cl* | no,cl*) - # Native MSVC - # hardcode_libdir_flag_spec is actually meaningless, as there is - # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=yes - _LT_TAGVAR(file_list_spec, $1)='@' - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; - else - $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; - fi~ - $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ - linknames=' - # 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 - # Don't use ranlib - _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' - _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ - lt_tool_outputfile="@TOOL_OUTPUT@"~ - case $lt_outputfile in - *.exe|*.EXE) ;; - *) - lt_outputfile="$lt_outputfile.exe" - lt_tool_outputfile="$lt_tool_outputfile.exe" - ;; - esac~ - func_to_tool_file "$lt_outputfile"~ - if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then - $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; - $RM "$lt_outputfile.manifest"; - fi' - ;; - *) - # g++ - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - darwin* | rhapsody*) - _LT_DARWIN_LINKER_FEATURES($1) - ;; - - dgux*) - case $cc_basename in - ec++*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - ghcx*) - # Green Hills C++ Compiler - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - freebsd2.*) - # C++ shared libraries reported to be fairly broken before - # switch to ELF - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - freebsd-elf*) - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - ;; - - freebsd* | dragonfly*) - # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF - # conventions - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - gnu*) - ;; - - haiku*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - - hpux9*) - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - hpux10*|hpux11*) - if test $with_gnu_ld = no; then - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - ;; - *) - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, - # but as the default - # location of the library. - ;; - esac - - case $cc_basename in - CC*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - aCC*) - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes; then - if test $with_gnu_ld = no; then - case $host_cpu in - hppa*64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - esac - fi - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - interix[[3-9]]*) - _LT_TAGVAR(hardcode_direct, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - irix5* | irix6*) - case $cc_basename in - CC*) - # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - - # Archives containing C++ object files must be created using - # "CC -ar", where "CC" is the IRIX C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' - ;; - *) - if test "$GXX" = yes; then - if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' - fi - fi - _LT_TAGVAR(link_all_deplibs, $1)=yes - ;; - esac - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - _LT_TAGVAR(inherit_rpath, $1)=yes - ;; - - linux* | k*bsd*-gnu | kopensolaris*-gnu) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - - # Archives containing C++ object files must be created using - # "CC -Bstatic", where "CC" is the KAI C++ compiler. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' - ;; - icpc* | ecpc* ) - # Intel C++ - with_gnu_ld=yes - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' - ;; - pgCC* | pgcpp*) - # Portland Group C++ compiler - case `$CC -V` in - *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) - _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' - _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ - $RANLIB $oldlib' - _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ - rm -rf $tpldir~ - $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - *) # Version 6 and above use weak symbols - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - ;; - cxx*) - # Compaq C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' - - runpath_var=LD_RUN_PATH - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' - ;; - xl* | mpixl* | bgxl*) - # IBM XL 8.0 on PPC, with GNU ld - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - if test "x$supports_anon_versioning" = xyes; then - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ - cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ - echo "local: *; };" >> $output_objdir/$libname.ver~ - $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - ;; - *) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' - _LT_TAGVAR(compiler_needs_object, $1)=yes - - # Not sure whether something based on - # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 - # would be better. - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - esac - ;; - esac - ;; - - lynxos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - m88k*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - mvs*) - case $cc_basename in - cxx*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - netbsd*) - if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' - wlarc= - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - fi - # Workaround some broken pre-1.5 toolchains - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' - ;; - - *nto* | *qnx*) - _LT_TAGVAR(ld_shlibs, $1)=yes - ;; - - openbsd2*) - # C++ shared libraries are fairly broken - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - openbsd*) - if test -f /usr/libexec/ld.so; then - _LT_TAGVAR(hardcode_direct, $1)=yes - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_direct_absolute, $1)=yes - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd=func_echo_all - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - osf3* | osf4* | osf5*) - case $cc_basename in - KCC*) - # Kuck and Associates, Inc. (KAI) C++ Compiler - - # KCC will only create a shared library if the output file - # ends with ".so" (or ".sl" for HP-UX), so rename the library - # to its proper name (with version) after linking. - _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Archives containing C++ object files must be created using - # the KAI C++ compiler. - case $host in - osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; - *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; - esac - ;; - RCC*) - # Rational C++ 2.4.1 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - cxx*) - case $host in - osf3*) - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - ;; - *) - _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ - echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ - $RM $lib.exp' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - # - # There doesn't appear to be a way to prevent this compiler from - # explicitly linking system object files so we need to strip them - # from the output so that they don't get included in the library - # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' - ;; - *) - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - case $host in - osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' - ;; - esac - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=: - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - - else - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - psos*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - sunos4*) - case $cc_basename in - CC*) - # Sun C++ 4.x - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - lcc*) - # Lucid - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - solaris*) - case $cc_basename in - CC* | sunCC*) - # Sun C++ 4.2, 5.x and Centerline C++ - _LT_TAGVAR(archive_cmds_need_lc,$1)=yes - _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - # The compiler driver will combine and reorder linker options, - # but understands `-z linker_flag'. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' - ;; - esac - _LT_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='func_echo_all' - - # Archives containing C++ object files must be created using - # "CC -xar", where "CC" is the Sun C++ compiler. This is - # necessary to make sure instantiated templates are included - # in the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' - ;; - gcx*) - # Green Hills C++ Compiler - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - - # The C++ compiler must be used to create the archive. - _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' - ;; - *) - # GNU C++ compiler with Solaris linker - if test "$GXX" = yes && test "$with_gnu_ld" = no; then - _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' - if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - else - # g++ 2.7 appears to require `-G' NOT `-shared' on this - # platform. - _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' - - # Commands to make compiler produce verbose output that lists - # what "hidden" libraries, object files and flags are used when - # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' - fi - - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' - case $host_os in - solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; - *) - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' - ;; - esac - fi - ;; - esac - ;; - - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' - _LT_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_TAGVAR(link_all_deplibs, $1)=yes - _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ - '"$_LT_TAGVAR(old_archive_cmds, $1)" - _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ - '"$_LT_TAGVAR(reload_cmds, $1)" - ;; - *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - - tandem*) - case $cc_basename in - NCC*) - # NonStop-UX NCC 3.20 - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - ;; - - vxworks*) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - - *) - # FIXME: insert proper C++ library support - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - esac - - AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) - test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no - - _LT_TAGVAR(GCC, $1)="$GXX" - _LT_TAGVAR(LD, $1)="$LD" - - ## 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... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS - LDCXX=$LD - LD=$lt_save_LD - GCC=$lt_save_GCC - with_gnu_ld=$lt_save_with_gnu_ld - lt_cv_path_LDCXX=$lt_cv_path_LD - lt_cv_path_LD=$lt_save_path_LD - lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld - lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld -fi # test "$_lt_caught_CXX_error" != yes - -AC_LANG_POP -])# _LT_LANG_CXX_CONFIG - - -# _LT_FUNC_STRIPNAME_CNF -# ---------------------- -# func_stripname_cnf prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# -# This function is identical to the (non-XSI) version of func_stripname, -# except this one can be used by m4 code that may be executed by configure, -# rather than the libtool script. -m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl -AC_REQUIRE([_LT_DECL_SED]) -AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) -func_stripname_cnf () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; - esac -} # func_stripname_cnf -])# _LT_FUNC_STRIPNAME_CNF - -# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) -# --------------------------------- -# Figure out "hidden" library dependencies from verbose -# compiler output when linking a shared library. -# Parse the compiler output and extract the necessary -# objects, libraries and library flags. -m4_defun([_LT_SYS_HIDDEN_LIBDEPS], -[m4_require([_LT_FILEUTILS_DEFAULTS])dnl -AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl -# Dependencies to place before and after the object being linked: -_LT_TAGVAR(predep_objects, $1)= -_LT_TAGVAR(postdep_objects, $1)= -_LT_TAGVAR(predeps, $1)= -_LT_TAGVAR(postdeps, $1)= -_LT_TAGVAR(compiler_lib_search_path, $1)= - -dnl we can't use the lt_simple_compile_test_code here, -dnl because it contains code intended for an executable, -dnl not a library. It's possible we should let each -dnl tag define a new lt_????_link_test_code variable, -dnl but it's only used here... -m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF -int a; -void foo (void) { a = 0; } -_LT_EOF -], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF -class Foo -{ -public: - Foo (void) { a = 0; } -private: - int a; -}; -_LT_EOF -], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer*4 a - a=0 - return - end -_LT_EOF -], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF - subroutine foo - implicit none - integer a - a=0 - return - end -_LT_EOF -], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF -public class foo { - private int a; - public void bar (void) { - a = 0; - } -}; -_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 -dnl objects, libraries and library flags. -if AC_TRY_EVAL(ac_compile); then - # Parse the compiler output and extract the necessary - # objects, libraries and library flags. - - # Sentinel used to keep track of whether or not we are before - # the conftest object file. - pre_test_object_deps_done=no - - for p in `eval "$output_verbose_link_cmd"`; do - case ${prev}${p} in - - -L* | -R* | -l*) - # Some compilers place space between "-{L,R}" and the path. - # Remove the space. - if test $p = "-L" || - test $p = "-R"; then - prev=$p - continue - fi - - # Expand the sysroot to ease extracting the directories later. - if test -z "$prev"; then - case $p in - -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; - -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; - -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; - esac - fi - case $p in - =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; - esac - if test "$pre_test_object_deps_done" = no; then - case ${prev} in - -L | -R) - # Internal compiler library paths should come after those - # provided the user. The postdeps already come after the - # user supplied libs so there is no need to process them. - if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then - _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" - else - _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" - fi - ;; - # The "-l" case would never come before the object being - # linked, so don't bother handling this case. - esac - else - if test -z "$_LT_TAGVAR(postdeps, $1)"; then - _LT_TAGVAR(postdeps, $1)="${prev}${p}" - else - _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" - fi - fi - prev= - ;; - - *.lto.$objext) ;; # Ignore GCC LTO objects - *.$objext) - # This assumes that the test object file only shows up - # once in the compiler output. - if test "$p" = "conftest.$objext"; then - pre_test_object_deps_done=yes - continue - fi - - if test "$pre_test_object_deps_done" = no; then - if test -z "$_LT_TAGVAR(predep_objects, $1)"; then - _LT_TAGVAR(predep_objects, $1)="$p" - else - _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" - fi - else - if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then - _LT_TAGVAR(postdep_objects, $1)="$p" - else - _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" - fi - fi - ;; - - *) ;; # Ignore the rest. - - esac - done - - # Clean up. - rm -f a.out a.exe -else - echo "libtool.m4: error: problem compiling $1 test program" -fi - -$RM -f confest.$objext -CFLAGS=$_lt_libdeps_save_CFLAGS - -# PORTME: override above test on systems where it is broken -m4_if([$1], [CXX], -[case $host_os in -interix[[3-9]]*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - _LT_TAGVAR(predep_objects,$1)= - _LT_TAGVAR(postdep_objects,$1)= - _LT_TAGVAR(postdeps,$1)= - ;; - -linux*) - case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C++ 5.9 - - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; - -solaris*) - case $cc_basename in - CC* | sunCC*) - # The more standards-conforming stlport4 library is - # incompatible with the Cstd library. Avoid specifying - # it if it's in CXXFLAGS. Ignore libCrun as - # -library=stlport4 depends on it. - case " $CXX $CXXFLAGS " in - *" -library=stlport4 "*) - solaris_use_stlport4=yes - ;; - esac - - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - if test "$solaris_use_stlport4" != yes; then - _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' - fi - ;; - esac - ;; -esac -]) - -case " $_LT_TAGVAR(postdeps, $1) " in -*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; -esac - _LT_TAGVAR(compiler_lib_search_dirs, $1)= -if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then - _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` -fi -_LT_TAGDECL([], [compiler_lib_search_dirs], [1], - [The directories searched by this compiler when creating a shared library]) -_LT_TAGDECL([], [predep_objects], [1], - [Dependencies to place before and after the objects being linked to - create a shared library]) -_LT_TAGDECL([], [postdep_objects], [1]) -_LT_TAGDECL([], [predeps], [1]) -_LT_TAGDECL([], [postdeps], [1]) -_LT_TAGDECL([], [compiler_lib_search_path], [1], - [The library search path used internally by the compiler when linking - a shared library]) -])# _LT_SYS_HIDDEN_LIBDEPS - - -# _LT_LANG_F77_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for a Fortran 77 compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_F77_CONFIG], -[AC_LANG_PUSH(Fortran 77) -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for f77 test sources. -ac_ext=f - -# Object file extension for compiled f77 test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the F77 compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_F77" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${F77-"f77"} - CFLAGS=$FFLAGS - compiler=$CC - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - GCC=$G77 - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$G77" - _LT_TAGVAR(LD, $1)="$LD" - - ## 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... - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC="$lt_save_CC" - CFLAGS="$lt_save_CFLAGS" -fi # test "$_lt_disable_F77" != yes - -AC_LANG_POP -])# _LT_LANG_F77_CONFIG - - -# _LT_LANG_FC_CONFIG([TAG]) -# ------------------------- -# Ensure that the configuration variables for a Fortran compiler are -# suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_FC_CONFIG], -[AC_LANG_PUSH(Fortran) - -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi - -_LT_TAGVAR(archive_cmds_need_lc, $1)=no -_LT_TAGVAR(allow_undefined_flag, $1)= -_LT_TAGVAR(always_export_symbols, $1)=no -_LT_TAGVAR(archive_expsym_cmds, $1)= -_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_separator, $1)= -_LT_TAGVAR(hardcode_minus_L, $1)=no -_LT_TAGVAR(hardcode_automatic, $1)=no -_LT_TAGVAR(inherit_rpath, $1)=no -_LT_TAGVAR(module_cmds, $1)= -_LT_TAGVAR(module_expsym_cmds, $1)= -_LT_TAGVAR(link_all_deplibs, $1)=unknown -_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds -_LT_TAGVAR(reload_flag, $1)=$reload_flag -_LT_TAGVAR(reload_cmds, $1)=$reload_cmds -_LT_TAGVAR(no_undefined_flag, $1)= -_LT_TAGVAR(whole_archive_flag_spec, $1)= -_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no - -# Source file extension for fc test sources. -ac_ext=${ac_fc_srcext-f} - -# Object file extension for compiled fc test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# No sense in running all these tests if we already determined that -# the FC compiler isn't working. Some variables (like enable_shared) -# are currently assumed to apply to all compilers on this platform, -# and will be corrupted by setting them based on a non-working compiler. -if test "$_lt_disable_FC" != yes; then - # Code to be used in simple compile tests - lt_simple_compile_test_code="\ - subroutine t - return - end -" - - # Code to be used in simple link tests - lt_simple_link_test_code="\ - program t - end -" - - # 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_GCC=$GCC - lt_save_CFLAGS=$CFLAGS - CC=${FC-"f95"} - CFLAGS=$FCFLAGS - compiler=$CC - GCC=$ac_cv_fc_compiler_gnu - - _LT_TAGVAR(compiler, $1)=$CC - _LT_CC_BASENAME([$compiler]) - - if test -n "$compiler"; then - AC_MSG_CHECKING([if libtool supports shared libraries]) - AC_MSG_RESULT([$can_build_shared]) - - AC_MSG_CHECKING([whether to build shared libraries]) - test "$can_build_shared" = "no" && enable_shared=no - - # On AIX, shared libraries and static libraries use the same namespace, and - # are all built from PIC. - case $host_os in - aix3*) - test "$enable_shared" = yes && enable_static=no - if test -n "$RANLIB"; then - archive_cmds="$archive_cmds~\$RANLIB \$lib" - postinstall_cmds='$RANLIB $lib' - fi - ;; - aix[[4-9]]*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=no - fi - ;; - esac - AC_MSG_RESULT([$enable_shared]) - - AC_MSG_CHECKING([whether to build static libraries]) - # Make sure either enable_shared or enable_static is yes. - test "$enable_shared" = yes || enable_static=yes - AC_MSG_RESULT([$enable_static]) - - _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" - _LT_TAGVAR(LD, $1)="$LD" - - ## 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... - _LT_SYS_HIDDEN_LIBDEPS($1) - _LT_COMPILER_PIC($1) - _LT_COMPILER_C_O($1) - _LT_COMPILER_FILE_LOCKS($1) - _LT_LINKER_SHLIBS($1) - _LT_SYS_DYNAMIC_LINKER($1) - _LT_LINKER_HARDCODE_LIBPATH($1) - - _LT_CONFIG($1) - fi # test -n "$compiler" - - GCC=$lt_save_GCC - CC=$lt_save_CC - CFLAGS=$lt_save_CFLAGS -fi # test "$_lt_disable_FC" != yes - -AC_LANG_POP -])# _LT_LANG_FC_CONFIG - - -# _LT_LANG_GCJ_CONFIG([TAG]) -# -------------------------- -# Ensure that the configuration variables for the GNU Java Compiler compiler -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_GCJ_CONFIG], -[AC_REQUIRE([LT_PROG_GCJ])dnl -AC_LANG_SAVE - -# Source file extension for Java test sources. -ac_ext=java - -# Object file extension for compiled Java test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code="class foo {}" - -# Code to be used in simple link tests -lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' - -# 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=${GCJ-"gcj"} -CFLAGS=$GCJFLAGS -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_TAGVAR(LD, $1)="$LD" -_LT_CC_BASENAME([$compiler]) - -# GCJ 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_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 -# are suitably defined. These variables are subsequently used by _LT_CONFIG -# to write the compiler configuration to `libtool'. -m4_defun([_LT_LANG_RC_CONFIG], -[AC_REQUIRE([LT_PROG_RC])dnl -AC_LANG_SAVE - -# Source file extension for RC test sources. -ac_ext=rc - -# Object file extension for compiled RC test sources. -objext=o -_LT_TAGVAR(objext, $1)=$objext - -# Code to be used in simple compile tests -lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' - -# Code to be used in simple link tests -lt_simple_link_test_code="$lt_simple_compile_test_code" - -# 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= -CC=${RC-"windres"} -CFLAGS= -compiler=$CC -_LT_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) -_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - -if test -n "$compiler"; then - : - _LT_CONFIG($1) -fi - -GCC=$lt_save_GCC -AC_LANG_RESTORE -CC=$lt_save_CC -CFLAGS=$lt_save_CFLAGS -])# _LT_LANG_RC_CONFIG - - -# LT_PROG_GCJ -# ----------- -AC_DEFUN([LT_PROG_GCJ], -[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], - [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], - [AC_CHECK_TOOL(GCJ, gcj,) - test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" - AC_SUBST(GCJFLAGS)])])[]dnl -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) -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], -[AC_CHECK_TOOL(RC, windres,) -]) - -# Old name: -AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_RC], []) - - -# _LT_DECL_EGREP -# -------------- -# If we don't have a new enough Autoconf to choose the best grep -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_EGREP], -[AC_REQUIRE([AC_PROG_EGREP])dnl -AC_REQUIRE([AC_PROG_FGREP])dnl -test -z "$GREP" && GREP=grep -_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) -_LT_DECL([], [EGREP], [1], [An ERE matcher]) -_LT_DECL([], [FGREP], [1], [A literal string matcher]) -dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too -AC_SUBST([GREP]) -]) - - -# _LT_DECL_OBJDUMP -# -------------- -# If we don't have a new enough Autoconf to choose the best objdump -# available, choose the one first in the user's PATH. -m4_defun([_LT_DECL_OBJDUMP], -[AC_CHECK_TOOL(OBJDUMP, objdump, false) -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) -AC_SUBST([OBJDUMP]) -]) - -# _LT_DECL_DLLTOOL -# ---------------- -# Ensure DLLTOOL variable is set. -m4_defun([_LT_DECL_DLLTOOL], -[AC_CHECK_TOOL(DLLTOOL, dlltool, false) -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) -AC_SUBST([DLLTOOL]) -]) - -# _LT_DECL_SED -# ------------ -# Check for a fully-functional sed program, that truncates -# as few characters as possible. Prefer GNU sed if found. -m4_defun([_LT_DECL_SED], -[AC_PROG_SED -test -z "$SED" && SED=sed -Xsed="$SED -e 1s/^X//" -_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) -_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], - [Sed that helps us avoid accidentally triggering echo(1) options like -n]) -])# _LT_DECL_SED - -m4_ifndef([AC_PROG_SED], [ -############################################################ -# NOTE: This macro has been submitted for inclusion into # -# GNU Autoconf as AC_PROG_SED. When it is available in # -# a released version of Autoconf we should remove this # -# macro and use it instead. # -############################################################ - -m4_defun([AC_PROG_SED], -[AC_MSG_CHECKING([for a sed that does not truncate output]) -AC_CACHE_VAL(lt_cv_path_SED, -[# Loop through the user's path and test for sed and gsed. -# Then use that list of sed's as ones to test for truncation. -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for lt_ac_prog in sed gsed; do - for ac_exec_ext in '' $ac_executable_extensions; do - if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then - lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" - fi - done - done -done -IFS=$as_save_IFS -lt_ac_max=0 -lt_ac_count=0 -# Add /usr/xpg4/bin/sed as it is typically found on Solaris -# along with /bin/sed that truncates output. -for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do - test ! -f $lt_ac_sed && continue - cat /dev/null > conftest.in - lt_ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >conftest.in - # Check for GNU sed and select it if it is found. - if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then - lt_cv_path_SED=$lt_ac_sed - break - fi - while true; do - cat conftest.in conftest.in >conftest.tmp - mv conftest.tmp conftest.in - cp conftest.in conftest.nl - echo >>conftest.nl - $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break - cmp -s conftest.out conftest.nl || break - # 10000 chars as input seems more than enough - test $lt_ac_count -gt 10 && break - lt_ac_count=`expr $lt_ac_count + 1` - if test $lt_ac_count -gt $lt_ac_max; then - lt_ac_max=$lt_ac_count - lt_cv_path_SED=$lt_ac_sed - fi - done -done -]) -SED=$lt_cv_path_SED -AC_SUBST([SED]) -AC_MSG_RESULT([$SED]) -])#AC_PROG_SED -])#m4_ifndef - -# Old name: -AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([LT_AC_PROG_SED], []) - - -# _LT_CHECK_SHELL_FEATURES -# ------------------------ -# Find out whether the shell is Bourne or XSI compatible, -# or has some other useful features. -m4_defun([_LT_CHECK_SHELL_FEATURES], -[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) -# Try some XSI features -xsi_shell=no -( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,b/c, \ - && eval 'test $(( 1 + 1 )) -eq 2 \ - && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ - && xsi_shell=yes -AC_MSG_RESULT([$xsi_shell]) -_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) - -AC_MSG_CHECKING([whether the shell understands "+="]) -lt_shell_append=no -( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ - >/dev/null 2>&1 \ - && lt_shell_append=yes -AC_MSG_RESULT([$lt_shell_append]) -_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) - -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - lt_unset=unset -else - lt_unset=false -fi -_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl - -# test EBCDIC or ASCII -case `echo X|tr X '\101'` in - A) # ASCII based system - # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr - lt_SP2NL='tr \040 \012' - lt_NL2SP='tr \015\012 \040\040' - ;; - *) # EBCDIC based system - lt_SP2NL='tr \100 \n' - lt_NL2SP='tr \r\n \100\100' - ;; -esac -_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl -_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl -])# _LT_CHECK_SHELL_FEATURES - - -# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) -# ------------------------------------------------------ -# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and -# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. -m4_defun([_LT_PROG_FUNCTION_REPLACE], -[dnl { -sed -e '/^$1 ()$/,/^} # $1 /c\ -$1 ()\ -{\ -m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) -} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") -test 0 -eq $? || _lt_function_replace_fail=: -]) - - -# _LT_PROG_REPLACE_SHELLFNS -# ------------------------- -# Replace existing portable implementations of several shell functions with -# equivalent extended shell implementations where those features are available.. -m4_defun([_LT_PROG_REPLACE_SHELLFNS], -[if test x"$xsi_shell" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}"]) - - _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl - func_split_long_opt_name=${1%%=*} - func_split_long_opt_arg=${1#*=}]) - - _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl - func_split_short_opt_arg=${1#??} - func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) - - _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac]) - - _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) - - _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) - - _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) -fi - -if test x"$lt_shell_append" = xyes; then - _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) - - _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl - func_quote_for_eval "${2}" -dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ - eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) - - # Save a `func_append' function call where possible by direct use of '+=' - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -else - # Save a `func_append' function call even when '+=' is not available - sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ - && mv -f "$cfgfile.tmp" "$cfgfile" \ - || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") - test 0 -eq $? || _lt_function_replace_fail=: -fi - -if test x"$_lt_function_replace_fail" = x":"; then - AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) -fi -]) - -# _LT_PATH_CONVERSION_FUNCTIONS -# ----------------------------- -# Determine which file name conversion functions should be used by -# func_to_host_file (and, implicitly, by func_to_host_path). These are needed -# for certain cross-compile configurations and native mingw. -m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -AC_REQUIRE([AC_CANONICAL_BUILD])dnl -AC_MSG_CHECKING([how to convert $build file names to $host format]) -AC_CACHE_VAL(lt_cv_to_host_file_cmd, -[case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 - ;; - esac - ;; - *-*-cygwin* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin - ;; - *-*-cygwin* ) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; - * ) # otherwise, assume *nix - lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin - ;; - esac - ;; - * ) # unhandled hosts (and "normal" native builds) - lt_cv_to_host_file_cmd=func_convert_file_noop - ;; -esac -]) -to_host_file_cmd=$lt_cv_to_host_file_cmd -AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) -_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], - [0], [convert $build file names to $host format])dnl - -AC_MSG_CHECKING([how to convert $build file names to toolchain format]) -AC_CACHE_VAL(lt_cv_to_tool_file_cmd, -[#assume ordinary cross tools, or native build. -lt_cv_to_tool_file_cmd=func_convert_file_noop -case $host in - *-*-mingw* ) - case $build in - *-*-mingw* ) # actually msys - lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 - ;; - esac - ;; -esac -]) -to_tool_file_cmd=$lt_cv_to_tool_file_cmd -AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) -_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], - [0], [convert $build files to toolchain format])dnl -])# _LT_PATH_CONVERSION_FUNCTIONS diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4 deleted file mode 100644 index 8010379..0000000 --- a/gnulib/m4/localcharset.m4 +++ /dev/null @@ -1,17 +0,0 @@ -# localcharset.m4 serial 7 -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. - -AC_DEFUN([gl_LOCALCHARSET], -[ - dnl Prerequisites of lib/localcharset.c. - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_REQUIRE([gl_FCNTL_O_FLAGS]) - AC_CHECK_DECLS_ONCE([getc_unlocked]) - - dnl Prerequisites of the lib/Makefile.am snippet. - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([gl_GLIBC21]) -]) diff --git a/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4 deleted file mode 100644 index 71b6847..0000000 --- a/gnulib/m4/locale-fr.m4 +++ /dev/null @@ -1,250 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -dnl Determine the name of a french locale with traditional encoding. -AC_DEFUN([gt_LOCALE_FR], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only - one byte long. This excludes the UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; -#endif - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the native Windows locale name. - if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=French_France.1252 - else - # None found. - gt_cv_locale_fr=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO-8859-1 - else - # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. - if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.ISO8859-1 - else - # Test for the HP-UX locale name. - if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr_FR.iso88591 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr=fr - else - # None found. - gt_cv_locale_fr=none - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_FR=$gt_cv_locale_fr - AC_SUBST([LOCALE_FR]) -]) - -dnl Determine the name of a french locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_FR_UTF8], -[ - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. */ -#if !(defined __BEOS__ || defined __HAIKU__) - /* Check whether the given locale name is recognized by the system. */ -# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -# else - if (setlocale (LC_ALL, "") == NULL) return 1; -# endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -# if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -# endif -# ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -# endif - /* Check whether in the abbreviation of the second month, the second - character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') - return 1; -#endif -#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ - /* Check whether the decimal separator is a comma. - On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point - are nl_langinfo(RADIXCHAR) are both ".". */ - if (localeconv () ->decimal_point[0] != ',') return 1; -#endif - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=French_France.65001 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr_FR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_fr_utf8=fr.UTF-8 - else - # None found. - gt_cv_locale_fr_utf8=none - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 - AC_SUBST([LOCALE_FR_UTF8]) -]) diff --git a/gnulib/m4/locale-ja.m4 b/gnulib/m4/locale-ja.m4 deleted file mode 100644 index 5ba0e43..0000000 --- a/gnulib/m4/locale-ja.m4 +++ /dev/null @@ -1,136 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -dnl Determine the name of a japanese locale with EUC-JP encoding. -AC_DEFUN([gt_LOCALE_JA], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales - on Cygwin 1.5.x. */ - if (MB_CUR_MAX == 1) - return 1; - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Note that on native Windows, the Japanese locale is - # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we - # cannot use it here. - gt_cv_locale_ja=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the AIX locale name. - if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC-JP - else - # Test for the HP-UX, OSF/1, NetBSD locale name. - if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.eucJP - else - # Test for the IRIX, FreeBSD locale name. - if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja_JP.EUC - else - # Test for the Solaris 7 locale name. - if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_ja=ja - else - # Special test for NetBSD 1.6. - if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then - gt_cv_locale_ja=ja_JP.eucJP - else - # None found. - gt_cv_locale_ja=none - fi - fi - fi - fi - fi - fi - ;; - esac - fi - rm -fr conftest* - ]) - LOCALE_JA=$gt_cv_locale_ja - AC_SUBST([LOCALE_JA]) -]) diff --git a/gnulib/m4/locale-tr.m4 b/gnulib/m4/locale-tr.m4 deleted file mode 100644 index 5f3bf80..0000000 --- a/gnulib/m4/locale-tr.m4 +++ /dev/null @@ -1,127 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -dnl Determine the name of a turkish locale with UTF-8 encoding. -AC_DEFUN([gt_LOCALE_TR_UTF8], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () { - /* On BeOS, locales are not implemented in libc. Rather, libintl - imitates locale dependent behaviour by looking at the environment - variables, and all locales use the UTF-8 encoding. But BeOS does not - implement the Turkish upper-/lowercase mappings. Therefore, let this - program return 1 on BeOS. */ - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in the abbreviation of the eighth month, the second - character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is - two bytes long, with UTF-8 encoding. */ - t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19; - if (strftime (buf, sizeof (buf), "%b", &t) < 4 - || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f) - return 1; - /* Check whether the upper-/lowercase mappings are as expected for - Turkish. */ - if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i' - || towupper(0x0131) != 'I' || towlower ('I') != 0x0131) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=Turkish_Turkey.65001 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the usual locale name. - if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr_TR.UTF-8 - else - # Test for the Solaris 7 locale name. - if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_tr_utf8=tr.UTF-8 - else - # None found. - gt_cv_locale_tr_utf8=none - fi - fi - fi - ;; - esac - else - gt_cv_locale_tr_utf8=none - fi - rm -fr conftest* - ]) - LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8 - AC_SUBST([LOCALE_TR_UTF8]) -]) diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4 deleted file mode 100644 index e5502b2..0000000 --- a/gnulib/m4/locale-zh.m4 +++ /dev/null @@ -1,130 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -dnl Determine the name of a chinese locale with GB18030 encoding. -AC_DEFUN([gt_LOCALE_ZH_CN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AM_LANGINFO_CODESET]) - AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [ - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -changequote(,)dnl -#include -#include -#include -#if HAVE_LANGINFO_CODESET -# include -#endif -#include -#include -struct tm t; -char buf[16]; -int main () -{ - const char *p; - /* Check whether the given locale name is recognized by the system. */ -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - /* On native Windows, setlocale(category, "") looks at the system settings, - not at the environment variables. Also, when an encoding suffix such - as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE - category of the locale to "C". */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL - || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - return 1; -#else - if (setlocale (LC_ALL, "") == NULL) return 1; -#endif - /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". - On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) - is empty, and the behaviour of Tcl 8.4 in this locale is not useful. - On OpenBSD 4.0, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "646". In this situation, - some unit tests fail. - On MirBSD 10, when an unsupported locale is specified, setlocale() - succeeds but then nl_langinfo(CODESET) is "UTF-8". */ -#if HAVE_LANGINFO_CODESET - { - const char *cs = nl_langinfo (CODESET); - if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 - || strcmp (cs, "UTF-8") == 0) - return 1; - } -#endif -#ifdef __CYGWIN__ - /* On Cygwin, avoid locale names without encoding suffix, because the - locale_charset() function relies on the encoding suffix. Note that - LC_ALL is set on the command line. */ - if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; -#endif - /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. - This excludes the UTF-8 encoding (except on MirBSD). */ - t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; - if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; - for (p = buf; *p != '\0'; p++) - if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) - return 1; - /* Check whether a typical GB18030 multibyte sequence is recognized as a - single wide character. This excludes the GB2312 and GBK encodings. */ - if (mblen ("\203\062\332\066", 5) != 4) - return 1; - return 0; -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - case "$host_os" in - # Handle native Windows specially, because there setlocale() interprets - # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", - # "fr" or "fra" as "French" or "French_France.1252", - # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", - # "ja" as "Japanese" or "Japanese_Japan.932", - # and similar. - mingw*) - # Test for the hypothetical native Windows locale name. - if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=Chinese_China.54936 - else - # None found. - gt_cv_locale_zh_CN=none - fi - ;; - solaris2.8) - # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are - # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. - # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. - gt_cv_locale_zh_CN=none - ;; - *) - # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because - # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the - # configure script would override the LC_ALL setting. Likewise for - # LC_CTYPE, which is also set at the beginning of the configure script. - # Test for the locale name without encoding suffix. - if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN - else - # Test for the locale name with explicit encoding suffix. - if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then - gt_cv_locale_zh_CN=zh_CN.GB18030 - else - # None found. - gt_cv_locale_zh_CN=none - fi - fi - ;; - esac - else - # If there was a link error, due to mblen(), the system is so old that - # it certainly doesn't have a chinese locale. - gt_cv_locale_zh_CN=none - fi - rm -fr conftest* - ]) - LOCALE_ZH_CN=$gt_cv_locale_zh_CN - AC_SUBST([LOCALE_ZH_CN]) -]) diff --git a/gnulib/m4/locale_h.m4 b/gnulib/m4/locale_h.m4 deleted file mode 100644 index c0f4d52..0000000 --- a/gnulib/m4/locale_h.m4 +++ /dev/null @@ -1,122 +0,0 @@ -# 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. - -AC_DEFUN([gl_LOCALE_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - - dnl Persuade glibc to define locale_t and the int_p_*, int_n_* - dnl members of 'struct lconv'. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - dnl If is replaced, then must also be replaced. - AC_REQUIRE([gl_STDDEF_H]) - - dnl Solaris 11 2011-11 defines the int_p_*, int_n_* members of 'struct lconv' - dnl only if _LCONV_C99 is defined. - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - solaris*) - AC_DEFINE([_LCONV_C99], [1], [Define to 1 on Solaris.]) - ;; - esac - - AC_CACHE_CHECK([whether locale.h conforms to POSIX:2001], - [gl_cv_header_locale_h_posix2001], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - int x = LC_MESSAGES; - int y = sizeof (((struct lconv *) 0)->decimal_point);]], - [[]])], - [gl_cv_header_locale_h_posix2001=yes], - [gl_cv_header_locale_h_posix2001=no])]) - - dnl Check for . - AC_CHECK_HEADERS_ONCE([xlocale.h]) - if test $ac_cv_header_xlocale_h = yes; then - HAVE_XLOCALE_H=1 - dnl Check whether use of locale_t requires inclusion of , - dnl e.g. on Mac OS X 10.5. If does not define locale_t by - dnl itself, we assume that will do so. - AC_CACHE_CHECK([whether locale.h defines locale_t], - [gl_cv_header_locale_has_locale_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - locale_t x;]], - [[]])], - [gl_cv_header_locale_has_locale_t=yes], - [gl_cv_header_locale_has_locale_t=no]) - ]) - if test $gl_cv_header_locale_has_locale_t = yes; then - gl_cv_header_locale_h_needs_xlocale_h=no - else - gl_cv_header_locale_h_needs_xlocale_h=yes - fi - else - HAVE_XLOCALE_H=0 - gl_cv_header_locale_h_needs_xlocale_h=no - fi - AC_SUBST([HAVE_XLOCALE_H]) - - dnl Check whether 'struct lconv' is complete. - dnl Bionic libc's 'struct lconv' is just a dummy. - dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x, - dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members. - AC_CACHE_CHECK([whether struct lconv is properly defined], - [gl_cv_sys_struct_lconv_ok], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - struct lconv l; - int x = sizeof (l.decimal_point); - int y = sizeof (l.int_p_cs_precedes);]], - [[]])], - [gl_cv_sys_struct_lconv_ok=yes], - [gl_cv_sys_struct_lconv_ok=no]) - ]) - if test $gl_cv_sys_struct_lconv_ok = no; then - REPLACE_STRUCT_LCONV=1 - fi - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_NEXT_HEADERS([locale.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include -/* Some systems provide declarations in a non-standard header. */ -#if HAVE_XLOCALE_H -# include -#endif - ]], - [setlocale duplocale]) -]) - -AC_DEFUN([gl_LOCALE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_LOCALE_H_DEFAULTS], -[ - GNULIB_LOCALECONV=0; AC_SUBST([GNULIB_LOCALECONV]) - GNULIB_SETLOCALE=0; AC_SUBST([GNULIB_SETLOCALE]) - GNULIB_DUPLOCALE=0; AC_SUBST([GNULIB_DUPLOCALE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE]) - REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV]) - REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE]) - REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE]) - REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV]) -]) diff --git a/gnulib/m4/localeconv.m4 b/gnulib/m4/localeconv.m4 deleted file mode 100644 index 5fae06d..0000000 --- a/gnulib/m4/localeconv.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# 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 deleted file mode 100644 index 2ba295e..0000000 --- a/gnulib/m4/localename.m4 +++ /dev/null @@ -1,12 +0,0 @@ -# localename.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. - -AC_DEFUN([gl_LOCALENAME], -[ - AC_REQUIRE([gt_LC_MESSAGES]) - AC_REQUIRE([gt_INTL_MACOSX]) - AC_CHECK_FUNCS([setlocale uselocale]) -]) diff --git a/gnulib/m4/lock.m4 b/gnulib/m4/lock.m4 deleted file mode 100644 index 19c6d45..0000000 --- a/gnulib/m4/lock.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -AC_DEFUN([gl_LOCK], -[ - AC_REQUIRE([gl_THREADLIB]) - if test "$gl_threads_api" = posix; then - # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the - # pthread_rwlock_* functions. - AC_CHECK_TYPE([pthread_rwlock_t], - [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1], - [Define if the POSIX multithreading library has read/write locks.])], - [], - [#include ]) - # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM( - [[#include ]], - [[ -#if __FreeBSD__ == 4 -error "No, in FreeBSD 4.0 recursive mutexes actually don't work." -#else -int x = (int)PTHREAD_MUTEX_RECURSIVE; -return !x; -#endif - ]])], - [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1], - [Define if the defines PTHREAD_MUTEX_RECURSIVE.])]) - fi - gl_PREREQ_LOCK -]) - -# Prerequisites of lib/lock.c. -AC_DEFUN([gl_PREREQ_LOCK], [ - AC_REQUIRE([AC_C_INLINE]) -]) diff --git a/gnulib/m4/longlong.m4 b/gnulib/m4/longlong.m4 deleted file mode 100644 index b9c65c7..0000000 --- a/gnulib/m4/longlong.m4 +++ /dev/null @@ -1,113 +0,0 @@ -# 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. - -dnl From Paul Eggert. - -# Define HAVE_LONG_LONG_INT if 'long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'long long int' exists but is only 32 bits large -# (as on some very old compilers), HAVE_LONG_LONG_INT will not be -# defined. In this case you can treat 'long long int' like 'long int'. - -AC_DEFUN([AC_TYPE_LONG_LONG_INT], -[ - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int], - [ac_cv_type_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int - if test $ac_cv_type_long_long_int = yes; then - dnl Catch a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004. - dnl If cross compiling, assume the bug is not important, since - dnl nobody cross compiles for this platform as far as we know. - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[@%:@include - @%:@ifndef LLONG_MAX - @%:@ define HALF \ - (1LL << (sizeof (long long int) * CHAR_BIT - 2)) - @%:@ define LLONG_MAX (HALF - 1 + HALF) - @%:@endif]], - [[long long int n = 1; - int i; - for (i = 0; ; i++) - { - long long int m = n << i; - if (m >> i != n) - return 1; - if (LLONG_MAX / 2 < m) - break; - } - return 0;]])], - [], - [ac_cv_type_long_long_int=no], - [:]) - fi - fi]) - if test $ac_cv_type_long_long_int = yes; then - AC_DEFINE([HAVE_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'long long int'.]) - fi -]) - -# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works. -# This fixes a bug in Autoconf 2.61, and can be faster -# than what's in Autoconf 2.62 through 2.68. - -# Note: If the type 'unsigned long long int' exists but is only 32 bits -# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT -# will not be defined. In this case you can treat 'unsigned long long int' -# like 'unsigned long int'. - -AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], -[ - AC_CACHE_CHECK([for unsigned long long int], - [ac_cv_type_unsigned_long_long_int], - [ac_cv_type_unsigned_long_long_int=yes - if test "x${ac_cv_prog_cc_c99-no}" = xno; then - AC_LINK_IFELSE( - [_AC_TYPE_LONG_LONG_SNIPPET], - [], - [ac_cv_type_unsigned_long_long_int=no]) - fi]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1], - [Define to 1 if the system has the type 'unsigned long long int'.]) - fi -]) - -# Expands to a C program that can be used to test for simultaneous support -# of 'long long' and 'unsigned long long'. We don't want to say that -# 'long long' is available if 'unsigned long long' is not, or vice versa, -# because too many programs rely on the symmetry between signed and unsigned -# integer types (excluding 'bool'). -AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], -[ - AC_LANG_PROGRAM( - [[/* For now, do not test the preprocessor; as of 2007 there are too many - implementations with broken preprocessors. Perhaps this can - be revisited in 2012. In the meantime, code should not expect - #if to work with literals wider than 32 bits. */ - /* Test literals. */ - long long int ll = 9223372036854775807ll; - long long int nll = -9223372036854775807LL; - unsigned long long int ull = 18446744073709551615ULL; - /* Test constant expressions. */ - typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) - ? 1 : -1)]; - typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 - ? 1 : -1)]; - int i = 63;]], - [[/* Test availability of runtime routines for shift and division. */ - long long int llmax = 9223372036854775807ll; - unsigned long long int ullmax = 18446744073709551615ull; - return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) - | (llmax / ll) | (llmax % ll) - | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) - | (ullmax / ull) | (ullmax % ull));]]) -]) diff --git a/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4 deleted file mode 100644 index b7335bd..0000000 --- a/gnulib/m4/lstat.m4 +++ /dev/null @@ -1,77 +0,0 @@ -# serial 25 - -# 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, -# with or without modifications, as long as this notice is preserved. - -dnl From Jim Meyering. - -AC_DEFUN([gl_FUNC_LSTAT], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - dnl If lstat does not exist, the replacement does - dnl "#define lstat stat", and lstat.c is a no-op. - AC_CHECK_FUNCS_ONCE([lstat]) - if test $ac_cv_func_lstat = yes; then - AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *no) - REPLACE_LSTAT=1 - ;; - esac - else - HAVE_LSTAT=0 - fi -]) - -# Prerequisites of lib/lstat.c. -AC_DEFUN([gl_PREREQ_LSTAT], -[ - AC_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], - [gl_cv_func_lstat_dereferences_slashed_symlink], - [rm -f conftest.sym conftest.file - echo >conftest.file - if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT], - [[struct stat sbuf; - /* Linux will dereference the symlink and fail, as required by - POSIX. That is better in the sense that it means we will not - have to compile and use the lstat wrapper. */ - return lstat ("conftest.sym/", &sbuf) == 0; - ]])], - [gl_cv_func_lstat_dereferences_slashed_symlink=yes], - [gl_cv_func_lstat_dereferences_slashed_symlink=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; - esac - ]) - else - # If the 'ln -s' command failed, then we probably don't even - # have an lstat function. - gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" - fi - rm -f conftest.sym conftest.file - ]) - case "$gl_cv_func_lstat_dereferences_slashed_symlink" in - *yes) - AC_DEFINE_UNQUOTED([LSTAT_FOLLOWS_SLASHED_SYMLINK], [1], - [Define to 1 if 'lstat' dereferences a symlink specified - with a trailing slash.]) - ;; - esac -]) diff --git a/gnulib/m4/ltoptions.m4 b/gnulib/m4/ltoptions.m4 deleted file mode 100644 index 5d9acd8..0000000 --- a/gnulib/m4/ltoptions.m4 +++ /dev/null @@ -1,384 +0,0 @@ -# Helper functions for option handling. -*- Autoconf -*- -# -# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 7 ltoptions.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) - - -# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) -# ------------------------------------------ -m4_define([_LT_MANGLE_OPTION], -[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) - - -# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) -# --------------------------------------- -# Set option OPTION-NAME for macro MACRO-NAME, and if there is a -# matching handler defined, dispatch to it. Other OPTION-NAMEs are -# saved as a flag. -m4_define([_LT_SET_OPTION], -[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl -m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), - _LT_MANGLE_DEFUN([$1], [$2]), - [m4_warning([Unknown $1 option `$2'])])[]dnl -]) - - -# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) -# ------------------------------------------------------------ -# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. -m4_define([_LT_IF_OPTION], -[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) - - -# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) -# ------------------------------------------------------- -# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME -# are set. -m4_define([_LT_UNLESS_OPTIONS], -[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), - [m4_define([$0_found])])])[]dnl -m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 -])[]dnl -]) - - -# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) -# ---------------------------------------- -# OPTION-LIST is a space-separated list of Libtool options associated -# with MACRO-NAME. If any OPTION has a matching handler declared with -# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about -# the unknown option and exit. -m4_defun([_LT_SET_OPTIONS], -[# Set options -m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), - [_LT_SET_OPTION([$1], _LT_Option)]) - -m4_if([$1],[LT_INIT],[ - dnl - dnl Simply set some default values (i.e off) if boolean options were not - dnl specified: - _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no - ]) - _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no - ]) - dnl - dnl If no reference was made to various pairs of opposing options, then - dnl we run the default mode handler for the pair. For example, if neither - dnl `shared' nor `disable-shared' was passed, we enable building of shared - dnl archives by default: - _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) - _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) - _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], - [_LT_ENABLE_FAST_INSTALL]) - ]) -])# _LT_SET_OPTIONS - - -## --------------------------------- ## -## Macros to handle LT_INIT options. ## -## --------------------------------- ## - -# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) -# ----------------------------------------- -m4_define([_LT_MANGLE_DEFUN], -[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) - - -# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) -# ----------------------------------------------- -m4_define([LT_OPTION_DEFINE], -[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl -])# LT_OPTION_DEFINE - - -# dlopen -# ------ -LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes -]) - -AU_DEFUN([AC_LIBTOOL_DLOPEN], -[_LT_SET_OPTION([LT_INIT], [dlopen]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `dlopen' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) - - -# win32-dll -# --------- -# Declare package support for building win32 dll's. -LT_OPTION_DEFINE([LT_INIT], [win32-dll], -[enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - AC_CHECK_TOOL(AS, as, false) - AC_CHECK_TOOL(DLLTOOL, dlltool, false) - AC_CHECK_TOOL(OBJDUMP, objdump, false) - ;; -esac - -test -z "$AS" && AS=as -_LT_DECL([], [AS], [1], [Assembler program])dnl - -test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl - -test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl -])# win32-dll - -AU_DEFUN([AC_LIBTOOL_WIN32_DLL], -[AC_REQUIRE([AC_CANONICAL_HOST])dnl -_LT_SET_OPTION([LT_INIT], [win32-dll]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) - - -# _LT_ENABLE_SHARED([DEFAULT]) -# ---------------------------- -# implement the --enable-shared flag, and supports the `shared' and -# `disable-shared' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_SHARED], -[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([shared], - [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], - [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) - - _LT_DECL([build_libtool_libs], [enable_shared], [0], - [Whether or not to build shared libraries]) -])# _LT_ENABLE_SHARED - -LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) -]) - -AC_DEFUN([AC_DISABLE_SHARED], -[_LT_SET_OPTION([LT_INIT], [disable-shared]) -]) - -AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_SHARED], []) -dnl AC_DEFUN([AM_DISABLE_SHARED], []) - - - -# _LT_ENABLE_STATIC([DEFAULT]) -# ---------------------------- -# implement the --enable-static flag, and support the `static' and -# `disable-static' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_STATIC], -[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([static], - [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], - [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_static=]_LT_ENABLE_STATIC_DEFAULT) - - _LT_DECL([build_old_libs], [enable_static], [0], - [Whether or not to build static libraries]) -])# _LT_ENABLE_STATIC - -LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) - -# Old names: -AC_DEFUN([AC_ENABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) -]) - -AC_DEFUN([AC_DISABLE_STATIC], -[_LT_SET_OPTION([LT_INIT], [disable-static]) -]) - -AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AM_ENABLE_STATIC], []) -dnl AC_DEFUN([AM_DISABLE_STATIC], []) - - - -# _LT_ENABLE_FAST_INSTALL([DEFAULT]) -# ---------------------------------- -# implement the --enable-fast-install flag, and support the `fast-install' -# and `disable-fast-install' LT_INIT options. -# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. -m4_define([_LT_ENABLE_FAST_INSTALL], -[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl -AC_ARG_ENABLE([fast-install], - [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], - [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], - [p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac], - [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) - -_LT_DECL([fast_install], [enable_fast_install], [0], - [Whether or not to optimize for fast installation])dnl -])# _LT_ENABLE_FAST_INSTALL - -LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) -LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) - -# Old names: -AU_DEFUN([AC_ENABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `fast-install' option into LT_INIT's first parameter.]) -]) - -AU_DEFUN([AC_DISABLE_FAST_INSTALL], -[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you put -the `disable-fast-install' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) -dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) - - -# _LT_WITH_PIC([MODE]) -# -------------------- -# implement the --with-pic flag, and support the `pic-only' and `no-pic' -# LT_INIT options. -# 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@<:@=PKGS@:>@], - [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [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]) - -_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl -])# _LT_WITH_PIC - -LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) -LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) - -# Old name: -AU_DEFUN([AC_LIBTOOL_PICMODE], -[_LT_SET_OPTION([LT_INIT], [pic-only]) -AC_DIAGNOSE([obsolete], -[$0: Remove this warning and the call to _LT_SET_OPTION when you -put the `pic-only' option into LT_INIT's first parameter.]) -]) - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) - -## ----------------- ## -## LTDL_INIT Options ## -## ----------------- ## - -m4_define([_LTDL_MODE], []) -LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], - [m4_define([_LTDL_MODE], [nonrecursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [recursive], - [m4_define([_LTDL_MODE], [recursive])]) -LT_OPTION_DEFINE([LTDL_INIT], [subproject], - [m4_define([_LTDL_MODE], [subproject])]) - -m4_define([_LTDL_TYPE], []) -LT_OPTION_DEFINE([LTDL_INIT], [installable], - [m4_define([_LTDL_TYPE], [installable])]) -LT_OPTION_DEFINE([LTDL_INIT], [convenience], - [m4_define([_LTDL_TYPE], [convenience])]) diff --git a/gnulib/m4/ltsugar.m4 b/gnulib/m4/ltsugar.m4 deleted file mode 100644 index 9000a05..0000000 --- a/gnulib/m4/ltsugar.m4 +++ /dev/null @@ -1,123 +0,0 @@ -# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. -# Written by Gary V. Vaughan, 2004 -# -# 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 ltsugar.m4 - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) - - -# lt_join(SEP, ARG1, [ARG2...]) -# ----------------------------- -# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their -# associated separator. -# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier -# versions in m4sugar had bugs. -m4_define([lt_join], -[m4_if([$#], [1], [], - [$#], [2], [[$2]], - [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) -m4_define([_lt_join], -[m4_if([$#$2], [2], [], - [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) - - -# lt_car(LIST) -# lt_cdr(LIST) -# ------------ -# Manipulate m4 lists. -# These macros are necessary as long as will still need to support -# Autoconf-2.59 which quotes differently. -m4_define([lt_car], [[$1]]) -m4_define([lt_cdr], -[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], - [$#], 1, [], - [m4_dquote(m4_shift($@))])]) -m4_define([lt_unquote], $1) - - -# lt_append(MACRO-NAME, STRING, [SEPARATOR]) -# ------------------------------------------ -# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. -# Note that neither SEPARATOR nor STRING are expanded; they are appended -# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). -# No SEPARATOR is output if MACRO-NAME was previously undefined (different -# than defined and empty). -# -# This macro is needed until we can rely on Autoconf 2.62, since earlier -# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. -m4_define([lt_append], -[m4_define([$1], - m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) - - - -# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) -# ---------------------------------------------------------- -# Produce a SEP delimited list of all paired combinations of elements of -# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list -# has the form PREFIXmINFIXSUFFIXn. -# Needed until we can rely on m4_combine added in Autoconf 2.62. -m4_define([lt_combine], -[m4_if(m4_eval([$# > 3]), [1], - [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl -[[m4_foreach([_Lt_prefix], [$2], - [m4_foreach([_Lt_suffix], - ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, - [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) - - -# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) -# ----------------------------------------------------------------------- -# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited -# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. -m4_define([lt_if_append_uniq], -[m4_ifdef([$1], - [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], - [lt_append([$1], [$2], [$3])$4], - [$5])], - [lt_append([$1], [$2], [$3])$4])]) - - -# lt_dict_add(DICT, KEY, VALUE) -# ----------------------------- -m4_define([lt_dict_add], -[m4_define([$1($2)], [$3])]) - - -# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) -# -------------------------------------------- -m4_define([lt_dict_add_subkey], -[m4_define([$1($2:$3)], [$4])]) - - -# lt_dict_fetch(DICT, KEY, [SUBKEY]) -# ---------------------------------- -m4_define([lt_dict_fetch], -[m4_ifval([$3], - m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), - m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) - - -# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) -# ----------------------------------------------------------------- -m4_define([lt_if_dict_fetch], -[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], - [$5], - [$6])]) - - -# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) -# -------------------------------------------------------------- -m4_define([lt_dict_filter], -[m4_if([$5], [], [], - [lt_join(m4_quote(m4_default([$4], [[, ]])), - lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), - [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl -]) diff --git a/gnulib/m4/ltversion.m4 b/gnulib/m4/ltversion.m4 deleted file mode 100644 index 07a8602..0000000 --- a/gnulib/m4/ltversion.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ltversion.m4 -- version numbers -*- Autoconf -*- -# -# Copyright (C) 2004 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004 -# -# 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. - -# @configure_input@ - -# serial 3337 ltversion.m4 -# This file is part of GNU Libtool - -m4_define([LT_PACKAGE_VERSION], [2.4.2]) -m4_define([LT_PACKAGE_REVISION], [1.3337]) - -AC_DEFUN([LTVERSION_VERSION], -[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/lt~obsolete.m4 b/gnulib/m4/lt~obsolete.m4 deleted file mode 100644 index c573da9..0000000 --- a/gnulib/m4/lt~obsolete.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- -# -# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. -# Written by Scott James Remnant, 2004. -# -# 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 lt~obsolete.m4 - -# These exist entirely to fool aclocal when bootstrapping libtool. -# -# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) -# which have later been changed to m4_define as they aren't part of the -# exported API, or moved to Autoconf or Automake where they belong. -# -# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN -# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us -# using a macro with the same name in our local m4/libtool.m4 it'll -# pull the old libtool.m4 in (it doesn't see our shiny new m4_define -# and doesn't know about Autoconf macros at all.) -# -# So we provide this file, which has a silly filename so it's always -# included after everything else. This provides aclocal with the -# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything -# because those macros already exist, or will be overwritten later. -# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. -# -# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. -# Yes, that means every name once taken will need to remain here until -# we give up compatibility with versions before 1.7, at which point -# we need to keep only those names which we still refer to. - -# This is to help aclocal find these macros, as it can't see m4_define. -AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) - -m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) -m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) -m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) -m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) -m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) -m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) -m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) -m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) -m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) -m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) -m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) -m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) -m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) -m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) -m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) -m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) -m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) -m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) -m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) -m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) -m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) -m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) -m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) -m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) -m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) -m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) -m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) -m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) -m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) -m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) -m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) -m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) -m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) -m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) -m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) -m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) -m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) -m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) -m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) -m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) -m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) -m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) -m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) -m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) -m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) -m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) -m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) -m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) -m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) -m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) -m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) -m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) -m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) -m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) diff --git a/gnulib/m4/malloc.m4 b/gnulib/m4/malloc.m4 deleted file mode 100644 index 8fa48e9..0000000 --- a/gnulib/m4/malloc.m4 +++ /dev/null @@ -1,98 +0,0 @@ -# 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 -# it is not. -AC_DEFUN([gl_FUNC_MALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_MALLOC_IF is defined in Autoconf. - _AC_FUNC_MALLOC_IF( - [AC_DEFINE([HAVE_MALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'malloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_MALLOC_GNU], [0]) - REPLACE_MALLOC=1 - ]) -]) - -# gl_FUNC_MALLOC_POSIX -# -------------------- -# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace malloc if it is not. -AC_DEFUN([gl_FUNC_MALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_MALLOC_POSIX], [1], - [Define if the 'malloc' function is POSIX compliant.]) - else - REPLACE_MALLOC=1 - fi -]) - -# Test whether malloc, realloc, calloc are POSIX compliant, -# Set gl_cv_func_malloc_posix to yes or no accordingly. -AC_DEFUN([gl_CHECK_MALLOC_POSIX], -[ - AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant], - [gl_cv_func_malloc_posix], - [ - dnl It is too dangerous to try to allocate a large amount of memory: - dnl some systems go to their knees when you do that. So assume that - dnl all Unix implementations of the function are POSIX compliant. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - choke me - #endif - ]])], - [gl_cv_func_malloc_posix=yes], - [gl_cv_func_malloc_posix=no]) - ]) -]) diff --git a/gnulib/m4/malloca.m4 b/gnulib/m4/malloca.m4 deleted file mode 100644 index 7841979..0000000 --- a/gnulib/m4/malloca.m4 +++ /dev/null @@ -1,15 +0,0 @@ -# malloca.m4 serial 1 -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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_MALLOCA], -[ - dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables - dnl @ALLOCA@ and @LTALLOCA@. - dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies. - AC_REQUIRE([gl_EEMALLOC]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) -]) diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4 deleted file mode 100644 index 8f829c8..0000000 --- a/gnulib/m4/mbrtowc.m4 +++ /dev/null @@ -1,572 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MBRTOWC], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbrtowc]) - if test $ac_cv_func_mbrtowc = no; then - HAVE_MBRTOWC=0 - AC_CHECK_DECLS([mbrtowc],,, [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -]]) - if test $ac_cv_have_decl_mbrtowc = yes; then - dnl On Minix 3.1.8, the system's declares mbrtowc() although - dnl it does not have the function. Avoid a collision with gnulib's - dnl replacement. - REPLACE_MBRTOWC=1 - fi - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBRTOWC=1 - else - gl_MBRTOWC_NULL_ARG1 - gl_MBRTOWC_NULL_ARG2 - gl_MBRTOWC_RETVAL - gl_MBRTOWC_NUL_RETVAL - case "$gl_cv_func_mbrtowc_null_arg1" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG1_BUG], [1], - [Define if the mbrtowc function has the NULL pwc argument bug.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_null_arg2" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1], - [Define if the mbrtowc function has the NULL string argument bug.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1], - [Define if the mbrtowc function returns a wrong return value.]) - REPLACE_MBRTOWC=1 - ;; - esac - case "$gl_cv_func_mbrtowc_nul_retval" in - *yes) ;; - *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1], - [Define if the mbrtowc function does not return 0 for a NUL character.]) - REPLACE_MBRTOWC=1 - ;; - esac - fi - fi -]) - -dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that -dnl redefines the semantics of the given mbstate_t type. -dnl Result is REPLACE_MBSTATE_T. -dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to -dnl avoid inconsistencies. - -AC_DEFUN([gl_MBSTATE_T_BROKEN], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_FUNCS_ONCE([mbsinit]) - AC_CHECK_FUNCS_ONCE([mbrtowc]) - if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then - gl_MBRTOWC_INCOMPLETE_STATE - gl_MBRTOWC_SANITYCHECK - REPLACE_MBSTATE_T=0 - case "$gl_cv_func_mbrtowc_incomplete_state" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - case "$gl_cv_func_mbrtowc_sanitycheck" in - *yes) ;; - *) REPLACE_MBSTATE_T=1 ;; - esac - else - REPLACE_MBSTATE_T=1 - fi -]) - -dnl Test whether mbrtowc puts the state into non-initial state when parsing an -dnl incomplete multibyte character. -dnl Result is gl_cv_func_mbrtowc_incomplete_state. - -AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles incomplete characters], - [gl_cv_func_mbrtowc_incomplete_state], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on AIX and OSF/1. - aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_JA != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - if (mbsinit (&state)) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_incomplete_state=yes], - [gl_cv_func_mbrtowc_incomplete_state=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc works not worse than mbtowc. -dnl Result is gl_cv_func_mbrtowc_sanitycheck. - -AC_DEFUN([gl_MBRTOWC_SANITYCHECK], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc], - [gl_cv_func_mbrtowc_sanitycheck], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris 8. - solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8: - mbrtowc returns 2, and sets wc to 0x00F0. - mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 6, &state) != 4 - && mbtowc (&wc, input + 3, 6) == 4) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_sanitycheck=yes], - [gl_cv_func_mbrtowc_sanitycheck=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc supports a NULL pwc argument correctly. -dnl Result is gl_cv_func_mbrtowc_null_arg1. - -AC_DEFUN([gl_MBRTOWC_NULL_ARG1], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument], - [gl_cv_func_mbrtowc_null_arg1], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris. - solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "\303\237er"; - mbstate_t state; - wchar_t wc; - size_t ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 5, &state); - if (ret != 2) - result |= 1; - if (!mbsinit (&state)) - result |= 2; - - memset (&state, '\0', sizeof (mbstate_t)); - ret = mbrtowc (NULL, input, 5, &state); - if (ret != 2) /* Solaris 7 fails here: ret is -1. */ - result |= 4; - if (!mbsinit (&state)) - result |= 8; - } - return result; -}]])], - [gl_cv_func_mbrtowc_null_arg1=yes], - [gl_cv_func_mbrtowc_null_arg1=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc supports a NULL string argument correctly. -dnl Result is gl_cv_func_mbrtowc_null_arg2. - -AC_DEFUN([gl_MBRTOWC_NULL_ARG2], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument], - [gl_cv_func_mbrtowc_null_arg2], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on OSF/1. - osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - mbstate_t state; - wchar_t wc; - int ret; - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - mbrtowc (&wc, NULL, 5, &state); - /* Check that wc was not modified. */ - if (wc != (wchar_t) 0xBADFACE) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_null_arg2=yes], - [gl_cv_func_mbrtowc_null_arg2=no], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc, when parsing the end of a multibyte character, -dnl correctly returns the number of bytes that were needed to complete the -dnl character (not the total number of bytes of the multibyte character). -dnl Result is gl_cv_func_mbrtowc_retval. - -AC_DEFUN([gl_MBRTOWC_RETVAL], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CACHE_CHECK([whether mbrtowc has a correct return value], - [gl_cv_func_mbrtowc_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on HP-UX, Solaris, native Windows. - hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ - || { case "$host_os" in mingw*) true;; *) false;; esac; }; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - int found_some_locale = 0; - /* This fails on Solaris. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 1) - result |= 1; - } - found_some_locale = 1; - } - /* This fails on HP-UX 11.11. */ - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) - { - input[1] = '\0'; - if (mbrtowc (&wc, input + 2, 5, &state) != 2) - result |= 2; - } - found_some_locale = 1; - } - /* This fails on native Windows. */ - if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 4; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 8; - } - found_some_locale = 1; - } - if (setlocale (LC_ALL, "Chinese_China.936") != NULL) - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) - { - input[3] = '\0'; - if (mbrtowc (&wc, input + 4, 4, &state) != 1) - result |= 16; - } - found_some_locale = 1; - } - return (found_some_locale ? result : 77); -}]])], - [gl_cv_func_mbrtowc_retval=yes], - [if test $? != 77; then - gl_cv_func_mbrtowc_retval=no - fi - ], - [:]) - fi - ]) -]) - -dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0. -dnl Result is gl_cv_func_mbrtowc_nul_retval. - -AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character], - [gl_cv_func_mbrtowc_nul_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris 8 and 9. - solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - /* This fails on Solaris 8 and 9. */ - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, "", 1, &state) != 0) - return 1; - } - return 0; -}]])], - [gl_cv_func_mbrtowc_nul_retval=yes], - [gl_cv_func_mbrtowc_nul_retval=no], - [:]) - fi - ]) -]) - -# Prerequisites of lib/mbrtowc.c. -AC_DEFUN([gl_PREREQ_MBRTOWC], [ - : -]) - - -dnl From Paul Eggert - -dnl This is an override of an autoconf macro. - -AC_DEFUN([AC_FUNC_MBRTOWC], -[ - dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60. - AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared], - gl_cv_func_mbrtowc, - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include ]], - [[wchar_t wc; - char const s[] = ""; - size_t n = 1; - mbstate_t state; - return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])], - gl_cv_func_mbrtowc=yes, - gl_cv_func_mbrtowc=no)]) - if test $gl_cv_func_mbrtowc = yes; then - AC_DEFINE([HAVE_MBRTOWC], [1], - [Define to 1 if mbrtowc and mbstate_t are properly declared.]) - fi -]) diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4 deleted file mode 100644 index da56c3d..0000000 --- a/gnulib/m4/mbsinit.m4 +++ /dev/null @@ -1,51 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_MBSINIT], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbsinit]) - if test $ac_cv_func_mbsinit = no; then - HAVE_MBSINIT=0 - AC_CHECK_DECLS([mbsinit],,, [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -]]) - if test $ac_cv_have_decl_mbsinit = yes; then - dnl On Minix 3.1.8, the system's declares mbsinit() although - dnl it does not have the function. Avoid a collision with gnulib's - dnl replacement. - REPLACE_MBSINIT=1 - fi - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSINIT=1 - else - dnl On mingw, mbsinit() always returns 1, which is inappropriate for - dnl states produced by mbrtowc() for an incomplete multibyte character - dnl in multibyte locales. - case "$host_os" in - mingw*) REPLACE_MBSINIT=1 ;; - esac - fi - fi -]) - -# Prerequisites of lib/mbsinit.c. -AC_DEFUN([gl_PREREQ_MBSINIT], [ - : -]) diff --git a/gnulib/m4/mbsrtowcs.m4 b/gnulib/m4/mbsrtowcs.m4 deleted file mode 100644 index a95f606..0000000 --- a/gnulib/m4/mbsrtowcs.m4 +++ /dev/null @@ -1,155 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_MBSRTOWCS], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([mbsrtowcs]) - if test $ac_cv_func_mbsrtowcs = no; then - HAVE_MBSRTOWCS=0 - AC_CHECK_DECLS([mbsrtowcs],,, [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -]]) - if test $ac_cv_have_decl_mbsrtowcs = yes; then - dnl On Minix 3.1.8, the system's declares mbsrtowcs() although - dnl it does not have the function. Avoid a collision with gnulib's - dnl replacement. - REPLACE_MBSRTOWCS=1 - fi - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_MBSRTOWCS=1 - else - gl_MBSRTOWCS_WORKS - case "$gl_cv_func_mbsrtowcs_works" in - *yes) ;; - *) REPLACE_MBSRTOWCS=1 ;; - esac - fi - fi -]) - -dnl Test whether mbsrtowcs works. -dnl Result is gl_cv_func_mbsrtowcs_works. - -AC_DEFUN([gl_MBSRTOWCS_WORKS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether mbsrtowcs works], - [gl_cv_func_mbsrtowcs_works], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on HP-UX, Solaris, mingw. - hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - /* Test whether the function supports a NULL destination argument. - This fails on native Windows. */ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - const char input[] = "\337er"; - const char *src = input; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbsrtowcs (NULL, &src, 1, &state) != 3 - || src != input) - result |= 1; - } - /* Test whether the function works when started with a conversion state - in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - const char input[] = "B\303\274\303\237er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 2; - } - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - const char input[] = "<\306\374\313\334\270\354>"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 4; - if (mbsrtowcs (NULL, &src, 10, &state) != 3) - result |= 4; - } - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - const char input[] = "B\250\271\201\060\211\070er"; - mbstate_t state; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) - if (!mbsinit (&state)) - { - const char *src = input + 2; - if (mbsrtowcs (NULL, &src, 10, &state) != 4) - result |= 8; - } - } - return result; -}]])], - [gl_cv_func_mbsrtowcs_works=yes], - [gl_cv_func_mbsrtowcs_works=no], - [:]) - fi - ]) -]) - -# Prerequisites of lib/mbsrtowcs.c. -AC_DEFUN([gl_PREREQ_MBSRTOWCS], [ - : -]) diff --git a/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4 deleted file mode 100644 index 61a8190..0000000 --- a/gnulib/m4/mbstate_t.m4 +++ /dev/null @@ -1,41 +0,0 @@ -# mbstate_t.m4 serial 13 -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. - -# From Paul Eggert. - -# BeOS 5 has but does not define mbstate_t, -# so you can't declare an object of that type. -# Check for this incompatibility with Standard C. - -# AC_TYPE_MBSTATE_T -# ----------------- -AC_DEFUN([AC_TYPE_MBSTATE_T], -[ - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11 - - AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include ]], - [[mbstate_t x; return sizeof x;]])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) - if test $ac_cv_type_mbstate_t = yes; then - AC_DEFINE([HAVE_MBSTATE_T], [1], - [Define to 1 if declares mbstate_t.]) - else - AC_DEFINE([mbstate_t], [int], - [Define to a type if does not define.]) - fi -]) diff --git a/gnulib/m4/mbtowc.m4 b/gnulib/m4/mbtowc.m4 deleted file mode 100644 index fec0d25..0000000 --- a/gnulib/m4/mbtowc.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_MBTOWC], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - - if false; then - REPLACE_MBTOWC=1 - fi -]) - -# Prerequisites of lib/mbtowc.c. -AC_DEFUN([gl_PREREQ_MBTOWC], [ - : -]) diff --git a/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4 deleted file mode 100644 index 0040294..0000000 --- a/gnulib/m4/memchr.m4 +++ /dev/null @@ -1,88 +0,0 @@ -# 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. - -AC_DEFUN_ONCE([gl_FUNC_MEMCHR], -[ - dnl Check for prerequisites for memory fence checks. - gl_FUNC_MMAP_ANON - AC_CHECK_HEADERS_ONCE([sys/mman.h]) - AC_CHECK_FUNCS_ONCE([mprotect]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - m4_ifdef([gl_FUNC_MEMCHR_OBSOLETE], [ - dnl These days, we assume memchr is present. But if support for old - dnl platforms is desired: - AC_CHECK_FUNCS_ONCE([memchr]) - if test $ac_cv_func_memchr = no; then - HAVE_MEMCHR=0 - fi - ]) - if test $HAVE_MEMCHR = 1; then - # Detect platform-specific bugs in some versions of glibc: - # memchr should not dereference anything with length 0 - # http://bugzilla.redhat.com/499689 - # memchr should not dereference overestimated length after a match - # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 - # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 - # Assume that memchr works on platforms that lack mprotect. - AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include -#if HAVE_SYS_MMAN_H -# include -# include -# include -# include -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif -]], [[ - int result = 0; - char *fence = NULL; -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - fence = two_pages + pagesize; - } -#endif - if (fence) - { - if (memchr (fence, 0, 0)) - result |= 1; - strcpy (fence - 9, "12345678"); - if (memchr (fence - 9, 0, 79) != fence - 1) - result |= 2; - if (memchr (fence - 1, 0, 3) != fence - 1) - result |= 4; - } - return result; -]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no], - [dnl Be pessimistic for now. - gl_cv_func_memchr_works="guessing no"])]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_MEMCHR=1 - fi - fi -]) - -# Prerequisites of lib/memchr.c. -AC_DEFUN([gl_PREREQ_MEMCHR], [ - AC_CHECK_HEADERS([bp-sym.h]) -]) diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4 deleted file mode 100644 index c926941..0000000 --- a/gnulib/m4/mempcpy.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_MEMPCPY], -[ - dnl Persuade glibc to declare mempcpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl The mempcpy() declaration in lib/string.in.h uses 'restrict'. - AC_REQUIRE([AC_C_RESTRICT]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS([mempcpy]) - if test $ac_cv_func_mempcpy = no; then - HAVE_MEMPCPY=0 - fi -]) - -# Prerequisites of lib/mempcpy.c. -AC_DEFUN([gl_PREREQ_MEMPCPY], [ - : -]) diff --git a/gnulib/m4/mkstemp.m4 b/gnulib/m4/mkstemp.m4 deleted file mode 100644 index cee0572..0000000 --- a/gnulib/m4/mkstemp.m4 +++ /dev/null @@ -1,82 +0,0 @@ -#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 deleted file mode 100644 index 748b17d..0000000 --- a/gnulib/m4/mmap-anon.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -# Detect how mmap can be used to create anonymous (not file-backed) memory -# mappings. -# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS -# and MAP_ANON exist and have the same value. -# - On HP-UX, only MAP_ANONYMOUS exists. -# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists. -# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be -# used. - -AC_DEFUN([gl_FUNC_MMAP_ANON], -[ - dnl Persuade glibc to define MAP_ANONYMOUS. - AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) - - # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it - # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is - # irrelevant for anonymous mappings. - AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no]) - - # Try to allow MAP_ANONYMOUS. - gl_have_mmap_anonymous=no - if test $gl_have_mmap = yes; then - AC_MSG_CHECKING([for MAP_ANONYMOUS]) - AC_EGREP_CPP([I cannot identify this map], [ -#include -#ifdef MAP_ANONYMOUS - I cannot identify this map -#endif -], - [gl_have_mmap_anonymous=yes]) - if test $gl_have_mmap_anonymous != yes; then - AC_EGREP_CPP([I cannot identify this map], [ -#include -#ifdef MAP_ANON - I cannot identify this map -#endif -], - [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON], - [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.]) - gl_have_mmap_anonymous=yes]) - fi - AC_MSG_RESULT([$gl_have_mmap_anonymous]) - if test $gl_have_mmap_anonymous = yes; then - AC_DEFINE([HAVE_MAP_ANONYMOUS], [1], - [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including - config.h and .]) - fi - fi -]) diff --git a/gnulib/m4/mode_t.m4 b/gnulib/m4/mode_t.m4 deleted file mode 100644 index 40f612a..0000000 --- a/gnulib/m4/mode_t.m4 +++ /dev/null @@ -1,26 +0,0 @@ -# mode_t.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. - -# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and -# include . - -# Define PROMOTED_MODE_T to the type that is the result of "default argument -# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t. -AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], -[ - AC_REQUIRE([AC_TYPE_MODE_T]) - AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [ - dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int', - dnl and to itself otherwise. This assumption is not guaranteed by the ISO C - dnl standard, but we don't know of any real-world counterexamples. - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], - [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])], - [gl_cv_promoted_mode_t='int'], - [gl_cv_promoted_mode_t='mode_t']) - ]) - AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t], - [Define to the type that is the result of default argument promotions of type mode_t.]) -]) diff --git a/gnulib/m4/msvc-inval.m4 b/gnulib/m4/msvc-inval.m4 deleted file mode 100644 index 8db4617..0000000 --- a/gnulib/m4/msvc-inval.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# 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 deleted file mode 100644 index 0125050..0000000 --- a/gnulib/m4/msvc-nothrow.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# 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 deleted file mode 100644 index 0c288b8..0000000 --- a/gnulib/m4/multiarch.m4 +++ /dev/null @@ -1,62 +0,0 @@ -# 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 Mac OS X 10.5 and later systems, the user can create libraries and -# executables that work on multiple system types--known as "fat" or -# "universal" binaries--by specifying multiple '-arch' options to the -# compiler but only a single '-arch' option to the preprocessor. Like -# this: -# -# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ -# CPP="gcc -E" CXXCPP="g++ -E" -# -# Detect this situation and set APPLE_UNIVERSAL_BUILD accordingly. - -AC_DEFUN_ONCE([gl_MULTIARCH], -[ - dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN. - gl_cv_c_multiarch=no - AC_COMPILE_IFELSE( - [AC_LANG_SOURCE( - [[#ifndef __APPLE_CC__ - not a universal capable compiler - #endif - typedef int dummy; - ]])], - [ - dnl Check for potential -arch flags. It is not universal unless - dnl there are at least two -arch flags with different values. - arch= - prev= - for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do - if test -n "$prev"; then - case $word in - i?86 | x86_64 | ppc | ppc64) - if test -z "$arch" || test "$arch" = "$word"; then - arch="$word" - else - gl_cv_c_multiarch=yes - fi - ;; - esac - prev= - else - if test "x$word" = "x-arch"; then - prev=arch - fi - fi - done - ]) - if test $gl_cv_c_multiarch = yes; then - APPLE_UNIVERSAL_BUILD=1 - else - APPLE_UNIVERSAL_BUILD=0 - fi - AC_SUBST([APPLE_UNIVERSAL_BUILD]) -]) diff --git a/gnulib/m4/nl_langinfo.m4 b/gnulib/m4/nl_langinfo.m4 deleted file mode 100644 index 80fe60d..0000000 --- a/gnulib/m4/nl_langinfo.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_NL_LANGINFO], -[ - AC_REQUIRE([gl_LANGINFO_H_DEFAULTS]) - AC_REQUIRE([gl_LANGINFO_H]) - AC_CHECK_FUNCS_ONCE([nl_langinfo]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - if test $ac_cv_func_nl_langinfo = yes; then - # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken. - AC_CACHE_CHECK([whether YESEXPR works], - [gl_cv_func_nl_langinfo_yesexpr_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM([[#include -]], [[return !*nl_langinfo(YESEXPR); -]])], - [gl_cv_func_nl_langinfo_yesexpr_works=yes], - [gl_cv_func_nl_langinfo_yesexpr_works=no], - [ - case "$host_os" in - # Guess no on irix systems. - irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";; - # Guess yes elsewhere. - *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";; - esac - ]) - ]) - case $gl_cv_func_nl_langinfo_yesexpr_works in - *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;; - *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;; - esac - AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS], - [$FUNC_NL_LANGINFO_YESEXPR_WORKS], - [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.]) - if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \ - && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then - : - else - REPLACE_NL_LANGINFO=1 - AC_DEFINE([REPLACE_NL_LANGINFO], [1], - [Define if nl_langinfo exists but is overridden by gnulib.]) - fi - else - HAVE_NL_LANGINFO=0 - fi -]) diff --git a/gnulib/m4/nocrash.m4 b/gnulib/m4/nocrash.m4 deleted file mode 100644 index c2638df..0000000 --- a/gnulib/m4/nocrash.m4 +++ /dev/null @@ -1,130 +0,0 @@ -# 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 deleted file mode 100644 index dfca2df..0000000 --- a/gnulib/m4/off_t.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# 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 deleted file mode 100644 index 275d73c..0000000 --- a/gnulib/m4/onceonly.m4 +++ /dev/null @@ -1,104 +0,0 @@ -# onceonly.m4 serial 9 -dnl Copyright (C) 2002-2003, 2005-2006, 2008-2012 Free Software Foundation, -dnl Inc. -dnl -dnl This file is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU General Public License as published by -dnl the Free Software Foundation; either version 3 of the License, or -dnl (at your option) any later version. -dnl -dnl This file is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -dnl GNU General Public License for more details. -dnl -dnl You should have received a copy of the GNU General Public License -dnl along with this file. If not, see . -dnl -dnl As a special exception to the GNU General Public License, -dnl this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl This file defines some "once only" variants of standard autoconf macros. -dnl AC_CHECK_HEADERS_ONCE like AC_CHECK_HEADERS -dnl AC_CHECK_FUNCS_ONCE like AC_CHECK_FUNCS -dnl AC_CHECK_DECLS_ONCE like AC_CHECK_DECLS -dnl AC_REQUIRE([AC_FUNC_STRCOLL]) like AC_FUNC_STRCOLL -dnl The advantage is that the check for each of the headers/functions/decls -dnl will be put only once into the 'configure' file. It keeps the size of -dnl the 'configure' file down, and avoids redundant output when 'configure' -dnl is run. -dnl The drawback is that the checks cannot be conditionalized. If you write -dnl if some_condition; then gl_CHECK_HEADERS(stdlib.h); fi -dnl inside an AC_DEFUNed function, the gl_CHECK_HEADERS macro call expands to -dnl empty, and the check will be inserted before the body of the AC_DEFUNed -dnl function. - -dnl The original code implemented AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE -dnl in terms of AC_DEFUN and AC_REQUIRE. This implementation uses diversions to -dnl named sections DEFAULTS and INIT_PREPARE in order to check all requested -dnl headers at once, thus reducing the size of 'configure'. It is known to work -dnl with autoconf 2.57..2.62 at least . The size reduction is ca. 9%. - -dnl Autoconf version 2.59 plus gnulib is required; this file is not needed -dnl with Autoconf 2.60 or greater. But note that autoconf's implementation of -dnl AC_CHECK_DECLS_ONCE expects a comma-separated list of symbols as first -dnl argument! -AC_PREREQ([2.59]) - -# AC_CHECK_HEADERS_ONCE(HEADER1 HEADER2 ...) is a once-only variant of -# AC_CHECK_HEADERS(HEADER1 HEADER2 ...). -AC_DEFUN([AC_CHECK_HEADERS_ONCE], [ - : - m4_foreach_w([gl_HEADER_NAME], [$1], [ - AC_DEFUN([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, - [./-], [___])), [ - m4_divert_text([INIT_PREPARE], - [gl_header_list="$gl_header_list gl_HEADER_NAME"]) - gl_HEADERS_EXPANSION - AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_HEADER_NAME])), - [Define to 1 if you have the <]m4_defn([gl_HEADER_NAME])[> header file.]) - ]) - AC_REQUIRE([gl_CHECK_HEADER_]m4_quote(m4_translit(gl_HEADER_NAME, - [./-], [___]))) - ]) -]) -m4_define([gl_HEADERS_EXPANSION], [ - m4_divert_text([DEFAULTS], [gl_header_list=]) - AC_CHECK_HEADERS([$gl_header_list]) - m4_define([gl_HEADERS_EXPANSION], []) -]) - -# AC_CHECK_FUNCS_ONCE(FUNC1 FUNC2 ...) is a once-only variant of -# AC_CHECK_FUNCS(FUNC1 FUNC2 ...). -AC_DEFUN([AC_CHECK_FUNCS_ONCE], [ - : - m4_foreach_w([gl_FUNC_NAME], [$1], [ - AC_DEFUN([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME]), [ - m4_divert_text([INIT_PREPARE], - [gl_func_list="$gl_func_list gl_FUNC_NAME"]) - gl_FUNCS_EXPANSION - AH_TEMPLATE(AS_TR_CPP([HAVE_]m4_defn([gl_FUNC_NAME])), - [Define to 1 if you have the ']m4_defn([gl_FUNC_NAME])[' function.]) - ]) - AC_REQUIRE([gl_CHECK_FUNC_]m4_defn([gl_FUNC_NAME])) - ]) -]) -m4_define([gl_FUNCS_EXPANSION], [ - m4_divert_text([DEFAULTS], [gl_func_list=]) - AC_CHECK_FUNCS([$gl_func_list]) - m4_define([gl_FUNCS_EXPANSION], []) -]) - -# AC_CHECK_DECLS_ONCE(DECL1 DECL2 ...) is a once-only variant of -# AC_CHECK_DECLS(DECL1, DECL2, ...). -AC_DEFUN([AC_CHECK_DECLS_ONCE], [ - : - m4_foreach_w([gl_DECL_NAME], [$1], [ - AC_DEFUN([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME]), [ - AC_CHECK_DECLS(m4_defn([gl_DECL_NAME])) - ]) - AC_REQUIRE([gl_CHECK_DECL_]m4_defn([gl_DECL_NAME])) - ]) -]) diff --git a/gnulib/m4/open.m4 b/gnulib/m4/open.m4 deleted file mode 100644 index c85971d..0000000 --- a/gnulib/m4/open.m4 +++ /dev/null @@ -1,92 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_OPEN], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - mingw* | pw*) - REPLACE_OPEN=1 - ;; - *) - dnl open("foo/") should not create a file when the file name has a - dnl trailing slash. FreeBSD only has the problem on symlinks. - AC_CHECK_FUNCS_ONCE([lstat]) - AC_CACHE_CHECK([whether open recognizes a trailing slash], - [gl_cv_func_open_slash], - [# Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - touch conftest.tmp - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#if HAVE_UNISTD_H -# include -#endif -int main () -{ - int result = 0; -#if HAVE_LSTAT - if (open ("conftest.lnk/", O_RDONLY) != -1) - result |= 1; -#endif - if (open ("conftest.sl/", O_CREAT, 0600) >= 0) - result |= 2; - return result; -}]])], - [gl_cv_func_open_slash=yes], - [gl_cv_func_open_slash=no], - [ -changequote(,)dnl - case "$host_os" in - freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) - gl_cv_func_open_slash="guessing no" ;; - *) - gl_cv_func_open_slash="guessing yes" ;; - esac -changequote([,])dnl - ]) - rm -f conftest.sl conftest.tmp conftest.lnk - ]) - case "$gl_cv_func_open_slash" in - *no) - AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1], - [Define to 1 if open() fails to recognize a trailing slash.]) - REPLACE_OPEN=1 - ;; - esac - ;; - esac - dnl Replace open() for supporting the gnulib-defined fchdir() function, - dnl to keep fchdir's bookkeeping up-to-date. - m4_ifdef([gl_FUNC_FCHDIR], [ - if test $REPLACE_OPEN = 0; then - gl_TEST_FCHDIR - if test $HAVE_FCHDIR = 0; then - REPLACE_OPEN=1 - fi - fi - ]) - dnl Replace open() for supporting the gnulib-defined O_NONBLOCK flag. - m4_ifdef([gl_NONBLOCKING_IO], [ - if test $REPLACE_OPEN = 0; then - gl_NONBLOCKING_IO - if test $gl_cv_have_open_O_NONBLOCK != yes; then - REPLACE_OPEN=1 - fi - fi - ]) -]) - -# Prerequisites of lib/open.c. -AC_DEFUN([gl_PREREQ_OPEN], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T]) - : -]) diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4 deleted file mode 100644 index 0117861..0000000 --- a/gnulib/m4/pathmax.m4 +++ /dev/null @@ -1,42 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_PATHMAX], -[ - dnl Prerequisites of lib/pathmax.h. - AC_CHECK_HEADERS_ONCE([sys/param.h]) -]) - -# Expands to a piece of C program that defines PATH_MAX in the same way as -# "pathmax.h" will do. -AC_DEFUN([gl_PATHMAX_SNIPPET], [[ -/* Arrange to define PATH_MAX, like "pathmax.h" does. */ -#if HAVE_UNISTD_H -# include -#endif -#include -#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN -# include -#endif -#if !defined PATH_MAX && defined MAXPATHLEN -# define PATH_MAX MAXPATHLEN -#endif -#ifdef __hpux -# undef PATH_MAX -# define PATH_MAX 1024 -#endif -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# undef PATH_MAX -# define PATH_MAX 260 -#endif -]]) - -# Prerequisites of gl_PATHMAX_SNIPPET. -AC_DEFUN([gl_PATHMAX_SNIPPET_PREREQ], -[ - AC_CHECK_HEADERS_ONCE([unistd.h sys/param.h]) -]) diff --git a/gnulib/m4/printf.m4 b/gnulib/m4/printf.m4 deleted file mode 100644 index 751e896..0000000 --- a/gnulib/m4/printf.m4 +++ /dev/null @@ -1,1570 +0,0 @@ -# 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. - -dnl Test whether the *printf family of functions supports the 'j', 'z', 't', -dnl 'L' size specifiers. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_sizes_c99. - -AC_DEFUN([gl_PRINTF_SIZES_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_AC_HEADER_STDINT_H]) - AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports size specifiers as in C99], - [gl_cv_func_printf_sizes_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -#include -#if HAVE_STDINT_H_WITH_UINTMAX -# include -#endif -#if HAVE_INTTYPES_H_WITH_UINTMAX -# include -#endif -static char buf[100]; -int main () -{ - int result = 0; -#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX - buf[0] = '\0'; - if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 - || strcmp (buf, "12345671 33") != 0) - result |= 1; -#endif - buf[0] = '\0'; - if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 - || strcmp (buf, "12345672 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 - || strcmp (buf, "12345673 33") != 0) - result |= 4; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 - || strcmp (buf, "1.5 33") != 0) - result |= 8; - return result; -}]])], - [gl_cv_func_printf_sizes_c99=yes], - [gl_cv_func_printf_sizes_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; - darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_printf_sizes_c99="guessing no";; - openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_sizes_c99="guessing no";; - netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_sizes_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports 'long double' -dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_long_double. - -AC_DEFUN([gl_PRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports 'long double' arguments], - [gl_cv_func_printf_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[10000]; -int main () -{ - int result = 0; - buf[0] = '\0'; - if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000 33") != 0) - result |= 1; - buf[0] = '\0'; - if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.750000e+00 33") != 0) - result |= 2; - buf[0] = '\0'; - if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 - || strcmp (buf, "1.75 33") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_long_double=yes], - [gl_cv_func_printf_long_double=no], - [ -changequote(,)dnl - case "$host_os" in - beos*) gl_cv_func_printf_long_double="guessing no";; - mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; - *) gl_cv_func_printf_long_double="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'double' arguments and negative zero arguments in the %f, %e, %g -dnl directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite. - -AC_DEFUN([gl_PRINTF_INFINITE], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports infinite 'double' arguments], - [gl_cv_func_printf_infinite], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static int -have_minus_zero () -{ - static double plus_zero = 0.0; - double minus_zero = - plus_zero; - return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; -} -static char buf[10000]; -static double zero = 0.0; -int main () -{ - int result = 0; - if (sprintf (buf, "%f", 1.0 / zero) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", -1.0 / zero) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%f", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%e", 1.0 / zero) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", -1.0 / zero) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 4; - if (sprintf (buf, "%e", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%g", 1.0 / zero) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", -1.0 / zero) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 16; - if (sprintf (buf, "%g", zero / zero) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - /* This test fails on HP-UX 10.20. */ - if (have_minus_zero ()) - if (sprintf (buf, "%g", - zero) < 0 - || strcmp (buf, "-0") != 0) - result |= 64; - return result; -}]])], - [gl_cv_func_printf_infinite=yes], - [gl_cv_func_printf_infinite=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; - darwin*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; - hpux*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_printf_infinite="guessing no";; - netbsd*) gl_cv_func_printf_infinite="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_infinite="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports infinite and NaN -dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_infinite_long_double. - -AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_BIGENDIAN]) - AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - dnl The user can set or unset the variable gl_printf_safe to indicate - dnl that he wishes a safe handling of non-IEEE-754 'long double' values. - if test -n "$gl_printf_safe"; then - AC_DEFINE([CHECK_PRINTF_SAFE], [1], - [Define if you wish *printf() functions that have a safe handling of - non-IEEE-754 'long double' values.]) - fi - case "$gl_cv_func_printf_long_double" in - *yes) - AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments], - [gl_cv_func_printf_infinite_long_double], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -]GL_NOCRASH[ -#include -#include -#include -static int -strisnan (const char *string, size_t start_index, size_t end_index) -{ - if (start_index < end_index) - { - if (string[start_index] == '-') - start_index++; - if (start_index + 3 <= end_index - && memcmp (string + start_index, "nan", 3) == 0) - { - start_index += 3; - if (start_index == end_index - || (string[start_index] == '(' && string[end_index - 1] == ')')) - return 1; - } - } - return 0; -} -static char buf[10000]; -static long double zeroL = 0.0L; -int main () -{ - int result = 0; - nocrash_init(); - if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Le", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; - if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 - || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 - || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) - result |= 1; - if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 1; -#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE -/* Representation of an 80-bit 'long double' as an initializer for a sequence - of 'unsigned int' words. */ -# ifdef WORDS_BIGENDIAN -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ - ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ - (unsigned int) (mantlo) << 16 \ - } -# else -# define LDBL80_WORDS(exponent,manthi,mantlo) \ - { mantlo, manthi, exponent } -# endif - { /* Quiet NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { - /* Signalling NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 2; - } - { /* Pseudo-NaN. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 4; - } - { /* Pseudo-Infinity. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 8; - } - { /* Pseudo-Zero. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 16; - } - { /* Unnormalized number. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 32; - } - { /* Pseudo-Denormal. */ - static union { unsigned int word[4]; long double value; } x = - { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; - if (sprintf (buf, "%Lf", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Le", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - if (sprintf (buf, "%Lg", x.value) < 0 - || !strisnan (buf, 0, strlen (buf))) - result |= 64; - } -#endif - return result; -}]])], - [gl_cv_func_printf_infinite_long_double=yes], - [gl_cv_func_printf_infinite_long_double=no], - [ -changequote(,)dnl - case "$host_cpu" in - # Guess no on ia64, x86_64, i386. - ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; - *) - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; - hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_infinite_long_double="guessing no";; - esac - ;; - esac -changequote([,])dnl - ]) - ]) - ;; - *) - gl_cv_func_printf_infinite_long_double="irrelevant" - ;; - esac -]) - -dnl Test whether the *printf family of functions supports the 'a' and 'A' -dnl conversion specifier for hexadecimal output of floating-point numbers. -dnl (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_a. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives], - [gl_cv_func_printf_directive_a], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -static double zero = 0.0; -int main () -{ - int result = 0; - if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.922p+1 33") != 0 - && strcmp (buf, "0x3.244p+0 33") != 0 - && strcmp (buf, "0x6.488p-1 33") != 0 - && strcmp (buf, "0xc.91p-2 33") != 0)) - result |= 1; - if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 - || (strcmp (buf, "-0X1.922P+1 33") != 0 - && strcmp (buf, "-0X3.244P+0 33") != 0 - && strcmp (buf, "-0X6.488P-1 33") != 0 - && strcmp (buf, "-0XC.91P-2 33") != 0)) - result |= 2; - /* This catches a FreeBSD 6.1 bug: it doesn't round. */ - if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 - || (strcmp (buf, "0x1.83p+0 33") != 0 - && strcmp (buf, "0x3.05p-1 33") != 0 - && strcmp (buf, "0x6.0ap-2 33") != 0 - && strcmp (buf, "0xc.14p-3 33") != 0)) - result |= 4; - /* This catches a FreeBSD 6.1 bug. See - */ - if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 - || buf[0] == '0') - result |= 8; - /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */ - if (sprintf (buf, "%.1a", 1.999) < 0 - || (strcmp (buf, "0x1.0p+1") != 0 - && strcmp (buf, "0x2.0p+0") != 0 - && strcmp (buf, "0x4.0p-1") != 0 - && strcmp (buf, "0x8.0p-2") != 0)) - result |= 16; - /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a - glibc 2.4 bug . */ - if (sprintf (buf, "%.1La", 1.999L) < 0 - || (strcmp (buf, "0x1.0p+1") != 0 - && strcmp (buf, "0x2.0p+0") != 0 - && strcmp (buf, "0x4.0p-1") != 0 - && strcmp (buf, "0x8.0p-2") != 0)) - result |= 32; - return result; -}]])], - [gl_cv_func_printf_directive_a=yes], - [gl_cv_func_printf_directive_a=no], - [ - case "$host_os" in - # Guess yes on glibc >= 2.5 systems. - *-gnu*) - AC_EGREP_CPP([BZ2908], [ - #include - #ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ - BZ2908 - #endif - #endif - ], - [gl_cv_func_printf_directive_a="guessing yes"], - [gl_cv_func_printf_directive_a="guessing no"]) - ;; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_a="guessing no";; - esac - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %F format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_f. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'F' directive], - [gl_cv_func_printf_directive_f], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -static double zero = 0.0; -int main () -{ - int result = 0; - if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 - || strcmp (buf, "1234567.000000 33") != 0) - result |= 1; - if (sprintf (buf, "%F", 1.0 / zero) < 0 - || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) - result |= 2; - /* This catches a Cygwin 1.5.x bug. */ - if (sprintf (buf, "%.F", 1234.0) < 0 - || strcmp (buf, "1234") != 0) - result |= 4; - return result; -}]])], - [gl_cv_func_printf_directive_f=yes], - [gl_cv_func_printf_directive_f=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on FreeBSD >= 6. - freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; - darwin*) gl_cv_func_printf_directive_f="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_directive_f="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %n format -dnl directive. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_printf_directive_n. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'n' directive], - [gl_cv_func_printf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#include -#ifdef _MSC_VER -/* See page about "Parameter Validation" on msdn.microsoft.com. */ -static void cdecl -invalid_parameter_handler (const wchar_t *expression, - const wchar_t *function, - const wchar_t *file, unsigned int line, - uintptr_t dummy) -{ - exit (1); -} -#endif -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; -#ifdef _MSC_VER - _set_invalid_parameter_handler (invalid_parameter_handler); -#endif - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 - || strcmp (buf, "123 ") != 0 - || count != 4) - return 1; - return 0; -}]])], - [gl_cv_func_printf_directive_n=yes], - [gl_cv_func_printf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - mingw*) gl_cv_func_printf_directive_n="guessing no";; - *) gl_cv_func_printf_directive_n="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the %ls format -dnl directive and in particular, when a precision is specified, whether -dnl the functions stop converting the wide string argument when the number -dnl of bytes that have been produced by this conversion equals or exceeds -dnl the precision. -dnl Result is gl_cv_func_printf_directive_ls. - -AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the 'ls' directive], - [gl_cv_func_printf_directive_ls], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -#include -int main () -{ - int result = 0; - char buf[100]; - /* Test whether %ls works at all. - This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on - Cygwin 1.5. */ - { - static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "abc") != 0) - result |= 1; - } - /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an - assertion failure inside libc), but not on OpenBSD 4.0. */ - { - static const wchar_t wstring[] = { 'a', 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%ls", wstring) < 0 - || strcmp (buf, "a") != 0) - result |= 2; - } - /* Test whether precisions in %ls are supported as specified in ISO C 99 - section 7.19.6.1: - "If a precision is specified, no more than that many bytes are written - (including shift sequences, if any), and the array shall contain a - null wide character if, to equal the multibyte character sequence - length given by the precision, the function would need to access a - wide character one past the end of the array." - This test fails on Solaris 10. */ - { - static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; - buf[0] = '\0'; - if (sprintf (buf, "%.2ls", wstring) < 0 - || strcmp (buf, "ab") != 0) - result |= 8; - } - return result; -}]])], - [gl_cv_func_printf_directive_ls=yes], - [gl_cv_func_printf_directive_ls=no], - [ -changequote(,)dnl - case "$host_os" in - openbsd*) gl_cv_func_printf_directive_ls="guessing no";; - irix*) gl_cv_func_printf_directive_ls="guessing no";; - solaris*) gl_cv_func_printf_directive_ls="guessing no";; - cygwin*) gl_cv_func_printf_directive_ls="guessing no";; - beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; - *) gl_cv_func_printf_directive_ls="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with positions. (POSIX:2001) -dnl Result is gl_cv_func_printf_positions. - -AC_DEFUN([gl_PRINTF_POSITIONS], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions], - [gl_cv_func_printf_positions], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* The string "%2$d %1$d", with dollar characters protected from the shell's - dollar expansion (possibly an autoconf bug). */ -static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; -static char buf[100]; -int main () -{ - sprintf (buf, format, 33, 55); - return (strcmp (buf, "55 33") != 0); -}]])], - [gl_cv_func_printf_positions=yes], - [gl_cv_func_printf_positions=no], - [ -changequote(,)dnl - case "$host_os" in - netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) - gl_cv_func_printf_positions="guessing no";; - beos*) gl_cv_func_printf_positions="guessing no";; - mingw* | pw*) gl_cv_func_printf_positions="guessing no";; - *) gl_cv_func_printf_positions="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports POSIX/XSI format -dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001) -dnl Result is gl_cv_func_printf_flag_grouping. - -AC_DEFUN([gl_PRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the grouping flag], - [gl_cv_func_printf_flag_grouping], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - if (sprintf (buf, "%'d %d", 1234567, 99) < 0 - || buf[strlen (buf) - 1] != '9') - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_grouping=yes], - [gl_cv_func_printf_flag_grouping=no], - [ -changequote(,)dnl - case "$host_os" in - cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; - netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; - mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; - *) gl_cv_func_printf_flag_grouping="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports the - flag correctly. -dnl (ISO C99.) See -dnl -dnl Result is gl_cv_func_printf_flag_leftadjust. - -AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly], - [gl_cv_func_printf_flag_leftadjust], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -int main () -{ - /* Check that a '-' flag is not annihilated by a negative width. */ - if (sprintf (buf, "a%-*sc", -3, "b") < 0 - || strcmp (buf, "ab c") != 0) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_leftadjust=yes], - [gl_cv_func_printf_flag_leftadjust=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on HP-UX 11. - hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; - # Guess no on HP-UX 10 and older. - hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; - # Guess yes otherwise. - *) gl_cv_func_printf_flag_leftadjust="guessing yes";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports padding of non-finite -dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See -dnl -dnl Result is gl_cv_func_printf_flag_zero. - -AC_DEFUN([gl_PRINTF_FLAG_ZERO], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports the zero flag correctly], - [gl_cv_func_printf_flag_zero], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[100]; -static double zero = 0.0; -int main () -{ - if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 - || (strcmp (buf, " inf") != 0 - && strcmp (buf, " infinity") != 0)) - return 1; - return 0; -}]])], - [gl_cv_func_printf_flag_zero=yes], - [gl_cv_func_printf_flag_zero=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_flag_zero="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_flag_zero="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions supports large precisions. -dnl On mingw, precisions larger than 512 are treated like 512, in integer, -dnl floating-point or pointer output. On Solaris 10/x86, precisions larger -dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC, -dnl precisions larger than 510 in floating-point output yield wrong results. -dnl On AIX 7.1, precisions larger than 998 in floating-point output yield -dnl wrong results. On BeOS, precisions larger than 1044 crash the program. -dnl Result is gl_cv_func_printf_precision. - -AC_DEFUN([gl_PRINTF_PRECISION], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf supports large precisions], - [gl_cv_func_printf_precision], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static char buf[5000]; -int main () -{ - int result = 0; -#ifdef __BEOS__ - /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ - return 1; -#endif - if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) - result |= 1; - if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) - result |= 2; - if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 - || buf[0] != '1') - result |= 4; - if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 - || buf[0] != '1') - result |= 4; - return result; -}]])], - [gl_cv_func_printf_precision=yes], - [gl_cv_func_printf_precision=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess no only on Solaris, native Windows, and BeOS systems. - solaris*) gl_cv_func_printf_precision="guessing no" ;; - mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; - beos*) gl_cv_func_printf_precision="guessing no" ;; - *) gl_cv_func_printf_precision="guessing yes" ;; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the *printf family of functions recovers gracefully in case -dnl of an out-of-memory condition, or whether it crashes the entire program. -dnl Result is gl_cv_func_printf_enomem. - -AC_DEFUN([gl_PRINTF_ENOMEM], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_MULTIARCH]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether printf survives out-of-memory conditions], - [gl_cv_func_printf_enomem], - [ - gl_cv_func_printf_enomem="guessing no" - if test "$cross_compiling" = no; then - if test $APPLE_UNIVERSAL_BUILD = 0; then - AC_LANG_CONFTEST([AC_LANG_SOURCE([ -]GL_NOCRASH[ -changequote(,)dnl -#include -#include -#include -#include -#include -int main() -{ - struct rlimit limit; - int ret; - nocrash_init (); - /* Some printf implementations allocate temporary space with malloc. */ - /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ -#ifdef RLIMIT_DATA - if (getrlimit (RLIMIT_DATA, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_DATA, &limit) < 0) - return 77; -#endif - /* On Linux systems, malloc() is limited by RLIMIT_AS. */ -#ifdef RLIMIT_AS - if (getrlimit (RLIMIT_AS, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_AS, &limit) < 0) - return 77; -#endif - /* Some printf implementations allocate temporary space on the stack. */ -#ifdef RLIMIT_STACK - if (getrlimit (RLIMIT_STACK, &limit) < 0) - return 77; - if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) - limit.rlim_max = 5000000; - limit.rlim_cur = limit.rlim_max; - if (setrlimit (RLIMIT_STACK, &limit) < 0) - return 77; -#endif - ret = printf ("%.5000000f", 1.0); - return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); -} -changequote([,])dnl - ])]) - if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then - (./conftest 2>&AS_MESSAGE_LOG_FD - result=$? - _AS_ECHO_LOG([\$? = $result]) - if test $result != 0 && test $result != 77; then result=1; fi - exit $result - ) >/dev/null 2>/dev/null - case $? in - 0) gl_cv_func_printf_enomem="yes" ;; - 77) gl_cv_func_printf_enomem="guessing no" ;; - *) gl_cv_func_printf_enomem="no" ;; - esac - else - gl_cv_func_printf_enomem="guessing no" - fi - rm -fr conftest* - else - dnl A universal build on Apple Mac OS X platforms. - dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode. - dnl But we need a configuration result that is valid in both modes. - gl_cv_func_printf_enomem="guessing no" - fi - fi - if test "$gl_cv_func_printf_enomem" = "guessing no"; then -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Solaris. - solaris*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on AIX. - aix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on HP-UX/hppa. - hpux*) case "$host_cpu" in - hppa*) gl_cv_func_printf_enomem="guessing yes";; - *) gl_cv_func_printf_enomem="guessing no";; - esac - ;; - # Guess yes on IRIX. - irix*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on OSF/1. - osf*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_printf_enomem="guessing yes";; - # Guess yes on Haiku. - haiku*) gl_cv_func_printf_enomem="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_printf_enomem="guessing no";; - esac -changequote([,])dnl - fi - ]) -]) - -dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001) -dnl Result is ac_cv_func_snprintf. - -AC_DEFUN([gl_SNPRINTF_PRESENCE], -[ - AC_CHECK_FUNCS_ONCE([snprintf]) -]) - -dnl Test whether the string produced by the snprintf function is always NUL -dnl terminated. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_truncation_c99. - -AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SNPRINTF_PRESENCE]) - AC_CACHE_CHECK([whether snprintf truncates the result as in C99], - [gl_cv_func_snprintf_truncation_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#if HAVE_SNPRINTF -# define my_snprintf snprintf -#else -# include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -#endif -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - my_snprintf (buf, 3, "%d %d", 4567, 89); - if (memcmp (buf, "45\0DEF", 6) != 0) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_truncation_c99=yes], - [gl_cv_func_snprintf_truncation_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; - darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on HP-UX >= 11. - hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; - hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; - osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_truncation_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_truncation_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the return value of the snprintf function is the number -dnl of bytes (excluding the terminating NUL) that would have been produced -dnl if the buffer had been large enough. (ISO C99, POSIX:2001) -dnl For example, this test program fails on IRIX 6.5: -dnl --------------------------------------------------------------------- -dnl #include -dnl int main() -dnl { -dnl static char buf[8]; -dnl int retval = snprintf (buf, 3, "%d", 12345); -dnl return retval >= 0 && retval < 3; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_snprintf_retval_c99. - -AC_DEFUN_ONCE([gl_SNPRINTF_RETVAL_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SNPRINTF_PRESENCE]) - AC_CACHE_CHECK([whether snprintf returns a byte count as in C99], - [gl_cv_func_snprintf_retval_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#if HAVE_SNPRINTF -# define my_snprintf snprintf -#else -# include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -#endif -static char buf[100]; -int main () -{ - strcpy (buf, "ABCDEF"); - if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) - return 1; - if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) - return 2; - if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) - return 3; - return 0; -}]])], - [gl_cv_func_snprintf_retval_c99=yes], - [gl_cv_func_snprintf_retval_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; - darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on OpenBSD >= 3.9. - openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) - gl_cv_func_snprintf_retval_c99="guessing no";; - openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on Solaris >= 2.10. - solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; - solaris*) gl_cv_func_printf_sizes_c99="guessing no";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; - aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_retval_c99="guessing no";; - netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_retval_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function supports the %n format directive -dnl also in truncated portions of the format string. (ISO C99, POSIX:2001) -dnl Result is gl_cv_func_snprintf_directive_n. - -AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SNPRINTF_PRESENCE]) - AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive], - [gl_cv_func_snprintf_directive_n], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -#if HAVE_SNPRINTF -# define my_snprintf snprintf -#else -# include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -#endif -static char fmtstring[10]; -static char buf[100]; -int main () -{ - int count = -1; - /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) - support %n in format strings in read-only memory but not in writable - memory. */ - strcpy (fmtstring, "%d %n"); - my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); - if (count != 6) - return 1; - return 0; -}]])], - [gl_cv_func_snprintf_directive_n=yes], - [gl_cv_func_snprintf_directive_n=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; - darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_snprintf_directive_n="guessing no";; - solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; - aix*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on OSF/1 >= 5. - osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; - osf*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_snprintf_directive_n="guessing no";; - netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_snprintf_directive_n="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_snprintf_directive_n="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl Test whether the snprintf function, when passed a size = 1, writes any -dnl output without bounds in this case, behaving like sprintf. This is the -dnl case on Linux libc5. -dnl Result is gl_cv_func_snprintf_size1. - -AC_DEFUN([gl_SNPRINTF_SIZE1], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gl_SNPRINTF_PRESENCE]) - AC_CACHE_CHECK([whether snprintf respects a size of 1], - [gl_cv_func_snprintf_size1], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#if HAVE_SNPRINTF -# define my_snprintf snprintf -#else -# include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -#endif -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - my_snprintf (buf, 1, "%d", 12345); - return buf[1] != 'E'; -}]])], - [gl_cv_func_snprintf_size1=yes], - [gl_cv_func_snprintf_size1=no], - [gl_cv_func_snprintf_size1="guessing yes"]) - ]) -]) - -dnl Test whether the vsnprintf function, when passed a zero size, produces no -dnl output. (ISO C99, POSIX:2001) -dnl For example, snprintf nevertheless writes a NUL byte in this case -dnl on OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl And vsnprintf writes any output without bounds in this case, behaving like -dnl vsprintf, on HP-UX 11 and OSF/1 5.1: -dnl --------------------------------------------------------------------- -dnl #include -dnl #include -dnl static int my_snprintf (char *buf, int size, const char *format, ...) -dnl { -dnl va_list args; -dnl int ret; -dnl va_start (args, format); -dnl ret = vsnprintf (buf, size, format, args); -dnl va_end (args); -dnl return ret; -dnl } -dnl int main() -dnl { -dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; -dnl my_snprintf (buf, 0, "%d", 12345); -dnl return buf[0] != 'D'; -dnl } -dnl --------------------------------------------------------------------- -dnl Result is gl_cv_func_vsnprintf_zerosize_c99. - -AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], -[ - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99], - [gl_cv_func_vsnprintf_zerosize_c99], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -static int my_snprintf (char *buf, int size, const char *format, ...) -{ - va_list args; - int ret; - va_start (args, format); - ret = vsnprintf (buf, size, format, args); - va_end (args); - return ret; -} -int main() -{ - static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; - my_snprintf (buf, 0, "%d", 12345); - return buf[0] != 'D'; -}]])], - [gl_cv_func_vsnprintf_zerosize_c99=yes], - [gl_cv_func_vsnprintf_zerosize_c99=no], - [ -changequote(,)dnl - case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on FreeBSD >= 5. - freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Mac OS X >= 10.3. - darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Cygwin. - cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on Solaris >= 2.6. - solaris2.[0-5] | solaris2.[0-5].*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on AIX >= 4. - aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on IRIX >= 6.5. - irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on NetBSD >= 3. - netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) - gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on BeOS. - beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # Guess yes on mingw. - mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; - # If we don't know, assume the worst. - *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; - esac -changequote([,])dnl - ]) - ]) -]) - -dnl The results of these tests on various platforms are: -dnl -dnl 1 = gl_PRINTF_SIZES_C99 -dnl 2 = gl_PRINTF_LONG_DOUBLE -dnl 3 = gl_PRINTF_INFINITE -dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE -dnl 5 = gl_PRINTF_DIRECTIVE_A -dnl 6 = gl_PRINTF_DIRECTIVE_F -dnl 7 = gl_PRINTF_DIRECTIVE_N -dnl 8 = gl_PRINTF_DIRECTIVE_LS -dnl 9 = gl_PRINTF_POSITIONS -dnl 10 = gl_PRINTF_FLAG_GROUPING -dnl 11 = gl_PRINTF_FLAG_LEFTADJUST -dnl 12 = gl_PRINTF_FLAG_ZERO -dnl 13 = gl_PRINTF_PRECISION -dnl 14 = gl_PRINTF_ENOMEM -dnl 15 = gl_SNPRINTF_PRESENCE -dnl 16 = gl_SNPRINTF_TRUNCATION_C99 -dnl 17 = gl_SNPRINTF_RETVAL_C99 -dnl 18 = gl_SNPRINTF_DIRECTIVE_N -dnl 19 = gl_SNPRINTF_SIZE1 -dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99 -dnl -dnl 1 = checking whether printf supports size specifiers as in C99... -dnl 2 = checking whether printf supports 'long double' arguments... -dnl 3 = checking whether printf supports infinite 'double' arguments... -dnl 4 = checking whether printf supports infinite 'long double' arguments... -dnl 5 = checking whether printf supports the 'a' and 'A' directives... -dnl 6 = checking whether printf supports the 'F' directive... -dnl 7 = checking whether printf supports the 'n' directive... -dnl 8 = checking whether printf supports the 'ls' directive... -dnl 9 = checking whether printf supports POSIX/XSI format strings with positions... -dnl 10 = checking whether printf supports the grouping flag... -dnl 11 = checking whether printf supports the left-adjust flag correctly... -dnl 12 = checking whether printf supports the zero flag correctly... -dnl 13 = checking whether printf supports large precisions... -dnl 14 = checking whether printf survives out-of-memory conditions... -dnl 15 = checking for snprintf... -dnl 16 = checking whether snprintf truncates the result as in C99... -dnl 17 = checking whether snprintf returns a byte count as in C99... -dnl 18 = checking whether snprintf fully supports the 'n' directive... -dnl 19 = checking whether snprintf respects a size of 1... -dnl 20 = checking whether vsnprintf respects a zero size as in C99... -dnl -dnl . = yes, # = no. -dnl -dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 -dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . . -dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . . -dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . . -dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . . -dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . . -dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . . -dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . . -dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . . -dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . . -dnl Solaris 11 2011-11 . . # # # . . # . . . # . . . . . . . . -dnl Solaris 10 . . # # # . . # . . . # # . . . . . . . -dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . . -dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # # -dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . . -dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . . -dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . . -dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . . -dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . # -dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? # -dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . . -dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . # -dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # # -dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . . -dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ? -dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . . -dnl Haiku . . . # # # . # . . . . . ? . . ? . . . -dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . . -dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . . -dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . . -dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . . -dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . . diff --git a/gnulib/m4/putenv.m4 b/gnulib/m4/putenv.m4 deleted file mode 100644 index b971b12..0000000 --- a/gnulib/m4/putenv.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# 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. - -dnl From Jim Meyering. -dnl -dnl Check whether putenv ("FOO") removes FOO from the environment. -dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that. - -AC_DEFUN([gl_FUNC_PUTENV], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([for putenv compatible with GNU and SVID], - [gl_cv_func_svid_putenv], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[ - /* Put it in env. */ - if (putenv ("CONFTEST_putenv=val")) - return 1; - - /* Try to remove it. */ - if (putenv ("CONFTEST_putenv")) - return 2; - - /* Make sure it was deleted. */ - if (getenv ("CONFTEST_putenv") != 0) - return 3; - - return 0; - ]])], - gl_cv_func_svid_putenv=yes, - gl_cv_func_svid_putenv=no, - dnl When crosscompiling, assume putenv is broken. - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_svid_putenv="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_svid_putenv="guessing no" ;; - esac - ]) - ]) - case "$gl_cv_func_svid_putenv" in - *yes) ;; - *) - REPLACE_PUTENV=1 - ;; - esac -]) diff --git a/gnulib/m4/rawmemchr.m4 b/gnulib/m4/rawmemchr.m4 deleted file mode 100644 index 1930164..0000000 --- a/gnulib/m4/rawmemchr.m4 +++ /dev/null @@ -1,20 +0,0 @@ -# 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 deleted file mode 100644 index ccf5141..0000000 --- a/gnulib/m4/readlink.m4 +++ /dev/null @@ -1,71 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_READLINK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([readlink]) - if test $ac_cv_func_readlink = no; then - HAVE_READLINK=0 - else - AC_CACHE_CHECK([whether readlink signature is correct], - [gl_cv_decl_readlink_works], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - /* Cause compilation failure if original declaration has wrong type. */ - ssize_t readlink (const char *, char *, size_t);]])], - [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])]) - dnl Solaris 9 ignores trailing slash. - dnl FreeBSD 7.2 dereferences only one level of links with trailing slash. - AC_CACHE_CHECK([whether readlink handles trailing slash correctly], - [gl_cv_func_readlink_works], - [# We have readlink, so assume ln -s works. - ln -s conftest.no-such conftest.link - ln -s conftest.link conftest.lnk2 - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[char buf[20]; - return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])], - [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_readlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_readlink_works="guessing no" ;; - esac - ]) - rm -f conftest.link conftest.lnk2]) - case "$gl_cv_func_readlink_works" in - *yes) - if test "$gl_cv_decl_readlink_works" != yes; then - REPLACE_READLINK=1 - fi - ;; - *) - AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink - fails to recognize a trailing slash.]) - REPLACE_READLINK=1 - ;; - esac - fi -]) - -# Like gl_FUNC_READLINK, except prepare for separate compilation -# (no REPLACE_READLINK, no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_READLINK_SEPARATE], -[ - AC_CHECK_FUNCS_ONCE([readlink]) - gl_PREREQ_READLINK -]) - -# Prerequisites of lib/readlink.c. -AC_DEFUN([gl_PREREQ_READLINK], -[ - : -]) diff --git a/gnulib/m4/realloc.m4 b/gnulib/m4/realloc.m4 deleted file mode 100644 index 954c2f0..0000000 --- a/gnulib/m4/realloc.m4 +++ /dev/null @@ -1,76 +0,0 @@ -# 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 -# realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_GNU], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - dnl _AC_FUNC_REALLOC_IF is defined in Autoconf. - _AC_FUNC_REALLOC_IF( - [AC_DEFINE([HAVE_REALLOC_GNU], [1], - [Define to 1 if your system has a GNU libc compatible 'realloc' - function, and to 0 otherwise.])], - [AC_DEFINE([HAVE_REALLOC_GNU], [0]) - REPLACE_REALLOC=1 - ]) -])# gl_FUNC_REALLOC_GNU - -# gl_FUNC_REALLOC_POSIX -# --------------------- -# Test whether 'realloc' is POSIX compliant (sets errno to ENOMEM when it -# fails), and replace realloc if it is not. -AC_DEFUN([gl_FUNC_REALLOC_POSIX], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([gl_CHECK_MALLOC_POSIX]) - if test $gl_cv_func_malloc_posix = yes; then - AC_DEFINE([HAVE_REALLOC_POSIX], [1], - [Define if the 'realloc' function is POSIX compliant.]) - else - REPLACE_REALLOC=1 - fi -]) diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4 deleted file mode 100644 index 41be5e8..0000000 --- a/gnulib/m4/regex.m4 +++ /dev/null @@ -1,226 +0,0 @@ -# serial 61 - -# 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, -# with or without modifications, as long as this notice is preserved. - -dnl Initially derived from code in GNU grep. -dnl Mostly written by Jim Meyering. - -AC_PREREQ([2.50]) - -AC_DEFUN([gl_REGEX], -[ - AC_ARG_WITH([included-regex], - [AS_HELP_STRING([--without-included-regex], - [don't compile regex; this is the default on systems - with recent-enough versions of the GNU C Library - (use with caution on other systems).])]) - - case $with_included_regex in #( - yes|no) ac_use_included_regex=$with_included_regex - ;; - '') - # If the system regex support is good enough that it passes the - # following run test, then default to *not* using the included regex.c. - # If cross compiling, assume the test would fail and use the included - # regex.c. - AC_CACHE_CHECK([for working re_compile_pattern], - [gl_cv_func_re_compile_pattern_working], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT[ - #include - #include - #include - ]], - [[int result = 0; - static struct re_pattern_buffer regex; - unsigned char folded_chars[UCHAR_MAX + 1]; - int i; - const char *s; - struct re_registers regs; - - /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html - This test needs valgrind to catch the bug on Debian - GNU/Linux 3.1 x86, but it might catch the bug better - on other platforms and it shouldn't hurt to try the - test here. */ - if (setlocale (LC_ALL, "en_US.UTF-8")) - { - static char const pat[] = "insert into"; - static char const data[] = - "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK"; - re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE - | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern (pat, sizeof pat - 1, ®ex); - if (s) - result |= 1; - else if (re_search (®ex, data, sizeof data - 1, - 0, sizeof data - 1, ®s) - != -1) - result |= 1; - if (! setlocale (LC_ALL, "C")) - return 1; - } - - /* This test is from glibc bug 3957, reported by Andrew Mackey. */ - re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[^x]b", 6, ®ex); - if (s) - result |= 2; - /* This should fail, but succeeds for glibc-2.5. */ - else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1) - result |= 2; - - /* This regular expression is from Spencer ere test number 75 - in grep-2.3. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP); - memset (®ex, 0, sizeof regex); - for (i = 0; i <= UCHAR_MAX; i++) - folded_chars[i] = i; - regex.translate = folded_chars; - s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex); - /* This should fail with _Invalid character class name_ error. */ - if (!s) - result |= 4; - - /* Ensure that [b-a] is diagnosed as invalid, when - using RE_NO_EMPTY_RANGES. */ - re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("a[b-a]", 6, ®ex); - if (s == 0) - result |= 8; - - /* This should succeed, but does not for glibc-2.1.3. */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("{1", 2, ®ex); - if (s) - result |= 8; - - /* The following example is derived from a problem report - against gawk from Jorge Stolfi . */ - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[an\371]*n", 7, ®ex); - if (s) - result |= 8; - /* This should match, but does not for glibc-2.2.1. */ - else if (re_match (®ex, "an", 2, 0, ®s) != 2) - result |= 8; - - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 8; - /* glibc-2.2.93 does not work with a negative RANGE argument. */ - else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1) - result |= 8; - - /* The version of regex.c in older versions of gnulib - ignored RE_ICASE. Detect that problem too. */ - re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("x", 1, ®ex); - if (s) - result |= 16; - else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0) - result |= 16; - - /* Catch a bug reported by Vin Shelton in - http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html - */ - re_set_syntax (RE_SYNTAX_POSIX_BASIC - & ~RE_CONTEXT_INVALID_DUP - & ~RE_NO_EMPTY_RANGES); - memset (®ex, 0, sizeof regex); - s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex); - if (s) - result |= 32; - - /* REG_STARTEND was added to glibc on 2004-01-15. - Reject older versions. */ - if (! REG_STARTEND) - result |= 64; - -#if 0 - /* It would be nice to reject hosts whose regoff_t values are too - narrow (including glibc on hosts with 64-bit ptrdiff_t and - 32-bit int), but we should wait until glibc implements this - feature. Otherwise, support for equivalence classes and - multibyte collation symbols would always be broken except - when compiling --without-included-regex. */ - if (sizeof (regoff_t) < sizeof (ptrdiff_t) - || sizeof (regoff_t) < sizeof (ssize_t)) - result |= 64; -#endif - - return result; - ]])], - [gl_cv_func_re_compile_pattern_working=yes], - [gl_cv_func_re_compile_pattern_working=no], - dnl When crosscompiling, assume it is not working. - [gl_cv_func_re_compile_pattern_working=no])]) - case $gl_cv_func_re_compile_pattern_working in #( - yes) ac_use_included_regex=no;; #( - no) ac_use_included_regex=yes;; - esac - ;; - *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex]) - ;; - esac - - if test $ac_use_included_regex = yes; then - AC_DEFINE([_REGEX_INCLUDE_LIMITS_H], [1], - [Define if you want to include , so that it - consistently overrides 's RE_DUP_MAX.]) - AC_DEFINE([_REGEX_LARGE_OFFSETS], [1], - [Define if you want regoff_t to be at least as wide POSIX requires.]) - AC_DEFINE([re_syntax_options], [rpl_re_syntax_options], - [Define to rpl_re_syntax_options if the replacement should be used.]) - AC_DEFINE([re_set_syntax], [rpl_re_set_syntax], - [Define to rpl_re_set_syntax if the replacement should be used.]) - AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern], - [Define to rpl_re_compile_pattern if the replacement should be used.]) - AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap], - [Define to rpl_re_compile_fastmap if the replacement should be used.]) - AC_DEFINE([re_search], [rpl_re_search], - [Define to rpl_re_search if the replacement should be used.]) - AC_DEFINE([re_search_2], [rpl_re_search_2], - [Define to rpl_re_search_2 if the replacement should be used.]) - AC_DEFINE([re_match], [rpl_re_match], - [Define to rpl_re_match if the replacement should be used.]) - AC_DEFINE([re_match_2], [rpl_re_match_2], - [Define to rpl_re_match_2 if the replacement should be used.]) - AC_DEFINE([re_set_registers], [rpl_re_set_registers], - [Define to rpl_re_set_registers if the replacement should be used.]) - AC_DEFINE([re_comp], [rpl_re_comp], - [Define to rpl_re_comp if the replacement should be used.]) - AC_DEFINE([re_exec], [rpl_re_exec], - [Define to rpl_re_exec if the replacement should be used.]) - AC_DEFINE([regcomp], [rpl_regcomp], - [Define to rpl_regcomp if the replacement should be used.]) - AC_DEFINE([regexec], [rpl_regexec], - [Define to rpl_regexec if the replacement should be used.]) - AC_DEFINE([regerror], [rpl_regerror], - [Define to rpl_regerror if the replacement should be used.]) - AC_DEFINE([regfree], [rpl_regfree], - [Define to rpl_regfree if the replacement should be used.]) - fi -]) - -# Prerequisites of lib/regex.c and lib/regex_internal.c. -AC_DEFUN([gl_PREREQ_REGEX], -[ - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - AC_CHECK_HEADERS([libintl.h]) - AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll]) - AC_CHECK_DECLS([isblank], [], [], [[#include ]]) -]) diff --git a/gnulib/m4/safe-alloc.m4 b/gnulib/m4/safe-alloc.m4 deleted file mode 100644 index abd6589..0000000 --- a/gnulib/m4/safe-alloc.m4 +++ /dev/null @@ -1,10 +0,0 @@ -# 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], -[ - : -]) diff --git a/gnulib/m4/selinux-context-h.m4 b/gnulib/m4/selinux-context-h.m4 deleted file mode 100644 index 7ad67bb..0000000 --- a/gnulib/m4/selinux-context-h.m4 +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -# From Jim Meyering -# Provide , if necessary. - -AC_DEFUN([gl_HEADERS_SELINUX_CONTEXT_H], -[ - AC_REQUIRE([gl_LIBSELINUX]) - if test "$with_selinux" != no; then - AC_CHECK_HEADERS([selinux/context.h], - [SELINUX_CONTEXT_H=], - [SELINUX_CONTEXT_H=selinux/context.h]) - else - SELINUX_CONTEXT_H=selinux/context.h - fi - AC_SUBST([SELINUX_CONTEXT_H]) - AM_CONDITIONAL([GL_GENERATE_SELINUX_CONTEXT_H], [test -n "$SELINUX_CONTEXT_H"]) -]) diff --git a/gnulib/m4/selinux-selinux-h.m4 b/gnulib/m4/selinux-selinux-h.m4 deleted file mode 100644 index ed5215b..0000000 --- a/gnulib/m4/selinux-selinux-h.m4 +++ /dev/null @@ -1,69 +0,0 @@ -# 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. - -# From Jim Meyering -# Provide , if necessary. -# If it is already present, provide wrapper functions to guard against -# misbehavior from getfilecon, lgetfilecon, and fgetfilecon. - -AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H], -[ - AC_REQUIRE([gl_LIBSELINUX]) - if test "$with_selinux" != no; then - AC_CHECK_HEADERS([selinux/selinux.h]) - - if test "$ac_cv_header_selinux_selinux_h" = yes; then - # We do have , so do compile getfilecon.c - # and arrange to use its wrappers. - gl_CHECK_NEXT_HEADERS([selinux/selinux.h]) - AC_DEFINE([getfilecon], [rpl_getfilecon], - [Always use our getfilecon wrapper.]) - AC_DEFINE([lgetfilecon], [rpl_lgetfilecon], - [Always use our lgetfilecon wrapper.]) - AC_DEFINE([fgetfilecon], [rpl_fgetfilecon], - [Always use our fgetfilecon wrapper.]) - fi - - case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in - no:*) # already warned - ;; - *:no) - AC_MSG_WARN([libselinux was found but selinux/selinux.h is missing.]) - AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) - esac - else - # Do as if does not exist, even if - # AC_CHECK_HEADERS_ONCE has already determined that it exists. - AC_DEFINE([HAVE_SELINUX_SELINUX_H], [0]) - fi -]) - -AC_DEFUN([gl_LIBSELINUX], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_REQUIRE([AC_CANONICAL_BUILD]) - - AC_ARG_WITH([selinux], - AS_HELP_STRING([--without-selinux], [do not use SELinux, even on systems with SELinux]), - [], [with_selinux=maybe]) - - LIB_SELINUX= - if test "$with_selinux" != no; then - gl_save_LIBS=$LIBS - AC_SEARCH_LIBS([setfilecon], [selinux], - [test "$ac_cv_search_setfilecon" = "none required" || - LIB_SELINUX=$ac_cv_search_setfilecon]) - LIBS=$gl_save_LIBS - fi - AC_SUBST([LIB_SELINUX]) - - # Warn if SELinux is found but libselinux is absent; - if test "$ac_cv_search_setfilecon" = no && - test "$host" = "$build" && test -d /selinux; then - AC_MSG_WARN([This system supports SELinux but libselinux is missing.]) - AC_MSG_WARN([AC_PACKAGE_NAME will be compiled without SELinux support.]) - fi -]) diff --git a/gnulib/m4/setenv.m4 b/gnulib/m4/setenv.m4 deleted file mode 100644 index e1931e7..0000000 --- a/gnulib/m4/setenv.m4 +++ /dev/null @@ -1,160 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_SETENV], -[ - AC_REQUIRE([gl_FUNC_SETENV_SEPARATE]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - if test $ac_cv_func_setenv = no; then - HAVE_SETENV=0 - else - AC_CACHE_CHECK([whether setenv validates arguments], - [gl_cv_func_setenv_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - #include - ]], [[ - int result = 0; - { - if (setenv ("", "", 0) != -1) - result |= 1; - else if (errno != EINVAL) - result |= 2; - } - { - if (setenv ("a", "=", 1) != 0) - result |= 4; - else if (strcmp (getenv ("a"), "=") != 0) - result |= 8; - } - return result; - ]])], - [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_setenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_setenv_works="guessing no" ;; - esac - ])]) - case "$gl_cv_func_setenv_works" in - *yes) ;; - *) - REPLACE_SETENV=1 - ;; - esac - fi -]) - -# Like gl_FUNC_SETENV, except prepare for separate compilation -# (no REPLACE_SETENV, no AC_LIBOBJ). -AC_DEFUN([gl_FUNC_SETENV_SEPARATE], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([setenv]) - if test $ac_cv_have_decl_setenv = no; then - HAVE_DECL_SETENV=0 - fi - AC_CHECK_FUNCS_ONCE([setenv]) - gl_PREREQ_SETENV -]) - -AC_DEFUN([gl_FUNC_UNSETENV], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_DECLS_ONCE([unsetenv]) - if test $ac_cv_have_decl_unsetenv = no; then - HAVE_DECL_UNSETENV=0 - fi - AC_CHECK_FUNCS([unsetenv]) - if test $ac_cv_func_unsetenv = no; then - HAVE_UNSETENV=0 - else - HAVE_UNSETENV=1 - dnl Some BSDs return void, failing to do error checking. - AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -#undef _BSD -#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */ -#include -extern -#ifdef __cplusplus -"C" -#endif -int unsetenv (const char *name); - ]], - [[]])], - [gt_cv_func_unsetenv_ret='int'], - [gt_cv_func_unsetenv_ret='void'])]) - if test $gt_cv_func_unsetenv_ret = 'void'; then - AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void - instead of int.]) - REPLACE_UNSETENV=1 - fi - - dnl Solaris 10 unsetenv does not remove all copies of a name. - dnl Haiku alpha 2 unsetenv gets confused by assignment to environ. - dnl OpenBSD 4.7 unsetenv("") does not fail. - AC_CACHE_CHECK([whether unsetenv obeys POSIX], - [gl_cv_func_unsetenv_works], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ - #include - #include - extern char **environ; - ]], [[ - char entry1[] = "a=1"; - char entry2[] = "b=2"; - char *env[] = { entry1, entry2, NULL }; - if (putenv ((char *) "a=1")) return 1; - if (putenv (entry2)) return 2; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 3; - if (!unsetenv ("") || errno != EINVAL) return 4; - entry2[0] = 'b'; - environ = env; - if (!getenv ("a")) return 5; - entry2[0] = 'a'; - unsetenv ("a"); - if (getenv ("a")) return 6; - ]])], - [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_unsetenv_works="guessing no" ;; - esac - ])]) - case "$gl_cv_func_unsetenv_works" in - *yes) ;; - *) - REPLACE_UNSETENV=1 - ;; - esac - fi -]) - -# Prerequisites of lib/setenv.c. -AC_DEFUN([gl_PREREQ_SETENV], -[ - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_REQUIRE([gl_ENVIRON]) - AC_CHECK_HEADERS_ONCE([unistd.h]) - AC_CHECK_HEADERS([search.h]) - AC_CHECK_FUNCS([tsearch]) -]) - -# Prerequisites of lib/unsetenv.c. -AC_DEFUN([gl_PREREQ_UNSETENV], -[ - AC_REQUIRE([gl_ENVIRON]) - AC_CHECK_HEADERS_ONCE([unistd.h]) -]) diff --git a/gnulib/m4/setlocale.m4 b/gnulib/m4/setlocale.m4 deleted file mode 100644 index c605241..0000000 --- a/gnulib/m4/setlocale.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_SETLOCALE], -[ - AC_REQUIRE([gl_LOCALE_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) - case "$host_os" in - dnl On native Windows systems, setlocale(category,NULL) does not look at - dnl the environment variables LC_ALL, category, and LANG. - mingw*) REPLACE_SETLOCALE=1 ;; - dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL) - dnl is then still "C". - cygwin*) - case `uname -r` in - 1.5.*) REPLACE_SETLOCALE=1 ;; - esac - ;; - esac -]) - -# Prerequisites of lib/setlocale.c. -AC_DEFUN([gl_PREREQ_SETLOCALE], -[ - : -]) diff --git a/gnulib/m4/size_max.m4 b/gnulib/m4/size_max.m4 deleted file mode 100644 index 5a8162b..0000000 --- a/gnulib/m4/size_max.m4 +++ /dev/null @@ -1,79 +0,0 @@ -# size_max.m4 serial 10 -dnl Copyright (C) 2003, 2005-2006, 2008-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_DEFUN([gl_SIZE_MAX], -[ - AC_CHECK_HEADERS([stdint.h]) - dnl First test whether the system already has SIZE_MAX. - AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [ - gl_cv_size_max= - AC_EGREP_CPP([Found it], [ -#include -#if HAVE_STDINT_H -#include -#endif -#ifdef SIZE_MAX -Found it -#endif -], [gl_cv_size_max=yes]) - if test -z "$gl_cv_size_max"; then - dnl Define it ourselves. Here we assume that the type 'size_t' is not wider - dnl than the type 'unsigned long'. Try hard to find a definition that can - dnl be used in a preprocessor #if, i.e. doesn't contain a cast. - AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], - [#include -#include ], [size_t_bits_minus_1=]) - AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], - [#include ], [fits_in_uint=]) - if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then - if test $fits_in_uint = 1; then - dnl Even though SIZE_MAX fits in an unsigned int, it must be of type - dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'. - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - extern size_t foo; - extern unsigned long foo; - ]], - [[]])], - [fits_in_uint=0]) - fi - dnl We cannot use 'expr' to simplify this expression, because 'expr' - dnl works only with 'long' integers in the host environment, while we - dnl might be cross-compiling from a 32-bit platform to a 64-bit platform. - if test $fits_in_uint = 1; then - gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" - else - gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" - fi - else - dnl Shouldn't happen, but who knows... - gl_cv_size_max='((size_t)~(size_t)0)' - fi - fi - ]) - if test "$gl_cv_size_max" != yes; then - AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max], - [Define as the maximum value of type 'size_t', if the system doesn't define it.]) - fi - dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after - dnl . Remember that the #undef in AH_VERBATIM gets replaced with - dnl #define by AC_DEFINE_UNQUOTED. - AH_VERBATIM([SIZE_MAX], -[/* Define as the maximum value of type 'size_t', if the system doesn't define - it. */ -#ifndef SIZE_MAX -# undef SIZE_MAX -#endif]) -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) diff --git a/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4 deleted file mode 100644 index 209d64c..0000000 --- a/gnulib/m4/ssize_t.m4 +++ /dev/null @@ -1,23 +0,0 @@ -# ssize_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2001-2003, 2006, 2010-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. -dnl Test whether ssize_t is defined. - -AC_DEFUN([gt_TYPE_SSIZE_T], -[ - AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[int x = sizeof (ssize_t *) + sizeof (ssize_t); - return !x;]])], - [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])]) - if test $gt_cv_ssize_t = no; then - AC_DEFINE([ssize_t], [int], - [Define as a signed type of the same size as size_t.]) - fi -]) diff --git a/gnulib/m4/stat.m4 b/gnulib/m4/stat.m4 deleted file mode 100644 index a8b79f5..0000000 --- a/gnulib/m4/stat.m4 +++ /dev/null @@ -1,75 +0,0 @@ -# serial 10 - -# 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, -# with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STAT], -[ - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - AC_CHECK_FUNCS_ONCE([lstat]) - dnl mingw is the only known platform where stat(".") and stat("./") differ - AC_CACHE_CHECK([whether stat handles trailing slashes on directories], - [gl_cv_func_stat_dir_slash], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])], - [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no], - [case $host_os in - mingw*) gl_cv_func_stat_dir_slash="guessing no";; - *) gl_cv_func_stat_dir_slash="guessing yes";; - esac])]) - dnl AIX 7.1, Solaris 9, mingw64 mistakenly succeed on stat("file/"). - dnl (For mingw, this is due to a broken stat() override in libmingwex.a.) - dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/"). - AC_CACHE_CHECK([whether stat handles trailing slashes on files], - [gl_cv_func_stat_file_slash], - [touch conftest.tmp - # Assume that if we have lstat, we can also check symlinks. - if test $ac_cv_func_lstat = yes; then - ln -s conftest.tmp conftest.lnk - fi - AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include -]], [[int result = 0; - struct stat st; - if (!stat ("conftest.tmp/", &st)) - result |= 1; -#if HAVE_LSTAT - if (!stat ("conftest.lnk/", &st)) - result |= 2; -#endif - return result; - ]])], - [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_stat_file_slash="guessing no" ;; - esac - ]) - rm -f conftest.tmp conftest.lnk]) - case $gl_cv_func_stat_dir_slash in - *no) REPLACE_STAT=1 - AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs - help when passed a directory name with a trailing slash]);; - esac - case $gl_cv_func_stat_file_slash in - *no) REPLACE_STAT=1 - AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs - help when passed a file name with a trailing slash]);; - esac -]) - -# Prerequisites of lib/stat.c. -AC_DEFUN([gl_PREREQ_STAT], -[ - AC_REQUIRE([AC_C_INLINE]) - : -]) diff --git a/gnulib/m4/stdbool.m4 b/gnulib/m4/stdbool.m4 deleted file mode 100644 index eabfa64..0000000 --- a/gnulib/m4/stdbool.m4 +++ /dev/null @@ -1,100 +0,0 @@ -# Check for stdbool.h that conforms to C99. - -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 5 - -# Prepare for substituting if it is not supported. - -AC_DEFUN([AM_STDBOOL_H], -[ - AC_REQUIRE([AC_CHECK_HEADER_STDBOOL]) - - # Define two additional variables used in the Makefile substitution. - - if test "$ac_cv_header_stdbool_h" = yes; then - STDBOOL_H='' - else - STDBOOL_H='stdbool.h' - fi - AC_SUBST([STDBOOL_H]) - AM_CONDITIONAL([GL_GENERATE_STDBOOL_H], [test -n "$STDBOOL_H"]) - - if test "$ac_cv_type__Bool" = yes; then - HAVE__BOOL=1 - else - HAVE__BOOL=0 - fi - AC_SUBST([HAVE__BOOL]) -]) - -# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future. -AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H]) - -# This version of the macro is needed in autoconf <= 2.68. - -AC_DEFUN([AC_CHECK_HEADER_STDBOOL], - [AC_CACHE_CHECK([for stdbool.h that conforms to C99], - [ac_cv_header_stdbool_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ - #include - #ifndef bool - "error: bool is not defined" - #endif - #ifndef false - "error: false is not defined" - #endif - #if false - "error: false is not 0" - #endif - #ifndef true - "error: true is not defined" - #endif - #if true != 1 - "error: true is not 1" - #endif - #ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" - #endif - - struct s { _Bool s: 1; _Bool t; } s; - - char a[true == 1 ? 1 : -1]; - char b[false == 0 ? 1 : -1]; - char c[__bool_true_false_are_defined == 1 ? 1 : -1]; - char d[(bool) 0.5 == true ? 1 : -1]; - /* See body of main program for 'e'. */ - char f[(_Bool) 0.0 == false ? 1 : -1]; - char g[true]; - char h[sizeof (_Bool)]; - char i[sizeof s.t]; - enum { j = false, k = true, l = false * true, m = true * 256 }; - /* The following fails for - HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ - _Bool n[m]; - char o[sizeof n == m * sizeof n[0] ? 1 : -1]; - char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; - /* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ - _Bool q = true; - _Bool *pq = &q; - ]], - [[ - bool e = &s; - *pq |= q; - *pq |= ! q; - /* Refer to every declared value, to avoid compiler optimizations. */ - return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l - + !m + !n + !o + !p + !q + !pq); - ]])], - [ac_cv_header_stdbool_h=yes], - [ac_cv_header_stdbool_h=no])]) - AC_CHECK_TYPES([_Bool]) -]) diff --git a/gnulib/m4/stddef_h.m4 b/gnulib/m4/stddef_h.m4 deleted file mode 100644 index cc11609..0000000 --- a/gnulib/m4/stddef_h.m4 +++ /dev/null @@ -1,47 +0,0 @@ -dnl A placeholder for POSIX 2008 , for platforms that have issues. -# 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. - -AC_DEFUN([gl_STDDEF_H], -[ - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - STDDEF_H= - if test $gt_cv_c_wchar_t = no; then - HAVE_WCHAR_T=0 - STDDEF_H=stddef.h - fi - AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions], - [gl_cv_decl_null_works], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - int test[2 * (sizeof NULL == sizeof (void *)) -1]; -]])], - [gl_cv_decl_null_works=yes], - [gl_cv_decl_null_works=no])]) - if test $gl_cv_decl_null_works = no; then - REPLACE_NULL=1 - STDDEF_H=stddef.h - fi - AC_SUBST([STDDEF_H]) - AM_CONDITIONAL([GL_GENERATE_STDDEF_H], [test -n "$STDDEF_H"]) - if test -n "$STDDEF_H"; then - gl_NEXT_HEADERS([stddef.h]) - fi -]) - -AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDDEF_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) -]) - -AC_DEFUN([gl_STDDEF_H_DEFAULTS], -[ - dnl Assume proper GNU behavior unless another module says otherwise. - REPLACE_NULL=0; AC_SUBST([REPLACE_NULL]) - HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T]) -]) diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4 deleted file mode 100644 index 28d342e..0000000 --- a/gnulib/m4/stdint.m4 +++ /dev/null @@ -1,484 +0,0 @@ -# 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. - -dnl From Paul Eggert and Bruno Haible. -dnl Test whether is supported or must be substituted. - -AC_DEFUN_ONCE([gl_STDINT_H], -[ - AC_PREREQ([2.59])dnl - - dnl Check for long long int and unsigned long long int. - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - if test $ac_cv_type_long_long_int = yes; then - HAVE_LONG_LONG_INT=1 - else - HAVE_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_LONG_LONG_INT]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) - if test $ac_cv_type_unsigned_long_long_int = yes; then - HAVE_UNSIGNED_LONG_LONG_INT=1 - else - HAVE_UNSIGNED_LONG_LONG_INT=0 - fi - AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT]) - - dnl Check for , in the same way as gl_WCHAR_H does. - AC_CHECK_HEADERS_ONCE([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h. - if test $ac_cv_header_inttypes_h = yes; then - HAVE_INTTYPES_H=1 - else - HAVE_INTTYPES_H=0 - fi - AC_SUBST([HAVE_INTTYPES_H]) - - dnl Check for . - dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h. - if test $ac_cv_header_sys_types_h = yes; then - HAVE_SYS_TYPES_H=1 - else - HAVE_SYS_TYPES_H=0 - fi - AC_SUBST([HAVE_SYS_TYPES_H]) - - gl_CHECK_NEXT_HEADERS([stdint.h]) - if test $ac_cv_header_stdint_h = yes; then - HAVE_STDINT_H=1 - else - HAVE_STDINT_H=0 - fi - AC_SUBST([HAVE_STDINT_H]) - - dnl Now see whether we need a substitute . - if test $ac_cv_header_stdint_h = yes; then - AC_CACHE_CHECK([whether stdint.h conforms to C99], - [gl_cv_header_working_stdint_h], - [gl_cv_header_working_stdint_h=no - AC_COMPILE_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in . */ -#if !(defined WCHAR_MIN && defined WCHAR_MAX) -#error "WCHAR_MIN, WCHAR_MAX not defined in " -#endif -] -gl_STDINT_INCLUDES -[ -#ifdef INT8_MAX -int8_t a1 = INT8_MAX; -int8_t a1min = INT8_MIN; -#endif -#ifdef INT16_MAX -int16_t a2 = INT16_MAX; -int16_t a2min = INT16_MIN; -#endif -#ifdef INT32_MAX -int32_t a3 = INT32_MAX; -int32_t a3min = INT32_MIN; -#endif -#ifdef INT64_MAX -int64_t a4 = INT64_MAX; -int64_t a4min = INT64_MIN; -#endif -#ifdef UINT8_MAX -uint8_t b1 = UINT8_MAX; -#else -typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; -#endif -#ifdef UINT16_MAX -uint16_t b2 = UINT16_MAX; -#endif -#ifdef UINT32_MAX -uint32_t b3 = UINT32_MAX; -#endif -#ifdef UINT64_MAX -uint64_t b4 = UINT64_MAX; -#endif -int_least8_t c1 = INT8_C (0x7f); -int_least8_t c1max = INT_LEAST8_MAX; -int_least8_t c1min = INT_LEAST8_MIN; -int_least16_t c2 = INT16_C (0x7fff); -int_least16_t c2max = INT_LEAST16_MAX; -int_least16_t c2min = INT_LEAST16_MIN; -int_least32_t c3 = INT32_C (0x7fffffff); -int_least32_t c3max = INT_LEAST32_MAX; -int_least32_t c3min = INT_LEAST32_MIN; -int_least64_t c4 = INT64_C (0x7fffffffffffffff); -int_least64_t c4max = INT_LEAST64_MAX; -int_least64_t c4min = INT_LEAST64_MIN; -uint_least8_t d1 = UINT8_C (0xff); -uint_least8_t d1max = UINT_LEAST8_MAX; -uint_least16_t d2 = UINT16_C (0xffff); -uint_least16_t d2max = UINT_LEAST16_MAX; -uint_least32_t d3 = UINT32_C (0xffffffff); -uint_least32_t d3max = UINT_LEAST32_MAX; -uint_least64_t d4 = UINT64_C (0xffffffffffffffff); -uint_least64_t d4max = UINT_LEAST64_MAX; -int_fast8_t e1 = INT_FAST8_MAX; -int_fast8_t e1min = INT_FAST8_MIN; -int_fast16_t e2 = INT_FAST16_MAX; -int_fast16_t e2min = INT_FAST16_MIN; -int_fast32_t e3 = INT_FAST32_MAX; -int_fast32_t e3min = INT_FAST32_MIN; -int_fast64_t e4 = INT_FAST64_MAX; -int_fast64_t e4min = INT_FAST64_MIN; -uint_fast8_t f1 = UINT_FAST8_MAX; -uint_fast16_t f2 = UINT_FAST16_MAX; -uint_fast32_t f3 = UINT_FAST32_MAX; -uint_fast64_t f4 = UINT_FAST64_MAX; -#ifdef INTPTR_MAX -intptr_t g = INTPTR_MAX; -intptr_t gmin = INTPTR_MIN; -#endif -#ifdef UINTPTR_MAX -uintptr_t h = UINTPTR_MAX; -#endif -intmax_t i = INTMAX_MAX; -uintmax_t j = UINTMAX_MAX; - -#include /* for CHAR_BIT */ -#define TYPE_MINIMUM(t) \ - ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) ((t) 0 < (t) -1 \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) -struct s { - int check_PTRDIFF: - PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) - && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) - ? 1 : -1; - /* Detect bug in FreeBSD 6.0 / ia64. */ - int check_SIG_ATOMIC: - SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) - && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) - ? 1 : -1; - int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; - int check_WCHAR: - WCHAR_MIN == TYPE_MINIMUM (wchar_t) - && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) - ? 1 : -1; - /* Detect bug in mingw. */ - int check_WINT: - WINT_MIN == TYPE_MINIMUM (wint_t) - && WINT_MAX == TYPE_MAXIMUM (wint_t) - ? 1 : -1; - - /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ - int check_UINT8_C: - (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; - int check_UINT16_C: - (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; - - /* Detect bugs in OpenBSD 3.9 stdint.h. */ -#ifdef UINT8_MAX - int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; -#endif -#ifdef UINT16_MAX - int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; -#endif -#ifdef UINT32_MAX - int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; -#endif -#ifdef UINT64_MAX - int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; -#endif - int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; - int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; - int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; - int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; - int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; - int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; - int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; - int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; - int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; - int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; - int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; -}; - ]])], - [dnl Determine whether the various *_MIN, *_MAX macros are usable - dnl in preprocessor expression. We could do it by compiling a test - dnl program for each of these macros. It is faster to run a program - dnl that inspects the macro expansion. - dnl This detects a bug on HP-UX 11.23/ia64. - AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[ -#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ -#include -] -gl_STDINT_INCLUDES -[ -#include -#include -#define MVAL(macro) MVAL1(macro) -#define MVAL1(expression) #expression -static const char *macro_values[] = - { -#ifdef INT8_MAX - MVAL (INT8_MAX), -#endif -#ifdef INT16_MAX - MVAL (INT16_MAX), -#endif -#ifdef INT32_MAX - MVAL (INT32_MAX), -#endif -#ifdef INT64_MAX - MVAL (INT64_MAX), -#endif -#ifdef UINT8_MAX - MVAL (UINT8_MAX), -#endif -#ifdef UINT16_MAX - MVAL (UINT16_MAX), -#endif -#ifdef UINT32_MAX - MVAL (UINT32_MAX), -#endif -#ifdef UINT64_MAX - MVAL (UINT64_MAX), -#endif - NULL - }; -]], [[ - const char **mv; - for (mv = macro_values; *mv != NULL; mv++) - { - const char *value = *mv; - /* Test whether it looks like a cast expression. */ - if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 - || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 - || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 - || strncmp (value, "((int)"/*)*/, 6) == 0 - || strncmp (value, "((signed short)"/*)*/, 15) == 0 - || strncmp (value, "((signed char)"/*)*/, 14) == 0) - return mv - macro_values + 1; - } - return 0; -]])], - [gl_cv_header_working_stdint_h=yes], - [], - [dnl When cross-compiling, assume it works. - gl_cv_header_working_stdint_h=yes - ]) - ]) - ]) - fi - if test "$gl_cv_header_working_stdint_h" = yes; then - STDINT_H= - else - dnl Check for , and for - dnl (used in Linux libc4 >= 4.6.7 and libc5). - AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h]) - if test $ac_cv_header_sys_inttypes_h = yes; then - HAVE_SYS_INTTYPES_H=1 - else - HAVE_SYS_INTTYPES_H=0 - fi - AC_SUBST([HAVE_SYS_INTTYPES_H]) - if test $ac_cv_header_sys_bitypes_h = yes; then - HAVE_SYS_BITYPES_H=1 - else - HAVE_SYS_BITYPES_H=0 - fi - AC_SUBST([HAVE_SYS_BITYPES_H]) - - gl_STDINT_TYPE_PROPERTIES - STDINT_H=stdint.h - fi - AC_SUBST([STDINT_H]) - AM_CONDITIONAL([GL_GENERATE_STDINT_H], [test -n "$STDINT_H"]) -]) - -dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES) -dnl Determine the size of each of the given types in bits. -AC_DEFUN([gl_STDINT_BITSIZEOF], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to the number of bits in type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}], - [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], - [$2 -#include ], [result=unknown]) - eval gl_cv_bitsizeof_${gltype}=\$result - ]) - eval result=\$gl_cv_bitsizeof_${gltype} - if test $result = unknown; then - dnl Use a nonempty default, because some compilers, such as IRIX 5 cc, - dnl do a syntax check even on unused #if conditions and give an error - dnl on valid C code like this: - dnl #if 0 - dnl # if > 32 - dnl # endif - dnl #endif - result=0 - fi - GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result]) - eval BITSIZEOF_${GLTYPE}=\$result - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([BITSIZEOF_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES) -dnl Determine the signedness of each of the given types. -dnl Define HAVE_SIGNED_TYPE if type is signed. -AC_DEFUN([gl_CHECK_TYPES_SIGNED], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]), - [Define to 1 if ']gltype[' is a signed integer type.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])], - result=yes, result=no) - eval gl_cv_type_${gltype}_signed=\$result - ]) - eval result=\$gl_cv_type_${gltype}_signed - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - if test "$result" = yes; then - AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1]) - eval HAVE_SIGNED_${GLTYPE}=1 - else - eval HAVE_SIGNED_${GLTYPE}=0 - fi - done - m4_foreach_w([gltype], [$1], - [AC_SUBST([HAVE_SIGNED_]m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))]) -]) - -dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES) -dnl Determine the suffix to use for integer constants of the given types. -dnl Define t_SUFFIX for each such type. -AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], -[ - dnl Use a shell loop, to avoid bloating configure, and - dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into - dnl config.h.in, - dnl - extra AC_SUBST calls, so that the right substitutions are made. - m4_foreach_w([gltype], [$1], - [AH_TEMPLATE(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX], - [Define to l, ll, u, ul, ull, etc., as suitable for - constants of type ']gltype['.])]) - for gltype in $1 ; do - AC_CACHE_CHECK([for $gltype integer literal suffix], - [gl_cv_type_${gltype}_suffix], - [eval gl_cv_type_${gltype}_suffix=no - eval result=\$gl_cv_type_${gltype}_signed - if test "$result" = yes; then - glsufu= - else - glsufu=u - fi - for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do - case $glsuf in - '') gltype1='int';; - l) gltype1='long int';; - ll) gltype1='long long int';; - i64) gltype1='__int64';; - u) gltype1='unsigned int';; - ul) gltype1='unsigned long int';; - ull) gltype1='unsigned long long int';; - ui64)gltype1='unsigned __int64';; - esac - AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM([$2[ - extern $gltype foo; - extern $gltype1 foo;]])], - [eval gl_cv_type_${gltype}_suffix=\$glsuf]) - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" != no && break - done]) - GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` - eval result=\$gl_cv_type_${gltype}_suffix - test "$result" = no && result= - eval ${GLTYPE}_SUFFIX=\$result - AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result]) - done - m4_foreach_w([gltype], [$1], - [AC_SUBST(m4_translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])]) -]) - -dnl gl_STDINT_INCLUDES -AC_DEFUN([gl_STDINT_INCLUDES], -[[ - /* BSD/OS 4.0.1 has a bug: , and must be - included before . */ - #include - #include - #if HAVE_WCHAR_H - # include - # include - # include - #endif -]]) - -dnl gl_STDINT_TYPE_PROPERTIES -dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t -dnl of interest to stdint.in.h. -AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], -[ - AC_REQUIRE([gl_MULTIARCH]) - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_STDINT_BITSIZEOF([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - gl_cv_type_ptrdiff_t_signed=yes - gl_cv_type_size_t_signed=no - if test $APPLE_UNIVERSAL_BUILD = 0; then - gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], - [gl_STDINT_INCLUDES]) - fi - gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], - [gl_STDINT_INCLUDES]) - - dnl If wint_t is smaller than 'int', it cannot satisfy the ISO C 99 - dnl requirement that wint_t is "unchanged by default argument promotions". - dnl In this case gnulib's and override wint_t. - dnl Set the variable BITSIZEOF_WINT_T accordingly. - if test $BITSIZEOF_WINT_T -lt 32; then - BITSIZEOF_WINT_T=32 - fi -]) - -dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in. -dnl Remove this when we can assume autoconf >= 2.61. -m4_ifdef([AC_COMPUTE_INT], [], [ - AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])]) -]) - -# Hey Emacs! -# Local Variables: -# indent-tabs-mode: nil -# End: diff --git a/gnulib/m4/stdint_h.m4 b/gnulib/m4/stdint_h.m4 deleted file mode 100644 index 581de96..0000000 --- a/gnulib/m4/stdint_h.m4 +++ /dev/null @@ -1,27 +0,0 @@ -# stdint_h.m4 serial 9 -dnl Copyright (C) 1997-2004, 2006, 2008-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 Paul Eggert. - -# Define HAVE_STDINT_H_WITH_UINTMAX if exists, -# doesn't clash with , and declares uintmax_t. - -AC_DEFUN([gl_AC_HEADER_STDINT_H], -[ - AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - #include ]], - [[uintmax_t i = (uintmax_t) -1; return !i;]])], - [gl_cv_header_stdint_h=yes], - [gl_cv_header_stdint_h=no])]) - if test $gl_cv_header_stdint_h = yes; then - AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], - [Define if exists, doesn't clash with , - and declares uintmax_t. ]) - fi -]) diff --git a/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4 deleted file mode 100644 index 5298dd6..0000000 --- a/gnulib/m4/stdio_h.m4 +++ /dev/null @@ -1,195 +0,0 @@ -# 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. - -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 - GNULIB_PRINTF=1 - GNULIB_VFPRINTF=1 - GNULIB_VPRINTF=1 - GNULIB_FPUTC=1 - GNULIB_PUTC=1 - GNULIB_PUTCHAR=1 - GNULIB_FPUTS=1 - GNULIB_PUTS=1 - GNULIB_FWRITE=1 - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_SIGPIPE or - dnl GNULIB_SIGPIPE redundant. - m4_ifdef([gl_SIGNAL_SIGPIPE], [ - gl_SIGNAL_SIGPIPE - if test $gl_cv_header_signal_h_SIGPIPE != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - dnl This ifdef is necessary to avoid an error "missing file lib/stdio-write.c" - dnl "expected source file, required through AC_LIBSOURCES, not found". It is - dnl also an optimization, to avoid performing a configure check whose result - dnl is not used. But it does not make the test of GNULIB_STDIO_H_NONBLOCKING - dnl or GNULIB_NONBLOCKING redundant. - m4_ifdef([gl_NONBLOCKING_IO], [ - gl_NONBLOCKING_IO - if test $gl_cv_have_nonblocking != yes; then - REPLACE_STDIO_WRITE_FUNCS=1 - AC_LIBOBJ([stdio-write]) - fi - ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by both C89 and C11. - gl_WARN_ON_USE_PREPARE([[#include - ]], [dprintf fpurge fseeko ftello getdelim getline gets pclose popen - renameat snprintf tmpfile vdprintf vsnprintf]) -]) - -AC_DEFUN([gl_STDIO_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDIO_H_DEFAULTS], -[ - GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF]) - GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE]) - GNULIB_FDOPEN=0; AC_SUBST([GNULIB_FDOPEN]) - GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH]) - GNULIB_FGETC=0; AC_SUBST([GNULIB_FGETC]) - GNULIB_FGETS=0; AC_SUBST([GNULIB_FGETS]) - GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN]) - GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF]) - GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX]) - GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE]) - GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC]) - GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS]) - GNULIB_FREAD=0; AC_SUBST([GNULIB_FREAD]) - GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN]) - GNULIB_FSCANF=0; AC_SUBST([GNULIB_FSCANF]) - GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK]) - GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO]) - GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL]) - GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO]) - GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE]) - GNULIB_GETC=0; AC_SUBST([GNULIB_GETC]) - GNULIB_GETCHAR=0; AC_SUBST([GNULIB_GETCHAR]) - GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM]) - GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE]) - GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF]) - GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX]) - GNULIB_PCLOSE=0; AC_SUBST([GNULIB_PCLOSE]) - GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR]) - GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN]) - GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF]) - GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX]) - GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC]) - GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR]) - GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS]) - GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE]) - GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME]) - GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT]) - GNULIB_SCANF=0; AC_SUBST([GNULIB_SCANF]) - GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF]) - GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX]) - GNULIB_STDIO_H_NONBLOCKING=0; AC_SUBST([GNULIB_STDIO_H_NONBLOCKING]) - GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE]) - GNULIB_TMPFILE=0; AC_SUBST([GNULIB_TMPFILE]) - GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF]) - GNULIB_VFSCANF=0; AC_SUBST([GNULIB_VFSCANF]) - GNULIB_VSCANF=0; AC_SUBST([GNULIB_VSCANF]) - GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF]) - GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF]) - GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX]) - GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF]) - GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX]) - GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF]) - GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE]) - HAVE_DECL_FSEEKO=1; AC_SUBST([HAVE_DECL_FSEEKO]) - HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO]) - HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM]) - HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE]) - HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF]) - HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF]) - HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF]) - HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF]) - HAVE_FSEEKO=1; AC_SUBST([HAVE_FSEEKO]) - HAVE_FTELLO=1; AC_SUBST([HAVE_FTELLO]) - HAVE_PCLOSE=1; AC_SUBST([HAVE_PCLOSE]) - HAVE_POPEN=1; AC_SUBST([HAVE_POPEN]) - HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT]) - HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF]) - HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF]) - REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF]) - REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE]) - REPLACE_FDOPEN=0; AC_SUBST([REPLACE_FDOPEN]) - REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH]) - REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN]) - REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF]) - REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE]) - REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN]) - REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK]) - REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO]) - REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL]) - REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO]) - REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM]) - REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE]) - REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF]) - REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR]) - REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN]) - REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF]) - REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE]) - REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME]) - REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT]) - REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF]) - REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF]) - REPLACE_STDIO_READ_FUNCS=0; AC_SUBST([REPLACE_STDIO_READ_FUNCS]) - REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS]) - REPLACE_TMPFILE=0; AC_SUBST([REPLACE_TMPFILE]) - REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF]) - REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF]) - REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF]) - REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF]) - REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF]) - REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF]) -]) diff --git a/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4 deleted file mode 100644 index ab43728..0000000 --- a/gnulib/m4/stdlib_h.m4 +++ /dev/null @@ -1,114 +0,0 @@ -# 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. - -AC_DEFUN([gl_STDLIB_H], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_NEXT_HEADERS([stdlib.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include -#if HAVE_SYS_LOADAVG_H -# include -#endif -#if HAVE_RANDOM_H -# include -#endif - ]], [_Exit atoll canonicalize_file_name getloadavg getsubopt grantpt - initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps - posix_openpt ptsname ptsname_r random random_r realpath rpmatch - setenv setstate setstate_r srandom srandom_r - strtod strtoll strtoull unlockpt unsetenv]) -]) - -AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_STDLIB_H_DEFAULTS], -[ - GNULIB__EXIT=0; AC_SUBST([GNULIB__EXIT]) - GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL]) - GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX]) - GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME]) - GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG]) - GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT]) - GNULIB_GRANTPT=0; AC_SUBST([GNULIB_GRANTPT]) - GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX]) - GNULIB_MBTOWC=0; AC_SUBST([GNULIB_MBTOWC]) - GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP]) - GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP]) - GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS]) - GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP]) - GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS]) - GNULIB_POSIX_OPENPT=0; AC_SUBST([GNULIB_POSIX_OPENPT]) - GNULIB_PTSNAME=0; AC_SUBST([GNULIB_PTSNAME]) - GNULIB_PTSNAME_R=0; AC_SUBST([GNULIB_PTSNAME_R]) - GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV]) - GNULIB_RANDOM=0; AC_SUBST([GNULIB_RANDOM]) - GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R]) - GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX]) - GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH]) - GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH]) - GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV]) - GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD]) - GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL]) - GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL]) - GNULIB_SYSTEM_POSIX=0; AC_SUBST([GNULIB_SYSTEM_POSIX]) - GNULIB_UNLOCKPT=0; AC_SUBST([GNULIB_UNLOCKPT]) - GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV]) - GNULIB_WCTOMB=0; AC_SUBST([GNULIB_WCTOMB]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE__EXIT=1; AC_SUBST([HAVE__EXIT]) - HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL]) - HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME]) - HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG]) - HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT]) - HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT]) - HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP]) - HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP]) - HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS]) - HAVE_MKSTEMP=1; AC_SUBST([HAVE_MKSTEMP]) - HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS]) - HAVE_POSIX_OPENPT=1; AC_SUBST([HAVE_POSIX_OPENPT]) - HAVE_PTSNAME=1; AC_SUBST([HAVE_PTSNAME]) - HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R]) - HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM]) - HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H]) - HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R]) - HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH]) - HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH]) - HAVE_SETENV=1; AC_SUBST([HAVE_SETENV]) - HAVE_DECL_SETENV=1; AC_SUBST([HAVE_DECL_SETENV]) - HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD]) - HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL]) - HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL]) - HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA]) - HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H]) - HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT]) - HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV]) - REPLACE_CALLOC=0; AC_SUBST([REPLACE_CALLOC]) - REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME]) - REPLACE_MALLOC=0; AC_SUBST([REPLACE_MALLOC]) - REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC]) - REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP]) - REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R]) - REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV]) - REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R]) - REPLACE_REALLOC=0; AC_SUBST([REPLACE_REALLOC]) - REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH]) - REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV]) - REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD]) - REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV]) - REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB]) -]) diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4 deleted file mode 100644 index 8e95457..0000000 --- a/gnulib/m4/stpcpy.m4 +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_STPCPY], -[ - dnl Persuade glibc to declare stpcpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'. - AC_REQUIRE([AC_C_RESTRICT]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_FUNCS([stpcpy]) - if test $ac_cv_func_stpcpy = no; then - HAVE_STPCPY=0 - fi -]) - -# Prerequisites of lib/stpcpy.c. -AC_DEFUN([gl_PREREQ_STPCPY], [ - : -]) diff --git a/gnulib/m4/stpncpy.m4 b/gnulib/m4/stpncpy.m4 deleted file mode 100644 index 90ae53b..0000000 --- a/gnulib/m4/stpncpy.m4 +++ /dev/null @@ -1,97 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STPNCPY], -[ - dnl Persuade glibc to declare stpncpy(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - dnl The stpncpy() declaration in lib/string.in.h uses 'restrict'. - AC_REQUIRE([AC_C_RESTRICT]) - - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - - dnl Both glibc and AIX (4.3.3, 5.1) have an stpncpy() function - dnl declared in . Its side effects are the same as those - dnl of strncpy(): - dnl stpncpy (dest, src, n) - dnl overwrites dest[0..n-1], min(strlen(src),n) bytes coming from src, - dnl and the remaining bytes being NULs. However, the return value is - dnl in glibc: dest + min(strlen(src),n) - dnl in AIX: dest + max(0,n-1) - dnl Only the glibc return value is useful in practice. - - AC_CHECK_DECLS_ONCE([stpncpy]) - AC_CHECK_FUNCS_ONCE([stpncpy]) - if test $ac_cv_func_stpncpy = yes; then - AC_CACHE_CHECK([for working stpncpy], [gl_cv_func_stpncpy], [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include /* for strcpy */ -/* The stpncpy prototype is missing in on AIX 4. */ -#if !HAVE_DECL_STPNCPY -extern -# ifdef __cplusplus -"C" -# endif -char *stpncpy (char *dest, const char *src, size_t n); -#endif -int main () -{ - int result = 0; - const char *src = "Hello"; - char dest[10]; - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+1 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 2) != dest + 2) - result |= 1; - } - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+4 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 5) != dest + 5) - result |= 2; - } - /* AIX 4.3.3 and AIX 5.1 stpncpy() returns dest+6 here. */ - { - strcpy (dest, "\377\377\377\377\377\377"); - if (stpncpy (dest, src, 7) != dest + 5) - result |= 4; - } - return result; -} -]])], - [gl_cv_func_stpncpy=yes], - [gl_cv_func_stpncpy=no], - [AC_EGREP_CPP([Thanks for using GNU], [ -#include -#ifdef __GNU_LIBRARY__ - Thanks for using GNU -#endif -], [gl_cv_func_stpncpy="guessing yes"], [gl_cv_func_stpncpy="guessing no"]) - ]) - ]) - 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 - fi -]) - -# Prerequisites of lib/stpncpy.c. -AC_DEFUN([gl_PREREQ_STPNCPY], [ - : -]) diff --git a/gnulib/m4/strchrnul.m4 b/gnulib/m4/strchrnul.m4 deleted file mode 100644 index d3dfb9a..0000000 --- a/gnulib/m4/strchrnul.m4 +++ /dev/null @@ -1,50 +0,0 @@ -# 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 deleted file mode 100644 index 5677e09..0000000 --- a/gnulib/m4/string_h.m4 +++ /dev/null @@ -1,120 +0,0 @@ -# Configure a GNU-like replacement for . - -# 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 21 - -# Written by Paul Eggert. - -AC_DEFUN([gl_HEADER_STRING_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_STRING_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_NEXT_HEADERS([string.h]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use, and which is not - dnl guaranteed by C89. - gl_WARN_ON_USE_PREPARE([[#include - ]], - [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul - strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r - strerror_r strsignal strverscmp]) -]) - -AC_DEFUN([gl_STRING_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], -[ - GNULIB_FFSL=0; AC_SUBST([GNULIB_FFSL]) - GNULIB_FFSLL=0; AC_SUBST([GNULIB_FFSLL]) - GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR]) - GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM]) - GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY]) - GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR]) - GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR]) - GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY]) - GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY]) - GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL]) - GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP]) - GNULIB_STRNCAT=0; AC_SUBST([GNULIB_STRNCAT]) - GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP]) - GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN]) - GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK]) - GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP]) - GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR]) - GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR]) - GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R]) - GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN]) - GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN]) - GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR]) - GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR]) - GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR]) - GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP]) - GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP]) - GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP]) - GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR]) - GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN]) - GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK]) - GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN]) - GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP]) - GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R]) - GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR]) - GNULIB_STRERROR_R=0; AC_SUBST([GNULIB_STRERROR_R]) - GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL]) - GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP]) - HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FFSL=1; AC_SUBST([HAVE_FFSL]) - HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL]) - HAVE_MEMCHR=1; AC_SUBST([HAVE_MEMCHR]) - HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM]) - HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY]) - HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR]) - HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR]) - HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY]) - HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY]) - HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL]) - HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP]) - HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP]) - HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN]) - HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK]) - HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP]) - HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR]) - HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R]) - HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R]) - HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL]) - HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP]) - REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR]) - REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM]) - REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY]) - REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP]) - REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR]) - REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR]) - REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL]) - REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR]) - REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R]) - REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT]) - REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP]) - REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN]) - REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL]) - REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R]) - UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R]) -]) diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4 deleted file mode 100644 index cef6889..0000000 --- a/gnulib/m4/strndup.m4 +++ /dev/null @@ -1,55 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_STRNDUP], -[ - dnl Persuade glibc to declare strndup(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_CHECK_DECLS_ONCE([strndup]) - AC_CHECK_FUNCS_ONCE([strndup]) - if test $ac_cv_have_decl_strndup = no; then - HAVE_DECL_STRNDUP=0 - fi - - if test $ac_cv_func_strndup = yes; then - HAVE_STRNDUP=1 - # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. - AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works], - [AC_RUN_IFELSE([ - AC_LANG_PROGRAM([[#include - #include ]], [[ -#if !HAVE_DECL_STRNDUP - extern - #ifdef __cplusplus - "C" - #endif - char *strndup (const char *, size_t); -#endif - char *s; - s = strndup ("some longer string", 15); - free (s); - s = strndup ("shorter string", 13); - return s[13] != '\0';]])], - [gl_cv_func_strndup_works=yes], - [gl_cv_func_strndup_works=no], - [ -changequote(,)dnl - case $host_os in - aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; - *) gl_cv_func_strndup_works="guessing yes";; - esac -changequote([,])dnl - ])]) - case $gl_cv_func_strndup_works in - *no) REPLACE_STRNDUP=1 ;; - esac - else - HAVE_STRNDUP=0 - fi -]) diff --git a/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4 deleted file mode 100644 index d97e307..0000000 --- a/gnulib/m4/strnlen.m4 +++ /dev/null @@ -1,30 +0,0 @@ -# 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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_STRNLEN], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - - dnl Persuade glibc to declare strnlen(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) - - AC_CHECK_DECLS_ONCE([strnlen]) - if test $ac_cv_have_decl_strnlen = no; then - HAVE_DECL_STRNLEN=0 - else - m4_pushdef([AC_LIBOBJ], [:]) - dnl Note: AC_FUNC_STRNLEN does AC_LIBOBJ([strnlen]). - AC_FUNC_STRNLEN - m4_popdef([AC_LIBOBJ]) - if test $ac_cv_func_strnlen_working = no; then - REPLACE_STRNLEN=1 - fi - fi -]) - -# Prerequisites of lib/strnlen.c. -AC_DEFUN([gl_PREREQ_STRNLEN], [:]) diff --git a/gnulib/m4/strstr.m4 b/gnulib/m4/strstr.m4 deleted file mode 100644 index b8f94bf..0000000 --- a/gnulib/m4/strstr.m4 +++ /dev/null @@ -1,130 +0,0 @@ -# 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. - -dnl Check that strstr works. -AC_DEFUN([gl_FUNC_STRSTR_SIMPLE], -[ - AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS]) - AC_REQUIRE([gl_FUNC_MEMCHR]) - if test "$gl_cv_func_memchr_works" != yes; then - REPLACE_STRSTR=1 - else - dnl Detect http://sourceware.org/bugzilla/show_bug.cgi?id=12092. - AC_CACHE_CHECK([whether strstr works], - [gl_cv_func_strstr_works_always], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for strstr */ -#define P "_EF_BF_BD" -#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P -#define NEEDLE P P P P P -]], [[return !!strstr (HAYSTACK, NEEDLE); - ]])], - [gl_cv_func_strstr_works_always=yes], - [gl_cv_func_strstr_works_always=no], - [dnl glibc 2.12 and cygwin 1.7.7 have a known bug. uClibc is not - dnl affected, since it uses different source code for strstr than - dnl glibc. - dnl Assume that it works on all other platforms, even if it is not - dnl linear. - AC_EGREP_CPP([Lucky user], - [ -#ifdef __GNU_LIBRARY__ - #include - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - || defined __UCLIBC__ - Lucky user - #endif -#elif defined __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#else - Lucky user -#endif - ], - [gl_cv_func_strstr_works_always="guessing yes"], - [gl_cv_func_strstr_works_always="guessing no"]) - ]) - ]) - case "$gl_cv_func_strstr_works_always" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac - fi -]) # gl_FUNC_STRSTR_SIMPLE - -dnl Additionally, check that strstr is efficient. -AC_DEFUN([gl_FUNC_STRSTR], -[ - AC_REQUIRE([gl_FUNC_STRSTR_SIMPLE]) - if test $REPLACE_STRSTR = 0; then - AC_CACHE_CHECK([whether strstr works in linear time], - [gl_cv_func_strstr_linear], - [AC_RUN_IFELSE([AC_LANG_PROGRAM([[ -#include /* for signal */ -#include /* for strstr */ -#include /* for malloc */ -#include /* for alarm */ -static void quit (int sig) { exit (sig + 128); } -]], [[ - int result = 0; - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - /* Failure to compile this test due to missing alarm is okay, - since all such platforms (mingw) also have quadratic strstr. */ - signal (SIGALRM, quit); - alarm (5); - /* Check for quadratic performance. */ - if (haystack && needle) - { - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = 0; - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = 0; - if (!strstr (haystack, needle)) - result |= 1; - } - return result; - ]])], - [gl_cv_func_strstr_linear=yes], [gl_cv_func_strstr_linear=no], - [dnl Only glibc > 2.12 on processors without SSE 4.2 instructions and - dnl cygwin > 1.7.7 are known to have a bug-free strstr that works in - dnl linear time. - AC_EGREP_CPP([Lucky user], - [ -#include -#ifdef __GNU_LIBRARY__ - #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ - && !(defined __i386__ || defined __x86_64__) \ - && !defined __UCLIBC__ - Lucky user - #endif -#endif -#ifdef __CYGWIN__ - #include - #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) - Lucky user - #endif -#endif - ], - [gl_cv_func_strstr_linear="guessing yes"], - [gl_cv_func_strstr_linear="guessing no"]) - ]) - ]) - case "$gl_cv_func_strstr_linear" in - *yes) ;; - *) - REPLACE_STRSTR=1 - ;; - esac - fi -]) # gl_FUNC_STRSTR diff --git a/gnulib/m4/symlink.m4 b/gnulib/m4/symlink.m4 deleted file mode 100644 index cfd90ec..0000000 --- a/gnulib/m4/symlink.m4 +++ /dev/null @@ -1,53 +0,0 @@ -# serial 6 -# See if we need to provide symlink replacement. - -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. - -# Written by Eric Blake. - -AC_DEFUN([gl_FUNC_SYMLINK], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CHECK_FUNCS_ONCE([symlink]) - dnl The best we can do on mingw is provide a dummy that always fails, so - dnl that compilation can proceed with fewer ifdefs. On FreeBSD 7.2, AIX 7.1, - dnl and Solaris 9, we want to fix a bug with trailing slash handling. - if test $ac_cv_func_symlink = no; then - HAVE_SYMLINK=0 - else - AC_CACHE_CHECK([whether symlink handles trailing slash correctly], - [gl_cv_func_symlink_works], - [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[int result = 0; - if (!symlink ("a", "conftest.link/")) - result |= 1; - if (symlink ("conftest.f", "conftest.lnk2")) - result |= 2; - else if (!symlink ("a", "conftest.lnk2/")) - result |= 4; - return result; - ]])], - [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no], - [case "$host_os" in - # Guess yes on glibc systems. - *-gnu*) gl_cv_func_symlink_works="guessing yes" ;; - # If we don't know, assume the worst. - *) gl_cv_func_symlink_works="guessing no" ;; - esac - ]) - rm -f conftest.f conftest.link conftest.lnk2]) - case "$gl_cv_func_symlink_works" in - *yes) ;; - *) - REPLACE_SYMLINK=1 - ;; - esac - fi -]) diff --git a/gnulib/m4/sys_socket_h.m4 b/gnulib/m4/sys_socket_h.m4 deleted file mode 100644 index 8d4e7e1..0000000 --- a/gnulib/m4/sys_socket_h.m4 +++ /dev/null @@ -1,177 +0,0 @@ -# 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 deleted file mode 100644 index f45dee1..0000000 --- a/gnulib/m4/sys_stat_h.m4 +++ /dev/null @@ -1,99 +0,0 @@ -# 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. - -dnl From Eric Blake. -dnl Provide a GNU-like . - -AC_DEFUN([gl_HEADER_SYS_STAT_H], -[ - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - - dnl For the mkdir substitute. - AC_REQUIRE([AC_C_INLINE]) - - dnl Check for broken stat macros. - AC_REQUIRE([AC_HEADER_STAT]) - - gl_CHECK_NEXT_HEADERS([sys/stat.h]) - - dnl Ensure the type mode_t gets defined. - AC_REQUIRE([AC_TYPE_MODE_T]) - - dnl Whether to override 'struct stat'. - m4_ifdef([gl_LARGEFILE], [ - AC_REQUIRE([gl_LARGEFILE]) - ], [ - WINDOWS_64_BIT_ST_SIZE=0 - ]) - AC_SUBST([WINDOWS_64_BIT_ST_SIZE]) - if test $WINDOWS_64_BIT_ST_SIZE = 1; then - AC_DEFINE([_GL_WINDOWS_64_BIT_ST_SIZE], [1], - [Define to 1 if Gnulib overrides 'struct stat' on Windows so that - struct stat.st_size becomes 64-bit.]) - fi - - dnl Define types that are supposed to be defined in or - dnl . - AC_CHECK_TYPE([nlink_t], [], - [AC_DEFINE([nlink_t], [int], - [Define to the type of st_nlink in struct stat, or a supertype.])], - [#include - #include ]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include - ]], [fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat - mknod mknodat stat utimensat]) -]) # gl_HEADER_SYS_STAT_H - -AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], -[ - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR - GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT]) - GNULIB_FSTAT=0; AC_SUBST([GNULIB_FSTAT]) - GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT]) - GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS]) - GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD]) - GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT]) - GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT]) - GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO]) - GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT]) - GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD]) - GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT]) - GNULIB_STAT=0; AC_SUBST([GNULIB_STAT]) - GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT]) - HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT]) - HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS]) - HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD]) - HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT]) - HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT]) - HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO]) - HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT]) - HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD]) - HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT]) - HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT]) - REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT]) - REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT]) - REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS]) - REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT]) - REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR]) - REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO]) - REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD]) - REPLACE_STAT=0; AC_SUBST([REPLACE_STAT]) - REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT]) -]) diff --git a/gnulib/m4/sys_time_h.m4 b/gnulib/m4/sys_time_h.m4 deleted file mode 100644 index c4a30cd..0000000 --- a/gnulib/m4/sys_time_h.m4 +++ /dev/null @@ -1,110 +0,0 @@ -# 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 deleted file mode 100644 index f11eef2..0000000 --- a/gnulib/m4/sys_types_h.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# 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 deleted file mode 100644 index c0bba86..0000000 --- a/gnulib/m4/sys_wait_h.m4 +++ /dev/null @@ -1,36 +0,0 @@ -# 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. - -AC_DEFUN([gl_SYS_WAIT_H], -[ - AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) - - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([sys/wait.h]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[#include ]], - [waitpid]) -]) - -AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS], -[ - GNULIB_WAITPID=0; AC_SUBST([GNULIB_WAITPID]) - dnl Assume proper GNU behavior unless another module says otherwise. -]) diff --git a/gnulib/m4/tempname.m4 b/gnulib/m4/tempname.m4 deleted file mode 100644 index 20ad78b..0000000 --- a/gnulib/m4/tempname.m4 +++ /dev/null @@ -1,19 +0,0 @@ -#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 deleted file mode 100644 index cd66c3e..0000000 --- a/gnulib/m4/thread.m4 +++ /dev/null @@ -1,18 +0,0 @@ -# thread.m4 serial 2 -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_THREAD], -[ - AC_REQUIRE([gl_THREADLIB]) - AC_REQUIRE([AC_C_INLINE]) - - if test $gl_threads_api = posix; then - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBMULTITHREAD" - AC_CHECK_FUNCS([pthread_atfork]) - LIBS="$gl_save_LIBS" - fi -]) diff --git a/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4 deleted file mode 100644 index cb93391..0000000 --- a/gnulib/m4/threadlib.m4 +++ /dev/null @@ -1,371 +0,0 @@ -# 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. - -dnl From Bruno Haible. - -dnl gl_THREADLIB -dnl ------------ -dnl Tests for a multithreading library to be used. -dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO -dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the -dnl default is 'no', otherwise it is system dependent. In both cases, the user -dnl can change the choice through the options --enable-threads=choice or -dnl --disable-threads. -dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS, -dnl USE_PTH_THREADS, USE_WINDOWS_THREADS -dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use -dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with -dnl libtool). -dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for -dnl programs that really need multithread functionality. The difference -dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak -dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread". -dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for -dnl multithread-safe programs. - -AC_DEFUN([gl_THREADLIB_EARLY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) -]) - -dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_EARLY_BODY], -[ - dnl Ordering constraints: This macro modifies CPPFLAGS in a way that - dnl influences the result of the autoconf tests that test for *_unlocked - dnl declarations, on AIX 5 at least. Therefore it must come early. - AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl - AC_BEFORE([$0], [gl_ARGP])dnl - - AC_REQUIRE([AC_CANONICAL_HOST]) - dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems. - dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes - dnl AC_GNU_SOURCE. - m4_ifdef([AC_USE_SYSTEM_EXTENSIONS], - [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])], - [AC_REQUIRE([AC_GNU_SOURCE])]) - dnl Check for multithreading. - m4_ifdef([gl_THREADLIB_DEFAULT_NO], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=no])], - [m4_divert_text([DEFAULTS], [gl_use_threads_default=])]) - AC_ARG_ENABLE([threads], -AC_HELP_STRING([--enable-threads={posix|solaris|pth|windows}], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [ -AC_HELP_STRING([--disable-threads], [build without multithread safety])]), - [gl_use_threads=$enableval], - [if test -n "$gl_use_threads_default"; then - gl_use_threads="$gl_use_threads_default" - else -changequote(,)dnl - case "$host_os" in - dnl Disable multithreading by default on OSF/1, because it interferes - dnl with fork()/exec(): When msgexec is linked with -lpthread, its - dnl child process gets an endless segmentation fault inside execvp(). - dnl Disable multithreading by default on Cygwin 1.5.x, because it has - dnl bugs that lead to endless loops or crashes. See - dnl . - osf*) gl_use_threads=no ;; - cygwin*) - case `uname -r` in - 1.[0-5].*) gl_use_threads=no ;; - *) gl_use_threads=yes ;; - esac - ;; - *) gl_use_threads=yes ;; - esac -changequote([,])dnl - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # For using : - case "$host_os" in - osf*) - # On OSF/1, the compiler needs the flag -D_REENTRANT so that it - # groks . cc also understands the flag -pthread, but - # we don't use it because 1. gcc-2.95 doesn't understand -pthread, - # 2. putting a flag into CPPFLAGS that has an effect on the linker - # causes the AC_LINK_IFELSE test below to succeed unexpectedly, - # leading to wrong values of LIBTHREAD and LTLIBTHREAD. - CPPFLAGS="$CPPFLAGS -D_REENTRANT" - ;; - esac - # Some systems optimize for single-threaded programs by default, and - # need special flags to disable these optimizations. For example, the - # definition of 'errno' in . - case "$host_os" in - aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; - solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; - esac - fi -]) - -dnl The guts of gl_THREADLIB. Needs to be expanded only once. - -AC_DEFUN([gl_THREADLIB_BODY], -[ - AC_REQUIRE([gl_THREADLIB_EARLY_BODY]) - gl_threads_api=none - LIBTHREAD= - LTLIBTHREAD= - LIBMULTITHREAD= - LTLIBMULTITHREAD= - if test "$gl_use_threads" != no; then - dnl Check whether the compiler and linker support weak declarations. - AC_CACHE_CHECK([whether imported symbols can be declared weak], - [gl_cv_have_weak], - [gl_cv_have_weak=no - dnl First, test whether the compiler accepts it syntactically. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[extern void xyzzy (); -#pragma weak xyzzy]], - [[xyzzy();]])], - [gl_cv_have_weak=maybe]) - if test $gl_cv_have_weak = maybe; then - dnl Second, test whether it actually works. On Cygwin 1.7.2, with - dnl gcc 4.3, symbols declared weak always evaluate to the address 0. - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#pragma weak fputs -int main () -{ - return (fputs == NULL); -}]])], - [gl_cv_have_weak=yes], - [gl_cv_have_weak=no], - [dnl When cross-compiling, assume that only ELF platforms support - dnl weak symbols. - AC_EGREP_CPP([Extensible Linking Format], - [#ifdef __ELF__ - Extensible Linking Format - #endif - ], - [gl_cv_have_weak="guessing yes"], - [gl_cv_have_weak="guessing no"]) - ]) - fi - ]) - if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then - # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that - # it groks . It's added above, in gl_THREADLIB_EARLY_BODY. - AC_CHECK_HEADER([pthread.h], - [gl_have_pthread_h=yes], [gl_have_pthread_h=no]) - if test "$gl_have_pthread_h" = yes; then - # Other possible tests: - # -lpthreads (FSU threads, PCthreads) - # -lgthreads - gl_have_pthread= - # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist - # in libc. IRIX 6.5 has the first one in both libc and libpthread, but - # the second one only in libpthread, and lock.c needs it. - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[#include ]], - [[pthread_mutex_lock((pthread_mutex_t*)0); - pthread_mutexattr_init((pthread_mutexattr_t*)0);]])], - [gl_have_pthread=yes]) - # Test for libpthread by looking for pthread_kill. (Not pthread_self, - # since it is defined as a macro on OSF/1.) - if test -n "$gl_have_pthread"; then - # The program links fine without libpthread. But it may actually - # need to link with libpthread in order to create multiple threads. - AC_CHECK_LIB([pthread], [pthread_kill], - [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread - # On Solaris and HP-UX, most pthread functions exist also in libc. - # Therefore pthread_in_use() needs to actually try to create a - # thread: pthread_create from libc will fail, whereas - # pthread_create will actually create a thread. - case "$host_os" in - solaris* | hpux*) - AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1], - [Define if the pthread_in_use() detection is hard.]) - esac - ]) - else - # Some library is needed. Try libpthread and libc_r. - AC_CHECK_LIB([pthread], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread - LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread]) - if test -z "$gl_have_pthread"; then - # For FreeBSD 4. - AC_CHECK_LIB([c_r], [pthread_kill], - [gl_have_pthread=yes - LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r - LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r]) - fi - fi - if test -n "$gl_have_pthread"; then - gl_threads_api=posix - AC_DEFINE([USE_POSIX_THREADS], [1], - [Define if the POSIX multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_POSIX_THREADS_WEAK], [1], - [Define if references to the POSIX multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - fi - if test -z "$gl_have_pthread"; then - if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then - gl_have_solaristhread= - gl_save_LIBS="$LIBS" - LIBS="$LIBS -lthread" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [[ -#include -#include - ]], - [[thr_self();]])], - [gl_have_solaristhread=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_solaristhread"; then - gl_threads_api=solaris - LIBTHREAD=-lthread - LTLIBTHREAD=-lthread - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_SOLARIS_THREADS], [1], - [Define if the old Solaris multithreading library can be used.]) - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1], - [Define if references to the old Solaris multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - fi - fi - if test "$gl_use_threads" = pth; then - gl_save_CPPFLAGS="$CPPFLAGS" - AC_LIB_LINKFLAGS([pth]) - gl_have_pth= - gl_save_LIBS="$LIBS" - LIBS="$LIBS $LIBPTH" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [[pth_self();]])], - [gl_have_pth=yes]) - LIBS="$gl_save_LIBS" - if test -n "$gl_have_pth"; then - gl_threads_api=pth - LIBTHREAD="$LIBPTH" - LTLIBTHREAD="$LTLIBPTH" - LIBMULTITHREAD="$LIBTHREAD" - LTLIBMULTITHREAD="$LTLIBTHREAD" - AC_DEFINE([USE_PTH_THREADS], [1], - [Define if the GNU Pth multithreading library can be used.]) - if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then - if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then - AC_DEFINE([USE_PTH_THREADS_WEAK], [1], - [Define if references to the GNU Pth multithreading library should be made weak.]) - LIBTHREAD= - LTLIBTHREAD= - fi - fi - else - CPPFLAGS="$gl_save_CPPFLAGS" - fi - fi - if test -z "$gl_have_pthread"; then - case "$gl_use_threads" in - yes | windows | win32) # The 'win32' is for backward compatibility. - if { case "$host_os" in - mingw*) true;; - *) false;; - esac - }; then - gl_threads_api=windows - AC_DEFINE([USE_WINDOWS_THREADS], [1], - [Define if the native Windows multithreading API can be used.]) - fi - ;; - esac - fi - fi - AC_MSG_CHECKING([for multithread API to use]) - AC_MSG_RESULT([$gl_threads_api]) - AC_SUBST([LIBTHREAD]) - AC_SUBST([LTLIBTHREAD]) - AC_SUBST([LIBMULTITHREAD]) - AC_SUBST([LTLIBMULTITHREAD]) -]) - -AC_DEFUN([gl_THREADLIB], -[ - AC_REQUIRE([gl_THREADLIB_EARLY]) - AC_REQUIRE([gl_THREADLIB_BODY]) -]) - - -dnl gl_DISABLE_THREADS -dnl ------------------ -dnl Sets the gl_THREADLIB default so that threads are not used by default. -dnl The user can still override it at installation time, by using the -dnl configure option '--enable-threads'. - -AC_DEFUN([gl_DISABLE_THREADS], [ - m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no]) -]) - - -dnl Survey of platforms: -dnl -dnl Platform Available Compiler Supports test-lock -dnl flavours option weak result -dnl --------------- --------- --------- -------- --------- -dnl Linux 2.4/glibc posix -lpthread Y OK -dnl -dnl GNU Hurd/glibc posix -dnl -dnl FreeBSD 5.3 posix -lc_r Y -dnl posix -lkse ? Y -dnl posix -lpthread ? Y -dnl posix -lthr Y -dnl -dnl FreeBSD 5.2 posix -lc_r Y -dnl posix -lkse Y -dnl posix -lthr Y -dnl -dnl FreeBSD 4.0,4.10 posix -lc_r Y OK -dnl -dnl NetBSD 1.6 -- -dnl -dnl OpenBSD 3.4 posix -lpthread Y OK -dnl -dnl Mac OS X 10.[123] posix -lpthread Y OK -dnl -dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK -dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK -dnl -dnl HP-UX 11 posix -lpthread N (cc) OK -dnl Y (gcc) -dnl -dnl IRIX 6.5 posix -lpthread Y 0.5 -dnl -dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK -dnl -dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK -dnl -lpthread (gcc) Y -dnl -dnl Cygwin posix -lpthread Y OK -dnl -dnl Any of the above pth -lpth 0.0 -dnl -dnl Mingw windows N OK -dnl -dnl BeOS 5 -- -dnl -dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is -dnl turned off: -dnl OK if all three tests terminate OK, -dnl 0.5 if the first test terminates OK but the second one loops endlessly, -dnl 0.0 if the first test already loops endlessly. diff --git a/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4 deleted file mode 100644 index 6415bfb..0000000 --- a/gnulib/m4/time_h.m4 +++ /dev/null @@ -1,109 +0,0 @@ -# Configure a more-standard replacement for . - -# Copyright (C) 2000-2001, 2003-2007, 2009-2012 Free Software Foundation, Inc. - -# serial 7 - -# This file is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# Written by Paul Eggert and Jim Meyering. - -AC_DEFUN([gl_HEADER_TIME_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_HEADER_TIME_H_BODY]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_BODY], -[ - AC_REQUIRE([AC_C_RESTRICT]) - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_NEXT_HEADERS([time.h]) - AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC]) -]) - -dnl Check whether 'struct timespec' is declared -dnl in time.h, sys/time.h, or pthread.h. - -AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], -[ - AC_CHECK_HEADERS_ONCE([sys/time.h]) - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_time_h=yes], - [gl_cv_sys_struct_timespec_in_time_h=no])]) - - TIME_H_DEFINES_STRUCT_TIMESPEC=0 - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 - if test $gl_cv_sys_struct_timespec_in_time_h = yes; then - TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_sys_time_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_sys_time_h=yes], - [gl_cv_sys_struct_timespec_in_sys_time_h=no])]) - if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then - SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 - else - AC_CACHE_CHECK([for struct timespec in ], - [gl_cv_sys_struct_timespec_in_pthread_h], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[static struct timespec x; x.tv_sec = x.tv_nsec;]])], - [gl_cv_sys_struct_timespec_in_pthread_h=yes], - [gl_cv_sys_struct_timespec_in_pthread_h=no])]) - if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then - PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 - fi - fi - fi - AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC]) - AC_SUBST([PTHREAD_H_DEFINES_STRUCT_TIMESPEC]) -]) - -AC_DEFUN([gl_TIME_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], -[ - GNULIB_MKTIME=0; AC_SUBST([GNULIB_MKTIME]) - GNULIB_NANOSLEEP=0; AC_SUBST([GNULIB_NANOSLEEP]) - GNULIB_STRPTIME=0; AC_SUBST([GNULIB_STRPTIME]) - GNULIB_TIMEGM=0; AC_SUBST([GNULIB_TIMEGM]) - GNULIB_TIME_R=0; AC_SUBST([GNULIB_TIME_R]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_DECL_LOCALTIME_R=1; AC_SUBST([HAVE_DECL_LOCALTIME_R]) - HAVE_NANOSLEEP=1; AC_SUBST([HAVE_NANOSLEEP]) - HAVE_STRPTIME=1; AC_SUBST([HAVE_STRPTIME]) - HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM]) - dnl If another module says to replace or to not replace, do that. - dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK; - dnl this lets maintainers check for portability. - REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R]) - REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME]) - REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP]) - REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM]) -]) diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4 deleted file mode 100644 index 7e7651b..0000000 --- a/gnulib/m4/unistd_h.m4 +++ /dev/null @@ -1,187 +0,0 @@ -# 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. - -dnl Written by Simon Josefsson, Bruno Haible. - -AC_DEFUN([gl_UNISTD_H], -[ - dnl Use AC_REQUIRE here, so that the default behavior below is expanded - dnl once only, before all statements that occur in other macros. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - AC_REQUIRE([AC_C_INLINE]) - - gl_CHECK_NEXT_HEADERS([unistd.h]) - if test $ac_cv_header_unistd_h = yes; then - HAVE_UNISTD_H=1 - else - HAVE_UNISTD_H=0 - fi - AC_SUBST([HAVE_UNISTD_H]) - - dnl Ensure the type pid_t gets defined. - AC_REQUIRE([AC_TYPE_PID_T]) - - dnl Determine WINDOWS_64_BIT_OFF_T. - AC_REQUIRE([gl_TYPE_OFF_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -#if HAVE_UNISTD_H -# include -#endif -/* Some systems declare various items in the wrong headers. */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -# include -# endif -#endif - ]], [chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat - fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups - gethostname getlogin getlogin_r getpagesize - getusershell setusershell endusershell - group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite - readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r - unlink unlinkat usleep]) -]) - -AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_UNISTD_H_DEFAULTS], -[ - GNULIB_CHDIR=0; AC_SUBST([GNULIB_CHDIR]) - GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN]) - GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE]) - GNULIB_DUP=0; AC_SUBST([GNULIB_DUP]) - GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2]) - GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3]) - GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON]) - GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS]) - GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT]) - GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR]) - GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT]) - GNULIB_FDATASYNC=0; AC_SUBST([GNULIB_FDATASYNC]) - GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC]) - GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE]) - GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD]) - GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME]) - GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE]) - GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS]) - GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME]) - GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN]) - GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R]) - GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE]) - GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL]) - GNULIB_GROUP_MEMBER=0; AC_SUBST([GNULIB_GROUP_MEMBER]) - GNULIB_ISATTY=0; AC_SUBST([GNULIB_ISATTY]) - GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN]) - GNULIB_LINK=0; AC_SUBST([GNULIB_LINK]) - GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT]) - GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK]) - GNULIB_PIPE=0; AC_SUBST([GNULIB_PIPE]) - GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2]) - GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD]) - GNULIB_PWRITE=0; AC_SUBST([GNULIB_PWRITE]) - GNULIB_READ=0; AC_SUBST([GNULIB_READ]) - GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK]) - GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT]) - GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR]) - GNULIB_SETHOSTNAME=0; AC_SUBST([GNULIB_SETHOSTNAME]) - GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP]) - GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK]) - GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT]) - GNULIB_TTYNAME_R=0; AC_SUBST([GNULIB_TTYNAME_R]) - GNULIB_UNISTD_H_NONBLOCKING=0; AC_SUBST([GNULIB_UNISTD_H_NONBLOCKING]) - GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE]) - GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK]) - GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT]) - GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP]) - GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN]) - HAVE_DUP2=1; AC_SUBST([HAVE_DUP2]) - HAVE_DUP3=1; AC_SUBST([HAVE_DUP3]) - HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS]) - HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT]) - HAVE_FCHDIR=1; AC_SUBST([HAVE_FCHDIR]) - HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT]) - HAVE_FDATASYNC=1; AC_SUBST([HAVE_FDATASYNC]) - HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC]) - HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE]) - HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE]) - HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS]) - HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME]) - HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN]) - HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE]) - HAVE_GROUP_MEMBER=1; AC_SUBST([HAVE_GROUP_MEMBER]) - HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN]) - HAVE_LINK=1; AC_SUBST([HAVE_LINK]) - HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT]) - HAVE_PIPE=1; AC_SUBST([HAVE_PIPE]) - HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2]) - HAVE_PREAD=1; AC_SUBST([HAVE_PREAD]) - HAVE_PWRITE=1; AC_SUBST([HAVE_PWRITE]) - HAVE_READLINK=1; AC_SUBST([HAVE_READLINK]) - HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT]) - HAVE_SETHOSTNAME=1; AC_SUBST([HAVE_SETHOSTNAME]) - HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP]) - HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK]) - HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT]) - HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT]) - HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP]) - HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON]) - HAVE_DECL_FCHDIR=1; AC_SUBST([HAVE_DECL_FCHDIR]) - HAVE_DECL_FDATASYNC=1; AC_SUBST([HAVE_DECL_FDATASYNC]) - HAVE_DECL_GETDOMAINNAME=1; AC_SUBST([HAVE_DECL_GETDOMAINNAME]) - HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R]) - HAVE_DECL_GETPAGESIZE=1; AC_SUBST([HAVE_DECL_GETPAGESIZE]) - HAVE_DECL_GETUSERSHELL=1; AC_SUBST([HAVE_DECL_GETUSERSHELL]) - HAVE_DECL_SETHOSTNAME=1; AC_SUBST([HAVE_DECL_SETHOSTNAME]) - HAVE_DECL_TTYNAME_R=1; AC_SUBST([HAVE_DECL_TTYNAME_R]) - HAVE_OS_H=0; AC_SUBST([HAVE_OS_H]) - HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H]) - REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN]) - REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE]) - REPLACE_DUP=0; AC_SUBST([REPLACE_DUP]) - REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2]) - REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT]) - REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE]) - REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD]) - REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME]) - REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R]) - REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS]) - REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE]) - REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY]) - REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN]) - REPLACE_LINK=0; AC_SUBST([REPLACE_LINK]) - REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT]) - REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK]) - REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD]) - REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE]) - REPLACE_READ=0; AC_SUBST([REPLACE_READ]) - REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK]) - REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR]) - REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP]) - REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK]) - REPLACE_TTYNAME_R=0; AC_SUBST([REPLACE_TTYNAME_R]) - REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK]) - REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT]) - REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP]) - REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE]) - UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H]) - UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; - AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS]) -]) diff --git a/gnulib/m4/vasnprintf.m4 b/gnulib/m4/vasnprintf.m4 deleted file mode 100644 index 0ce11da..0000000 --- a/gnulib/m4/vasnprintf.m4 +++ /dev/null @@ -1,292 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - if test $ac_cv_func_vasnprintf = no; then - gl_REPLACE_VASNPRINTF - fi -]) - -AC_DEFUN([gl_REPLACE_VASNPRINTF], -[ - AC_CHECK_FUNCS_ONCE([vasnprintf]) - AC_LIBOBJ([vasnprintf]) - AC_LIBOBJ([printf-args]) - AC_LIBOBJ([printf-parse]) - AC_LIBOBJ([asnprintf]) - if test $ac_cv_func_vasnprintf = yes; then - AC_DEFINE([REPLACE_VASNPRINTF], [1], - [Define if vasnprintf exists but is overridden by gnulib.]) - fi - gl_PREREQ_PRINTF_ARGS - gl_PREREQ_PRINTF_PARSE - gl_PREREQ_VASNPRINTF - gl_PREREQ_ASNPRINTF -]) - -# Prerequisites of lib/printf-args.h, lib/printf-args.c. -AC_DEFUN([gl_PREREQ_PRINTF_ARGS], -[ - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) -]) - -# Prerequisites of lib/printf-parse.h, lib/printf-parse.c. -AC_DEFUN([gl_PREREQ_PRINTF_PARSE], -[ - AC_REQUIRE([gl_FEATURES_H]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_REQUIRE([AC_TYPE_SIZE_T]) - AC_CHECK_TYPE([ptrdiff_t], , - [AC_DEFINE([ptrdiff_t], [long], - [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) - ]) - AC_REQUIRE([gt_AC_TYPE_INTMAX_T]) -]) - -# Prerequisites of lib/vasnprintf.c. -AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], -[ - AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_FUNC_ALLOCA]) - AC_REQUIRE([AC_TYPE_LONG_LONG_INT]) - AC_REQUIRE([gt_TYPE_WCHAR_T]) - AC_REQUIRE([gt_TYPE_WINT_T]) - AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb]) - dnl Use the _snprintf function only if it is declared (because on NetBSD it - dnl is defined as a weak alias of snprintf; we prefer to use the latter). - AC_CHECK_DECLS([_snprintf], , , [[#include ]]) - dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization - dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE. - AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION]) - dnl We can avoid a lot of code by assuming that snprintf's return value - dnl conforms to ISO C99. So check that. - AC_REQUIRE([gl_SNPRINTF_RETVAL_C99]) - case "$gl_cv_func_snprintf_retval_c99" in - *yes) - AC_DEFINE([HAVE_SNPRINTF_RETVAL_C99], [1], - [Define if the return value of the snprintf function is the number of - of bytes (excluding the terminating NUL) that would have been produced - if the buffer had been large enough.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting 'long double' -# arguments. -AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE]) - case "$gl_cv_func_printf_infinite" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double' -# arguments. -AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], -[ - AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE]) - dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if - dnl NEED_PRINTF_LONG_DOUBLE is already set. - AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE]) - case "$gl_cv_func_printf_long_double" in - *yes) - case "$gl_cv_func_printf_infinite_long_double" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - infinite 'long double' arguments.]) - ;; - esac - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_A]) - case "$gl_cv_func_printf_directive_a" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1], - [Define if the vasnprintf implementation needs special code for - the 'a' and 'A' directives.]) - AC_CHECK_FUNCS([nl_langinfo]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_F]) - case "$gl_cv_func_printf_directive_f" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1], - [Define if the vasnprintf implementation needs special code for - the 'F' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive. -AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], -[ - AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS]) - case "$gl_cv_func_printf_directive_ls" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1], - [Define if the vasnprintf implementation needs special code for - the 'ls' directive.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], -[ - AC_REQUIRE([gl_PRINTF_FLAG_GROUPING]) - case "$gl_cv_func_printf_flag_grouping" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1], - [Define if the vasnprintf implementation needs special code for the - ' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], -[ - AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST]) - case "$gl_cv_func_printf_flag_leftadjust" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1], - [Define if the vasnprintf implementation needs special code for the - '-' flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag. -AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], -[ - AC_REQUIRE([gl_PRINTF_FLAG_ZERO]) - case "$gl_cv_func_printf_flag_zero" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1], - [Define if the vasnprintf implementation needs special code for the - 0 flag.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for supporting large precisions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], -[ - AC_REQUIRE([gl_PRINTF_PRECISION]) - case "$gl_cv_func_printf_precision" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1], - [Define if the vasnprintf implementation needs special code for - supporting large precisions without arbitrary bounds.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory -# conditions. -AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], -[ - AC_REQUIRE([gl_PRINTF_ENOMEM]) - case "$gl_cv_func_printf_enomem" in - *yes) - ;; - *) - AC_DEFINE([NEED_PRINTF_ENOMEM], [1], - [Define if the vasnprintf implementation needs special code for - surviving out-of-memory conditions.]) - AC_DEFINE([NEED_PRINTF_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'double' arguments.]) - AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1], - [Define if the vasnprintf implementation needs special code for - 'long double' arguments.]) - ;; - esac -]) - -# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance. -AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], -[ - AC_REQUIRE([gl_PREREQ_VASNPRINTF]) - gl_PREREQ_VASNPRINTF_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE - gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE - gl_PREREQ_VASNPRINTF_DIRECTIVE_A - gl_PREREQ_VASNPRINTF_DIRECTIVE_F - gl_PREREQ_VASNPRINTF_DIRECTIVE_LS - gl_PREREQ_VASNPRINTF_FLAG_GROUPING - gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST - gl_PREREQ_VASNPRINTF_FLAG_ZERO - gl_PREREQ_VASNPRINTF_PRECISION - gl_PREREQ_VASNPRINTF_ENOMEM -]) - -# Prerequisites of lib/asnprintf.c. -AC_DEFUN([gl_PREREQ_ASNPRINTF], -[ -]) diff --git a/gnulib/m4/vasprintf.m4 b/gnulib/m4/vasprintf.m4 deleted file mode 100644 index 205ceea..0000000 --- a/gnulib/m4/vasprintf.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# vasprintf.m4 serial 6 -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, -dnl with or without modifications, as long as this notice is preserved. - -AC_DEFUN([gl_FUNC_VASPRINTF], -[ - AC_CHECK_FUNCS([vasprintf]) - if test $ac_cv_func_vasprintf = no; then - gl_REPLACE_VASPRINTF - fi -]) - -AC_DEFUN([gl_REPLACE_VASPRINTF], -[ - AC_LIBOBJ([vasprintf]) - AC_LIBOBJ([asprintf]) - AC_REQUIRE([gl_STDIO_H_DEFAULTS]) - if test $ac_cv_func_vasprintf = yes; then - REPLACE_VASPRINTF=1 - else - HAVE_VASPRINTF=0 - fi - gl_PREREQ_VASPRINTF_H - gl_PREREQ_VASPRINTF - gl_PREREQ_ASPRINTF -]) - -# Prerequisites of the vasprintf portion of lib/stdio.h. -AC_DEFUN([gl_PREREQ_VASPRINTF_H], -[ - dnl Persuade glibc to declare asprintf() and vasprintf(). - AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) -]) - -# Prerequisites of lib/vasprintf.c. -AC_DEFUN([gl_PREREQ_VASPRINTF], -[ -]) - -# Prerequisites of lib/asprintf.c. -AC_DEFUN([gl_PREREQ_ASPRINTF], -[ -]) diff --git a/gnulib/m4/warn-on-use.m4 b/gnulib/m4/warn-on-use.m4 deleted file mode 100644 index a77802e..0000000 --- a/gnulib/m4/warn-on-use.m4 +++ /dev/null @@ -1,47 +0,0 @@ -# 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. - -# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES) -# --------------------------------------- -# For each whitespace-separated element in the list of NAMES, define -# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES -# even after being undefined as a macro. -# -# See warn-on-use.h for some hints on how to poison function names, as -# well as ideas on poisoning global variables and macros. NAMES may -# include global variables, but remember that only functions work with -# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single -# header, but if the replacement header pulls in other headers because -# some systems declare functions in the wrong header, then INCLUDES -# should do likewise. -# -# It is generally safe to assume declarations for functions declared -# in the intersection of C89 and C11 (such as printf) without -# needing gl_WARN_ON_USE_PREPARE. -AC_DEFUN([gl_WARN_ON_USE_PREPARE], -[ - m4_foreach_w([gl_decl], [$2], - [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])), - [Define to 1 if ]m4_defn([gl_decl])[ is declared even after - undefining macros.])])dnl -dnl FIXME: gl_Symbol must be used unquoted until we can assume -dnl autoconf 2.64 or newer. - for gl_func in m4_flatten([$2]); do - AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl - AC_CACHE_CHECK([whether $gl_func is declared without a macro], - gl_Symbol, - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1], -[@%:@undef $gl_func - (void) $gl_func;])], - [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])]) - AS_VAR_IF(gl_Symbol, [yes], - [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1]) - dnl shortcut - if the raw declaration exists, then set a cache - dnl variable to allow skipping any later AC_CHECK_DECL efforts - eval ac_cv_have_decl_$gl_func=yes]) - AS_VAR_POPDEF([gl_Symbol])dnl - done -]) diff --git a/gnulib/m4/wchar_h.m4 b/gnulib/m4/wchar_h.m4 deleted file mode 100644 index c7a8b2d..0000000 --- a/gnulib/m4/wchar_h.m4 +++ /dev/null @@ -1,225 +0,0 @@ -dnl A placeholder for ISO C99 , for platforms that have issues. - -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 39 - -AC_DEFUN([gl_WCHAR_H], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - AC_REQUIRE([gl_WCHAR_H_INLINE_OK]) - dnl Prepare for creating substitute . - dnl Check for (missing in Linux uClibc when built without wide - dnl character support). - dnl is always overridden, because of GNULIB_POSIXCHECK. - gl_CHECK_NEXT_HEADERS([wchar.h]) - if test $ac_cv_header_wchar_h = yes; then - HAVE_WCHAR_H=1 - else - HAVE_WCHAR_H=0 - fi - AC_SUBST([HAVE_WCHAR_H]) - - AC_REQUIRE([gl_FEATURES_H]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -#endif -#include - ]], - [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb - wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset - wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp - wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr - wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth - ]) -]) - -dnl Check whether is usable at all. -AC_DEFUN([gl_WCHAR_H_INLINE_OK], -[ - dnl Test whether suffers due to the transition from '__inline' to - dnl 'gnu_inline'. See - dnl and . In summary, - dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and - dnl the option -std=c99 or -std=gnu99, leads to a broken . - AC_CACHE_CHECK([whether uses 'inline' correctly], - [gl_cv_header_wchar_h_correct_inline], - [gl_cv_header_wchar_h_correct_inline=yes - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -extern int zero (void); -int main () { return zero(); } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest1.$ac_objext - AC_LANG_CONFTEST([ - AC_LANG_SOURCE([[#define wcstod renamed_wcstod -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int zero (void) { return 0; } -]])]) - if AC_TRY_EVAL([ac_compile]); then - mv conftest.$ac_objext conftest2.$ac_objext - if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then - : - else - gl_cv_header_wchar_h_correct_inline=no - fi - fi - fi - rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext - ]) - if test $gl_cv_header_wchar_h_correct_inline = no; then - AC_MSG_ERROR([ cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). -This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in -C99 mode. You have four options: - - Add the flag -fgnu89-inline to CC and reconfigure, or - - Fix your include files, using parts of - , or - - Use a gcc version older than 4.3, or - - Don't use the flags -std=c99 or -std=gnu99. -Configuration aborted.]) - fi -]) - -AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_WCHAR_H_DEFAULTS], -[ - GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC]) - GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB]) - GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT]) - GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC]) - GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN]) - GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS]) - GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS]) - GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB]) - GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS]) - GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS]) - GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH]) - GNULIB_WMEMCHR=0; AC_SUBST([GNULIB_WMEMCHR]) - GNULIB_WMEMCMP=0; AC_SUBST([GNULIB_WMEMCMP]) - GNULIB_WMEMCPY=0; AC_SUBST([GNULIB_WMEMCPY]) - GNULIB_WMEMMOVE=0; AC_SUBST([GNULIB_WMEMMOVE]) - GNULIB_WMEMSET=0; AC_SUBST([GNULIB_WMEMSET]) - GNULIB_WCSLEN=0; AC_SUBST([GNULIB_WCSLEN]) - GNULIB_WCSNLEN=0; AC_SUBST([GNULIB_WCSNLEN]) - GNULIB_WCSCPY=0; AC_SUBST([GNULIB_WCSCPY]) - GNULIB_WCPCPY=0; AC_SUBST([GNULIB_WCPCPY]) - GNULIB_WCSNCPY=0; AC_SUBST([GNULIB_WCSNCPY]) - GNULIB_WCPNCPY=0; AC_SUBST([GNULIB_WCPNCPY]) - GNULIB_WCSCAT=0; AC_SUBST([GNULIB_WCSCAT]) - GNULIB_WCSNCAT=0; AC_SUBST([GNULIB_WCSNCAT]) - GNULIB_WCSCMP=0; AC_SUBST([GNULIB_WCSCMP]) - GNULIB_WCSNCMP=0; AC_SUBST([GNULIB_WCSNCMP]) - GNULIB_WCSCASECMP=0; AC_SUBST([GNULIB_WCSCASECMP]) - GNULIB_WCSNCASECMP=0; AC_SUBST([GNULIB_WCSNCASECMP]) - GNULIB_WCSCOLL=0; AC_SUBST([GNULIB_WCSCOLL]) - GNULIB_WCSXFRM=0; AC_SUBST([GNULIB_WCSXFRM]) - GNULIB_WCSDUP=0; AC_SUBST([GNULIB_WCSDUP]) - GNULIB_WCSCHR=0; AC_SUBST([GNULIB_WCSCHR]) - GNULIB_WCSRCHR=0; AC_SUBST([GNULIB_WCSRCHR]) - GNULIB_WCSCSPN=0; AC_SUBST([GNULIB_WCSCSPN]) - GNULIB_WCSSPN=0; AC_SUBST([GNULIB_WCSSPN]) - GNULIB_WCSPBRK=0; AC_SUBST([GNULIB_WCSPBRK]) - GNULIB_WCSSTR=0; AC_SUBST([GNULIB_WCSSTR]) - GNULIB_WCSTOK=0; AC_SUBST([GNULIB_WCSTOK]) - GNULIB_WCSWIDTH=0; AC_SUBST([GNULIB_WCSWIDTH]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC]) - HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT]) - HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC]) - HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN]) - HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS]) - HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS]) - HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB]) - HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS]) - HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS]) - HAVE_WMEMCHR=1; AC_SUBST([HAVE_WMEMCHR]) - HAVE_WMEMCMP=1; AC_SUBST([HAVE_WMEMCMP]) - HAVE_WMEMCPY=1; AC_SUBST([HAVE_WMEMCPY]) - HAVE_WMEMMOVE=1; AC_SUBST([HAVE_WMEMMOVE]) - HAVE_WMEMSET=1; AC_SUBST([HAVE_WMEMSET]) - HAVE_WCSLEN=1; AC_SUBST([HAVE_WCSLEN]) - HAVE_WCSNLEN=1; AC_SUBST([HAVE_WCSNLEN]) - HAVE_WCSCPY=1; AC_SUBST([HAVE_WCSCPY]) - HAVE_WCPCPY=1; AC_SUBST([HAVE_WCPCPY]) - HAVE_WCSNCPY=1; AC_SUBST([HAVE_WCSNCPY]) - HAVE_WCPNCPY=1; AC_SUBST([HAVE_WCPNCPY]) - HAVE_WCSCAT=1; AC_SUBST([HAVE_WCSCAT]) - HAVE_WCSNCAT=1; AC_SUBST([HAVE_WCSNCAT]) - HAVE_WCSCMP=1; AC_SUBST([HAVE_WCSCMP]) - HAVE_WCSNCMP=1; AC_SUBST([HAVE_WCSNCMP]) - HAVE_WCSCASECMP=1; AC_SUBST([HAVE_WCSCASECMP]) - HAVE_WCSNCASECMP=1; AC_SUBST([HAVE_WCSNCASECMP]) - HAVE_WCSCOLL=1; AC_SUBST([HAVE_WCSCOLL]) - HAVE_WCSXFRM=1; AC_SUBST([HAVE_WCSXFRM]) - HAVE_WCSDUP=1; AC_SUBST([HAVE_WCSDUP]) - HAVE_WCSCHR=1; AC_SUBST([HAVE_WCSCHR]) - HAVE_WCSRCHR=1; AC_SUBST([HAVE_WCSRCHR]) - HAVE_WCSCSPN=1; AC_SUBST([HAVE_WCSCSPN]) - HAVE_WCSSPN=1; AC_SUBST([HAVE_WCSSPN]) - HAVE_WCSPBRK=1; AC_SUBST([HAVE_WCSPBRK]) - HAVE_WCSSTR=1; AC_SUBST([HAVE_WCSSTR]) - HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK]) - HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH]) - HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB]) - HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH]) - REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T]) - REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC]) - REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB]) - REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT]) - REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC]) - REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN]) - REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS]) - REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS]) - REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB]) - REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS]) - REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS]) - REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH]) - REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH]) -]) diff --git a/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4 deleted file mode 100644 index 534735d..0000000 --- a/gnulib/m4/wchar_t.m4 +++ /dev/null @@ -1,24 +0,0 @@ -# wchar_t.m4 serial 4 (gettext-0.18.2) -dnl Copyright (C) 2002-2003, 2008-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. -dnl Test whether has the 'wchar_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WCHAR_T], -[ - AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[#include - wchar_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wchar_t=yes], - [gt_cv_c_wchar_t=no])]) - if test $gt_cv_c_wchar_t = yes; then - AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.]) - fi -]) diff --git a/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4 deleted file mode 100644 index 00d7302..0000000 --- a/gnulib/m4/wcrtomb.m4 +++ /dev/null @@ -1,112 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_WCRTOMB], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_REQUIRE([AC_TYPE_MBSTATE_T]) - gl_MBSTATE_T_BROKEN - - AC_CHECK_FUNCS_ONCE([wcrtomb]) - if test $ac_cv_func_wcrtomb = no; then - HAVE_WCRTOMB=0 - AC_CHECK_DECLS([wcrtomb],,, [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -]]) - if test $ac_cv_have_decl_wcrtomb = yes; then - dnl On Minix 3.1.8, the system's declares wcrtomb() although - dnl it does not have the function. Avoid a collision with gnulib's - dnl replacement. - REPLACE_WCRTOMB=1 - fi - else - if test $REPLACE_MBSTATE_T = 1; then - REPLACE_WCRTOMB=1 - else - dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes - dnl returns 0 instead of 1. - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([gt_LOCALE_FR_UTF8]) - AC_REQUIRE([gt_LOCALE_JA]) - AC_REQUIRE([gt_LOCALE_ZH_CN]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether wcrtomb return value is correct], - [gl_cv_func_wcrtomb_retval], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on AIX 4, OSF/1 and Solaris. - aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wcrtomb_retval="guessing yes" ;; - esac -changequote([,])dnl - if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - int result = 0; - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 1; - } - if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 2; - } - if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 4; - } - if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) - { - if (wcrtomb (NULL, 0, NULL) != 1) - result |= 8; - } - return result; -}]])], - [gl_cv_func_wcrtomb_retval=yes], - [gl_cv_func_wcrtomb_retval=no], - [:]) - fi - ]) - case "$gl_cv_func_wcrtomb_retval" in - *yes) ;; - *) REPLACE_WCRTOMB=1 ;; - esac - fi - fi -]) - -# Prerequisites of lib/wcrtomb.c. -AC_DEFUN([gl_PREREQ_WCRTOMB], [ - : -]) diff --git a/gnulib/m4/wctob.m4 b/gnulib/m4/wctob.m4 deleted file mode 100644 index 786c881..0000000 --- a/gnulib/m4/wctob.m4 +++ /dev/null @@ -1,127 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_WCTOB], -[ - AC_REQUIRE([gl_WCHAR_H_DEFAULTS]) - - AC_CHECK_FUNCS_ONCE([wctob]) - if test $ac_cv_func_wctob = no; then - HAVE_WCTOB=0 - HAVE_DECL_WCTOB=0 - else - HAVE_WCTOB=1 - - dnl Solaris 9 has the wctob() function but it does not work. - dnl Cygwin 1.7.2 has the wctob() function but it clobbers caller-owned - dnl registers, see . - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([gt_LOCALE_FR]) - AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles - AC_CACHE_CHECK([whether wctob works], - [gl_cv_func_wctob_works], - [ - dnl Initial guess, used when cross-compiling or when no suitable locale - dnl is present. -changequote(,)dnl - case "$host_os" in - # Guess no on Solaris <= 9 and Cygwin. - solaris2.[1-9] | solaris2.[1-9].* | cygwin*) - gl_cv_func_wctob_works="guessing no" ;; - # Guess yes otherwise. - *) gl_cv_func_wctob_works="guessing yes" ;; - esac -changequote([,])dnl - case "$host_os" in - cygwin*) - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include - -register long global __asm__ ("%ebx"); - -int main () -{ - setlocale (LC_ALL, "en_US.UTF-8"); - - global = 0x12345678; - if (wctob (0x00FC) != -1) - return 1; - if (global != 0x12345678) - return 2; - return 0; -}]])], - [:], - [gl_cv_func_wctob_works=no], - [:]) - ;; - esac - if test "$gl_cv_func_wctob_works" != no && test $LOCALE_FR != none; then - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ -#include -#include -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#include -#include -#include -#include -int main () -{ - if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) - { - wchar_t wc; - - if (mbtowc (&wc, "\374", 1) == 1) - if (wctob (wc) != (unsigned char) '\374') - return 1; - } - return 0; -}]])], - [gl_cv_func_wctob_works=yes], - [gl_cv_func_wctob_works=no], - [:]) - fi - ]) - case "$gl_cv_func_wctob_works" in - *yes) ;; - *) REPLACE_WCTOB=1 ;; - esac - if test $REPLACE_WCTOB = 0; then - - dnl IRIX 6.5 has the wctob() function but does not declare it. - AC_CHECK_DECLS([wctob], [], [], [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include -]]) - if test $ac_cv_have_decl_wctob != yes; then - HAVE_DECL_WCTOB=0 - fi - fi - fi -]) - -# Prerequisites of lib/wctob.c. -AC_DEFUN([gl_PREREQ_WCTOB], [ - : -]) diff --git a/gnulib/m4/wctomb.m4 b/gnulib/m4/wctomb.m4 deleted file mode 100644 index 88fd6be..0000000 --- a/gnulib/m4/wctomb.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -AC_DEFUN([gl_FUNC_WCTOMB], -[ - AC_REQUIRE([gl_STDLIB_H_DEFAULTS]) - - if false; then - REPLACE_WCTOMB=1 - fi -]) - -# Prerequisites of lib/wctomb.c. -AC_DEFUN([gl_PREREQ_WCTOMB], [ - : -]) diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4 deleted file mode 100644 index 4b19f64..0000000 --- a/gnulib/m4/wctype_h.m4 +++ /dev/null @@ -1,211 +0,0 @@ -# wctype_h.m4 serial 17 - -dnl A placeholder for ISO C99 , for platforms that lack it. - -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 Written by Paul Eggert. - -AC_DEFUN([gl_WCTYPE_H], -[ - AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) - AC_REQUIRE([AC_PROG_CC]) - AC_REQUIRE([AC_CANONICAL_HOST]) - AC_CHECK_FUNCS_ONCE([iswcntrl]) - if test $ac_cv_func_iswcntrl = yes; then - HAVE_ISWCNTRL=1 - else - HAVE_ISWCNTRL=0 - fi - AC_SUBST([HAVE_ISWCNTRL]) - - AC_REQUIRE([AC_C_INLINE]) - - AC_REQUIRE([gt_TYPE_WINT_T]) - if test $gt_cv_c_wint_t = yes; then - HAVE_WINT_T=1 - else - HAVE_WINT_T=0 - fi - AC_SUBST([HAVE_WINT_T]) - - gl_CHECK_NEXT_HEADERS([wctype.h]) - if test $ac_cv_header_wctype_h = yes; then - if test $ac_cv_func_iswcntrl = yes; then - dnl Linux libc5 has an iswprint function that returns 0 for all arguments. - dnl The other functions are likely broken in the same way. - AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works], - [ - AC_RUN_IFELSE( - [AC_LANG_SOURCE([[ - /* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - int main () { return iswprint ('x') == 0; } - ]])], - [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no], - [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include - #if __GNU_LIBRARY__ == 1 - Linux libc5 i18n is broken. - #endif]], [])], - [gl_cv_func_iswcntrl_works="guessing yes"], - [gl_cv_func_iswcntrl_works="guessing no"]) - ]) - ]) - fi - HAVE_WCTYPE_H=1 - else - HAVE_WCTYPE_H=0 - fi - AC_SUBST([HAVE_WCTYPE_H]) - - case "$gl_cv_func_iswcntrl_works" in - *yes) REPLACE_ISWCNTRL=0 ;; - *) REPLACE_ISWCNTRL=1 ;; - esac - AC_SUBST([REPLACE_ISWCNTRL]) - - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then - dnl Redefine all of iswcntrl, ..., iswxdigit in . - : - fi - - if test $REPLACE_ISWCNTRL = 1; then - REPLACE_TOWLOWER=1 - else - AC_CHECK_FUNCS([towlower]) - if test $ac_cv_func_towlower = yes; then - REPLACE_TOWLOWER=0 - else - AC_CHECK_DECLS([towlower],,, - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - ]]) - if test $ac_cv_have_decl_towlower = yes; then - dnl On Minix 3.1.8, the system's declares towlower() and - dnl towupper() although it does not have the functions. Avoid a - dnl collision with gnulib's replacement. - REPLACE_TOWLOWER=1 - else - REPLACE_TOWLOWER=0 - fi - fi - fi - AC_SUBST([REPLACE_TOWLOWER]) - - if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then - dnl Redefine towlower, towupper in . - : - fi - - dnl We assume that the wctype() and iswctype() functions exist if and only - dnl if the type wctype_t is defined in or in if that - dnl exists. - dnl HP-UX 11.00 declares all these in and lacks . - AC_CACHE_CHECK([for wctype_t], [gl_cv_type_wctype_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #if HAVE_WCTYPE_H - # include - #endif - wctype_t a; - ]], - [[]])], - [gl_cv_type_wctype_t=yes], - [gl_cv_type_wctype_t=no]) - ]) - if test $gl_cv_type_wctype_t = no; then - HAVE_WCTYPE_T=0 - fi - - dnl We assume that the wctrans() and towctrans() functions exist if and only - dnl if the type wctrans_t is defined in . - AC_CACHE_CHECK([for wctrans_t], [gl_cv_type_wctrans_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[/* Tru64 with Desktop Toolkit C has a bug: must be - included before . - BSD/OS 4.0.1 has a bug: , and - must be included before . */ - #include - #include - #include - #include - #include - wctrans_t a; - ]], - [[]])], - [gl_cv_type_wctrans_t=yes], - [gl_cv_type_wctrans_t=no]) - ]) - if test $gl_cv_type_wctrans_t = no; then - HAVE_WCTRANS_T=0 - fi - - dnl Check for declarations of anything we want to poison if the - dnl corresponding gnulib module is not in use. - gl_WARN_ON_USE_PREPARE([[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be - included before . */ -#if !(defined __GLIBC__ && !defined __UCLIBC__) -# include -# include -# include -# include -#endif -#include - ]], - [wctype iswctype wctrans towctrans - ]) -]) - -AC_DEFUN([gl_WCTYPE_MODULE_INDICATOR], -[ - dnl Use AC_REQUIRE here, so that the default settings are expanded once only. - AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) - gl_MODULE_INDICATOR_SET_VARIABLE([$1]) - dnl Define it also as a C macro, for the benefit of the unit tests. - gl_MODULE_INDICATOR_FOR_TESTS([$1]) -]) - -AC_DEFUN([gl_WCTYPE_H_DEFAULTS], -[ - GNULIB_ISWBLANK=0; AC_SUBST([GNULIB_ISWBLANK]) - GNULIB_WCTYPE=0; AC_SUBST([GNULIB_WCTYPE]) - GNULIB_ISWCTYPE=0; AC_SUBST([GNULIB_ISWCTYPE]) - GNULIB_WCTRANS=0; AC_SUBST([GNULIB_WCTRANS]) - GNULIB_TOWCTRANS=0; AC_SUBST([GNULIB_TOWCTRANS]) - dnl Assume proper GNU behavior unless another module says otherwise. - HAVE_ISWBLANK=1; AC_SUBST([HAVE_ISWBLANK]) - HAVE_WCTYPE_T=1; AC_SUBST([HAVE_WCTYPE_T]) - HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T]) - REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK]) -]) diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4 deleted file mode 100644 index 3260cce..0000000 --- a/gnulib/m4/wint_t.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# wint_t.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2003, 2007-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. -dnl Test whether has the 'wint_t' type. -dnl Prerequisite: AC_PROG_CC - -AC_DEFUN([gt_TYPE_WINT_T], -[ - AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t], - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [[ -/* Tru64 with Desktop Toolkit C has a bug: must be included before - . - BSD/OS 4.0.1 has a bug: , and must be included - before . */ -#include -#include -#include -#include - wint_t foo = (wchar_t)'\0';]], - [[]])], - [gt_cv_c_wint_t=yes], - [gt_cv_c_wint_t=no])]) - if test $gt_cv_c_wint_t = yes; then - AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.]) - fi -]) diff --git a/gnulib/m4/xsize.m4 b/gnulib/m4/xsize.m4 deleted file mode 100644 index b3b7fee..0000000 --- a/gnulib/m4/xsize.m4 +++ /dev/null @@ -1,13 +0,0 @@ -# xsize.m4 serial 4 -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. - -AC_DEFUN([gl_XSIZE], -[ - dnl Prerequisites of lib/xsize.h. - AC_REQUIRE([gl_SIZE_MAX]) - AC_REQUIRE([AC_C_INLINE]) - AC_CHECK_HEADERS([stdint.h]) -]) diff --git a/gnulib/m4/yield.m4 b/gnulib/m4/yield.m4 deleted file mode 100644 index 94e69c4..0000000 --- a/gnulib/m4/yield.m4 +++ /dev/null @@ -1,19 +0,0 @@ -# yield.m4 serial 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. - -AC_DEFUN([gl_YIELD], -[ - AC_REQUIRE([gl_THREADLIB]) - dnl On some systems, sched_yield is in librt, rather than in libpthread. - YIELD_LIB= - if test $gl_threads_api = posix; then - dnl Solaris has sched_yield in librt, not in libpthread or libc. - AC_CHECK_LIB([rt], [sched_yield], [YIELD_LIB=-lrt], - [dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt. - AC_CHECK_LIB([posix4], [sched_yield], [YIELD_LIB=-lposix4])]) - fi - AC_SUBST([YIELD_LIB]) -]) diff --git a/gnulib/tests/Makefile.am b/gnulib/tests/Makefile.am deleted file mode 100644 index 34645eb..0000000 --- a/gnulib/tests/Makefile.am +++ /dev/null @@ -1,1115 +0,0 @@ -## DO NOT EDIT! GENERATED AUTOMATICALLY! -## Process this file with automake to produce Makefile.in. -# 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 . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -# Generated by gnulib-tool. - -AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects - -SUBDIRS = . -TESTS = -XFAIL_TESTS = -TESTS_ENVIRONMENT = -noinst_PROGRAMS = -check_PROGRAMS = -noinst_HEADERS = -noinst_LIBRARIES = -check_LIBRARIES = libtests.a -EXTRA_DIST = -BUILT_SOURCES = -SUFFIXES = -MOSTLYCLEANFILES = core *.stackdump -MOSTLYCLEANDIRS = -CLEANFILES = -DISTCLEANFILES = -MAINTAINERCLEANFILES = - -AM_CPPFLAGS = \ - -D@gltests_WITNESS@=1 \ - -I. -I$(srcdir) \ - -I../.. -I$(srcdir)/../.. \ - -I../../gnulib/lib -I$(srcdir)/../../gnulib/lib - -LDADD = libtests.a ../../gnulib/lib/libgnu.la libtests.a $(LIBTESTS_LIBDEPS) - -libtests_a_SOURCES = -libtests_a_LIBADD = $(gltests_LIBOBJS) -libtests_a_DEPENDENCIES = $(gltests_LIBOBJS) -EXTRA_libtests_a_SOURCES = -AM_LIBTOOLFLAGS = --preserve-dup-deps - -TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)' - -## begin gnulib module alloca-opt-tests - -TESTS += test-alloca-opt -check_PROGRAMS += test-alloca-opt - -EXTRA_DIST += test-alloca-opt.c - -## end gnulib module alloca-opt-tests - -## begin gnulib module binary-io - -libtests_a_SOURCES += binary-io.h - -## end gnulib module binary-io - -## begin gnulib module binary-io-tests - -TESTS += test-binary-io.sh -check_PROGRAMS += test-binary-io - -EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h - -## end gnulib module binary-io-tests - -## begin gnulib module btowc-tests - -TESTS += test-btowc1.sh test-btowc2.sh -TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' -check_PROGRAMS += test-btowc - -EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h - -## end gnulib module btowc-tests - -## begin gnulib module c-ctype - -libtests_a_SOURCES += c-ctype.h c-ctype.c - -## end gnulib module c-ctype - -## begin gnulib module c-ctype-tests - -TESTS += test-c-ctype -check_PROGRAMS += test-c-ctype - -EXTRA_DIST += test-c-ctype.c macros.h - -## end gnulib module c-ctype-tests - -## begin gnulib module c-strcase - -libtests_a_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c - -## end gnulib module c-strcase - -## begin gnulib module c-strcase-tests - -TESTS += test-c-strcase.sh -TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' -check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp -EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h - -## end gnulib module c-strcase-tests - -## begin gnulib module canonicalize-lgpl-tests - -TESTS += test-canonicalize-lgpl -check_PROGRAMS += test-canonicalize-lgpl -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 -check_PROGRAMS += test-ctype -EXTRA_DIST += test-ctype.c - -## end gnulib module ctype-tests - -## begin gnulib module dup2 - - -EXTRA_DIST += dup2.c - -EXTRA_libtests_a_SOURCES += dup2.c - -## end gnulib module dup2 - -## begin gnulib module dup2-tests - -TESTS += test-dup2 -check_PROGRAMS += test-dup2 -EXTRA_DIST += test-dup2.c signature.h macros.h - -## end gnulib module dup2-tests - -## begin gnulib module environ-tests - -TESTS += test-environ -check_PROGRAMS += test-environ - -EXTRA_DIST += test-environ.c - -## end gnulib module environ-tests - -## begin gnulib module errno-tests - -TESTS += test-errno -check_PROGRAMS += test-errno - -EXTRA_DIST += test-errno.c - -## end gnulib module errno-tests - -## begin gnulib module fcntl-h-tests - -TESTS += test-fcntl-h -check_PROGRAMS += test-fcntl-h -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 -check_PROGRAMS += test-fnmatch -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 -check_PROGRAMS += test-getdelim -MOSTLYCLEANFILES += test-getdelim.txt -EXTRA_DIST += test-getdelim.c signature.h macros.h - -## end gnulib module getdelim-tests - -## begin gnulib module getline-tests - -TESTS += test-getline -check_PROGRAMS += test-getline -MOSTLYCLEANFILES += test-getline.txt -EXTRA_DIST += test-getline.c signature.h macros.h - -## end gnulib module getline-tests - -## begin gnulib module getopt-posix-tests - -TESTS += test-getopt -check_PROGRAMS += test-getopt -test_getopt_LDADD = $(LDADD) $(LIBINTL) -EXTRA_DIST += macros.h signature.h test-getopt.c test-getopt.h test-getopt_long.h - -## end gnulib module getopt-posix-tests - -## begin gnulib module getpagesize - - -EXTRA_DIST += getpagesize.c - -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/ac-aux/config.rpath - -## end gnulib module havelib - -## begin gnulib module ignore-value - - -EXTRA_DIST += ignore-value.h - -## end gnulib module ignore-value - -## begin gnulib module ignore-value-tests - -TESTS += test-ignore-value -check_PROGRAMS += test-ignore-value -EXTRA_DIST += test-ignore-value.c - -## end gnulib module ignore-value-tests - -## begin gnulib module intprops - - -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 -check_PROGRAMS += test-isblank -EXTRA_DIST += test-isblank.c signature.h macros.h - -## end gnulib module isblank-tests - -## begin gnulib module langinfo-tests - -TESTS += test-langinfo -check_PROGRAMS += test-langinfo -EXTRA_DIST += test-langinfo.c - -## end gnulib module langinfo-tests - -## begin gnulib module locale-tests - -TESTS += test-locale -check_PROGRAMS += test-locale -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 - -EXTRA_DIST += localename.h - -## end gnulib module localename - -## begin gnulib module localename-tests - -TESTS += test-localename -check_PROGRAMS += test-localename -test_localename_LDADD = $(LDADD) @INTL_MACOSX_LIBS@ $(LIBTHREAD) - -EXTRA_DIST += test-localename.c macros.h - -## end gnulib module localename-tests - -## begin gnulib module lock - -libtests_a_SOURCES += glthread/lock.h glthread/lock.c - -## end gnulib module lock - -## begin gnulib module lock-tests - -TESTS += test-lock -check_PROGRAMS += test-lock -test_lock_LDADD = $(LDADD) @LIBMULTITHREAD@ @YIELD_LIB@ -EXTRA_DIST += test-lock.c - -## end gnulib module lock-tests - -## begin gnulib module lstat-tests - -TESTS += test-lstat -check_PROGRAMS += test-lstat -EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h - -## end gnulib module lstat-tests - -## begin gnulib module malloc-gnu-tests - -TESTS += test-malloc-gnu -check_PROGRAMS += test-malloc-gnu -EXTRA_DIST += test-malloc-gnu.c - -## end gnulib module malloc-gnu-tests - -## begin gnulib module malloca-tests - -TESTS += test-malloca -check_PROGRAMS += test-malloca - -EXTRA_DIST += test-malloca.c - -## end gnulib module malloca-tests - -## begin gnulib module mbrtowc-tests - -TESTS += \ - test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \ - 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 -TESTS_ENVIRONMENT += \ - LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' -check_PROGRAMS += test-mbrtowc test-mbrtowc-w32 - -EXTRA_DIST += 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 - -## end gnulib module mbrtowc-tests - -## begin gnulib module mbsinit-tests - -TESTS += test-mbsinit.sh -TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' -check_PROGRAMS += test-mbsinit - -EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h - -## end gnulib module mbsinit-tests - -## begin gnulib module mbsrtowcs-tests - -TESTS += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh -TESTS_ENVIRONMENT += \ - LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' -check_PROGRAMS += test-mbsrtowcs - -EXTRA_DIST += test-mbsrtowcs1.sh test-mbsrtowcs2.sh test-mbsrtowcs3.sh test-mbsrtowcs4.sh test-mbsrtowcs.c signature.h macros.h - -## end gnulib module mbsrtowcs-tests - -## begin gnulib module memchr-tests - -TESTS += test-memchr -check_PROGRAMS += test-memchr -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 -TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' -check_PROGRAMS += test-nl_langinfo -EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h - -## end gnulib module nl_langinfo-tests - -## begin gnulib module open - - -EXTRA_DIST += open.c - -EXTRA_libtests_a_SOURCES += open.c - -## end gnulib module open - -## begin gnulib module open-tests - -TESTS += test-open -check_PROGRAMS += test-open -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 - - -EXTRA_DIST += putenv.c - -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 -check_PROGRAMS += test-readlink -EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h - -## end gnulib module readlink-tests - -## begin gnulib module safe-alloc-tests - -TESTS += test-safe-alloc -check_PROGRAMS += test-safe-alloc -EXTRA_DIST += test-safe-alloc.c macros.h - -## end gnulib module safe-alloc-tests - -## begin gnulib module same-inode - - -EXTRA_DIST += same-inode.h - -## end gnulib module same-inode - -## begin gnulib module setenv - - -EXTRA_DIST += setenv.c - -EXTRA_libtests_a_SOURCES += setenv.c - -## end gnulib module setenv - -## begin gnulib module setenv-tests - -TESTS += test-setenv -check_PROGRAMS += test-setenv -EXTRA_DIST += test-setenv.c signature.h macros.h - -## end gnulib module setenv-tests - -## begin gnulib module setlocale - - -EXTRA_DIST += setlocale.c - -EXTRA_libtests_a_SOURCES += setlocale.c - -## end gnulib module setlocale - -## begin gnulib module setlocale-tests - -TESTS += test-setlocale1.sh test-setlocale2.sh -TESTS_ENVIRONMENT += \ - LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' -check_PROGRAMS += test-setlocale1 test-setlocale2 -EXTRA_DIST += test-setlocale1.sh test-setlocale1.c test-setlocale2.sh test-setlocale2.c signature.h macros.h - -## 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 - -## begin gnulib module stdbool-tests - -TESTS += test-stdbool -check_PROGRAMS += test-stdbool -EXTRA_DIST += test-stdbool.c - -## end gnulib module stdbool-tests - -## begin gnulib module stddef-tests - -TESTS += test-stddef -check_PROGRAMS += test-stddef -EXTRA_DIST += test-stddef.c - -## end gnulib module stddef-tests - -## begin gnulib module stdint-tests - -TESTS += test-stdint -check_PROGRAMS += test-stdint -EXTRA_DIST += test-stdint.c - -## end gnulib module stdint-tests - -## begin gnulib module stdio-tests - -TESTS += test-stdio -check_PROGRAMS += test-stdio -EXTRA_DIST += test-stdio.c - -## end gnulib module stdio-tests - -## begin gnulib module stdlib-tests - -TESTS += test-stdlib -check_PROGRAMS += test-stdlib -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 -check_PROGRAMS += test-string -EXTRA_DIST += test-string.c - -## end gnulib module string-tests - -## begin gnulib module strnlen-tests - -TESTS += test-strnlen -check_PROGRAMS += test-strnlen -EXTRA_DIST += test-strnlen.c zerosize-ptr.h signature.h macros.h - -## end gnulib module strnlen-tests - -## begin gnulib module strstr-tests - -TESTS += test-strstr -check_PROGRAMS += test-strstr -EXTRA_DIST += test-strstr.c zerosize-ptr.h signature.h macros.h - -## end gnulib module strstr-tests - -## begin gnulib module symlink - - -EXTRA_DIST += symlink.c - -EXTRA_libtests_a_SOURCES += symlink.c - -## end gnulib module symlink - -## begin gnulib module symlink-tests - -TESTS += test-symlink -check_PROGRAMS += test-symlink -EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h - -## end gnulib module symlink-tests - -## begin gnulib module sys_stat-tests - -TESTS += test-sys_stat -check_PROGRAMS += test-sys_stat -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 -check_PROGRAMS += test-sys_wait -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/ac-aux/config.rpath - -## end gnulib module threadlib - -## begin gnulib module time-tests - -TESTS += test-time -check_PROGRAMS += test-time -EXTRA_DIST += test-time.c - -## end gnulib module time-tests - -## begin gnulib module unistd-tests - -TESTS += test-unistd -check_PROGRAMS += test-unistd -EXTRA_DIST += test-unistd.c - -## end gnulib module unistd-tests - -## begin gnulib module unsetenv - - -EXTRA_DIST += unsetenv.c - -EXTRA_libtests_a_SOURCES += unsetenv.c - -## end gnulib module unsetenv - -## begin gnulib module unsetenv-tests - -TESTS += test-unsetenv -check_PROGRAMS += test-unsetenv -EXTRA_DIST += test-unsetenv.c signature.h macros.h - -## end gnulib module unsetenv-tests - -## begin gnulib module vasnprintf-tests - -TESTS += test-vasnprintf -check_PROGRAMS += test-vasnprintf - -EXTRA_DIST += test-vasnprintf.c macros.h - -## end gnulib module vasnprintf-tests - -## begin gnulib module vasprintf-tests - -TESTS += test-vasprintf -check_PROGRAMS += test-vasprintf - -EXTRA_DIST += test-vasprintf.c signature.h macros.h - -## end gnulib module vasprintf-tests - -## begin gnulib module verify-tests - -TESTS_ENVIRONMENT += MAKE='$(MAKE)' -TESTS += test-verify test-verify.sh -check_PROGRAMS += test-verify -EXTRA_DIST += test-verify.c test-verify.sh - -## end gnulib module verify-tests - -## begin gnulib module wchar-tests - -TESTS += test-wchar -check_PROGRAMS += test-wchar -EXTRA_DIST += test-wchar.c - -## end gnulib module wchar-tests - -## begin gnulib module wcrtomb-tests - -TESTS += \ - test-wcrtomb.sh \ - 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 -TESTS_ENVIRONMENT += \ - LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' -check_PROGRAMS += test-wcrtomb test-wcrtomb-w32 - -EXTRA_DIST += 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 - -## end gnulib module wcrtomb-tests - -## begin gnulib module wctob - - -EXTRA_DIST += wctob.c - -EXTRA_libtests_a_SOURCES += wctob.c - -## end gnulib module wctob - -## begin gnulib module wctomb - - -EXTRA_DIST += wctomb-impl.h wctomb.c - -EXTRA_libtests_a_SOURCES += wctomb.c - -## end gnulib module wctomb - -## begin gnulib module wctype-h-tests - -TESTS += test-wctype-h -check_PROGRAMS += test-wctype-h -EXTRA_DIST += test-wctype-h.c macros.h - -## end gnulib module wctype-h-tests - -## begin gnulib module yield - -libtests_a_SOURCES += glthread/yield.h - -## end gnulib module yield - -# Clean up after Solaris cc. -clean-local: - rm -rf SunWS_cache - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : diff --git a/gnulib/tests/Makefile.in b/gnulib/tests/Makefile.in deleted file mode 100644 index 37b527a..0000000 --- a/gnulib/tests/Makefile.in +++ /dev/null @@ -1,3790 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Copyright (C) 2002-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 . -# -# 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. - - - -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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -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-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-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 \ - test-mbrtowc4.sh 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-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-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 \ - test-wcrtomb-w32-3.sh test-wcrtomb-w32-4.sh \ - test-wcrtomb-w32-5.sh test-wctype-h$(EXEEXT) -XFAIL_TESTS = -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-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-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-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-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 = $(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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -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) fd-hook.$(OBJEXT) localename.$(OBJEXT) \ - glthread/lock.$(OBJEXT) glthread/thread.$(OBJEXT) \ - glthread/threadlib.$(OBJEXT) -libtests_a_OBJECTS = $(am_libtests_a_OBJECTS) -PROGRAMS = $(noinst_PROGRAMS) -test_alloca_opt_SOURCES = test-alloca-opt.c -test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT) -test_alloca_opt_LDADD = $(LDADD) -test_alloca_opt_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -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) -test_binary_io_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_btowc_SOURCES = test-btowc.c -test_btowc_OBJECTS = test-btowc.$(OBJEXT) -test_btowc_LDADD = $(LDADD) -test_btowc_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_c_ctype_SOURCES = test-c-ctype.c -test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT) -test_c_ctype_LDADD = $(LDADD) -test_c_ctype_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_c_strcasecmp_SOURCES = test-c-strcasecmp.c -test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT) -test_c_strcasecmp_LDADD = $(LDADD) -test_c_strcasecmp_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_c_strncasecmp_SOURCES = test-c-strncasecmp.c -test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT) -test_c_strncasecmp_LDADD = $(LDADD) -test_c_strncasecmp_DEPENDENCIES = libtests.a \ - ../../gnulib/lib/libgnu.la libtests.a $(am__DEPENDENCIES_1) -test_canonicalize_lgpl_SOURCES = test-canonicalize-lgpl.c -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) -test_ctype_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_dup2_SOURCES = test-dup2.c -test_dup2_OBJECTS = test-dup2.$(OBJEXT) -test_dup2_LDADD = $(LDADD) -test_dup2_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_environ_SOURCES = test-environ.c -test_environ_OBJECTS = test-environ.$(OBJEXT) -test_environ_LDADD = $(LDADD) -test_environ_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_errno_SOURCES = test-errno.c -test_errno_OBJECTS = test-errno.$(OBJEXT) -test_errno_LDADD = $(LDADD) -test_errno_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_fcntl_h_SOURCES = test-fcntl-h.c -test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT) -test_fcntl_h_LDADD = $(LDADD) -test_fcntl_h_DEPENDENCIES = libtests.a ../../gnulib/lib/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) -test_getdelim_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_getline_SOURCES = test-getline.c -test_getline_OBJECTS = test-getline.$(OBJEXT) -test_getline_LDADD = $(LDADD) -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) -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) -test_isblank_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_langinfo_SOURCES = test-langinfo.c -test_langinfo_OBJECTS = test-langinfo.$(OBJEXT) -test_langinfo_LDADD = $(LDADD) -test_langinfo_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_locale_SOURCES = test-locale.c -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) \ - $(am__DEPENDENCIES_1) -test_lock_SOURCES = test-lock.c -test_lock_OBJECTS = test-lock.$(OBJEXT) -test_lock_DEPENDENCIES = $(am__DEPENDENCIES_2) -test_lstat_SOURCES = test-lstat.c -test_lstat_OBJECTS = test-lstat.$(OBJEXT) -test_lstat_LDADD = $(LDADD) -test_lstat_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_malloc_gnu_SOURCES = test-malloc-gnu.c -test_malloc_gnu_OBJECTS = test-malloc-gnu.$(OBJEXT) -test_malloc_gnu_LDADD = $(LDADD) -test_malloc_gnu_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_malloca_SOURCES = test-malloca.c -test_malloca_OBJECTS = test-malloca.$(OBJEXT) -test_malloca_LDADD = $(LDADD) -test_malloca_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_mbrtowc_SOURCES = test-mbrtowc.c -test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT) -test_mbrtowc_LDADD = $(LDADD) -test_mbrtowc_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_mbrtowc_w32_SOURCES = test-mbrtowc-w32.c -test_mbrtowc_w32_OBJECTS = test-mbrtowc-w32.$(OBJEXT) -test_mbrtowc_w32_LDADD = $(LDADD) -test_mbrtowc_w32_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_mbsinit_SOURCES = test-mbsinit.c -test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT) -test_mbsinit_LDADD = $(LDADD) -test_mbsinit_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_mbsrtowcs_SOURCES = test-mbsrtowcs.c -test_mbsrtowcs_OBJECTS = test-mbsrtowcs.$(OBJEXT) -test_mbsrtowcs_LDADD = $(LDADD) -test_mbsrtowcs_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_memchr_SOURCES = test-memchr.c -test_memchr_OBJECTS = test-memchr.$(OBJEXT) -test_memchr_LDADD = $(LDADD) -test_memchr_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_nl_langinfo_SOURCES = test-nl_langinfo.c -test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT) -test_nl_langinfo_LDADD = $(LDADD) -test_nl_langinfo_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_open_SOURCES = test-open.c -test_open_OBJECTS = test-open.$(OBJEXT) -test_open_LDADD = $(LDADD) -test_open_DEPENDENCIES = libtests.a ../../gnulib/lib/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) -test_readlink_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_safe_alloc_SOURCES = test-safe-alloc.c -test_safe_alloc_OBJECTS = test-safe-alloc.$(OBJEXT) -test_safe_alloc_LDADD = $(LDADD) -test_safe_alloc_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_setenv_SOURCES = test-setenv.c -test_setenv_OBJECTS = test-setenv.$(OBJEXT) -test_setenv_LDADD = $(LDADD) -test_setenv_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_setlocale1_SOURCES = test-setlocale1.c -test_setlocale1_OBJECTS = test-setlocale1.$(OBJEXT) -test_setlocale1_LDADD = $(LDADD) -test_setlocale1_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_setlocale2_SOURCES = test-setlocale2.c -test_setlocale2_OBJECTS = test-setlocale2.$(OBJEXT) -test_setlocale2_LDADD = $(LDADD) -test_setlocale2_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_stat_SOURCES = test-stat.c -test_stat_OBJECTS = test-stat.$(OBJEXT) -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) -test_stdbool_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_stddef_SOURCES = test-stddef.c -test_stddef_OBJECTS = test-stddef.$(OBJEXT) -test_stddef_LDADD = $(LDADD) -test_stddef_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_stdint_SOURCES = test-stdint.c -test_stdint_OBJECTS = test-stdint.$(OBJEXT) -test_stdint_LDADD = $(LDADD) -test_stdint_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_stdio_SOURCES = test-stdio.c -test_stdio_OBJECTS = test-stdio.$(OBJEXT) -test_stdio_LDADD = $(LDADD) -test_stdio_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_stdlib_SOURCES = test-stdlib.c -test_stdlib_OBJECTS = test-stdlib.$(OBJEXT) -test_stdlib_LDADD = $(LDADD) -test_stdlib_DEPENDENCIES = libtests.a ../../gnulib/lib/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) -test_string_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_strnlen_SOURCES = test-strnlen.c -test_strnlen_OBJECTS = test-strnlen.$(OBJEXT) -test_strnlen_LDADD = $(LDADD) -test_strnlen_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_strstr_SOURCES = test-strstr.c -test_strstr_OBJECTS = test-strstr.$(OBJEXT) -test_strstr_LDADD = $(LDADD) -test_strstr_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_symlink_SOURCES = test-symlink.c -test_symlink_OBJECTS = test-symlink.$(OBJEXT) -test_symlink_LDADD = $(LDADD) -test_symlink_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_sys_stat_SOURCES = test-sys_stat.c -test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT) -test_sys_stat_LDADD = $(LDADD) -test_sys_stat_DEPENDENCIES = libtests.a ../../gnulib/lib/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) -test_time_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_unistd_SOURCES = test-unistd.c -test_unistd_OBJECTS = test-unistd.$(OBJEXT) -test_unistd_LDADD = $(LDADD) -test_unistd_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_unsetenv_SOURCES = test-unsetenv.c -test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT) -test_unsetenv_LDADD = $(LDADD) -test_unsetenv_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_vasnprintf_SOURCES = test-vasnprintf.c -test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT) -test_vasnprintf_LDADD = $(LDADD) -test_vasnprintf_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_vasprintf_SOURCES = test-vasprintf.c -test_vasprintf_OBJECTS = test-vasprintf.$(OBJEXT) -test_vasprintf_LDADD = $(LDADD) -test_vasprintf_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_verify_SOURCES = test-verify.c -test_verify_OBJECTS = test-verify.$(OBJEXT) -test_verify_LDADD = $(LDADD) -test_verify_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_wchar_SOURCES = test-wchar.c -test_wchar_OBJECTS = test-wchar.$(OBJEXT) -test_wchar_LDADD = $(LDADD) -test_wchar_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_wcrtomb_SOURCES = test-wcrtomb.c -test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT) -test_wcrtomb_LDADD = $(LDADD) -test_wcrtomb_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_wcrtomb_w32_SOURCES = test-wcrtomb-w32.c -test_wcrtomb_w32_OBJECTS = test-wcrtomb-w32.$(OBJEXT) -test_wcrtomb_w32_LDADD = $(LDADD) -test_wcrtomb_w32_DEPENDENCIES = libtests.a ../../gnulib/lib/libgnu.la \ - libtests.a $(am__DEPENDENCIES_1) -test_wctype_h_SOURCES = test-wctype-h.c -test_wctype_h_OBJECTS = test-wctype-h.$(OBJEXT) -test_wctype_h_LDADD = $(LDADD) -test_wctype_h_DEPENDENCIES = libtests.a ../../gnulib/lib/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/ac-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -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_@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_@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-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-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-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-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-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-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 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_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 -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 \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -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), 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. 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; \ -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='$@'; \ -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_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) -DIST_SUBDIRS = $(SUBDIRS) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -am__relativize = \ - dir0=`pwd`; \ - sed_first='s,^\([^/]*\)/.*$$,\1,'; \ - sed_rest='s,^[^/]*/*,,'; \ - sed_last='s,^.*/\([^/]*\)$$,\1,'; \ - sed_butlast='s,/*[^/]*$$,,'; \ - while test -n "$$dir1"; do \ - first=`echo "$$dir1" | sed -e "$$sed_first"`; \ - if test "$$first" != "."; then \ - if test "$$first" = ".."; then \ - dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ - dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ - else \ - first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ - if test "$$first2" = "$$first"; then \ - dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ - else \ - dir2="../$$dir2"; \ - fi; \ - dir0="$$dir0"/"$$first"; \ - fi; \ - fi; \ - dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ - done; \ - reldir="$$dir2" -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -AMTAR = @AMTAR@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects -SUBDIRS = . -TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \ - LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \ - LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \ - LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_JA='@LOCALE_JA@' \ - LOCALE_ZH_CN='@LOCALE_ZH_CN@' MAKE='$(MAKE)' \ - LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \ - LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' -noinst_HEADERS = -noinst_LIBRARIES = -check_LIBRARIES = libtests.a -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 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 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 \ - $(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_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 -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. - -# The BUILT_SOURCES created by this Makefile snippet are not used via #include -# statements but through direct file reference. Therefore this snippet must be -# present in all Makefile.am that need it. This is ensured by the applicability -# 'all' defined above. -BUILT_SOURCES = inttypes.h arg-nonnull.h c++defs.h unused-parameter.h \ - warn-on-use.h -SUFFIXES = -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 = -DISTCLEANFILES = -MAINTAINERCLEANFILES = -AM_CPPFLAGS = \ - -D@gltests_WITNESS@=1 \ - -I. -I$(srcdir) \ - -I../.. -I$(srcdir)/../.. \ - -I../../gnulib/lib -I$(srcdir)/../../gnulib/lib - -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 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 = 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 -test_getcwd_lgpl_LDADD = $(LDADD) $(LIBINTL) -test_getopt_LDADD = $(LDADD) $(LIBINTL) -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 .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 \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign gnulib/tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign gnulib/tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkLIBRARIES: - -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES) - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -glthread/$(am__dirstamp): - @$(MKDIR_P) glthread - @: > glthread/$(am__dirstamp) -glthread/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) glthread/$(DEPDIR) - @: > glthread/$(DEPDIR)/$(am__dirstamp) -glthread/lock.$(OBJEXT): glthread/$(am__dirstamp) \ - glthread/$(DEPDIR)/$(am__dirstamp) -glthread/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) $(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 - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - 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) $(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) $(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) $(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) $(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) $(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) $(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) $(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-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) $(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) $(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) $(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) $(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-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-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) $(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) $(EXTRA_test_getopt_DEPENDENCIES) - @rm -f test-getopt$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_getopt_OBJECTS) $(test_getopt_LDADD) $(LIBS) - -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-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) $(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) $(EXTRA_test_locale_DEPENDENCIES) - @rm -f test-locale$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_locale_OBJECTS) $(test_locale_LDADD) $(LIBS) - -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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(EXTRA_test_open_DEPENDENCIES) - @rm -f test-open$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS) - -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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(EXTRA_test_stdlib_DEPENDENCIES) - @rm -f test-stdlib$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS) - -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) $(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) $(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) $(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) $(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_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-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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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) $(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/*.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setlocale.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloc-gnu.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc-w32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsrtowcs.Po@am__quote@ -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setlocale2.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@ -@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@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasprintf.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-verify.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb-w32.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype-h.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctomb.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/lock.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/thread.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@glthread/$(DEPDIR)/threadlib.Po@am__quote@ - -.c.o: -@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 -@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@ $(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 -@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@ $(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 -@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -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. -$(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//`; \ - 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; \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done; \ - if test "$$dot_seen" = "no"; then \ - $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ - fi; test -z "$$fail" - -ID: $(am__tagged_files) - $(am__define_uniq_tagged_files); mkid -fID $$unique -tags: tags-recursive -TAGS: tags - -tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) - set x; \ - here=`pwd`; \ - if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ - include_option=--etags-include; \ - empty_fix=.; \ - else \ - include_option=--include; \ - empty_fix=; \ - fi; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - test ! -f $$subdir/TAGS || \ - set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ - fi; \ - done; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -# 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__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); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - 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 $$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 \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @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) - @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)'; \ - 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'; \ - 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'; \ - 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'; \ - 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)'; \ - 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'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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)'; \ - 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'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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'; \ - 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'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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)'; \ - 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'; \ - 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)'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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'; \ - 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)'; \ - 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__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__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'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ - $(am__make_dryrun) \ - || test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ - $(am__relativize); \ - new_distdir=$$reldir; \ - dir1=$$subdir; dir2="$(top_distdir)"; \ - $(am__relativize); \ - new_top_distdir=$$reldir; \ - echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ - echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ - ($(am__cd) $$subdir && \ - $(MAKE) $(AM_MAKEFLAGS) \ - top_distdir="$$new_top_distdir" \ - distdir="$$new_distdir" \ - am__remove_distdir=: \ - am__skip_length_check=: \ - am__skip_mode_fix=: \ - distdir) \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) -installdirs: installdirs-recursive -installdirs-am: -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-recursive -install-exec: install-exec-recursive -install-data: install-data-recursive -uninstall: uninstall-recursive - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-recursive -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f glthread/$(DEPDIR)/$(am__dirstamp) - -rm -f glthread/$(am__dirstamp) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) - -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) -clean: clean-recursive - -clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \ - clean-libtool clean-local clean-noinstLIBRARIES \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-recursive - -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-recursive - -dvi-am: - -html: html-recursive - -html-am: - -info: info-recursive - -info-am: - -install-data-am: - -install-dvi: install-dvi-recursive - -install-dvi-am: - -install-exec-am: - -install-html: install-html-recursive - -install-html-am: - -install-info: install-info-recursive - -install-info-am: - -install-man: - -install-pdf: install-pdf-recursive - -install-pdf-am: - -install-ps: install-ps-recursive - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-recursive - -rm -rf ./$(DEPDIR) glthread/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-recursive - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local - -pdf: pdf-recursive - -pdf-am: - -ps: ps-recursive - -ps-am: - -uninstall-am: - -.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. -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 $@ -# 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 $@ -# 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 $@ - -# Clean up after Solaris cc. -clean-local: - rm -rf SunWS_cache - -mostlyclean-local: mostlyclean-generic - @for dir in '' $(MOSTLYCLEANDIRS); do \ - if test -n "$$dir" && test -d $$dir; then \ - echo "rmdir $$dir"; rmdir $$dir; \ - fi; \ - done; \ - : - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/gnulib/tests/binary-io.h b/gnulib/tests/binary-io.h deleted file mode 100644 index a33e32a..0000000 --- a/gnulib/tests/binary-io.h +++ /dev/null @@ -1,65 +0,0 @@ -/* Binary mode I/O. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General 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 _BINARY_H -#define _BINARY_H - -/* For systems that distinguish between text and binary I/O. - O_BINARY is guaranteed by the gnulib . */ -#include - -/* The MSVC7 doesn't like to be included after '#define fileno ...', - so we include it here first. */ -#include - -/* 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 set_binary_mode _setmode -# undef fileno -# define fileno _fileno -# endif -#else - /* 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 deleted file mode 100644 index 952d7a8..0000000 --- a/gnulib/tests/c-ctype.c +++ /dev/null @@ -1,395 +0,0 @@ -/* Character handling in C locale. - - 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 -the Free Software Foundation; either version 3 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, see . */ - -#include - -/* Specification. */ -#define NO_C_CTYPE_MACROS -#include "c-ctype.h" - -/* The function isascii is not locale dependent. Its use in EBCDIC is - questionable. */ -bool -c_isascii (int c) -{ - return (c >= 0x00 && c <= 0x7f); -} - -bool -c_isalnum (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'Z') - || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isalpha (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'); -#else - return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')); -#endif -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isblank (int c) -{ - return (c == ' ' || c == '\t'); -} - -bool -c_iscntrl (int c) -{ -#if C_CTYPE_ASCII - return ((c & ~0x1f) == 0 || c == 0x7f); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 0; - default: - return 1; - } -#endif -} - -bool -c_isdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS - return (c >= '0' && c <= '9'); -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - return 1; - default: - return 0; - } -#endif -} - -bool -c_islower (int c) -{ -#if C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z'); -#else - switch (c) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isgraph (int c) -{ -#if C_CTYPE_ASCII - return (c >= '!' && c <= '~'); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isprint (int c) -{ -#if C_CTYPE_ASCII - return (c >= ' ' && c <= '~'); -#else - switch (c) - { - case ' ': case '!': case '"': case '#': case '$': case '%': - case '&': case '\'': case '(': case ')': case '*': case '+': - case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case '[': case '\\': case ']': case '^': case '_': case '`': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_ispunct (int c) -{ -#if C_CTYPE_ASCII - return ((c >= '!' && c <= '~') - && !((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'))); -#else - switch (c) - { - case '!': case '"': case '#': case '$': case '%': case '&': - case '\'': case '(': case ')': case '*': case '+': case ',': - case '-': case '.': case '/': - case ':': case ';': case '<': case '=': case '>': case '?': - case '@': - case '[': case '\\': case ']': case '^': case '_': case '`': - case '{': case '|': case '}': case '~': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isspace (int c) -{ - return (c == ' ' || c == '\t' - || c == '\n' || c == '\v' || c == '\f' || c == '\r'); -} - -bool -c_isupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE - return (c >= 'A' && c <= 'Z'); -#else - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - return 1; - default: - return 0; - } -#endif -} - -bool -c_isxdigit (int c) -{ -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII - return ((c >= '0' && c <= '9') - || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F')); -#else - return ((c >= '0' && c <= '9') - || (c >= 'A' && c <= 'F') - || (c >= 'a' && c <= 'f')); -#endif -#else - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - return 1; - default: - return 0; - } -#endif -} - -int -c_tolower (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c); -#else - switch (c) - { - case 'A': return 'a'; - case 'B': return 'b'; - case 'C': return 'c'; - case 'D': return 'd'; - case 'E': return 'e'; - case 'F': return 'f'; - case 'G': return 'g'; - case 'H': return 'h'; - case 'I': return 'i'; - case 'J': return 'j'; - case 'K': return 'k'; - case 'L': return 'l'; - case 'M': return 'm'; - case 'N': return 'n'; - case 'O': return 'o'; - case 'P': return 'p'; - case 'Q': return 'q'; - case 'R': return 'r'; - case 'S': return 's'; - case 'T': return 't'; - case 'U': return 'u'; - case 'V': return 'v'; - case 'W': return 'w'; - case 'X': return 'x'; - case 'Y': return 'y'; - case 'Z': return 'z'; - default: return c; - } -#endif -} - -int -c_toupper (int c) -{ -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE - return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c); -#else - switch (c) - { - case 'a': return 'A'; - case 'b': return 'B'; - case 'c': return 'C'; - case 'd': return 'D'; - case 'e': return 'E'; - case 'f': return 'F'; - case 'g': return 'G'; - case 'h': return 'H'; - case 'i': return 'I'; - case 'j': return 'J'; - case 'k': return 'K'; - case 'l': return 'L'; - case 'm': return 'M'; - case 'n': return 'N'; - case 'o': return 'O'; - case 'p': return 'P'; - case 'q': return 'Q'; - case 'r': return 'R'; - case 's': return 'S'; - case 't': return 'T'; - case 'u': return 'U'; - case 'v': return 'V'; - case 'w': return 'W'; - case 'x': return 'X'; - case 'y': return 'Y'; - case 'z': return 'Z'; - default: return c; - } -#endif -} diff --git a/gnulib/tests/c-ctype.h b/gnulib/tests/c-ctype.h deleted file mode 100644 index 0b31309..0000000 --- a/gnulib/tests/c-ctype.h +++ /dev/null @@ -1,294 +0,0 @@ -/* Character handling in C locale. - - These functions work like the corresponding functions in , - except that they have the C (POSIX) locale hardwired, whereas the - functions' behaviour depends on the current locale set via - setlocale. - - Copyright (C) 2000-2003, 2006, 2008-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 C_CTYPE_H -#define C_CTYPE_H - -#include - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* The functions defined in this file assume the "C" locale and a character - set without diacritics (ASCII-US or EBCDIC-US or something like that). - Even if the "C" locale on a particular system is an extension of the ASCII - character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it - is ISO-8859-1), the functions in this file recognize only the ASCII - characters. */ - - -/* Check whether the ASCII optimizations apply. */ - -/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that - '0', '1', ..., '9' have consecutive integer values. */ -#define C_CTYPE_CONSECUTIVE_DIGITS 1 - -#if ('A' <= 'Z') \ - && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \ - && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \ - && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \ - && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \ - && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \ - && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \ - && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \ - && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \ - && ('Y' + 1 == 'Z') -#define C_CTYPE_CONSECUTIVE_UPPERCASE 1 -#endif - -#if ('a' <= 'z') \ - && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \ - && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \ - && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \ - && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \ - && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \ - && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \ - && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \ - && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \ - && ('y' + 1 == 'z') -#define C_CTYPE_CONSECUTIVE_LOWERCASE 1 -#endif - -#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \ - && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \ - && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \ - && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \ - && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \ - && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \ - && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \ - && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \ - && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \ - && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \ - && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \ - && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \ - && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \ - && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \ - && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \ - && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \ - && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \ - && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \ - && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \ - && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \ - && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \ - && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \ - && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126) -/* The character set is ASCII or one of its variants or extensions, not EBCDIC. - Testing the value of '\n' and '\r' is not relevant. */ -#define C_CTYPE_ASCII 1 -#endif - - -/* Function declarations. */ - -/* Unlike the functions in , which require an argument in the range - of the 'unsigned char' type, the functions here operate on values that are - in the 'unsigned char' range or in the 'char' range. In other words, - when you have a 'char' value, you need to cast it before using it as - argument to a function: - - const char *s = ...; - if (isalpha ((unsigned char) *s)) ... - - but you don't need to cast it for the functions defined in this file: - - const char *s = ...; - if (c_isalpha (*s)) ... - */ - -extern bool c_isascii (int c) _GL_ATTRIBUTE_CONST; /* not locale dependent */ - -extern bool c_isalnum (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isalpha (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isblank (int c) _GL_ATTRIBUTE_CONST; -extern bool c_iscntrl (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isdigit (int c) _GL_ATTRIBUTE_CONST; -extern bool c_islower (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isgraph (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isprint (int c) _GL_ATTRIBUTE_CONST; -extern bool c_ispunct (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isspace (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isupper (int c) _GL_ATTRIBUTE_CONST; -extern bool c_isxdigit (int c) _GL_ATTRIBUTE_CONST; - -extern int c_tolower (int c) _GL_ATTRIBUTE_CONST; -extern int c_toupper (int c) _GL_ATTRIBUTE_CONST; - - -#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS - -/* ASCII optimizations. */ - -#undef c_isascii -#define c_isascii(c) \ - ({ int __c = (c); \ - (__c >= 0x00 && __c <= 0x7f); \ - }) - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \ - }) -#else -#undef c_isalnum -#define c_isalnum(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'Z') \ - || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \ - }) -#else -#undef c_isalpha -#define c_isalpha(c) \ - ({ int __c = (c); \ - ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \ - }) -#endif -#endif - -#undef c_isblank -#define c_isblank(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t'); \ - }) - -#if C_CTYPE_ASCII -#undef c_iscntrl -#define c_iscntrl(c) \ - ({ int __c = (c); \ - ((__c & ~0x1f) == 0 || __c == 0x7f); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS -#undef c_isdigit -#define c_isdigit(c) \ - ({ int __c = (c); \ - (__c >= '0' && __c <= '9'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_islower -#define c_islower(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isgraph -#define c_isgraph(c) \ - ({ int __c = (c); \ - (__c >= '!' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_isprint -#define c_isprint(c) \ - ({ int __c = (c); \ - (__c >= ' ' && __c <= '~'); \ - }) -#endif - -#if C_CTYPE_ASCII -#undef c_ispunct -#define c_ispunct(c) \ - ({ int _c = (c); \ - (c_isgraph (_c) && ! c_isalnum (_c)); \ - }) -#endif - -#undef c_isspace -#define c_isspace(c) \ - ({ int __c = (c); \ - (__c == ' ' || __c == '\t' \ - || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \ - }) - -#if C_CTYPE_CONSECUTIVE_UPPERCASE -#undef c_isupper -#define c_isupper(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z'); \ - }) -#endif - -#if C_CTYPE_CONSECUTIVE_DIGITS \ - && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#if C_CTYPE_ASCII -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \ - }) -#else -#undef c_isxdigit -#define c_isxdigit(c) \ - ({ int __c = (c); \ - ((__c >= '0' && __c <= '9') \ - || (__c >= 'A' && __c <= 'F') \ - || (__c >= 'a' && __c <= 'f')); \ - }) -#endif -#endif - -#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE -#undef c_tolower -#define c_tolower(c) \ - ({ int __c = (c); \ - (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \ - }) -#undef c_toupper -#define c_toupper(c) \ - ({ int __c = (c); \ - (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \ - }) -#endif - -#endif /* optimizing for speed */ - - -#ifdef __cplusplus -} -#endif - -#endif /* C_CTYPE_H */ diff --git a/gnulib/tests/c-strcase.h b/gnulib/tests/c-strcase.h deleted file mode 100644 index fdef238..0000000 --- a/gnulib/tests/c-strcase.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Case-insensitive string comparison functions in C locale. - Copyright (C) 1995-1996, 2001, 2003, 2005, 2009-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 C_STRCASE_H -#define C_STRCASE_H - -#include - - -/* The functions defined in this file assume the "C" locale and a character - set without diacritics (ASCII-US or EBCDIC-US or something like that). - Even if the "C" locale on a particular system is an extension of the ASCII - character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it - is ISO-8859-1), the functions in this file recognize only the ASCII - characters. More precisely, one of the string arguments must be an ASCII - string; the other one can also contain non-ASCII characters (but then - the comparison result will be nonzero). */ - - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Compare strings S1 and S2, ignoring case, returning less than, equal to or - greater than zero if S1 is lexicographically less than, equal to or greater - than S2. */ -extern int c_strcasecmp (const char *s1, const char *s2) _GL_ATTRIBUTE_PURE; - -/* Compare no more than N characters of strings S1 and S2, ignoring case, - returning less than, equal to or greater than zero if S1 is - lexicographically less than, equal to or greater than S2. */ -extern int c_strncasecmp (const char *s1, const char *s2, size_t n) - _GL_ATTRIBUTE_PURE; - - -#ifdef __cplusplus -} -#endif - - -#endif /* C_STRCASE_H */ diff --git a/gnulib/tests/c-strcasecmp.c b/gnulib/tests/c-strcasecmp.c deleted file mode 100644 index d8332ca..0000000 --- a/gnulib/tests/c-strcasecmp.c +++ /dev/null @@ -1,56 +0,0 @@ -/* c-strcasecmp.c -- case insensitive string comparator in C locale - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#include - -/* Specification. */ -#include "c-strcase.h" - -#include - -#include "c-ctype.h" - -int -c_strcasecmp (const char *s1, const char *s2) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do - { - c1 = c_tolower (*p1); - c2 = c_tolower (*p2); - - if (c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/tests/c-strncasecmp.c b/gnulib/tests/c-strncasecmp.c deleted file mode 100644 index 47fb5fd..0000000 --- a/gnulib/tests/c-strncasecmp.c +++ /dev/null @@ -1,56 +0,0 @@ -/* c-strncasecmp.c -- case insensitive string comparator in C locale - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -#include - -/* Specification. */ -#include "c-strcase.h" - -#include - -#include "c-ctype.h" - -int -c_strncasecmp (const char *s1, const char *s2, size_t n) -{ - register const unsigned char *p1 = (const unsigned char *) s1; - register const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2 || n == 0) - return 0; - - do - { - c1 = c_tolower (*p1); - c2 = c_tolower (*p2); - - if (--n == 0 || c1 == '\0') - break; - - ++p1; - ++p2; - } - while (c1 == c2); - - if (UCHAR_MAX <= INT_MAX) - return c1 - c2; - else - /* On machines where 'char' and 'int' are types of the same size, the - difference of two 'unsigned char' values - including the sign bit - - doesn't fit in an 'int'. */ - return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0); -} diff --git a/gnulib/tests/close.c b/gnulib/tests/close.c deleted file mode 100644 index 4b7accb..0000000 --- a/gnulib/tests/close.c +++ /dev/null @@ -1,69 +0,0 @@ -/* 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 deleted file mode 100644 index f6d0f1c..0000000 --- a/gnulib/tests/dup2.c +++ /dev/null @@ -1,157 +0,0 @@ -/* Duplicate an open file descriptor to a specified file descriptor. - - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* written by Paul Eggert */ - -#include - -/* Specification. */ -#include - -#include -#include - -#if HAVE_DUP2 - -# undef dup2 - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* Get declarations of the native Windows API functions. */ -# define WIN32_LEAN_AND_MEAN -# include - -# include "msvc-inval.h" - -/* Get _get_osfhandle. */ -# include "msvc-nothrow.h" - -static int -ms_windows_dup2 (int fd, int desired_fd) -{ - int result; - - /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open, - dup2 (fd, fd) returns 0, but all further attempts to use fd in - future dup2 calls will hang. */ - if (fd == desired_fd) - { - if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE) - { - errno = EBADF; - return -1; - } - return fd; - } - - /* Wine 1.0.1 return 0 when desired_fd is negative but not -1: - http://bugs.winehq.org/show_bug.cgi?id=21289 */ - if (desired_fd < 0) - { - errno = EBADF; - return -1; - } - - TRY_MSVC_INVAL - { - result = dup2 (fd, desired_fd); - } - CATCH_MSVC_INVAL - { - errno = EBADF; - result = -1; - } - DONE_MSVC_INVAL; - - if (result == 0) - result = desired_fd; - - return result; -} - -# define dup2 ms_windows_dup2 - -# endif - -int -rpl_dup2 (int fd, int desired_fd) -{ - int result; - -# ifdef F_GETFL - /* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF. - On Cygwin 1.5.x, dup2 (1, 1) returns 0. - On 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) - result = _gl_register_dup (fd, result); -# endif - return result; -} - -#else /* !HAVE_DUP2 */ - -/* On older platforms, dup2 did not exist. */ - -# ifndef F_DUPFD -static int -dupfd (int fd, int desired_fd) -{ - int duplicated_fd = dup (fd); - if (duplicated_fd < 0 || duplicated_fd == desired_fd) - return duplicated_fd; - else - { - int r = dupfd (fd, desired_fd); - int e = errno; - close (duplicated_fd); - errno = e; - return r; - } -} -# endif - -int -dup2 (int fd, int desired_fd) -{ - int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd; - if (result == -1 || fd == desired_fd) - return result; - close (desired_fd); -# ifdef F_DUPFD - result = fcntl (fd, F_DUPFD, desired_fd); -# if REPLACE_FCHDIR - if (0 <= result) - result = _gl_register_dup (fd, result); -# endif -# else - result = dupfd (fd, desired_fd); -# endif - if (result == -1 && (errno == EMFILE || errno == EINVAL)) - errno = EBADF; - return result; -} -#endif /* !HAVE_DUP2 */ diff --git a/gnulib/tests/fd-hook.c b/gnulib/tests/fd-hook.c deleted file mode 100644 index 8f4ffe2..0000000 --- a/gnulib/tests/fd-hook.c +++ /dev/null @@ -1,116 +0,0 @@ -/* 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 deleted file mode 100644 index 721e9ad..0000000 --- a/gnulib/tests/fd-hook.h +++ /dev/null @@ -1,119 +0,0 @@ -/* 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 deleted file mode 100644 index 6595b16..0000000 --- a/gnulib/tests/fdopen.c +++ /dev/null @@ -1,69 +0,0 @@ -/* 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 deleted file mode 100644 index 23e4c81..0000000 --- a/gnulib/tests/fpucw.h +++ /dev/null @@ -1,108 +0,0 @@ -/* 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 deleted file mode 100644 index 6d5f5c2..0000000 --- a/gnulib/tests/fstat.c +++ /dev/null @@ -1,88 +0,0 @@ -/* 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 deleted file mode 100644 index f1e821b..0000000 --- a/gnulib/tests/getcwd-lgpl.c +++ /dev/null @@ -1,125 +0,0 @@ -/* 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 deleted file mode 100644 index 02c00fb..0000000 --- a/gnulib/tests/getpagesize.c +++ /dev/null @@ -1,39 +0,0 @@ -/* getpagesize emulation for systems where it cannot be done in a C macro. - - 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 and Martin Lambers. */ - -#include - -/* Specification. */ -#include - -/* This implementation is only for native Windows systems. */ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -# define WIN32_LEAN_AND_MEAN -# include - -int -getpagesize (void) -{ - SYSTEM_INFO system_info; - GetSystemInfo (&system_info); - return system_info.dwPageSize; -} - -#endif diff --git a/gnulib/tests/glthread/lock.c b/gnulib/tests/glthread/lock.c deleted file mode 100644 index 9a391ea..0000000 --- a/gnulib/tests/glthread/lock.c +++ /dev/null @@ -1,1057 +0,0 @@ -/* Locking in multithreaded situations. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -#include - -#include "glthread/lock.h" - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK - -# if !defined PTHREAD_RWLOCK_INITIALIZER - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_rwlock_init (&lock->rwlock, NULL); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_rdlock (&lock->rwlock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_rwlock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_rwlock_wrlock (&lock->rwlock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_rwlock_unlock (&lock->rwlock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_rwlock_destroy (&lock->rwlock); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_rwlock_init_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->lock, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_readers, NULL); - if (err != 0) - return err; - err = pthread_cond_init (&lock->waiting_writers, NULL); - if (err != 0) - return err; - lock->waiting_writers_count = 0; - lock->runcount = 0; - return 0; -} - -int -glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether only readers are currently running, and whether the runcount - field will not overflow. */ - /* POSIX says: "It is implementation-defined whether the calling thread - acquires the lock when a writer does not hold the lock and there are - writers blocked on the lock." Let's say, no: give the writers a higher - priority. */ - while (!(lock->runcount + 1 > 0 && lock->waiting_writers_count == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - err = pthread_cond_wait (&lock->waiting_readers, &lock->lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - lock->runcount++; - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - /* Test whether no readers or writers are currently running. */ - while (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - lock->waiting_writers_count++; - err = pthread_cond_wait (&lock->waiting_writers, &lock->lock); - if (err != 0) - { - lock->waiting_writers_count--; - pthread_mutex_unlock (&lock->lock); - return err; - } - lock->waiting_writers_count--; - } - lock->runcount--; /* runcount becomes -1 */ - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_lock (&lock->lock); - if (err != 0) - return err; - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - pthread_mutex_unlock (&lock->lock); - return EINVAL; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers_count > 0) - { - /* Wake up one of the waiting writers. */ - err = pthread_cond_signal (&lock->waiting_writers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - else - { - /* Wake up all waiting readers. */ - err = pthread_cond_broadcast (&lock->waiting_readers); - if (err != 0) - { - pthread_mutex_unlock (&lock->lock); - return err; - } - } - } - return pthread_mutex_unlock (&lock->lock); -} - -int -glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock) -{ - int err; - - err = pthread_mutex_destroy (&lock->lock); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_readers); - if (err != 0) - return err; - err = pthread_cond_destroy (&lock->waiting_writers); - if (err != 0) - return err; - return 0; -} - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (lock, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - return 0; -} - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_mutexattr_t attributes; - int err; - - err = pthread_mutexattr_init (&attributes); - if (err != 0) - return err; - err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutex_init (&lock->recmutex, &attributes); - if (err != 0) - { - pthread_mutexattr_destroy (&attributes); - return err; - } - err = pthread_mutexattr_destroy (&attributes); - if (err != 0) - return err; - lock->initialized = 1; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - { - int err; - - err = pthread_mutex_lock (&lock->guard); - if (err != 0) - return err; - if (!lock->initialized) - { - err = glthread_recursive_lock_init_multithreaded (lock); - if (err != 0) - { - pthread_mutex_unlock (&lock->guard); - return err; - } - } - err = pthread_mutex_unlock (&lock->guard); - if (err != 0) - return err; - } - return pthread_mutex_lock (&lock->recmutex); -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (!lock->initialized) - return EINVAL; - return pthread_mutex_unlock (&lock->recmutex); -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - if (!lock->initialized) - return EINVAL; - err = pthread_mutex_destroy (&lock->recmutex); - if (err != 0) - return err; - lock->initialized = 0; - return 0; -} - -# endif - -# else - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - err = pthread_mutex_init (&lock->mutex, NULL); - if (err != 0) - return err; - lock->owner = (pthread_t) 0; - lock->depth = 0; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - pthread_t self = pthread_self (); - if (lock->owner != self) - { - int err; - - err = pthread_mutex_lock (&lock->mutex); - if (err != 0) - return err; - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - return 0; -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != pthread_self ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = (pthread_t) 0; - return pthread_mutex_unlock (&lock->mutex); - } - else - return 0; -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != (pthread_t) 0) - return EBUSY; - return pthread_mutex_destroy (&lock->mutex); -} - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -static const pthread_once_t fresh_once = PTHREAD_ONCE_INIT; - -int -glthread_once_singlethreaded (pthread_once_t *once_control) -{ - /* We don't know whether pthread_once_t is an integer type, a floating-point - type, a pointer type, or a structure type. */ - char *firstbyte = (char *)once_control; - if (*firstbyte == *(const char *)&fresh_once) - { - /* First time use of once_control. Invert the first byte. */ - *firstbyte = ~ *(const char *)&fresh_once; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* -------------------------- gl_once_t datatype -------------------------- */ - -static void -glthread_once_call (void *arg) -{ - void (**gl_once_temp_addr) (void) = (void (**) (void)) arg; - void (*initfunction) (void) = *gl_once_temp_addr; - initfunction (); -} - -int -glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)) -{ - void (*temp) (void) = initfunction; - return (!pth_once (once_control, glthread_once_call, &temp) ? errno : 0); -} - -int -glthread_once_singlethreaded (pth_once_t *once_control) -{ - /* We know that pth_once_t is an integer type. */ - if (*once_control == PTH_ONCE_INIT) - { - /* First time use of once_control. Invert the marker. */ - *once_control = ~ PTH_ONCE_INIT; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -int -glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock) -{ - int err; - - err = mutex_init (&lock->mutex, USYNC_THREAD, NULL); - if (err != 0) - return err; - lock->owner = (thread_t) 0; - lock->depth = 0; - return 0; -} - -int -glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock) -{ - thread_t self = thr_self (); - if (lock->owner != self) - { - int err; - - err = mutex_lock (&lock->mutex); - if (err != 0) - return err; - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - return 0; -} - -int -glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != thr_self ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = (thread_t) 0; - return mutex_unlock (&lock->mutex); - } - else - return 0; -} - -int -glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock) -{ - if (lock->owner != (thread_t) 0) - return EBUSY; - return mutex_destroy (&lock->mutex); -} - -/* -------------------------- gl_once_t datatype -------------------------- */ - -int -glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)) -{ - if (!once_control->inited) - { - int err; - - /* Use the mutex to guarantee that if another thread is already calling - the initfunction, this thread waits until it's finished. */ - err = mutex_lock (&once_control->mutex); - if (err != 0) - return err; - if (!once_control->inited) - { - once_control->inited = 1; - initfunction (); - } - return mutex_unlock (&once_control->mutex); - } - else - return 0; -} - -int -glthread_once_singlethreaded (gl_once_t *once_control) -{ - /* We know that gl_once_t contains an integer type. */ - if (!once_control->inited) - { - /* First time use of once_control. Invert the marker. */ - once_control->inited = ~ 0; - return 1; - } - else - return 0; -} - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -void -glthread_lock_init_func (gl_lock_t *lock) -{ - InitializeCriticalSection (&lock->lock); - lock->guard.done = 1; -} - -int -glthread_lock_lock_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_lock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - return 0; -} - -int -glthread_lock_unlock_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_lock_destroy_func (gl_lock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - DeleteCriticalSection (&lock->lock); - lock->guard.done = 0; - return 0; -} - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* In this file, the waitqueues are implemented as circular arrays. */ -#define gl_waitqueue_t gl_carray_waitqueue_t - -static inline void -gl_waitqueue_init (gl_waitqueue_t *wq) -{ - wq->array = NULL; - wq->count = 0; - wq->alloc = 0; - wq->offset = 0; -} - -/* Enqueues the current thread, represented by an event, in a wait queue. - Returns INVALID_HANDLE_VALUE if an allocation failure occurs. */ -static HANDLE -gl_waitqueue_add (gl_waitqueue_t *wq) -{ - HANDLE event; - unsigned int index; - - if (wq->count == wq->alloc) - { - unsigned int new_alloc = 2 * wq->alloc + 1; - HANDLE *new_array = - (HANDLE *) realloc (wq->array, new_alloc * sizeof (HANDLE)); - if (new_array == NULL) - /* No more memory. */ - return INVALID_HANDLE_VALUE; - /* Now is a good opportunity to rotate the array so that its contents - starts at offset 0. */ - if (wq->offset > 0) - { - unsigned int old_count = wq->count; - unsigned int old_alloc = wq->alloc; - unsigned int old_offset = wq->offset; - unsigned int i; - if (old_offset + old_count > old_alloc) - { - unsigned int limit = old_offset + old_count - old_alloc; - for (i = 0; i < limit; i++) - new_array[old_alloc + i] = new_array[i]; - } - for (i = 0; i < old_count; i++) - new_array[i] = new_array[old_offset + i]; - wq->offset = 0; - } - wq->array = new_array; - wq->alloc = new_alloc; - } - /* Whether the created event is a manual-reset one or an auto-reset one, - does not matter, since we will wait on it only once. */ - event = CreateEvent (NULL, TRUE, FALSE, NULL); - if (event == INVALID_HANDLE_VALUE) - /* No way to allocate an event. */ - return INVALID_HANDLE_VALUE; - index = wq->offset + wq->count; - if (index >= wq->alloc) - index -= wq->alloc; - wq->array[index] = event; - wq->count++; - return event; -} - -/* Notifies the first thread from a wait queue and dequeues it. */ -static inline void -gl_waitqueue_notify_first (gl_waitqueue_t *wq) -{ - SetEvent (wq->array[wq->offset + 0]); - wq->offset++; - wq->count--; - if (wq->count == 0 || wq->offset == wq->alloc) - wq->offset = 0; -} - -/* Notifies all threads from a wait queue and dequeues them all. */ -static inline void -gl_waitqueue_notify_all (gl_waitqueue_t *wq) -{ - unsigned int i; - - for (i = 0; i < wq->count; i++) - { - unsigned int index = wq->offset + i; - if (index >= wq->alloc) - index -= wq->alloc; - SetEvent (wq->array[index]); - } - wq->count = 0; - wq->offset = 0; -} - -void -glthread_rwlock_init_func (gl_rwlock_t *lock) -{ - InitializeCriticalSection (&lock->lock); - gl_waitqueue_init (&lock->waiting_readers); - gl_waitqueue_init (&lock->waiting_writers); - lock->runcount = 0; - lock->guard.done = 1; -} - -int -glthread_rwlock_rdlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_rwlock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - /* Test whether only readers are currently running, and whether the runcount - field will not overflow. */ - if (!(lock->runcount + 1 > 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_readers. */ - HANDLE event = gl_waitqueue_add (&lock->waiting_readers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_readers, incremented lock->runcount. */ - if (!(lock->runcount > 0)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount + 1 > 0)); - } - } - lock->runcount++; - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_wrlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_rwlock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - EnterCriticalSection (&lock->lock); - /* Test whether no readers or writers are currently running. */ - if (!(lock->runcount == 0)) - { - /* This thread has to wait for a while. Enqueue it among the - waiting_writers. */ - HANDLE event = gl_waitqueue_add (&lock->waiting_writers); - if (event != INVALID_HANDLE_VALUE) - { - DWORD result; - LeaveCriticalSection (&lock->lock); - /* Wait until another thread signals this event. */ - result = WaitForSingleObject (event, INFINITE); - if (result == WAIT_FAILED || result == WAIT_TIMEOUT) - abort (); - CloseHandle (event); - /* The thread which signalled the event already did the bookkeeping: - removed us from the waiting_writers, set lock->runcount = -1. */ - if (!(lock->runcount == -1)) - abort (); - return 0; - } - else - { - /* Allocation failure. Weird. */ - do - { - LeaveCriticalSection (&lock->lock); - Sleep (1); - EnterCriticalSection (&lock->lock); - } - while (!(lock->runcount == 0)); - } - } - lock->runcount--; /* runcount becomes -1 */ - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_unlock_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - EnterCriticalSection (&lock->lock); - if (lock->runcount < 0) - { - /* Drop a writer lock. */ - if (!(lock->runcount == -1)) - abort (); - lock->runcount = 0; - } - else - { - /* Drop a reader lock. */ - if (!(lock->runcount > 0)) - { - LeaveCriticalSection (&lock->lock); - return EPERM; - } - lock->runcount--; - } - if (lock->runcount == 0) - { - /* POSIX recommends that "write locks shall take precedence over read - locks", to avoid "writer starvation". */ - if (lock->waiting_writers.count > 0) - { - /* Wake up one of the waiting writers. */ - lock->runcount--; - gl_waitqueue_notify_first (&lock->waiting_writers); - } - else - { - /* Wake up all waiting readers. */ - lock->runcount += lock->waiting_readers.count; - gl_waitqueue_notify_all (&lock->waiting_readers); - } - } - LeaveCriticalSection (&lock->lock); - return 0; -} - -int -glthread_rwlock_destroy_func (gl_rwlock_t *lock) -{ - if (!lock->guard.done) - return EINVAL; - if (lock->runcount != 0) - return EBUSY; - DeleteCriticalSection (&lock->lock); - if (lock->waiting_readers.array != NULL) - free (lock->waiting_readers.array); - if (lock->waiting_writers.array != NULL) - free (lock->waiting_writers.array); - lock->guard.done = 0; - return 0; -} - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -void -glthread_recursive_lock_init_func (gl_recursive_lock_t *lock) -{ - lock->owner = 0; - lock->depth = 0; - InitializeCriticalSection (&lock->lock); - lock->guard.done = 1; -} - -int -glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock) -{ - if (!lock->guard.done) - { - if (InterlockedIncrement (&lock->guard.started) == 0) - /* This thread is the first one to need this lock. Initialize it. */ - glthread_recursive_lock_init (lock); - else - /* Yield the CPU while waiting for another thread to finish - initializing this lock. */ - while (!lock->guard.done) - Sleep (0); - } - { - DWORD self = GetCurrentThreadId (); - if (lock->owner != self) - { - EnterCriticalSection (&lock->lock); - lock->owner = self; - } - if (++(lock->depth) == 0) /* wraparound? */ - { - lock->depth--; - return EAGAIN; - } - } - return 0; -} - -int -glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock) -{ - if (lock->owner != GetCurrentThreadId ()) - return EPERM; - if (lock->depth == 0) - return EINVAL; - if (--(lock->depth) == 0) - { - lock->owner = 0; - LeaveCriticalSection (&lock->lock); - } - return 0; -} - -int -glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock) -{ - if (lock->owner != 0) - return EBUSY; - DeleteCriticalSection (&lock->lock); - lock->guard.done = 0; - return 0; -} - -/* -------------------------- gl_once_t datatype -------------------------- */ - -void -glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)) -{ - if (once_control->inited <= 0) - { - if (InterlockedIncrement (&once_control->started) == 0) - { - /* This thread is the first one to come to this once_control. */ - InitializeCriticalSection (&once_control->lock); - EnterCriticalSection (&once_control->lock); - once_control->inited = 0; - initfunction (); - once_control->inited = 1; - LeaveCriticalSection (&once_control->lock); - } - else - { - /* Undo last operation. */ - InterlockedDecrement (&once_control->started); - /* Some other thread has already started the initialization. - Yield the CPU while waiting for the other thread to finish - initializing and taking the lock. */ - while (once_control->inited < 0) - Sleep (0); - if (once_control->inited <= 0) - { - /* Take the lock. This blocks until the other thread has - finished calling the initfunction. */ - EnterCriticalSection (&once_control->lock); - LeaveCriticalSection (&once_control->lock); - if (!(once_control->inited > 0)) - abort (); - } - } - } -} - -#endif - -/* ========================================================================= */ diff --git a/gnulib/tests/glthread/lock.h b/gnulib/tests/glthread/lock.h deleted file mode 100644 index 6782d49..0000000 --- a/gnulib/tests/glthread/lock.h +++ /dev/null @@ -1,927 +0,0 @@ -/* Locking in multithreaded situations. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -/* This file contains locking primitives for use with a given thread library. - It does not contain primitives for creating threads or for other - synchronization primitives. - - Normal (non-recursive) locks: - Type: gl_lock_t - Declaration: gl_lock_define(extern, name) - Initializer: gl_lock_define_initialized(, name) - Initialization: gl_lock_init (name); - Taking the lock: gl_lock_lock (name); - Releasing the lock: gl_lock_unlock (name); - De-initialization: gl_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_lock_init (&name); - Taking the lock: err = glthread_lock_lock (&name); - Releasing the lock: err = glthread_lock_unlock (&name); - De-initialization: err = glthread_lock_destroy (&name); - - Read-Write (non-recursive) locks: - Type: gl_rwlock_t - Declaration: gl_rwlock_define(extern, name) - Initializer: gl_rwlock_define_initialized(, name) - Initialization: gl_rwlock_init (name); - Taking the lock: gl_rwlock_rdlock (name); - gl_rwlock_wrlock (name); - Releasing the lock: gl_rwlock_unlock (name); - De-initialization: gl_rwlock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_rwlock_init (&name); - Taking the lock: err = glthread_rwlock_rdlock (&name); - err = glthread_rwlock_wrlock (&name); - Releasing the lock: err = glthread_rwlock_unlock (&name); - De-initialization: err = glthread_rwlock_destroy (&name); - - Recursive locks: - Type: gl_recursive_lock_t - Declaration: gl_recursive_lock_define(extern, name) - Initializer: gl_recursive_lock_define_initialized(, name) - Initialization: gl_recursive_lock_init (name); - Taking the lock: gl_recursive_lock_lock (name); - Releasing the lock: gl_recursive_lock_unlock (name); - De-initialization: gl_recursive_lock_destroy (name); - Equivalent functions with control of error handling: - Initialization: err = glthread_recursive_lock_init (&name); - Taking the lock: err = glthread_recursive_lock_lock (&name); - Releasing the lock: err = glthread_recursive_lock_unlock (&name); - De-initialization: err = glthread_recursive_lock_destroy (&name); - - Once-only execution: - Type: gl_once_t - Initializer: gl_once_define(extern, name) - Execution: gl_once (name, initfunction); - Equivalent functions with control of error handling: - Execution: err = glthread_once (&name, initfunction); -*/ - - -#ifndef _LOCK_H -#define _LOCK_H - -#include -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The pthread_in_use() detection needs to be done at runtime. */ -# define pthread_in_use() \ - glthread_in_use () -extern int glthread_in_use (void); - -# endif - -# if USE_POSIX_THREADS_WEAK - -/* Use weak references to the POSIX threads library. */ - -/* Weak references avoid dragging in external libraries if the other parts - of the program don't use them. Here we use them, because we don't want - every program that uses libintl to depend on libpthread. This assumes - that libpthread would not be loaded after libintl; i.e. if libintl is - loaded first, by an executable that does not depend on libpthread, and - then a module is dynamically loaded that depends on libpthread, libintl - will not be multithread-safe. */ - -/* The way to test at runtime whether libpthread is present is to test - whether a function pointer's value, such as &pthread_mutex_init, is - non-NULL. However, some versions of GCC have a bug through which, in - PIC mode, &foo != NULL always evaluates to true if there is a direct - call to foo(...) in the same function. To avoid this, we test the - address of a function in libpthread that we don't use. */ - -# pragma weak pthread_mutex_init -# pragma weak pthread_mutex_lock -# pragma weak pthread_mutex_unlock -# pragma weak pthread_mutex_destroy -# pragma weak pthread_rwlock_init -# pragma weak pthread_rwlock_rdlock -# pragma weak pthread_rwlock_wrlock -# pragma weak pthread_rwlock_unlock -# pragma weak pthread_rwlock_destroy -# pragma weak pthread_once -# pragma weak pthread_cond_init -# pragma weak pthread_cond_wait -# pragma weak pthread_cond_signal -# pragma weak pthread_cond_broadcast -# pragma weak pthread_cond_destroy -# pragma weak pthread_mutexattr_init -# pragma weak pthread_mutexattr_settype -# pragma weak pthread_mutexattr_destroy -# ifndef pthread_self -# pragma weak pthread_self -# endif - -# if !PTHREAD_IN_USE_DETECTION_HARD -# pragma weak pthread_cancel -# define pthread_in_use() (pthread_cancel != NULL) -# endif - -# else - -# if !PTHREAD_IN_USE_DETECTION_HARD -# define pthread_in_use() 1 -# endif - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef pthread_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - PTHREAD_MUTEX_INITIALIZER -# define glthread_lock_init(LOCK) \ - (pthread_in_use () ? pthread_mutex_init (LOCK, NULL) : 0) -# define glthread_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -# if HAVE_PTHREAD_RWLOCK - -# ifdef PTHREAD_RWLOCK_INITIALIZER - -typedef pthread_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - PTHREAD_RWLOCK_INITIALIZER -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_rdlock (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_wrlock (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? pthread_rwlock_unlock (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? pthread_rwlock_destroy (LOCK) : 0) - -# else - -typedef struct - { - int initialized; - pthread_mutex_t guard; /* protects the initialization */ - pthread_rwlock_t rwlock; /* read-write lock */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { 0, PTHREAD_MUTEX_INITIALIZER } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -# else - -typedef struct - { - pthread_mutex_t lock; /* protects the remaining fields */ - pthread_cond_t waiting_readers; /* waiting readers */ - pthread_cond_t waiting_writers; /* waiting writers */ - unsigned int waiting_writers_count; /* number of waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, 0 } -# define glthread_rwlock_init(LOCK) \ - (pthread_in_use () ? glthread_rwlock_init_multithreaded (LOCK) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_rdlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_wrlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pthread_in_use () ? glthread_rwlock_unlock_multithreaded (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (pthread_in_use () ? glthread_rwlock_destroy_multithreaded (LOCK) : 0) -extern int glthread_rwlock_init_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock); - -# endif - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -# if HAVE_PTHREAD_MUTEX_RECURSIVE - -# if defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER || defined PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP - -typedef pthread_mutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pthread_mutex_t NAME = gl_recursive_lock_initializer; -# ifdef PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER -# else -# define gl_recursive_lock_initializer \ - PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP -# endif -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? pthread_mutex_lock (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? pthread_mutex_unlock (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? pthread_mutex_destroy (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); - -# else - -typedef struct - { - pthread_mutex_t recmutex; /* recursive mutex */ - pthread_mutex_t guard; /* protects the initialization */ - int initialized; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, PTHREAD_MUTEX_INITIALIZER, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -# else - -/* Old versions of POSIX threads on Solaris did not have recursive locks. - We have to implement them ourselves. */ - -typedef struct - { - pthread_mutex_t mutex; - pthread_t owner; - unsigned long depth; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { PTHREAD_MUTEX_INITIALIZER, (pthread_t) 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (pthread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -# endif - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef pthread_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS pthread_once_t NAME = PTHREAD_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (pthread_in_use () \ - ? pthread_once (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_singlethreaded (pthread_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_PTH_THREADS_WEAK - -/* Use weak references to the GNU Pth threads library. */ - -# pragma weak pth_mutex_init -# pragma weak pth_mutex_acquire -# pragma weak pth_mutex_release -# pragma weak pth_rwlock_init -# pragma weak pth_rwlock_acquire -# pragma weak pth_rwlock_release -# pragma weak pth_once - -# pragma weak pth_cancel -# define pth_in_use() (pth_cancel != NULL) - -# else - -# define pth_in_use() 1 - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef pth_mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - PTH_MUTEX_INIT -# define glthread_lock_init(LOCK) \ - (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) -# define glthread_lock_lock(LOCK) \ - (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) -# define glthread_lock_unlock(LOCK) \ - (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) -# define glthread_lock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef pth_rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - PTH_RWLOCK_INIT -# define glthread_rwlock_init(LOCK) \ - (pth_in_use () && !pth_rwlock_init (LOCK) ? errno : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RD, 0, NULL) ? errno : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (pth_in_use () && !pth_rwlock_acquire (LOCK, PTH_RWLOCK_RW, 0, NULL) ? errno : 0) -# define glthread_rwlock_unlock(LOCK) \ - (pth_in_use () && !pth_rwlock_release (LOCK) ? errno : 0) -# define glthread_rwlock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* In Pth, mutexes are recursive by default. */ -typedef pth_mutex_t gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS pth_mutex_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - PTH_MUTEX_INIT -# define glthread_recursive_lock_init(LOCK) \ - (pth_in_use () && !pth_mutex_init (LOCK) ? errno : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (pth_in_use () && !pth_mutex_acquire (LOCK, 0, NULL) ? errno : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (pth_in_use () && !pth_mutex_release (LOCK) ? errno : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - ((void)(LOCK), 0) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef pth_once_t gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS pth_once_t NAME = PTH_ONCE_INIT; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (pth_in_use () \ - ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_multithreaded (pth_once_t *once_control, void (*initfunction) (void)); -extern int glthread_once_singlethreaded (pth_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -# include -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_SOLARIS_THREADS_WEAK - -/* Use weak references to the old Solaris threads library. */ - -# pragma weak mutex_init -# pragma weak mutex_lock -# pragma weak mutex_unlock -# pragma weak mutex_destroy -# pragma weak rwlock_init -# pragma weak rw_rdlock -# pragma weak rw_wrlock -# pragma weak rw_unlock -# pragma weak rwlock_destroy -# pragma weak thr_self - -# pragma weak thr_suspend -# define thread_in_use() (thr_suspend != NULL) - -# else - -# define thread_in_use() 1 - -# endif - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef mutex_t gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS mutex_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS mutex_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - DEFAULTMUTEX -# define glthread_lock_init(LOCK) \ - (thread_in_use () ? mutex_init (LOCK, USYNC_THREAD, NULL) : 0) -# define glthread_lock_lock(LOCK) \ - (thread_in_use () ? mutex_lock (LOCK) : 0) -# define glthread_lock_unlock(LOCK) \ - (thread_in_use () ? mutex_unlock (LOCK) : 0) -# define glthread_lock_destroy(LOCK) \ - (thread_in_use () ? mutex_destroy (LOCK) : 0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef rwlock_t gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - DEFAULTRWLOCK -# define glthread_rwlock_init(LOCK) \ - (thread_in_use () ? rwlock_init (LOCK, USYNC_THREAD, NULL) : 0) -# define glthread_rwlock_rdlock(LOCK) \ - (thread_in_use () ? rw_rdlock (LOCK) : 0) -# define glthread_rwlock_wrlock(LOCK) \ - (thread_in_use () ? rw_wrlock (LOCK) : 0) -# define glthread_rwlock_unlock(LOCK) \ - (thread_in_use () ? rw_unlock (LOCK) : 0) -# define glthread_rwlock_destroy(LOCK) \ - (thread_in_use () ? rwlock_destroy (LOCK) : 0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* Old Solaris threads did not have recursive locks. - We have to implement them ourselves. */ - -typedef struct - { - mutex_t mutex; - thread_t owner; - unsigned long depth; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { DEFAULTMUTEX, (thread_t) 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_init_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_lock(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_lock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_unlock(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_unlock_multithreaded (LOCK) : 0) -# define glthread_recursive_lock_destroy(LOCK) \ - (thread_in_use () ? glthread_recursive_lock_destroy_multithreaded (LOCK) : 0) -extern int glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock); - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef struct - { - volatile int inited; - mutex_t mutex; - } - gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = { 0, DEFAULTMUTEX }; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (thread_in_use () \ - ? glthread_once_multithreaded (ONCE_CONTROL, INITFUNCTION) \ - : (glthread_once_singlethreaded (ONCE_CONTROL) ? (INITFUNCTION (), 0) : 0)) -extern int glthread_once_multithreaded (gl_once_t *once_control, void (*initfunction) (void)); -extern int glthread_once_singlethreaded (gl_once_t *once_control); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# ifdef __cplusplus -extern "C" { -# endif - -/* We can use CRITICAL_SECTION directly, rather than the native Windows Event, - Mutex, Semaphore types, because - - we need only to synchronize inside a single process (address space), - not inter-process locking, - - we don't need to support trylock operations. (TryEnterCriticalSection - does not work on Windows 95/98/ME. Packages that need trylock usually - define their own mutex type.) */ - -/* There is no way to statically initialize a CRITICAL_SECTION. It needs - to be done lazily, once only. For this we need spinlocks. */ - -typedef struct { volatile int done; volatile long started; } gl_spinlock_t; - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; - } - gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME; -# define gl_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_lock_t NAME = gl_lock_initializer; -# define gl_lock_initializer \ - { { 0, -1 } } -# define glthread_lock_init(LOCK) \ - (glthread_lock_init_func (LOCK), 0) -# define glthread_lock_lock(LOCK) \ - glthread_lock_lock_func (LOCK) -# define glthread_lock_unlock(LOCK) \ - glthread_lock_unlock_func (LOCK) -# define glthread_lock_destroy(LOCK) \ - glthread_lock_destroy_func (LOCK) -extern void glthread_lock_init_func (gl_lock_t *lock); -extern int glthread_lock_lock_func (gl_lock_t *lock); -extern int glthread_lock_unlock_func (gl_lock_t *lock); -extern int glthread_lock_destroy_func (gl_lock_t *lock); - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -/* It is impossible to implement read-write locks using plain locks, without - introducing an extra thread dedicated to managing read-write locks. - Therefore here we need to use the low-level Event type. */ - -typedef struct - { - HANDLE *array; /* array of waiting threads, each represented by an event */ - unsigned int count; /* number of waiting threads */ - unsigned int alloc; /* length of allocated array */ - unsigned int offset; /* index of first waiting thread in array */ - } - gl_carray_waitqueue_t; -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - CRITICAL_SECTION lock; /* protects the remaining fields */ - gl_carray_waitqueue_t waiting_readers; /* waiting readers */ - gl_carray_waitqueue_t waiting_writers; /* waiting writers */ - int runcount; /* number of readers running, or -1 when a writer runs */ - } - gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME; -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_rwlock_t NAME = gl_rwlock_initializer; -# define gl_rwlock_initializer \ - { { 0, -1 } } -# define glthread_rwlock_init(LOCK) \ - (glthread_rwlock_init_func (LOCK), 0) -# define glthread_rwlock_rdlock(LOCK) \ - glthread_rwlock_rdlock_func (LOCK) -# define glthread_rwlock_wrlock(LOCK) \ - glthread_rwlock_wrlock_func (LOCK) -# define glthread_rwlock_unlock(LOCK) \ - glthread_rwlock_unlock_func (LOCK) -# define glthread_rwlock_destroy(LOCK) \ - glthread_rwlock_destroy_func (LOCK) -extern void glthread_rwlock_init_func (gl_rwlock_t *lock); -extern int glthread_rwlock_rdlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_wrlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_unlock_func (gl_rwlock_t *lock); -extern int glthread_rwlock_destroy_func (gl_rwlock_t *lock); - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -/* The native Windows documentation says that CRITICAL_SECTION already - implements a recursive lock. But we need not rely on it: It's easy to - implement a recursive lock without this assumption. */ - -typedef struct - { - gl_spinlock_t guard; /* protects the initialization */ - DWORD owner; - unsigned long depth; - CRITICAL_SECTION lock; - } - gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME; -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) \ - STORAGECLASS gl_recursive_lock_t NAME = gl_recursive_lock_initializer; -# define gl_recursive_lock_initializer \ - { { 0, -1 }, 0, 0 } -# define glthread_recursive_lock_init(LOCK) \ - (glthread_recursive_lock_init_func (LOCK), 0) -# define glthread_recursive_lock_lock(LOCK) \ - glthread_recursive_lock_lock_func (LOCK) -# define glthread_recursive_lock_unlock(LOCK) \ - glthread_recursive_lock_unlock_func (LOCK) -# define glthread_recursive_lock_destroy(LOCK) \ - glthread_recursive_lock_destroy_func (LOCK) -extern void glthread_recursive_lock_init_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_lock_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_unlock_func (gl_recursive_lock_t *lock); -extern int glthread_recursive_lock_destroy_func (gl_recursive_lock_t *lock); - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef struct - { - volatile int inited; - volatile long started; - CRITICAL_SECTION lock; - } - gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = { -1, -1 }; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (glthread_once_func (ONCE_CONTROL, INITFUNCTION), 0) -extern void glthread_once_func (gl_once_t *once_control, void (*initfunction) (void)); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) - -/* Provide dummy implementation if threads are not supported. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -typedef int gl_lock_t; -# define gl_lock_define(STORAGECLASS, NAME) -# define gl_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_lock_init(NAME) 0 -# define glthread_lock_lock(NAME) 0 -# define glthread_lock_unlock(NAME) 0 -# define glthread_lock_destroy(NAME) 0 - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -typedef int gl_rwlock_t; -# define gl_rwlock_define(STORAGECLASS, NAME) -# define gl_rwlock_define_initialized(STORAGECLASS, NAME) -# define glthread_rwlock_init(NAME) 0 -# define glthread_rwlock_rdlock(NAME) 0 -# define glthread_rwlock_wrlock(NAME) 0 -# define glthread_rwlock_unlock(NAME) 0 -# define glthread_rwlock_destroy(NAME) 0 - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -typedef int gl_recursive_lock_t; -# define gl_recursive_lock_define(STORAGECLASS, NAME) -# define gl_recursive_lock_define_initialized(STORAGECLASS, NAME) -# define glthread_recursive_lock_init(NAME) 0 -# define glthread_recursive_lock_lock(NAME) 0 -# define glthread_recursive_lock_unlock(NAME) 0 -# define glthread_recursive_lock_destroy(NAME) 0 - -/* -------------------------- gl_once_t datatype -------------------------- */ - -typedef int gl_once_t; -# define gl_once_define(STORAGECLASS, NAME) \ - STORAGECLASS gl_once_t NAME = 0; -# define glthread_once(ONCE_CONTROL, INITFUNCTION) \ - (*(ONCE_CONTROL) == 0 ? (*(ONCE_CONTROL) = ~ 0, INITFUNCTION (), 0) : 0) - -#endif - -/* ========================================================================= */ - -/* Macros with built-in error handling. */ - -/* -------------------------- gl_lock_t datatype -------------------------- */ - -#define gl_lock_init(NAME) \ - do \ - { \ - if (glthread_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_lock(NAME) \ - do \ - { \ - if (glthread_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_unlock(NAME) \ - do \ - { \ - if (glthread_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_lock_destroy(NAME) \ - do \ - { \ - if (glthread_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* ------------------------- gl_rwlock_t datatype ------------------------- */ - -#define gl_rwlock_init(NAME) \ - do \ - { \ - if (glthread_rwlock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_rdlock(NAME) \ - do \ - { \ - if (glthread_rwlock_rdlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_wrlock(NAME) \ - do \ - { \ - if (glthread_rwlock_wrlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_unlock(NAME) \ - do \ - { \ - if (glthread_rwlock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_rwlock_destroy(NAME) \ - do \ - { \ - if (glthread_rwlock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* --------------------- gl_recursive_lock_t datatype --------------------- */ - -#define gl_recursive_lock_init(NAME) \ - do \ - { \ - if (glthread_recursive_lock_init (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_lock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_lock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_unlock(NAME) \ - do \ - { \ - if (glthread_recursive_lock_unlock (&NAME)) \ - abort (); \ - } \ - while (0) -#define gl_recursive_lock_destroy(NAME) \ - do \ - { \ - if (glthread_recursive_lock_destroy (&NAME)) \ - abort (); \ - } \ - while (0) - -/* -------------------------- gl_once_t datatype -------------------------- */ - -#define gl_once(NAME, INITFUNCTION) \ - do \ - { \ - if (glthread_once (&NAME, INITFUNCTION)) \ - abort (); \ - } \ - while (0) - -/* ========================================================================= */ - -#endif /* _LOCK_H */ diff --git a/gnulib/tests/glthread/thread.c b/gnulib/tests/glthread/thread.c deleted file mode 100644 index d55b4e2..0000000 --- a/gnulib/tests/glthread/thread.c +++ /dev/null @@ -1,231 +0,0 @@ -/* Creating and controlling threads. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -#include - -/* Specification. */ -#include "glthread/thread.h" - -#include -#include "glthread/lock.h" - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -#include - -#ifdef PTW32_VERSION - -const gl_thread_t gl_null_thread /* = { .p = NULL } */; - -#endif - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -#include - -/* -------------------------- gl_thread_t datatype -------------------------- */ - -/* The Thread-Local Storage (TLS) key that allows to access each thread's - 'struct gl_thread_struct *' pointer. */ -static DWORD self_key = (DWORD)-1; - -/* Initializes self_key. This function must only be called once. */ -static void -do_init_self_key (void) -{ - self_key = TlsAlloc (); - /* If this fails, we're hosed. */ - if (self_key == (DWORD)-1) - abort (); -} - -/* Initializes self_key. */ -static void -init_self_key (void) -{ - gl_once_define(static, once) - gl_once (once, do_init_self_key); -} - -/* This structure contains information about a thread. - It is stored in TLS under key self_key. */ -struct gl_thread_struct -{ - /* Fields for managing the handle. */ - HANDLE volatile handle; - CRITICAL_SECTION handle_lock; - /* Fields for managing the exit value. */ - void * volatile result; - /* Fields for managing the thread start. */ - void * (*func) (void *); - void *arg; -}; - -/* Return a real HANDLE object for the current thread. */ -static inline HANDLE -get_current_thread_handle (void) -{ - HANDLE this_handle; - - /* GetCurrentThread() returns a pseudo-handle, i.e. only a symbolic - identifier, not a real handle. */ - if (!DuplicateHandle (GetCurrentProcess (), GetCurrentThread (), - GetCurrentProcess (), &this_handle, - 0, FALSE, DUPLICATE_SAME_ACCESS)) - abort (); - return this_handle; -} - -gl_thread_t -gl_thread_self_func (void) -{ - gl_thread_t thread; - - if (self_key == (DWORD)-1) - init_self_key (); - thread = TlsGetValue (self_key); - if (thread == NULL) - { - /* This happens only in threads that have not been created through - glthread_create(), such as the main thread. */ - for (;;) - { - thread = - (struct gl_thread_struct *) - malloc (sizeof (struct gl_thread_struct)); - if (thread != NULL) - break; - /* Memory allocation failed. There is not much we can do. Have to - busy-loop, waiting for the availability of memory. */ - Sleep (1); - } - - thread->handle = get_current_thread_handle (); - InitializeCriticalSection (&thread->handle_lock); - thread->result = NULL; /* just to be deterministic */ - TlsSetValue (self_key, thread); - } - return thread; -} - -/* The main function of a freshly creating thread. It's a wrapper around - the FUNC and ARG arguments passed to glthread_create_func. */ -static unsigned int WINAPI -wrapper_func (void *varg) -{ - struct gl_thread_struct *thread = (struct gl_thread_struct *)varg; - - EnterCriticalSection (&thread->handle_lock); - /* Create a new handle for the thread only if the parent thread did not yet - fill in the handle. */ - if (thread->handle == NULL) - thread->handle = get_current_thread_handle (); - LeaveCriticalSection (&thread->handle_lock); - - if (self_key == (DWORD)-1) - init_self_key (); - TlsSetValue (self_key, thread); - - /* Run the thread. Store the exit value if the thread was not terminated - otherwise. */ - thread->result = thread->func (thread->arg); - return 0; -} - -int -glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg) -{ - struct gl_thread_struct *thread = - (struct gl_thread_struct *) malloc (sizeof (struct gl_thread_struct)); - if (thread == NULL) - return ENOMEM; - thread->handle = NULL; - InitializeCriticalSection (&thread->handle_lock); - thread->result = NULL; /* just to be deterministic */ - thread->func = func; - thread->arg = arg; - - { - unsigned int thread_id; - HANDLE thread_handle; - - thread_handle = (HANDLE) - _beginthreadex (NULL, 100000, wrapper_func, thread, 0, &thread_id); - /* calls CreateThread with the same arguments */ - if (thread_handle == NULL) - { - DeleteCriticalSection (&thread->handle_lock); - free (thread); - return EAGAIN; - } - - EnterCriticalSection (&thread->handle_lock); - if (thread->handle == NULL) - thread->handle = thread_handle; - else - /* thread->handle was already set by the thread itself. */ - CloseHandle (thread_handle); - LeaveCriticalSection (&thread->handle_lock); - - *threadp = thread; - return 0; - } -} - -int -glthread_join_func (gl_thread_t thread, void **retvalp) -{ - if (thread == NULL) - return EINVAL; - - if (thread == gl_thread_self ()) - return EDEADLK; - - if (WaitForSingleObject (thread->handle, INFINITE) == WAIT_FAILED) - return EINVAL; - - if (retvalp != NULL) - *retvalp = thread->result; - - DeleteCriticalSection (&thread->handle_lock); - CloseHandle (thread->handle); - free (thread); - - return 0; -} - -int -gl_thread_exit_func (void *retval) -{ - gl_thread_t thread = gl_thread_self (); - thread->result = retval; - _endthreadex (0); /* calls ExitThread (0) */ - abort (); -} - -#endif - -/* ========================================================================= */ diff --git a/gnulib/tests/glthread/thread.h b/gnulib/tests/glthread/thread.h deleted file mode 100644 index 6653aa2..0000000 --- a/gnulib/tests/glthread/thread.h +++ /dev/null @@ -1,400 +0,0 @@ -/* Creating and controlling threads. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Bruno Haible , 2005. - Based on GCC's gthr-posix.h, gthr-posix95.h, gthr-solaris.h, - gthr-win32.h. */ - -/* This file contains primitives for creating and controlling threads. - - Thread data type: gl_thread_t. - - Creating a thread: - thread = gl_thread_create (func, arg); - Or with control of error handling: - err = glthread_create (&thread, func, arg); - extern int glthread_create (gl_thread_t *result, - void *(*func) (void *), void *arg); - - Querying and changing the signal mask of a thread (not supported on all - platforms): - gl_thread_sigmask (how, newmask, oldmask); - Or with control of error handling: - err = glthread_sigmask (how, newmask, oldmask); - extern int glthread_sigmask (int how, const sigset_t *newmask, sigset_t *oldmask); - - Waiting for termination of another thread: - gl_thread_join (thread, &return_value); - Or with control of error handling: - err = glthread_join (thread, &return_value); - extern int glthread_join (gl_thread_t thread, void **return_value_ptr); - - Getting a reference to the current thread: - 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 _Noreturn void gl_thread_exit (void *return_value); - - Requesting custom code to be executed at fork() time(not supported on all - platforms): - gl_thread_atfork (prepare_func, parent_func, child_func); - Or with control of error handling: - err = glthread_atfork (prepare_func, parent_func, child_func); - extern int glthread_atfork (void (*prepare_func) (void), - void (*parent_func) (void), - void (*child_func) (void)); - Note that even on platforms where this is supported, use of fork() and - threads together is problematic, see - - */ - - -#ifndef _GLTHREAD_THREAD_H -#define _GLTHREAD_THREAD_H - -#include -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The pthread_in_use() detection needs to be done at runtime. */ -# define pthread_in_use() \ - glthread_in_use () -extern int glthread_in_use (void); - -# endif - -# if USE_POSIX_THREADS_WEAK - -/* Use weak references to the POSIX threads library. */ - -/* Weak references avoid dragging in external libraries if the other parts - of the program don't use them. Here we use them, because we don't want - every program that uses libintl to depend on libpthread. This assumes - that libpthread would not be loaded after libintl; i.e. if libintl is - loaded first, by an executable that does not depend on libpthread, and - then a module is dynamically loaded that depends on libpthread, libintl - will not be multithread-safe. */ - -/* The way to test at runtime whether libpthread is present is to test - whether a function pointer's value, such as &pthread_mutex_init, is - non-NULL. However, some versions of GCC have a bug through which, in - PIC mode, &foo != NULL always evaluates to true if there is a direct - call to foo(...) in the same function. To avoid this, we test the - address of a function in libpthread that we don't use. */ - -# pragma weak pthread_create -# pragma weak pthread_sigmask -# pragma weak pthread_join -# ifndef pthread_self -# pragma weak pthread_self -# endif -# pragma weak pthread_exit -# if HAVE_PTHREAD_ATFORK -# pragma weak pthread_atfork -# endif - -# if !PTHREAD_IN_USE_DETECTION_HARD -# pragma weak pthread_cancel -# define pthread_in_use() (pthread_cancel != NULL) -# endif - -# else - -# if !PTHREAD_IN_USE_DETECTION_HARD -# define pthread_in_use() 1 -# endif - -# endif - -/* -------------------------- gl_thread_t datatype -------------------------- */ - -/* This choice of gl_thread_t assumes that - pthread_equal (a, b) is equivalent to ((a) == (b)). - This is the case on all platforms in use in 2008. */ -typedef pthread_t gl_thread_t; -# define glthread_create(THREADP, FUNC, ARG) \ - (pthread_in_use () ? pthread_create (THREADP, NULL, FUNC, ARG) : ENOSYS) -# define glthread_sigmask(HOW, SET, OSET) \ - (pthread_in_use () ? pthread_sigmask (HOW, SET, OSET) : 0) -# define glthread_join(THREAD, RETVALP) \ - (pthread_in_use () ? pthread_join (THREAD, RETVALP) : 0) -# 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) - -# if HAVE_PTHREAD_ATFORK -# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) \ - (pthread_in_use () ? pthread_atfork (PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) : 0) -# else -# define glthread_atfork(PREPARE_FUNC, PARENT_FUNC, CHILD_FUNC) 0 -# endif - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_PTH_THREADS_WEAK - -/* Use weak references to the GNU Pth threads library. */ - -# pragma weak pth_spawn -# pragma weak pth_sigmask -# pragma weak pth_join -# pragma weak pth_self -# pragma weak pth_exit - -# pragma weak pth_cancel -# define pth_in_use() (pth_cancel != NULL) - -# else - -# define pth_in_use() 1 - -# endif -/* -------------------------- gl_thread_t datatype -------------------------- */ - -typedef pth_t gl_thread_t; -# define glthread_create(THREADP, FUNC, ARG) \ - (pth_in_use () ? ((*(THREADP) = pth_spawn (NULL, FUNC, ARG)) ? 0 : errno) : 0) -# define glthread_sigmask(HOW, SET, OSET) \ - (pth_in_use () && !pth_sigmask (HOW, SET, OSET) ? errno : 0) -# define glthread_join(THREAD, RETVALP) \ - (pth_in_use () && !pth_join (THREAD, RETVALP) ? errno : 0) -# define gl_thread_self() \ - (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 - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -# include -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# if USE_SOLARIS_THREADS_WEAK - -/* Use weak references to the old Solaris threads library. */ - -# pragma weak thr_create -# pragma weak thr_join -# pragma weak thr_self -# pragma weak thr_exit - -# pragma weak thr_suspend -# define thread_in_use() (thr_suspend != NULL) - -# else - -# define thread_in_use() 1 - -# endif - -/* -------------------------- gl_thread_t datatype -------------------------- */ - -typedef thread_t gl_thread_t; -# define glthread_create(THREADP, FUNC, ARG) \ - (thread_in_use () ? thr_create (NULL, 0, FUNC, ARG, 0, THREADP) : 0) -# define glthread_sigmask(HOW, SET, OSET) \ - (thread_in_use () ? sigprocmask (HOW, SET, OSET) : 0) -# define glthread_join(THREAD, RETVALP) \ - (thread_in_use () ? thr_join (THREAD, NULL, RETVALP) : 0) -# define gl_thread_self() \ - (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 - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# ifdef __cplusplus -extern "C" { -# endif - -/* -------------------------- gl_thread_t datatype -------------------------- */ - -/* The gl_thread_t is a pointer to a structure in memory. - Why not the thread handle? If it were the thread handle, it would be hard - to implement gl_thread_self() (since GetCurrentThread () returns a pseudo- - handle, DuplicateHandle (GetCurrentThread ()) returns a handle that must be - closed afterwards, and there is no function for quickly retrieving a thread - handle from its id). - Why not the thread id? I tried it. It did not work: Sometimes ids appeared - that did not belong to running threads, and glthread_join failed with ESRCH. - */ -typedef struct gl_thread_struct *gl_thread_t; -# define glthread_create(THREADP, FUNC, ARG) \ - glthread_create_func (THREADP, FUNC, ARG) -# define glthread_sigmask(HOW, SET, OSET) \ - /* unsupported */ 0 -# define glthread_join(THREAD, RETVALP) \ - 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 -extern int glthread_create_func (gl_thread_t *threadp, void * (*func) (void *), void *arg); -extern int glthread_join_func (gl_thread_t thread, void **retvalp); -extern gl_thread_t gl_thread_self_func (void); -extern int gl_thread_exit_func (void *retval); - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) - -/* Provide dummy implementation if threads are not supported. */ - -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() 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 - -#endif - -/* ========================================================================= */ - -/* Macros with built-in error handling. */ - -#ifdef __cplusplus -extern "C" { -#endif - -static inline gl_thread_t -gl_thread_create (void *(*func) (void *arg), void *arg) -{ - gl_thread_t thread; - int ret; - - ret = glthread_create (&thread, func, arg); - if (ret != 0) - abort (); - return thread; -} -#define gl_thread_sigmask(HOW, SET, OSET) \ - do \ - { \ - if (glthread_sigmask (HOW, SET, OSET)) \ - abort (); \ - } \ - while (0) -#define gl_thread_join(THREAD, RETVAL) \ - do \ - { \ - if (glthread_join (THREAD, RETVAL)) \ - abort (); \ - } \ - while (0) -#define gl_thread_atfork(PREPARE, PARENT, CHILD) \ - do \ - { \ - if (glthread_atfork (PREPARE, PARENT, CHILD)) \ - abort (); \ - } \ - while (0) - -#ifdef __cplusplus -} -#endif - -#endif /* _GLTHREAD_THREAD_H */ diff --git a/gnulib/tests/glthread/threadlib.c b/gnulib/tests/glthread/threadlib.c deleted file mode 100644 index 946268e..0000000 --- a/gnulib/tests/glthread/threadlib.c +++ /dev/null @@ -1,73 +0,0 @@ -/* Multithreading primitives. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include -# include - -# if PTHREAD_IN_USE_DETECTION_HARD - -/* The function to be executed by a dummy thread. */ -static void * -dummy_thread_func (void *arg) -{ - return arg; -} - -int -glthread_in_use (void) -{ - static int tested; - static int result; /* 1: linked with -lpthread, 0: only with libc */ - - if (!tested) - { - pthread_t thread; - - if (pthread_create (&thread, NULL, dummy_thread_func, NULL) != 0) - /* Thread creation failed. */ - result = 0; - else - { - /* Thread creation works. */ - void *retval; - if (pthread_join (thread, &retval) != 0) - abort (); - result = 1; - } - tested = 1; - } - return result; -} - -# endif - -#endif - -/* ========================================================================= */ - -/* This declaration is solely to ensure that after preprocessing - this file is never empty. */ -typedef int dummy; diff --git a/gnulib/tests/glthread/yield.h b/gnulib/tests/glthread/yield.h deleted file mode 100644 index 63c45be..0000000 --- a/gnulib/tests/glthread/yield.h +++ /dev/null @@ -1,121 +0,0 @@ -/* Yielding the processor to other threads and processes. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* This file contains a primitive for yielding the processor to other threads. - extern void gl_thread_yield (void); - */ - -#ifndef _GLTHREAD_YIELD_H -#define _GLTHREAD_YIELD_H - -#include - -/* ========================================================================= */ - -#if USE_POSIX_THREADS - -/* Use the POSIX threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# define gl_thread_yield() \ - sched_yield () - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_PTH_THREADS - -/* Use the GNU Pth threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# define gl_thread_yield() \ - pth_yield (NULL) - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_SOLARIS_THREADS - -/* Use the old Solaris threads library. */ - -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# define gl_thread_yield() \ - thr_yield () - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if USE_WINDOWS_THREADS - -# define WIN32_LEAN_AND_MEAN /* avoid including junk */ -# include - -# ifdef __cplusplus -extern "C" { -# endif - -# define gl_thread_yield() \ - Sleep (0) - -# ifdef __cplusplus -} -# endif - -#endif - -/* ========================================================================= */ - -#if !(USE_POSIX_THREADS || USE_PTH_THREADS || USE_SOLARIS_THREADS || USE_WINDOWS_THREADS) - -/* Provide dummy implementation if threads are not supported. */ - -# define gl_thread_yield() 0 - -#endif - -/* ========================================================================= */ - -#endif /* _GLTHREAD_YIELD_H */ diff --git a/gnulib/tests/ignore-value.h b/gnulib/tests/ignore-value.h deleted file mode 100644 index 2e34435..0000000 --- a/gnulib/tests/ignore-value.h +++ /dev/null @@ -1,47 +0,0 @@ -/* ignore a function return without a compiler warning - - 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, Eric Blake and Pádraig Brady. */ - -/* Use "ignore_value" to avoid a warning when using a function declared with - gcc's warn_unused_result attribute, but for which you really do want to - ignore the result. Traditionally, people have used a "(void)" cast to - indicate that a function's return value is deliberately unused. However, - if the function is declared with __attribute__((warn_unused_result)), - gcc issues a warning even with the cast. - - Caution: most of the time, you really should heed gcc's warning, and - check the return value. However, in those exceptional cases in which - you're sure you know what you're doing, use this function. - - For the record, here's one of the ignorable warnings: - "copy.c:233: warning: ignoring return value of 'fchown', - declared with attribute warn_unused_result". */ - -#ifndef _GL_IGNORE_VALUE_H -# define _GL_IGNORE_VALUE_H - -/* The __attribute__((__warn_unused_result__)) feature - is available in gcc versions 3.4 and newer, - while the typeof feature has been available since 2.7 at least. */ -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) -# define ignore_value(x) ((void) (x)) -# else -# define ignore_value(x) (({ __typeof__ (x) __x = (x); (void) __x; })) -# endif - -#endif diff --git a/gnulib/tests/init.sh b/gnulib/tests/init.sh deleted file mode 100644 index 5f6e638..0000000 --- a/gnulib/tests/init.sh +++ /dev/null @@ -1,589 +0,0 @@ -# source this file; set up for tests - -# 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 . - -# Using this file in a test -# ========================= -# -# The typical skeleton of a test looks like this: -# -# #!/bin/sh -# . "${srcdir=.}/init.sh"; path_prepend_ . -# Execute some commands. -# Note that these commands are executed in a subdirectory, therefore you -# need to prepend "../" to relative filenames in the build directory. -# Note that the "path_prepend_ ." is useful only if the body of your -# test invokes programs residing in the initial directory. -# For example, if the programs you want to test are in src/, and this test -# script is named tests/test-1, then you would use "path_prepend_ ../src", -# or perhaps export PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" -# to all tests via automake's TESTS_ENVIRONMENT. -# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure. -# Use the skip_ and fail_ functions to print a diagnostic and then exit -# with the corresponding exit code. -# Exit $? - -# Executing a test that uses this file -# ==================================== -# -# Running a single test: -# $ make check TESTS=test-foo.sh -# -# Running a single test, with verbose output: -# $ make check TESTS=test-foo.sh VERBOSE=yes -# -# Running a single test, with single-stepping: -# 1. Go into a sub-shell: -# $ bash -# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the -# Makefile: -# $ export srcdir=../../tests # this is an example -# 3. Execute the commands from the test, copy&pasting them one by one: -# $ . "$srcdir/init.sh"; path_prepend_ . -# ... -# 4. Finally -# $ exit - -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. -# 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...; $(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} - -# 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. -DUALCASE=1; export DUALCASE -if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - emulate sh - NULLCMD=: - alias -g '${1+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; - esac -fi - -# We require $(...) support unconditionally. -# We require a few additional shell features only when $EXEEXT is nonempty, -# in order to support automatic $EXEEXT emulation: -# - hyphen-containing alias names -# - we prefer to use ${var#...} substitution, rather than having -# to work around lack of support for that feature. -# The following code attempts to find a shell with support for these features. -# If the current shell passes the test, we're done. Otherwise, test other -# shells until we find one that passes. If one is found, re-exec it. -# If no acceptable shell is found, skip the current test. -# -# The "...set -x; P=1 true 2>err..." test is to disqualify any shell that -# emits "P=1" into err, as /bin/sh from SunOS 5.11 and OpenBSD 4.7 do. -# -# Use "9" to indicate success (rather than 0), in case some shell acts -# like Solaris 10's /bin/sh but exits successfully instead of with status 2. - -# Eval this code in a subshell to determine a shell's suitability. -# 10 - passes all tests; ok to use -# 9 - ok, but enabling "set -x" corrupts app stderr; prefer higher score -# ? - not ok -gl_shell_test_script_=' -test $(echo y) = y || exit 1 -score_=10 -if test "$VERBOSE" = yes; then - test -n "$( (exec 3>&1; set -x; P=1 true 2>&3) 2> /dev/null)" && score_=9 -fi -test -z "$EXEEXT" && exit $score_ -shopt -s expand_aliases -alias a-b="echo zoo" -v=abx - test ${v%x} = ab \ - && test ${v#a} = bx \ - && test $(a-b) = zoo \ - && exit $score_ -' - -if test "x$1" = "x--no-reexec"; then - shift -else - # Assume a working shell. Export to subshells (setup_ needs this). - gl_set_x_corrupts_stderr_=false - export gl_set_x_corrupts_stderr_ - - # Record the first marginally acceptable shell. - marginal_= - - # Search for a shell that meets our requirements. - for re_shell_ in __current__ "${CONFIG_SHELL:-no_shell}" \ - /bin/sh bash dash zsh pdksh fail - do - test "$re_shell_" = no_shell && continue - - # If we've made it all the way to the sentinel, "fail" without - # finding even a marginal shell, skip this test. - if test "$re_shell_" = fail; then - test -z "$marginal_" && skip_ failed to find an adequate shell - re_shell_=$marginal_ - break - fi - - # When testing the current shell, simply "eval" the test code. - # Otherwise, run it via $re_shell_ -c ... - 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. - ( eval "$gl_shell_test_script_" ) > /dev/null 2>&1 - else - "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null - fi - - st_=$? - - # $re_shell_ works just fine. Use it. - 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 - marginal_="$re_shell_" - gl_set_x_corrupts_stderr_=true - fi - done - - if test "$re_shell_" != __current__; then - # Found a usable shell. Preserve -v and -x. - case $- in - *v*x* | *x*v*) opts_=-vx ;; - *v*) opts_=-v ;; - *x*) opts_=-x ;; - *) opts_= ;; - esac - exec "$re_shell_" $opts_ "$0" --no-reexec "$@" - echo "$ME_: exec failed" 1>&2 - exit 127 - fi -fi - -# If this is bash, turn off all aliases. -test -n "$BASH_VERSION" && unalias -a - -# Note that when supporting $EXEEXT (transparently mapping from PROG_NAME to -# PROG_NAME.exe), we want to support hyphen-containing names like test-acos. -# That is part of the shell-selection test above. Why use aliases rather -# than functions? Because support for hyphen-containing aliases is more -# widespread than that for hyphen-containing function names. -test -n "$EXEEXT" && shopt -s expand_aliases - -# Enable glibc's malloc-perturbing option. -# This is useful for exposing code that depends on the fact that -# malloc-related functions often return memory that is mostly zeroed. -# If you have the time and cycles, use valgrind to do an even better job. -: ${MALLOC_PERTURB_=87} -export MALLOC_PERTURB_ - -# This is a stub function that is run upon trap (upon regular exit and -# interrupt). Override it with a per-test function, e.g., to unmount -# a partition, or to undo any other global state changes. -cleanup_ () { :; } - -# 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 "$@"; } -else - 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; } - -# Run the user-overridable cleanup_ function, remove the temporary -# directory and exit with the incoming value of $?. -remove_tmp_ () -{ - __st=$? - cleanup_ - # cd out of the directory we're about to remove - cd "$initial_cwd_" || cd / || cd /tmp - chmod -R u+rwx "$test_dir_" - # If removal fails and exit status was to be 0, then change it to 1. - rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } - exit $__st -} - -# Given a directory name, DIR, if every entry in it that matches *.exe -# contains only the specified bytes (see the case stmt below), then print -# a space-separated list of those names and return 0. Otherwise, don't -# print anything and return 1. Naming constraints apply also to DIR. -find_exe_basenames_ () -{ - feb_dir_=$1 - feb_fail_=0 - feb_result_= - feb_sp_= - for feb_file_ in $feb_dir_/*.exe; do - # If there was no *.exe file, or there existed a file named "*.exe" that - # was deleted between the above glob expansion and the existence test - # below, just skip it. - test "x$feb_file_" = "x$feb_dir_/*.exe" && test ! -f "$feb_file_" \ - && continue - # Exempt [.exe, since we can't create a function by that name, yet - # we can't invoke [ by PATH search anyways due to shell builtins. - test "x$feb_file_" = "x$feb_dir_/[.exe" && continue - case $feb_file_ in - *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;; - *) # Remove leading file name components as well as the .exe suffix. - feb_file_=${feb_file_##*/} - feb_file_=${feb_file_%.exe} - feb_result_="$feb_result_$feb_sp_$feb_file_";; - esac - feb_sp_=' ' - done - test $feb_fail_ = 0 && printf %s "$feb_result_" - return $feb_fail_ -} - -# Consider the files in directory, $1. -# For each file name of the form PROG.exe, create an alias named -# PROG that simply invokes PROG.exe, then return 0. If any selected -# file name or the directory name, $1, contains an unexpected character, -# define no alias and return 1. -create_exe_shims_ () -{ - case $EXEEXT in - '') return 0 ;; - .exe) ;; - *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;; - esac - - base_names_=`find_exe_basenames_ $1` \ - || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 0; } - - if test -n "$base_names_"; then - for base_ in $base_names_; do - alias "$base_"="$base_$EXEEXT" - done - fi - - return 0 -} - -# Use this function to prepend to PATH an absolute name for each -# specified, possibly-$initial_cwd_-relative, directory. -path_prepend_ () -{ - while test $# != 0; do - path_dir_=$1 - case $path_dir_ in - '') fail_ "invalid path dir: '$1'";; - /*) abs_path_dir_=$path_dir_;; - *) abs_path_dir_=$initial_cwd_/$path_dir_;; - esac - case $abs_path_dir_ in - *:*) fail_ "invalid path dir: '$abs_path_dir_'";; - esac - PATH="$abs_path_dir_:$PATH" - - # Create an alias, FOO, for each FOO.exe in this directory. - create_exe_shims_ "$abs_path_dir_" \ - || fail_ "something failed (above): $abs_path_dir_" - shift - done - export PATH -} - -setup_ () -{ - if test "$VERBOSE" = yes; then - # Test whether set -x may cause the selected shell to corrupt an - # application's stderr. Many do, including zsh-4.3.10 and the /bin/sh - # from SunOS 5.11, OpenBSD 4.7 and Irix 5.x and 6.5. - # If enabling verbose output this way would cause trouble, simply - # issue a warning and refrain. - if $gl_set_x_corrupts_stderr_; then - warn_ "using SHELL=$SHELL with 'set -x' corrupts stderr" - else - set -x - fi - fi - - initial_cwd_=$PWD - fail=0 - - pfx_=`testdir_prefix_` - test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \ - || fail_ "failed to create temporary directory in $initial_cwd_" - 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. - gl_init_sh_nl_=' -' - IFS=" "" $gl_init_sh_nl_" - - # This trap statement, along with a trap on 0 below, ensure that the - # temporary directory, $test_dir_, is removed upon exit as well as - # upon receipt of any of the listed signals. - for sig_ in 1 2 3 13 15; do - eval "trap 'Exit $(expr $sig_ + 128)' $sig_" - done -} - -# Create a temporary directory, much like mktemp -d does. -# Written by Jim Meyering. -# -# Usage: mktempd_ /tmp phoey.XXXXXXXXXX -# -# First, try to use the mktemp program. -# Failing that, we'll roll our own mktemp-like function: -# - try to get random bytes from /dev/urandom -# - failing that, generate output from a combination of quickly-varying -# sources and gzip. Ignore non-varying gzip header, and extract -# "random" bits from there. -# - given those bits, map to file-name bytes using tr, and try to create -# the desired directory. -# - make only $MAX_TRIES_ attempts - -# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9. -rand_bytes_ () -{ - n_=$1 - - # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first? - # But if they have openssl, they probably have mktemp, too. - - chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 - dev_rand_=/dev/urandom - if test -r "$dev_rand_"; then - # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194. - dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \ - | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ - return - fi - - n_plus_50_=`expr $n_ + 50` - cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n' - data_=` (eval "$cmds_") 2>&1 | gzip ` - - # Ensure that $data_ has length at least 50+$n_ - while :; do - len_=`echo "$data_"|wc -c` - test $n_plus_50_ -le $len_ && break; - data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip ` - done - - echo "$data_" \ - | dd bs=1 skip=50 count=$n_ 2>/dev/null \ - | LC_ALL=C tr -c $chars_ 01234567$chars_$chars_$chars_ -} - -mktempd_ () -{ - case $# in - 2);; - *) fail_ "Usage: mktempd_ DIR TEMPLATE";; - esac - - destdir_=$1 - template_=$2 - - MAX_TRIES_=4 - - # Disallow any trailing slash on specified destdir: - # it would subvert the post-mktemp "case"-based destdir test. - case $destdir_ in - /) ;; - */) fail_ "invalid destination dir: remove trailing slash(es)";; - esac - - case $template_ in - *XXXX) ;; - *) fail_ \ - "invalid template: $template_ (must have a suffix of at least 4 X's)";; - esac - - # First, try to use mktemp. - d=`unset TMPDIR; { mktemp -d -t -p "$destdir_" "$template_"; } 2>/dev/null` \ - || fail=1 - - # The resulting name must be in the specified directory. - case $d in "$destdir_"*);; *) fail=1;; esac - - # It must have created the directory. - test -d "$d" || fail=1 - - # It must have 0700 permissions. Handle sticky "S" bits. - perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1 - case $perms in drwx------*) ;; *) fail=1;; esac - - test $fail = 0 && { - echo "$d" - return - } - - # If we reach this point, we'll have to create a directory manually. - - # Get a copy of the template without its suffix of X's. - base_template_=`echo "$template_"|sed 's/XX*$//'` - - # Calculate how many X's we've just removed. - template_length_=`echo "$template_" | wc -c` - nx_=`echo "$base_template_" | wc -c` - nx_=`expr $template_length_ - $nx_` - - err_= - i_=1 - while :; do - X_=`rand_bytes_ $nx_` - candidate_dir_="$destdir_/$base_template_$X_" - err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \ - && { echo "$candidate_dir_"; return; } - test $MAX_TRIES_ -le $i_ && break; - i_=`expr $i_ + 1` - done - fail_ "$err_" -} - -# If you want to override the testdir_prefix_ function, -# or to add more utility functions, use this file. -test -f "$srcdir/init.cfg" \ - && . "$srcdir/init.cfg" - -setup_ "$@" -# This trap is here, rather than in the setup_ function, because some -# shells run the exit trap at shell function exit, rather than script exit. -trap remove_tmp_ 0 diff --git a/gnulib/tests/intprops.h b/gnulib/tests/intprops.h deleted file mode 100644 index 2485c78..0000000 --- a/gnulib/tests/intprops.h +++ /dev/null @@ -1,319 +0,0 @@ -/* intprops.h -- properties of integer types - - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Paul Eggert. */ - -#ifndef _GL_INTPROPS_H -#define _GL_INTPROPS_H - -#include - -/* Return an integer value, converted to the same type as the integer - expression E after integer type promotion. V is the unconverted value. */ -#define _GL_INT_CONVERT(e, v) (0 * (e) + (v)) - -/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see - . */ -#define _GL_INT_NEGATE_CONVERT(e, v) (0 * (e) - (v)) - -/* The extra casts in the following macros work around compiler bugs, - e.g., in Cray C 5.0.3.0. */ - -/* True if the arithmetic type T is an integer type. bool counts as - an integer. */ -#define TYPE_IS_INTEGER(t) ((t) 1.5 == 1) - -/* True if negative values of the signed integer type T use two's - complement, ones' complement, or signed magnitude representation, - respectively. Much GNU code assumes two's complement, but some - people like to be portable to all possible C hosts. */ -#define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1) -#define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0) -#define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1) - -/* True if the signed integer expression E uses two's complement. */ -#define _GL_INT_TWOS_COMPLEMENT(e) (~ _GL_INT_CONVERT (e, 0) == -1) - -/* True if the arithmetic type T is signed. */ -#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1)) - -/* Return 1 if the integer expression E, after integer promotion, has - a signed type. */ -#define _GL_INT_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0) - - -/* Minimum and maximum values for integer types and expressions. These - macros have undefined behavior if T is signed and has padding bits. - If this is a problem for you, please let us know how to fix it for - your host. */ - -/* The maximum and minimum values for the integer type T. */ -#define TYPE_MINIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) 0 \ - : TYPE_SIGNED_MAGNITUDE (t) \ - ? ~ (t) 0 \ - : ~ TYPE_MAXIMUM (t))) -#define TYPE_MAXIMUM(t) \ - ((t) (! TYPE_SIGNED (t) \ - ? (t) -1 \ - : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) - -/* The maximum and minimum values for the type of the expression E, - after integer promotion. E should not have side effects. */ -#define _GL_INT_MINIMUM(e) \ - (_GL_INT_SIGNED (e) \ - ? - _GL_INT_TWOS_COMPLEMENT (e) - _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_CONVERT (e, 0)) -#define _GL_INT_MAXIMUM(e) \ - (_GL_INT_SIGNED (e) \ - ? _GL_SIGNED_INT_MAXIMUM (e) \ - : _GL_INT_NEGATE_CONVERT (e, 1)) -#define _GL_SIGNED_INT_MAXIMUM(e) \ - (((_GL_INT_CONVERT (e, 1) << (sizeof ((e) + 0) * CHAR_BIT - 2)) - 1) * 2 + 1) - - -/* Return 1 if the __typeof__ keyword works. This could be done by - 'configure', but for now it's easier to do it by hand. */ -#if 2 <= __GNUC__ || 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) - -/* Bound on length of the string representing an integer type or expression T. - Subtract 1 for the sign bit if T is signed, and then add 1 more for - a minus sign if needed. - - Because _GL_SIGNED_TYPE_OR_EXPR sometimes returns 0 when its argument is - signed, this macro may overestimate the true bound by one byte when - applied to unsigned types of size 2, 4, 16, ... bytes. */ -#define INT_STRLEN_BOUND(t) \ - (INT_BITS_STRLEN_BOUND (sizeof (t) * CHAR_BIT \ - - _GL_SIGNED_TYPE_OR_EXPR (t)) \ - + _GL_SIGNED_TYPE_OR_EXPR (t)) - -/* Bound on buffer size needed to represent an integer type or expression T, - including the terminating null. */ -#define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1) - - -/* Range overflow checks. - - The INT__RANGE_OVERFLOW macros return 1 if the corresponding C - operators might not yield numerically correct answers due to - arithmetic overflow. They do not rely on undefined or - implementation-defined behavior. Their implementations are simple - and straightforward, but they are a bit harder to use than the - INT__OVERFLOW macros described below. - - Example usage: - - long int i = ...; - long int j = ...; - if (INT_MULTIPLY_RANGE_OVERFLOW (i, j, LONG_MIN, LONG_MAX)) - printf ("multiply would overflow"); - else - printf ("product is %ld", i * j); - - Restrictions on *_RANGE_OVERFLOW macros: - - These macros do not check for all possible numerical problems or - undefined or unspecified behavior: they do not check for division - by zero, for bad shift counts, or for shifting negative numbers. - - These macros may evaluate their arguments zero or multiple times, - so the arguments should not have side effects. The arithmetic - arguments (including the MIN and MAX arguments) must be of the same - integer type after the usual arithmetic conversions, and the type - must have minimum value MIN and maximum MAX. Unsigned types should - use a zero MIN of the proper type. - - These macros are tuned for constant MIN and MAX. For commutative - operations such as A + B, they are also tuned for constant B. */ - -/* Return 1 if A + B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_ADD_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? (a) < (min) - (b) \ - : (max) - (b) < (a)) - -/* Return 1 if A - B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_SUBTRACT_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? (max) + (b) < (a) \ - : (a) < (min) + (b)) - -/* Return 1 if - A would overflow in [MIN,MAX] arithmetic. - See above for restrictions. */ -#define INT_NEGATE_RANGE_OVERFLOW(a, min, max) \ - ((min) < 0 \ - ? (a) < - (max) \ - : 0 < (a)) - -/* Return 1 if A * B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Avoid && and || as they tickle - bugs in Sun C 5.11 2010/08/13 and other compilers; see - . */ -#define INT_MULTIPLY_RANGE_OVERFLOW(a, b, min, max) \ - ((b) < 0 \ - ? ((a) < 0 \ - ? (a) < (max) / (b) \ - : (b) == -1 \ - ? 0 \ - : (min) / (b) < (a)) \ - : (b) == 0 \ - ? 0 \ - : ((a) < 0 \ - ? (a) < (min) / (b) \ - : (max) / (b) < (a))) - -/* Return 1 if A / B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Do not check for division by zero. */ -#define INT_DIVIDE_RANGE_OVERFLOW(a, b, min, max) \ - ((min) < 0 && (b) == -1 && (a) < - (max)) - -/* Return 1 if A % B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Do not check for division by zero. - Mathematically, % should never overflow, but on x86-like hosts - INT_MIN % -1 traps, and the C standard permits this, so treat this - as an overflow too. */ -#define INT_REMAINDER_RANGE_OVERFLOW(a, b, min, max) \ - INT_DIVIDE_RANGE_OVERFLOW (a, b, min, max) - -/* Return 1 if A << B would overflow in [MIN,MAX] arithmetic. - See above for restrictions. Here, MIN and MAX are for A only, and B need - not be of the same type as the other arguments. The C standard says that - behavior is undefined for shifts unless 0 <= B < wordwidth, and that when - A is negative then A << B has undefined behavior and A >> B has - implementation-defined behavior, but do not check these other - restrictions. */ -#define INT_LEFT_SHIFT_RANGE_OVERFLOW(a, b, min, max) \ - ((a) < 0 \ - ? (a) < (min) >> (b) \ - : (max) >> (b) < (a)) - - -/* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands - (e.g., A and B) have the same type as MIN and MAX. Instead, they assume - that the result (e.g., A + B) has that type. */ -#define _GL_ADD_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_ADD_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? (b) <= (a) + (b) \ - : (b) < 0 ? (a) <= (a) + (b) \ - : (a) + (b) < (b)) -#define _GL_SUBTRACT_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? INT_SUBTRACT_RANGE_OVERFLOW (a, b, min, max) \ - : (a) < 0 ? 1 \ - : (b) < 0 ? (a) - (b) <= (a) \ - : (a) < (b)) -#define _GL_MULTIPLY_OVERFLOW(a, b, min, max) \ - (((min) == 0 && (((a) < 0 && 0 < (b)) || ((b) < 0 && 0 < (a)))) \ - || INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max)) -#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ - : (a) < 0 ? (b) <= (a) + (b) - 1 \ - : (b) < 0 && (a) + (b) <= (a)) -#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \ - ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \ - : (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \ - : (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max)) - -/* Return a nonzero value if A is a mathematical multiple of B, where - A is unsigned, B is negative, and MAX is the maximum value of A's - type. A's type must be the same as (A % B)'s type. Normally (A % - -B == 0) suffices, but things get tricky if -B would overflow. */ -#define _GL_UNSIGNED_NEG_MULTIPLE(a, b, max) \ - (((b) < -_GL_SIGNED_INT_MAXIMUM (b) \ - ? (_GL_SIGNED_INT_MAXIMUM (b) == (max) \ - ? (a) \ - : (a) % (_GL_INT_CONVERT (a, _GL_SIGNED_INT_MAXIMUM (b)) + 1)) \ - : (a) % - (b)) \ - == 0) - - -/* Integer overflow checks. - - The INT__OVERFLOW macros return 1 if the corresponding C operators - might not yield numerically correct answers due to arithmetic overflow. - They work correctly on all known practical hosts, and do not rely - on undefined behavior due to signed arithmetic overflow. - - Example usage: - - long int i = ...; - long int j = ...; - if (INT_MULTIPLY_OVERFLOW (i, j)) - printf ("multiply would overflow"); - else - printf ("product is %ld", i * j); - - These macros do not check for all possible numerical problems or - undefined or unspecified behavior: they do not check for division - by zero, for bad shift counts, or for shifting negative numbers. - - These macros may evaluate their arguments zero or multiple times, so the - arguments should not have side effects. - - These macros are tuned for their last argument being a constant. - - Return 1 if the integer expressions A * B, A - B, -A, A * B, A / B, - A % B, and A << B would overflow, respectively. */ - -#define INT_ADD_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_ADD_OVERFLOW) -#define INT_SUBTRACT_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_SUBTRACT_OVERFLOW) -#define INT_NEGATE_OVERFLOW(a) \ - INT_NEGATE_RANGE_OVERFLOW (a, _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) -#define INT_MULTIPLY_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_MULTIPLY_OVERFLOW) -#define INT_DIVIDE_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_DIVIDE_OVERFLOW) -#define INT_REMAINDER_OVERFLOW(a, b) \ - _GL_BINARY_OP_OVERFLOW (a, b, _GL_REMAINDER_OVERFLOW) -#define INT_LEFT_SHIFT_OVERFLOW(a, b) \ - INT_LEFT_SHIFT_RANGE_OVERFLOW (a, b, \ - _GL_INT_MINIMUM (a), _GL_INT_MAXIMUM (a)) - -/* Return 1 if the expression A B would overflow, - where OP_RESULT_OVERFLOW (A, B, MIN, MAX) does the actual test, - assuming MIN and MAX are the minimum and maximum for the result type. - Arguments should be free of side effects. */ -#define _GL_BINARY_OP_OVERFLOW(a, b, op_result_overflow) \ - op_result_overflow (a, b, \ - _GL_INT_MINIMUM (0 * (b) + (a)), \ - _GL_INT_MAXIMUM (0 * (b) + (a))) - -#endif /* _GL_INTPROPS_H */ diff --git a/gnulib/tests/inttypes.in.h b/gnulib/tests/inttypes.in.h deleted file mode 100644 index b9da2b5..0000000 --- a/gnulib/tests/inttypes.in.h +++ /dev/null @@ -1,1130 +0,0 @@ -/* 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 deleted file mode 100644 index e921e76..0000000 --- a/gnulib/tests/localename.c +++ /dev/null @@ -1,2957 +0,0 @@ -/* Determine name of the currently selected locale. - 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 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Ulrich Drepper , 1995. */ -/* Native Windows code written by Tor Lillqvist . */ -/* Mac OS X code written by Bruno Haible . */ - -#include - -/* Specification. */ -#ifdef IN_LIBINTL -# include "gettextP.h" -#else -# include "localename.h" -#endif - -#include -#include -#include -#include -#include - -#if HAVE_USELOCALE -/* Mac OS X 10.5 defines the locale_t type in . */ -# if defined __APPLE__ && defined __MACH__ -# include -# endif -# include -# if !defined IN_LIBINTL -# include "glthread/lock.h" -# endif -#endif - -#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -# include -# if HAVE_CFLOCALECOPYCURRENT -# include -# elif HAVE_CFPREFERENCESCOPYAPPVALUE -# include -# endif -#endif - -#if defined _WIN32 || defined __WIN32__ -# define WINDOWS_NATIVE -#endif - -#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ -# define WIN32_LEAN_AND_MEAN -# include -/* List of language codes, sorted by value: - 0x01 LANG_ARABIC - 0x02 LANG_BULGARIAN - 0x03 LANG_CATALAN - 0x04 LANG_CHINESE - 0x05 LANG_CZECH - 0x06 LANG_DANISH - 0x07 LANG_GERMAN - 0x08 LANG_GREEK - 0x09 LANG_ENGLISH - 0x0a LANG_SPANISH - 0x0b LANG_FINNISH - 0x0c LANG_FRENCH - 0x0d LANG_HEBREW - 0x0e LANG_HUNGARIAN - 0x0f LANG_ICELANDIC - 0x10 LANG_ITALIAN - 0x11 LANG_JAPANESE - 0x12 LANG_KOREAN - 0x13 LANG_DUTCH - 0x14 LANG_NORWEGIAN - 0x15 LANG_POLISH - 0x16 LANG_PORTUGUESE - 0x17 LANG_ROMANSH - 0x18 LANG_ROMANIAN - 0x19 LANG_RUSSIAN - 0x1a LANG_CROATIAN == LANG_SERBIAN - 0x1b LANG_SLOVAK - 0x1c LANG_ALBANIAN - 0x1d LANG_SWEDISH - 0x1e LANG_THAI - 0x1f LANG_TURKISH - 0x20 LANG_URDU - 0x21 LANG_INDONESIAN - 0x22 LANG_UKRAINIAN - 0x23 LANG_BELARUSIAN - 0x24 LANG_SLOVENIAN - 0x25 LANG_ESTONIAN - 0x26 LANG_LATVIAN - 0x27 LANG_LITHUANIAN - 0x28 LANG_TAJIK - 0x29 LANG_FARSI - 0x2a LANG_VIETNAMESE - 0x2b LANG_ARMENIAN - 0x2c LANG_AZERI - 0x2d LANG_BASQUE - 0x2e LANG_SORBIAN - 0x2f LANG_MACEDONIAN - 0x30 LANG_SUTU - 0x31 LANG_TSONGA - 0x32 LANG_TSWANA - 0x33 LANG_VENDA - 0x34 LANG_XHOSA - 0x35 LANG_ZULU - 0x36 LANG_AFRIKAANS - 0x37 LANG_GEORGIAN - 0x38 LANG_FAEROESE - 0x39 LANG_HINDI - 0x3a LANG_MALTESE - 0x3b LANG_SAMI - 0x3c LANG_GAELIC - 0x3d LANG_YIDDISH - 0x3e LANG_MALAY - 0x3f LANG_KAZAK - 0x40 LANG_KYRGYZ - 0x41 LANG_SWAHILI - 0x42 LANG_TURKMEN - 0x43 LANG_UZBEK - 0x44 LANG_TATAR - 0x45 LANG_BENGALI - 0x46 LANG_PUNJABI - 0x47 LANG_GUJARATI - 0x48 LANG_ORIYA - 0x49 LANG_TAMIL - 0x4a LANG_TELUGU - 0x4b LANG_KANNADA - 0x4c LANG_MALAYALAM - 0x4d LANG_ASSAMESE - 0x4e LANG_MARATHI - 0x4f LANG_SANSKRIT - 0x50 LANG_MONGOLIAN - 0x51 LANG_TIBETAN - 0x52 LANG_WELSH - 0x53 LANG_CAMBODIAN - 0x54 LANG_LAO - 0x55 LANG_BURMESE - 0x56 LANG_GALICIAN - 0x57 LANG_KONKANI - 0x58 LANG_MANIPURI - 0x59 LANG_SINDHI - 0x5a LANG_SYRIAC - 0x5b LANG_SINHALESE - 0x5c LANG_CHEROKEE - 0x5d LANG_INUKTITUT - 0x5e LANG_AMHARIC - 0x5f LANG_TAMAZIGHT - 0x60 LANG_KASHMIRI - 0x61 LANG_NEPALI - 0x62 LANG_FRISIAN - 0x63 LANG_PASHTO - 0x64 LANG_TAGALOG - 0x65 LANG_DIVEHI - 0x66 LANG_EDO - 0x67 LANG_FULFULDE - 0x68 LANG_HAUSA - 0x69 LANG_IBIBIO - 0x6a LANG_YORUBA - 0x6d LANG_BASHKIR - 0x6e LANG_LUXEMBOURGISH - 0x6f LANG_GREENLANDIC - 0x70 LANG_IGBO - 0x71 LANG_KANURI - 0x72 LANG_OROMO - 0x73 LANG_TIGRINYA - 0x74 LANG_GUARANI - 0x75 LANG_HAWAIIAN - 0x76 LANG_LATIN - 0x77 LANG_SOMALI - 0x78 LANG_YI - 0x79 LANG_PAPIAMENTU - 0x7a LANG_MAPUDUNGUN - 0x7c LANG_MOHAWK - 0x7e LANG_BRETON - 0x82 LANG_OCCITAN - 0x83 LANG_CORSICAN - 0x84 LANG_ALSATIAN - 0x85 LANG_YAKUT - 0x86 LANG_KICHE - 0x87 LANG_KINYARWANDA - 0x88 LANG_WOLOF - 0x8c LANG_DARI - 0x91 LANG_SCOTTISH_GAELIC -*/ -/* Mingw headers don't have latest language and sublanguage codes. */ -# ifndef LANG_AFRIKAANS -# define LANG_AFRIKAANS 0x36 -# endif -# ifndef LANG_ALBANIAN -# define LANG_ALBANIAN 0x1c -# endif -# ifndef LANG_ALSATIAN -# define LANG_ALSATIAN 0x84 -# endif -# ifndef LANG_AMHARIC -# define LANG_AMHARIC 0x5e -# endif -# ifndef LANG_ARABIC -# define LANG_ARABIC 0x01 -# endif -# ifndef LANG_ARMENIAN -# define LANG_ARMENIAN 0x2b -# endif -# ifndef LANG_ASSAMESE -# define LANG_ASSAMESE 0x4d -# endif -# ifndef LANG_AZERI -# define LANG_AZERI 0x2c -# endif -# ifndef LANG_BASHKIR -# define LANG_BASHKIR 0x6d -# endif -# ifndef LANG_BASQUE -# define LANG_BASQUE 0x2d -# endif -# ifndef LANG_BELARUSIAN -# define LANG_BELARUSIAN 0x23 -# endif -# ifndef LANG_BENGALI -# define LANG_BENGALI 0x45 -# endif -# ifndef LANG_BRETON -# define LANG_BRETON 0x7e -# endif -# ifndef LANG_BURMESE -# define LANG_BURMESE 0x55 -# endif -# ifndef LANG_CAMBODIAN -# define LANG_CAMBODIAN 0x53 -# endif -# ifndef LANG_CATALAN -# define LANG_CATALAN 0x03 -# endif -# ifndef LANG_CHEROKEE -# define LANG_CHEROKEE 0x5c -# endif -# ifndef LANG_CORSICAN -# define LANG_CORSICAN 0x83 -# endif -# ifndef LANG_DARI -# define LANG_DARI 0x8c -# endif -# ifndef LANG_DIVEHI -# define LANG_DIVEHI 0x65 -# endif -# ifndef LANG_EDO -# define LANG_EDO 0x66 -# endif -# ifndef LANG_ESTONIAN -# define LANG_ESTONIAN 0x25 -# endif -# ifndef LANG_FAEROESE -# define LANG_FAEROESE 0x38 -# endif -# ifndef LANG_FARSI -# define LANG_FARSI 0x29 -# endif -# ifndef LANG_FRISIAN -# define LANG_FRISIAN 0x62 -# endif -# ifndef LANG_FULFULDE -# define LANG_FULFULDE 0x67 -# endif -# ifndef LANG_GAELIC -# define LANG_GAELIC 0x3c -# endif -# ifndef LANG_GALICIAN -# define LANG_GALICIAN 0x56 -# endif -# ifndef LANG_GEORGIAN -# define LANG_GEORGIAN 0x37 -# endif -# ifndef LANG_GREENLANDIC -# define LANG_GREENLANDIC 0x6f -# endif -# ifndef LANG_GUARANI -# define LANG_GUARANI 0x74 -# endif -# ifndef LANG_GUJARATI -# define LANG_GUJARATI 0x47 -# endif -# ifndef LANG_HAUSA -# define LANG_HAUSA 0x68 -# endif -# ifndef LANG_HAWAIIAN -# define LANG_HAWAIIAN 0x75 -# endif -# ifndef LANG_HEBREW -# define LANG_HEBREW 0x0d -# endif -# ifndef LANG_HINDI -# define LANG_HINDI 0x39 -# endif -# ifndef LANG_IBIBIO -# define LANG_IBIBIO 0x69 -# endif -# ifndef LANG_IGBO -# define LANG_IGBO 0x70 -# endif -# ifndef LANG_INDONESIAN -# define LANG_INDONESIAN 0x21 -# endif -# ifndef LANG_INUKTITUT -# define LANG_INUKTITUT 0x5d -# endif -# ifndef LANG_KANNADA -# define LANG_KANNADA 0x4b -# endif -# ifndef LANG_KANURI -# define LANG_KANURI 0x71 -# endif -# ifndef LANG_KASHMIRI -# define LANG_KASHMIRI 0x60 -# endif -# ifndef LANG_KAZAK -# define LANG_KAZAK 0x3f -# endif -# ifndef LANG_KICHE -# define LANG_KICHE 0x86 -# endif -# ifndef LANG_KINYARWANDA -# define LANG_KINYARWANDA 0x87 -# endif -# ifndef LANG_KONKANI -# define LANG_KONKANI 0x57 -# endif -# ifndef LANG_KYRGYZ -# define LANG_KYRGYZ 0x40 -# endif -# ifndef LANG_LAO -# define LANG_LAO 0x54 -# endif -# ifndef LANG_LATIN -# define LANG_LATIN 0x76 -# endif -# ifndef LANG_LATVIAN -# define LANG_LATVIAN 0x26 -# endif -# ifndef LANG_LITHUANIAN -# define LANG_LITHUANIAN 0x27 -# endif -# ifndef LANG_LUXEMBOURGISH -# define LANG_LUXEMBOURGISH 0x6e -# endif -# ifndef LANG_MACEDONIAN -# define LANG_MACEDONIAN 0x2f -# endif -# ifndef LANG_MALAY -# define LANG_MALAY 0x3e -# endif -# ifndef LANG_MALAYALAM -# define LANG_MALAYALAM 0x4c -# endif -# ifndef LANG_MALTESE -# define LANG_MALTESE 0x3a -# endif -# ifndef LANG_MANIPURI -# define LANG_MANIPURI 0x58 -# endif -# ifndef LANG_MAORI -# define LANG_MAORI 0x81 -# endif -# ifndef LANG_MAPUDUNGUN -# define LANG_MAPUDUNGUN 0x7a -# endif -# ifndef LANG_MARATHI -# define LANG_MARATHI 0x4e -# endif -# ifndef LANG_MOHAWK -# define LANG_MOHAWK 0x7c -# endif -# ifndef LANG_MONGOLIAN -# define LANG_MONGOLIAN 0x50 -# endif -# ifndef LANG_NEPALI -# define LANG_NEPALI 0x61 -# endif -# ifndef LANG_OCCITAN -# define LANG_OCCITAN 0x82 -# endif -# ifndef LANG_ORIYA -# define LANG_ORIYA 0x48 -# endif -# ifndef LANG_OROMO -# define LANG_OROMO 0x72 -# endif -# ifndef LANG_PAPIAMENTU -# define LANG_PAPIAMENTU 0x79 -# endif -# ifndef LANG_PASHTO -# define LANG_PASHTO 0x63 -# endif -# ifndef LANG_PUNJABI -# define LANG_PUNJABI 0x46 -# endif -# ifndef LANG_QUECHUA -# define LANG_QUECHUA 0x6b -# endif -# ifndef LANG_ROMANSH -# define LANG_ROMANSH 0x17 -# endif -# ifndef LANG_SAMI -# define LANG_SAMI 0x3b -# endif -# ifndef LANG_SANSKRIT -# define LANG_SANSKRIT 0x4f -# endif -# ifndef LANG_SCOTTISH_GAELIC -# define LANG_SCOTTISH_GAELIC 0x91 -# endif -# ifndef LANG_SERBIAN -# define LANG_SERBIAN 0x1a -# endif -# ifndef LANG_SINDHI -# define LANG_SINDHI 0x59 -# endif -# ifndef LANG_SINHALESE -# define LANG_SINHALESE 0x5b -# endif -# ifndef LANG_SLOVAK -# define LANG_SLOVAK 0x1b -# endif -# ifndef LANG_SOMALI -# define LANG_SOMALI 0x77 -# endif -# ifndef LANG_SORBIAN -# define LANG_SORBIAN 0x2e -# endif -# ifndef LANG_SOTHO -# define LANG_SOTHO 0x6c -# endif -# ifndef LANG_SUTU -# define LANG_SUTU 0x30 -# endif -# ifndef LANG_SWAHILI -# define LANG_SWAHILI 0x41 -# endif -# ifndef LANG_SYRIAC -# define LANG_SYRIAC 0x5a -# endif -# ifndef LANG_TAGALOG -# define LANG_TAGALOG 0x64 -# endif -# ifndef LANG_TAJIK -# define LANG_TAJIK 0x28 -# endif -# ifndef LANG_TAMAZIGHT -# define LANG_TAMAZIGHT 0x5f -# endif -# ifndef LANG_TAMIL -# define LANG_TAMIL 0x49 -# endif -# ifndef LANG_TATAR -# define LANG_TATAR 0x44 -# endif -# ifndef LANG_TELUGU -# define LANG_TELUGU 0x4a -# endif -# ifndef LANG_THAI -# define LANG_THAI 0x1e -# endif -# ifndef LANG_TIBETAN -# define LANG_TIBETAN 0x51 -# endif -# ifndef LANG_TIGRINYA -# define LANG_TIGRINYA 0x73 -# endif -# ifndef LANG_TSONGA -# define LANG_TSONGA 0x31 -# endif -# ifndef LANG_TSWANA -# define LANG_TSWANA 0x32 -# endif -# ifndef LANG_TURKMEN -# define LANG_TURKMEN 0x42 -# endif -# ifndef LANG_UIGHUR -# define LANG_UIGHUR 0x80 -# endif -# ifndef LANG_UKRAINIAN -# define LANG_UKRAINIAN 0x22 -# endif -# ifndef LANG_URDU -# define LANG_URDU 0x20 -# endif -# ifndef LANG_UZBEK -# define LANG_UZBEK 0x43 -# endif -# ifndef LANG_VENDA -# define LANG_VENDA 0x33 -# endif -# ifndef LANG_VIETNAMESE -# define LANG_VIETNAMESE 0x2a -# endif -# ifndef LANG_WELSH -# define LANG_WELSH 0x52 -# endif -# ifndef LANG_WOLOF -# define LANG_WOLOF 0x88 -# endif -# ifndef LANG_XHOSA -# define LANG_XHOSA 0x34 -# endif -# ifndef LANG_YAKUT -# define LANG_YAKUT 0x85 -# endif -# ifndef LANG_YI -# define LANG_YI 0x78 -# endif -# ifndef LANG_YIDDISH -# define LANG_YIDDISH 0x3d -# endif -# ifndef LANG_YORUBA -# define LANG_YORUBA 0x6a -# endif -# ifndef LANG_ZULU -# define LANG_ZULU 0x35 -# endif -# ifndef SUBLANG_AFRIKAANS_SOUTH_AFRICA -# define SUBLANG_AFRIKAANS_SOUTH_AFRICA 0x01 -# endif -# ifndef SUBLANG_ALBANIAN_ALBANIA -# define SUBLANG_ALBANIAN_ALBANIA 0x01 -# endif -# ifndef SUBLANG_ALSATIAN_FRANCE -# define SUBLANG_ALSATIAN_FRANCE 0x01 -# endif -# ifndef SUBLANG_AMHARIC_ETHIOPIA -# define SUBLANG_AMHARIC_ETHIOPIA 0x01 -# endif -# ifndef SUBLANG_ARABIC_SAUDI_ARABIA -# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 -# endif -# ifndef SUBLANG_ARABIC_IRAQ -# define SUBLANG_ARABIC_IRAQ 0x02 -# endif -# ifndef SUBLANG_ARABIC_EGYPT -# define SUBLANG_ARABIC_EGYPT 0x03 -# endif -# ifndef SUBLANG_ARABIC_LIBYA -# define SUBLANG_ARABIC_LIBYA 0x04 -# endif -# ifndef SUBLANG_ARABIC_ALGERIA -# define SUBLANG_ARABIC_ALGERIA 0x05 -# endif -# ifndef SUBLANG_ARABIC_MOROCCO -# define SUBLANG_ARABIC_MOROCCO 0x06 -# endif -# ifndef SUBLANG_ARABIC_TUNISIA -# define SUBLANG_ARABIC_TUNISIA 0x07 -# endif -# ifndef SUBLANG_ARABIC_OMAN -# define SUBLANG_ARABIC_OMAN 0x08 -# endif -# ifndef SUBLANG_ARABIC_YEMEN -# define SUBLANG_ARABIC_YEMEN 0x09 -# endif -# ifndef SUBLANG_ARABIC_SYRIA -# define SUBLANG_ARABIC_SYRIA 0x0a -# endif -# ifndef SUBLANG_ARABIC_JORDAN -# define SUBLANG_ARABIC_JORDAN 0x0b -# endif -# ifndef SUBLANG_ARABIC_LEBANON -# define SUBLANG_ARABIC_LEBANON 0x0c -# endif -# ifndef SUBLANG_ARABIC_KUWAIT -# define SUBLANG_ARABIC_KUWAIT 0x0d -# endif -# ifndef SUBLANG_ARABIC_UAE -# define SUBLANG_ARABIC_UAE 0x0e -# endif -# ifndef SUBLANG_ARABIC_BAHRAIN -# define SUBLANG_ARABIC_BAHRAIN 0x0f -# endif -# ifndef SUBLANG_ARABIC_QATAR -# define SUBLANG_ARABIC_QATAR 0x10 -# endif -# ifndef SUBLANG_ARMENIAN_ARMENIA -# define SUBLANG_ARMENIAN_ARMENIA 0x01 -# endif -# ifndef SUBLANG_ASSAMESE_INDIA -# define SUBLANG_ASSAMESE_INDIA 0x01 -# endif -# ifndef SUBLANG_AZERI_LATIN -# define SUBLANG_AZERI_LATIN 0x01 -# endif -# ifndef SUBLANG_AZERI_CYRILLIC -# define SUBLANG_AZERI_CYRILLIC 0x02 -# endif -# ifndef SUBLANG_BASHKIR_RUSSIA -# define SUBLANG_BASHKIR_RUSSIA 0x01 -# endif -# ifndef SUBLANG_BASQUE_BASQUE -# define SUBLANG_BASQUE_BASQUE 0x01 -# endif -# ifndef SUBLANG_BELARUSIAN_BELARUS -# define SUBLANG_BELARUSIAN_BELARUS 0x01 -# endif -# ifndef SUBLANG_BENGALI_INDIA -# define SUBLANG_BENGALI_INDIA 0x01 -# endif -# ifndef SUBLANG_BENGALI_BANGLADESH -# define SUBLANG_BENGALI_BANGLADESH 0x02 -# endif -# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN -# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN 0x05 -# endif -# ifndef SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC -# define SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC 0x08 -# endif -# ifndef SUBLANG_BRETON_FRANCE -# define SUBLANG_BRETON_FRANCE 0x01 -# endif -# ifndef SUBLANG_BULGARIAN_BULGARIA -# define SUBLANG_BULGARIAN_BULGARIA 0x01 -# endif -# ifndef SUBLANG_CAMBODIAN_CAMBODIA -# define SUBLANG_CAMBODIAN_CAMBODIA 0x01 -# endif -# ifndef SUBLANG_CATALAN_SPAIN -# define SUBLANG_CATALAN_SPAIN 0x01 -# endif -# ifndef SUBLANG_CORSICAN_FRANCE -# define SUBLANG_CORSICAN_FRANCE 0x01 -# endif -# ifndef SUBLANG_CROATIAN_CROATIA -# define SUBLANG_CROATIAN_CROATIA 0x01 -# endif -# ifndef SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN -# define SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN 0x04 -# endif -# ifndef SUBLANG_CHINESE_MACAU -# define SUBLANG_CHINESE_MACAU 0x05 -# endif -# ifndef SUBLANG_CZECH_CZECH_REPUBLIC -# define SUBLANG_CZECH_CZECH_REPUBLIC 0x01 -# endif -# ifndef SUBLANG_DANISH_DENMARK -# define SUBLANG_DANISH_DENMARK 0x01 -# endif -# ifndef SUBLANG_DARI_AFGHANISTAN -# define SUBLANG_DARI_AFGHANISTAN 0x01 -# endif -# ifndef SUBLANG_DIVEHI_MALDIVES -# define SUBLANG_DIVEHI_MALDIVES 0x01 -# endif -# ifndef SUBLANG_DUTCH_SURINAM -# define SUBLANG_DUTCH_SURINAM 0x03 -# endif -# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA -# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 -# endif -# ifndef SUBLANG_ENGLISH_JAMAICA -# define SUBLANG_ENGLISH_JAMAICA 0x08 -# endif -# ifndef SUBLANG_ENGLISH_CARIBBEAN -# define SUBLANG_ENGLISH_CARIBBEAN 0x09 -# endif -# ifndef SUBLANG_ENGLISH_BELIZE -# define SUBLANG_ENGLISH_BELIZE 0x0a -# endif -# ifndef SUBLANG_ENGLISH_TRINIDAD -# define SUBLANG_ENGLISH_TRINIDAD 0x0b -# endif -# ifndef SUBLANG_ENGLISH_ZIMBABWE -# define SUBLANG_ENGLISH_ZIMBABWE 0x0c -# endif -# ifndef SUBLANG_ENGLISH_PHILIPPINES -# define SUBLANG_ENGLISH_PHILIPPINES 0x0d -# endif -# ifndef SUBLANG_ENGLISH_INDONESIA -# define SUBLANG_ENGLISH_INDONESIA 0x0e -# endif -# ifndef SUBLANG_ENGLISH_HONGKONG -# define SUBLANG_ENGLISH_HONGKONG 0x0f -# endif -# ifndef SUBLANG_ENGLISH_INDIA -# define SUBLANG_ENGLISH_INDIA 0x10 -# endif -# ifndef SUBLANG_ENGLISH_MALAYSIA -# define SUBLANG_ENGLISH_MALAYSIA 0x11 -# endif -# ifndef SUBLANG_ENGLISH_SINGAPORE -# define SUBLANG_ENGLISH_SINGAPORE 0x12 -# endif -# ifndef SUBLANG_ESTONIAN_ESTONIA -# define SUBLANG_ESTONIAN_ESTONIA 0x01 -# endif -# ifndef SUBLANG_FAEROESE_FAROE_ISLANDS -# define SUBLANG_FAEROESE_FAROE_ISLANDS 0x01 -# endif -# ifndef SUBLANG_FARSI_IRAN -# define SUBLANG_FARSI_IRAN 0x01 -# endif -# ifndef SUBLANG_FINNISH_FINLAND -# define SUBLANG_FINNISH_FINLAND 0x01 -# endif -# ifndef SUBLANG_FRENCH_LUXEMBOURG -# define SUBLANG_FRENCH_LUXEMBOURG 0x05 -# endif -# ifndef SUBLANG_FRENCH_MONACO -# define SUBLANG_FRENCH_MONACO 0x06 -# endif -# ifndef SUBLANG_FRENCH_WESTINDIES -# define SUBLANG_FRENCH_WESTINDIES 0x07 -# endif -# ifndef SUBLANG_FRENCH_REUNION -# define SUBLANG_FRENCH_REUNION 0x08 -# endif -# ifndef SUBLANG_FRENCH_CONGO -# define SUBLANG_FRENCH_CONGO 0x09 -# endif -# ifndef SUBLANG_FRENCH_SENEGAL -# define SUBLANG_FRENCH_SENEGAL 0x0a -# endif -# ifndef SUBLANG_FRENCH_CAMEROON -# define SUBLANG_FRENCH_CAMEROON 0x0b -# endif -# ifndef SUBLANG_FRENCH_COTEDIVOIRE -# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c -# endif -# ifndef SUBLANG_FRENCH_MALI -# define SUBLANG_FRENCH_MALI 0x0d -# endif -# ifndef SUBLANG_FRENCH_MOROCCO -# define SUBLANG_FRENCH_MOROCCO 0x0e -# endif -# ifndef SUBLANG_FRENCH_HAITI -# define SUBLANG_FRENCH_HAITI 0x0f -# endif -# ifndef SUBLANG_FRISIAN_NETHERLANDS -# define SUBLANG_FRISIAN_NETHERLANDS 0x01 -# endif -# ifndef SUBLANG_GALICIAN_SPAIN -# define SUBLANG_GALICIAN_SPAIN 0x01 -# endif -# ifndef SUBLANG_GEORGIAN_GEORGIA -# define SUBLANG_GEORGIAN_GEORGIA 0x01 -# endif -# ifndef SUBLANG_GERMAN_LUXEMBOURG -# define SUBLANG_GERMAN_LUXEMBOURG 0x04 -# endif -# ifndef SUBLANG_GERMAN_LIECHTENSTEIN -# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 -# endif -# ifndef SUBLANG_GREEK_GREECE -# define SUBLANG_GREEK_GREECE 0x01 -# endif -# ifndef SUBLANG_GREENLANDIC_GREENLAND -# define SUBLANG_GREENLANDIC_GREENLAND 0x01 -# endif -# ifndef SUBLANG_GUJARATI_INDIA -# define SUBLANG_GUJARATI_INDIA 0x01 -# endif -# ifndef SUBLANG_HAUSA_NIGERIA_LATIN -# define SUBLANG_HAUSA_NIGERIA_LATIN 0x01 -# endif -# ifndef SUBLANG_HEBREW_ISRAEL -# define SUBLANG_HEBREW_ISRAEL 0x01 -# endif -# ifndef SUBLANG_HINDI_INDIA -# define SUBLANG_HINDI_INDIA 0x01 -# endif -# ifndef SUBLANG_HUNGARIAN_HUNGARY -# define SUBLANG_HUNGARIAN_HUNGARY 0x01 -# endif -# ifndef SUBLANG_ICELANDIC_ICELAND -# define SUBLANG_ICELANDIC_ICELAND 0x01 -# endif -# ifndef SUBLANG_IGBO_NIGERIA -# define SUBLANG_IGBO_NIGERIA 0x01 -# endif -# ifndef SUBLANG_INDONESIAN_INDONESIA -# define SUBLANG_INDONESIAN_INDONESIA 0x01 -# endif -# ifndef SUBLANG_INUKTITUT_CANADA -# define SUBLANG_INUKTITUT_CANADA 0x01 -# endif -# undef SUBLANG_INUKTITUT_CANADA_LATIN -# define SUBLANG_INUKTITUT_CANADA_LATIN 0x02 -# undef SUBLANG_IRISH_IRELAND -# define SUBLANG_IRISH_IRELAND 0x02 -# ifndef SUBLANG_JAPANESE_JAPAN -# define SUBLANG_JAPANESE_JAPAN 0x01 -# endif -# ifndef SUBLANG_KANNADA_INDIA -# define SUBLANG_KANNADA_INDIA 0x01 -# endif -# ifndef SUBLANG_KASHMIRI_INDIA -# define SUBLANG_KASHMIRI_INDIA 0x02 -# endif -# ifndef SUBLANG_KAZAK_KAZAKHSTAN -# define SUBLANG_KAZAK_KAZAKHSTAN 0x01 -# endif -# ifndef SUBLANG_KICHE_GUATEMALA -# define SUBLANG_KICHE_GUATEMALA 0x01 -# endif -# ifndef SUBLANG_KINYARWANDA_RWANDA -# define SUBLANG_KINYARWANDA_RWANDA 0x01 -# endif -# ifndef SUBLANG_KONKANI_INDIA -# define SUBLANG_KONKANI_INDIA 0x01 -# endif -# ifndef SUBLANG_KYRGYZ_KYRGYZSTAN -# define SUBLANG_KYRGYZ_KYRGYZSTAN 0x01 -# endif -# ifndef SUBLANG_LAO_LAOS -# define SUBLANG_LAO_LAOS 0x01 -# endif -# ifndef SUBLANG_LATVIAN_LATVIA -# define SUBLANG_LATVIAN_LATVIA 0x01 -# endif -# ifndef SUBLANG_LITHUANIAN_LITHUANIA -# define SUBLANG_LITHUANIAN_LITHUANIA 0x01 -# endif -# undef SUBLANG_LOWER_SORBIAN_GERMANY -# define SUBLANG_LOWER_SORBIAN_GERMANY 0x02 -# ifndef SUBLANG_LUXEMBOURGISH_LUXEMBOURG -# define SUBLANG_LUXEMBOURGISH_LUXEMBOURG 0x01 -# endif -# ifndef SUBLANG_MACEDONIAN_MACEDONIA -# define SUBLANG_MACEDONIAN_MACEDONIA 0x01 -# endif -# ifndef SUBLANG_MALAY_MALAYSIA -# define SUBLANG_MALAY_MALAYSIA 0x01 -# endif -# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM -# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 -# endif -# ifndef SUBLANG_MALAYALAM_INDIA -# define SUBLANG_MALAYALAM_INDIA 0x01 -# endif -# ifndef SUBLANG_MALTESE_MALTA -# define SUBLANG_MALTESE_MALTA 0x01 -# endif -# ifndef SUBLANG_MAORI_NEW_ZEALAND -# define SUBLANG_MAORI_NEW_ZEALAND 0x01 -# endif -# ifndef SUBLANG_MAPUDUNGUN_CHILE -# define SUBLANG_MAPUDUNGUN_CHILE 0x01 -# endif -# ifndef SUBLANG_MARATHI_INDIA -# define SUBLANG_MARATHI_INDIA 0x01 -# endif -# ifndef SUBLANG_MOHAWK_CANADA -# define SUBLANG_MOHAWK_CANADA 0x01 -# endif -# ifndef SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA -# define SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA 0x01 -# endif -# ifndef SUBLANG_MONGOLIAN_PRC -# define SUBLANG_MONGOLIAN_PRC 0x02 -# endif -# ifndef SUBLANG_NEPALI_NEPAL -# define SUBLANG_NEPALI_NEPAL 0x01 -# endif -# ifndef SUBLANG_NEPALI_INDIA -# define SUBLANG_NEPALI_INDIA 0x02 -# endif -# ifndef SUBLANG_OCCITAN_FRANCE -# define SUBLANG_OCCITAN_FRANCE 0x01 -# endif -# ifndef SUBLANG_ORIYA_INDIA -# define SUBLANG_ORIYA_INDIA 0x01 -# endif -# ifndef SUBLANG_PASHTO_AFGHANISTAN -# define SUBLANG_PASHTO_AFGHANISTAN 0x01 -# endif -# ifndef SUBLANG_POLISH_POLAND -# define SUBLANG_POLISH_POLAND 0x01 -# endif -# ifndef SUBLANG_PUNJABI_INDIA -# define SUBLANG_PUNJABI_INDIA 0x01 -# endif -# ifndef SUBLANG_PUNJABI_PAKISTAN -# define SUBLANG_PUNJABI_PAKISTAN 0x02 -# endif -# ifndef SUBLANG_QUECHUA_BOLIVIA -# define SUBLANG_QUECHUA_BOLIVIA 0x01 -# endif -# ifndef SUBLANG_QUECHUA_ECUADOR -# define SUBLANG_QUECHUA_ECUADOR 0x02 -# endif -# ifndef SUBLANG_QUECHUA_PERU -# define SUBLANG_QUECHUA_PERU 0x03 -# endif -# ifndef SUBLANG_ROMANIAN_ROMANIA -# define SUBLANG_ROMANIAN_ROMANIA 0x01 -# endif -# ifndef SUBLANG_ROMANIAN_MOLDOVA -# define SUBLANG_ROMANIAN_MOLDOVA 0x02 -# endif -# ifndef SUBLANG_ROMANSH_SWITZERLAND -# define SUBLANG_ROMANSH_SWITZERLAND 0x01 -# endif -# ifndef SUBLANG_RUSSIAN_RUSSIA -# define SUBLANG_RUSSIAN_RUSSIA 0x01 -# endif -# ifndef SUBLANG_RUSSIAN_MOLDAVIA -# define SUBLANG_RUSSIAN_MOLDAVIA 0x02 -# endif -# ifndef SUBLANG_SAMI_NORTHERN_NORWAY -# define SUBLANG_SAMI_NORTHERN_NORWAY 0x01 -# endif -# ifndef SUBLANG_SAMI_NORTHERN_SWEDEN -# define SUBLANG_SAMI_NORTHERN_SWEDEN 0x02 -# endif -# ifndef SUBLANG_SAMI_NORTHERN_FINLAND -# define SUBLANG_SAMI_NORTHERN_FINLAND 0x03 -# endif -# ifndef SUBLANG_SAMI_LULE_NORWAY -# define SUBLANG_SAMI_LULE_NORWAY 0x04 -# endif -# ifndef SUBLANG_SAMI_LULE_SWEDEN -# define SUBLANG_SAMI_LULE_SWEDEN 0x05 -# endif -# ifndef SUBLANG_SAMI_SOUTHERN_NORWAY -# define SUBLANG_SAMI_SOUTHERN_NORWAY 0x06 -# endif -# ifndef SUBLANG_SAMI_SOUTHERN_SWEDEN -# define SUBLANG_SAMI_SOUTHERN_SWEDEN 0x07 -# endif -# undef SUBLANG_SAMI_SKOLT_FINLAND -# define SUBLANG_SAMI_SKOLT_FINLAND 0x08 -# undef SUBLANG_SAMI_INARI_FINLAND -# define SUBLANG_SAMI_INARI_FINLAND 0x09 -# ifndef SUBLANG_SANSKRIT_INDIA -# define SUBLANG_SANSKRIT_INDIA 0x01 -# endif -# ifndef SUBLANG_SERBIAN_LATIN -# define SUBLANG_SERBIAN_LATIN 0x02 -# endif -# ifndef SUBLANG_SERBIAN_CYRILLIC -# define SUBLANG_SERBIAN_CYRILLIC 0x03 -# endif -# ifndef SUBLANG_SINDHI_INDIA -# define SUBLANG_SINDHI_INDIA 0x01 -# endif -# undef SUBLANG_SINDHI_PAKISTAN -# define SUBLANG_SINDHI_PAKISTAN 0x02 -# ifndef SUBLANG_SINDHI_AFGHANISTAN -# define SUBLANG_SINDHI_AFGHANISTAN 0x02 -# endif -# ifndef SUBLANG_SINHALESE_SRI_LANKA -# define SUBLANG_SINHALESE_SRI_LANKA 0x01 -# endif -# ifndef SUBLANG_SLOVAK_SLOVAKIA -# define SUBLANG_SLOVAK_SLOVAKIA 0x01 -# endif -# ifndef SUBLANG_SLOVENIAN_SLOVENIA -# define SUBLANG_SLOVENIAN_SLOVENIA 0x01 -# endif -# ifndef SUBLANG_SOTHO_SOUTH_AFRICA -# define SUBLANG_SOTHO_SOUTH_AFRICA 0x01 -# endif -# ifndef SUBLANG_SPANISH_GUATEMALA -# define SUBLANG_SPANISH_GUATEMALA 0x04 -# endif -# ifndef SUBLANG_SPANISH_COSTA_RICA -# define SUBLANG_SPANISH_COSTA_RICA 0x05 -# endif -# ifndef SUBLANG_SPANISH_PANAMA -# define SUBLANG_SPANISH_PANAMA 0x06 -# endif -# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC -# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 -# endif -# ifndef SUBLANG_SPANISH_VENEZUELA -# define SUBLANG_SPANISH_VENEZUELA 0x08 -# endif -# ifndef SUBLANG_SPANISH_COLOMBIA -# define SUBLANG_SPANISH_COLOMBIA 0x09 -# endif -# ifndef SUBLANG_SPANISH_PERU -# define SUBLANG_SPANISH_PERU 0x0a -# endif -# ifndef SUBLANG_SPANISH_ARGENTINA -# define SUBLANG_SPANISH_ARGENTINA 0x0b -# endif -# ifndef SUBLANG_SPANISH_ECUADOR -# define SUBLANG_SPANISH_ECUADOR 0x0c -# endif -# ifndef SUBLANG_SPANISH_CHILE -# define SUBLANG_SPANISH_CHILE 0x0d -# endif -# ifndef SUBLANG_SPANISH_URUGUAY -# define SUBLANG_SPANISH_URUGUAY 0x0e -# endif -# ifndef SUBLANG_SPANISH_PARAGUAY -# define SUBLANG_SPANISH_PARAGUAY 0x0f -# endif -# ifndef SUBLANG_SPANISH_BOLIVIA -# define SUBLANG_SPANISH_BOLIVIA 0x10 -# endif -# ifndef SUBLANG_SPANISH_EL_SALVADOR -# define SUBLANG_SPANISH_EL_SALVADOR 0x11 -# endif -# ifndef SUBLANG_SPANISH_HONDURAS -# define SUBLANG_SPANISH_HONDURAS 0x12 -# endif -# ifndef SUBLANG_SPANISH_NICARAGUA -# define SUBLANG_SPANISH_NICARAGUA 0x13 -# endif -# ifndef SUBLANG_SPANISH_PUERTO_RICO -# define SUBLANG_SPANISH_PUERTO_RICO 0x14 -# endif -# ifndef SUBLANG_SPANISH_US -# define SUBLANG_SPANISH_US 0x15 -# endif -# ifndef SUBLANG_SWAHILI_KENYA -# define SUBLANG_SWAHILI_KENYA 0x01 -# endif -# ifndef SUBLANG_SWEDISH_SWEDEN -# define SUBLANG_SWEDISH_SWEDEN 0x01 -# endif -# ifndef SUBLANG_SWEDISH_FINLAND -# define SUBLANG_SWEDISH_FINLAND 0x02 -# endif -# ifndef SUBLANG_SYRIAC_SYRIA -# define SUBLANG_SYRIAC_SYRIA 0x01 -# endif -# ifndef SUBLANG_TAGALOG_PHILIPPINES -# define SUBLANG_TAGALOG_PHILIPPINES 0x01 -# endif -# ifndef SUBLANG_TAJIK_TAJIKISTAN -# define SUBLANG_TAJIK_TAJIKISTAN 0x01 -# endif -# ifndef SUBLANG_TAMAZIGHT_ARABIC -# define SUBLANG_TAMAZIGHT_ARABIC 0x01 -# endif -# ifndef SUBLANG_TAMAZIGHT_ALGERIA_LATIN -# define SUBLANG_TAMAZIGHT_ALGERIA_LATIN 0x02 -# endif -# ifndef SUBLANG_TAMIL_INDIA -# define SUBLANG_TAMIL_INDIA 0x01 -# endif -# ifndef SUBLANG_TATAR_RUSSIA -# define SUBLANG_TATAR_RUSSIA 0x01 -# endif -# ifndef SUBLANG_TELUGU_INDIA -# define SUBLANG_TELUGU_INDIA 0x01 -# endif -# ifndef SUBLANG_THAI_THAILAND -# define SUBLANG_THAI_THAILAND 0x01 -# endif -# ifndef SUBLANG_TIBETAN_PRC -# define SUBLANG_TIBETAN_PRC 0x01 -# endif -# undef SUBLANG_TIBETAN_BHUTAN -# define SUBLANG_TIBETAN_BHUTAN 0x02 -# ifndef SUBLANG_TIGRINYA_ETHIOPIA -# define SUBLANG_TIGRINYA_ETHIOPIA 0x01 -# endif -# ifndef SUBLANG_TIGRINYA_ERITREA -# define SUBLANG_TIGRINYA_ERITREA 0x02 -# endif -# ifndef SUBLANG_TSWANA_SOUTH_AFRICA -# define SUBLANG_TSWANA_SOUTH_AFRICA 0x01 -# endif -# ifndef SUBLANG_TURKISH_TURKEY -# define SUBLANG_TURKISH_TURKEY 0x01 -# endif -# ifndef SUBLANG_TURKMEN_TURKMENISTAN -# define SUBLANG_TURKMEN_TURKMENISTAN 0x01 -# endif -# ifndef SUBLANG_UIGHUR_PRC -# define SUBLANG_UIGHUR_PRC 0x01 -# endif -# ifndef SUBLANG_UKRAINIAN_UKRAINE -# define SUBLANG_UKRAINIAN_UKRAINE 0x01 -# endif -# ifndef SUBLANG_UPPER_SORBIAN_GERMANY -# define SUBLANG_UPPER_SORBIAN_GERMANY 0x01 -# endif -# ifndef SUBLANG_URDU_PAKISTAN -# define SUBLANG_URDU_PAKISTAN 0x01 -# endif -# ifndef SUBLANG_URDU_INDIA -# define SUBLANG_URDU_INDIA 0x02 -# endif -# ifndef SUBLANG_UZBEK_LATIN -# define SUBLANG_UZBEK_LATIN 0x01 -# endif -# ifndef SUBLANG_UZBEK_CYRILLIC -# define SUBLANG_UZBEK_CYRILLIC 0x02 -# endif -# ifndef SUBLANG_VIETNAMESE_VIETNAM -# define SUBLANG_VIETNAMESE_VIETNAM 0x01 -# endif -# ifndef SUBLANG_WELSH_UNITED_KINGDOM -# define SUBLANG_WELSH_UNITED_KINGDOM 0x01 -# endif -# ifndef SUBLANG_WOLOF_SENEGAL -# define SUBLANG_WOLOF_SENEGAL 0x01 -# endif -# ifndef SUBLANG_XHOSA_SOUTH_AFRICA -# define SUBLANG_XHOSA_SOUTH_AFRICA 0x01 -# endif -# ifndef SUBLANG_YAKUT_RUSSIA -# define SUBLANG_YAKUT_RUSSIA 0x01 -# endif -# ifndef SUBLANG_YI_PRC -# define SUBLANG_YI_PRC 0x01 -# endif -# ifndef SUBLANG_YORUBA_NIGERIA -# define SUBLANG_YORUBA_NIGERIA 0x01 -# endif -# ifndef SUBLANG_ZULU_SOUTH_AFRICA -# define SUBLANG_ZULU_SOUTH_AFRICA 0x01 -# endif -/* GetLocaleInfoA operations. */ -# ifndef LOCALE_SNAME -# define LOCALE_SNAME 0x5c -# endif -#endif - - -#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE -/* Mac OS X 10.2 or newer */ - -/* Canonicalize a Mac OS X locale name to a Unix locale name. - NAME is a sufficiently large buffer. - On input, it contains the Mac OS X locale name. - On output, it contains the Unix locale name. */ -# if !defined IN_LIBINTL -static -# endif -void -gl_locale_name_canonicalize (char *name) -{ - /* This conversion is based on a posting by - Deborah GoldSmith on 2005-03-08, - 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 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 - Mac OS X 10.3.8 function - CFLocaleCreateCanonicalLocaleIdentifierFromString(). */ - typedef struct { const char legacy[21+1]; const char unixy[5+1]; } - legacy_entry; - static const legacy_entry legacy_table[] = { - { "Afrikaans", "af" }, - { "Albanian", "sq" }, - { "Amharic", "am" }, - { "Arabic", "ar" }, - { "Armenian", "hy" }, - { "Assamese", "as" }, - { "Aymara", "ay" }, - { "Azerbaijani", "az" }, - { "Basque", "eu" }, - { "Belarusian", "be" }, - { "Belorussian", "be" }, - { "Bengali", "bn" }, - { "Brazilian Portugese", "pt_BR" }, - { "Brazilian Portuguese", "pt_BR" }, - { "Breton", "br" }, - { "Bulgarian", "bg" }, - { "Burmese", "my" }, - { "Byelorussian", "be" }, - { "Catalan", "ca" }, - { "Chewa", "ny" }, - { "Chichewa", "ny" }, - { "Chinese", "zh" }, - { "Chinese, Simplified", "zh_CN" }, - { "Chinese, Traditional", "zh_TW" }, - { "Chinese, Tradtional", "zh_TW" }, - { "Croatian", "hr" }, - { "Czech", "cs" }, - { "Danish", "da" }, - { "Dutch", "nl" }, - { "Dzongkha", "dz" }, - { "English", "en" }, - { "Esperanto", "eo" }, - { "Estonian", "et" }, - { "Faroese", "fo" }, - { "Farsi", "fa" }, - { "Finnish", "fi" }, - { "Flemish", "nl_BE" }, - { "French", "fr" }, - { "Galician", "gl" }, - { "Gallegan", "gl" }, - { "Georgian", "ka" }, - { "German", "de" }, - { "Greek", "el" }, - { "Greenlandic", "kl" }, - { "Guarani", "gn" }, - { "Gujarati", "gu" }, - { "Hawaiian", "haw" }, /* Yes, "haw", not "cpe". */ - { "Hebrew", "he" }, - { "Hindi", "hi" }, - { "Hungarian", "hu" }, - { "Icelandic", "is" }, - { "Indonesian", "id" }, - { "Inuktitut", "iu" }, - { "Irish", "ga" }, - { "Italian", "it" }, - { "Japanese", "ja" }, - { "Javanese", "jv" }, - { "Kalaallisut", "kl" }, - { "Kannada", "kn" }, - { "Kashmiri", "ks" }, - { "Kazakh", "kk" }, - { "Khmer", "km" }, - { "Kinyarwanda", "rw" }, - { "Kirghiz", "ky" }, - { "Korean", "ko" }, - { "Kurdish", "ku" }, - { "Latin", "la" }, - { "Latvian", "lv" }, - { "Lithuanian", "lt" }, - { "Macedonian", "mk" }, - { "Malagasy", "mg" }, - { "Malay", "ms" }, - { "Malayalam", "ml" }, - { "Maltese", "mt" }, - { "Manx", "gv" }, - { "Marathi", "mr" }, - { "Moldavian", "mo" }, - { "Mongolian", "mn" }, - { "Nepali", "ne" }, - { "Norwegian", "nb" }, /* Yes, "nb", not the obsolete "no". */ - { "Nyanja", "ny" }, - { "Nynorsk", "nn" }, - { "Oriya", "or" }, - { "Oromo", "om" }, - { "Panjabi", "pa" }, - { "Pashto", "ps" }, - { "Persian", "fa" }, - { "Polish", "pl" }, - { "Portuguese", "pt" }, - { "Portuguese, Brazilian", "pt_BR" }, - { "Punjabi", "pa" }, - { "Pushto", "ps" }, - { "Quechua", "qu" }, - { "Romanian", "ro" }, - { "Ruanda", "rw" }, - { "Rundi", "rn" }, - { "Russian", "ru" }, - { "Sami", "se_NO" }, /* Not just "se". */ - { "Sanskrit", "sa" }, - { "Scottish", "gd" }, - { "Serbian", "sr" }, - { "Simplified Chinese", "zh_CN" }, - { "Sindhi", "sd" }, - { "Sinhalese", "si" }, - { "Slovak", "sk" }, - { "Slovenian", "sl" }, - { "Somali", "so" }, - { "Spanish", "es" }, - { "Sundanese", "su" }, - { "Swahili", "sw" }, - { "Swedish", "sv" }, - { "Tagalog", "tl" }, - { "Tajik", "tg" }, - { "Tajiki", "tg" }, - { "Tamil", "ta" }, - { "Tatar", "tt" }, - { "Telugu", "te" }, - { "Thai", "th" }, - { "Tibetan", "bo" }, - { "Tigrinya", "ti" }, - { "Tongan", "to" }, - { "Traditional Chinese", "zh_TW" }, - { "Turkish", "tr" }, - { "Turkmen", "tk" }, - { "Uighur", "ug" }, - { "Ukrainian", "uk" }, - { "Urdu", "ur" }, - { "Uzbek", "uz" }, - { "Vietnamese", "vi" }, - { "Welsh", "cy" }, - { "Yiddish", "yi" } - }; - - /* Convert new-style locale names with language tags (ISO 639 and ISO 15924) - to Unix (ISO 639 and ISO 3166) names. */ - typedef struct { const char langtag[7+1]; const char unixy[12+1]; } - langtag_entry; - static const langtag_entry langtag_table[] = { - /* Mac OS X has "az-Arab", "az-Cyrl", "az-Latn". - The default script for az on Unix is Latin. */ - { "az-Latn", "az" }, - /* Mac OS X has "ga-dots". Does not yet exist on Unix. */ - { "ga-dots", "ga" }, - /* 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" }, - /* Mac OS X has "ms-Arab", "ms-Latn". - The default script for ms on Unix is Latin. */ - { "ms-Latn", "ms" }, - /* Mac OS X has "tg-Cyrl". - The default script for tg on Unix is Cyrillic. */ - { "tg-Cyrl", "tg" }, - /* 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" }, - /* 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" } - }; - - /* Convert script names (ISO 15924) to Unix conventions. - See http://www.unicode.org/iso15924/iso15924-codes.html */ - typedef struct { const char script[4+1]; const char unixy[9+1]; } - script_entry; - static const script_entry script_table[] = { - { "Arab", "arabic" }, - { "Cyrl", "cyrillic" }, - { "Mong", "mongolian" } - }; - - /* Step 1: Convert using legacy_table. */ - if (name[0] >= 'A' && name[0] <= 'Z') - { - unsigned int i1, i2; - i1 = 0; - i2 = sizeof (legacy_table) / sizeof (legacy_entry); - while (i2 - i1 > 1) - { - /* At this point we know that if name occurs in legacy_table, - its index must be >= i1 and < i2. */ - unsigned int i = (i1 + i2) >> 1; - const legacy_entry *p = &legacy_table[i]; - if (strcmp (name, p->legacy) < 0) - i2 = i; - else - i1 = i; - } - if (strcmp (name, legacy_table[i1].legacy) == 0) - { - strcpy (name, legacy_table[i1].unixy); - return; - } - } - - /* Step 2: Convert using langtag_table and script_table. */ - if (strlen (name) == 7 && name[2] == '-') - { - unsigned int i1, i2; - i1 = 0; - i2 = sizeof (langtag_table) / sizeof (langtag_entry); - while (i2 - i1 > 1) - { - /* At this point we know that if name occurs in langtag_table, - its index must be >= i1 and < i2. */ - unsigned int i = (i1 + i2) >> 1; - const langtag_entry *p = &langtag_table[i]; - if (strcmp (name, p->langtag) < 0) - i2 = i; - else - i1 = i; - } - if (strcmp (name, langtag_table[i1].langtag) == 0) - { - strcpy (name, langtag_table[i1].unixy); - return; - } - - i1 = 0; - i2 = sizeof (script_table) / sizeof (script_entry); - while (i2 - i1 > 1) - { - /* At this point we know that if (name + 3) occurs in script_table, - its index must be >= i1 and < i2. */ - unsigned int i = (i1 + i2) >> 1; - const script_entry *p = &script_table[i]; - if (strcmp (name + 3, p->script) < 0) - i2 = i; - else - i1 = i; - } - if (strcmp (name + 3, script_table[i1].script) == 0) - { - name[2] = '@'; - strcpy (name + 3, script_table[i1].unixy); - return; - } - } - - /* Step 3: Convert new-style dash to Unix underscore. */ - { - char *p; - for (p = name; *p != '\0'; p++) - if (*p == '-') - *p = '_'; - } -} - -#endif - - -#if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ - -/* Canonicalize a Windows native locale name to a Unix locale name. - NAME is a sufficiently large buffer. - On input, it contains the Windows locale name. - On output, it contains the Unix locale name. */ -# if !defined IN_LIBINTL -static -# endif -void -gl_locale_name_canonicalize (char *name) -{ - /* FIXME: This is probably incomplete: it does not handle "zh-Hans" and - "zh-Hant". */ - char *p; - - for (p = name; *p != '\0'; p++) - if (*p == '-') - { - *p = '_'; - p++; - for (; *p != '\0'; p++) - { - if (*p >= 'a' && *p <= 'z') - *p += 'A' - 'a'; - if (*p == '-') - { - *p = '\0'; - return; - } - } - return; - } -} - -# if !defined IN_LIBINTL -static -# endif -const char * -gl_locale_name_from_win32_LANGID (LANGID langid) -{ - /* Activate the new code only when the GETTEXT_MUI environment variable is - set, for the time being, since the new code is not well tested. */ - if (getenv ("GETTEXT_MUI") != NULL) - { - static char namebuf[256]; - - /* Query the system's notion of locale name. - On Windows95/98/ME, GetLocaleInfoA returns some incorrect results. - But we don't need to support systems that are so old. */ - if (GetLocaleInfoA (MAKELCID (langid, SORT_DEFAULT), LOCALE_SNAME, - namebuf, sizeof (namebuf) - 1)) - { - /* Convert it to a Unix locale name. */ - gl_locale_name_canonicalize (namebuf); - return namebuf; - } - } - /* 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 native - Windows base (e.g. they have different character conversion facilities - that produce different results). */ - /* Use our own table. */ - { - int primary, sub; - - /* Split into language and territory part. */ - primary = PRIMARYLANGID (langid); - sub = SUBLANGID (langid); - - /* Dispatch on language. - See also http://www.unicode.org/unicode/onlinedat/languages.html . - For details about languages, see http://www.ethnologue.com/ . */ - switch (primary) - { - case LANG_AFRIKAANS: - switch (sub) - { - case SUBLANG_AFRIKAANS_SOUTH_AFRICA: return "af_ZA"; - } - return "af"; - case LANG_ALBANIAN: - switch (sub) - { - case SUBLANG_ALBANIAN_ALBANIA: return "sq_AL"; - } - return "sq"; - case LANG_ALSATIAN: - switch (sub) - { - case SUBLANG_ALSATIAN_FRANCE: return "gsw_FR"; - } - return "gsw"; - case LANG_AMHARIC: - switch (sub) - { - case SUBLANG_AMHARIC_ETHIOPIA: return "am_ET"; - } - return "am"; - case LANG_ARABIC: - switch (sub) - { - case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; - case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; - case SUBLANG_ARABIC_EGYPT: return "ar_EG"; - case SUBLANG_ARABIC_LIBYA: return "ar_LY"; - case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; - case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; - case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; - case SUBLANG_ARABIC_OMAN: return "ar_OM"; - case SUBLANG_ARABIC_YEMEN: return "ar_YE"; - case SUBLANG_ARABIC_SYRIA: return "ar_SY"; - case SUBLANG_ARABIC_JORDAN: return "ar_JO"; - case SUBLANG_ARABIC_LEBANON: return "ar_LB"; - case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; - case SUBLANG_ARABIC_UAE: return "ar_AE"; - case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; - case SUBLANG_ARABIC_QATAR: return "ar_QA"; - } - return "ar"; - case LANG_ARMENIAN: - switch (sub) - { - case SUBLANG_ARMENIAN_ARMENIA: return "hy_AM"; - } - return "hy"; - case LANG_ASSAMESE: - switch (sub) - { - case SUBLANG_ASSAMESE_INDIA: return "as_IN"; - } - return "as"; - case LANG_AZERI: - switch (sub) - { - /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ - case 0x1e: return "az@latin"; - case SUBLANG_AZERI_LATIN: return "az_AZ@latin"; - case 0x1d: return "az@cyrillic"; - case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic"; - } - return "az"; - case LANG_BASHKIR: - switch (sub) - { - case SUBLANG_BASHKIR_RUSSIA: return "ba_RU"; - } - return "ba"; - case LANG_BASQUE: - switch (sub) - { - case SUBLANG_BASQUE_BASQUE: return "eu_ES"; - } - return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ - case LANG_BELARUSIAN: - switch (sub) - { - case SUBLANG_BELARUSIAN_BELARUS: return "be_BY"; - } - return "be"; - case LANG_BENGALI: - switch (sub) - { - case SUBLANG_BENGALI_INDIA: return "bn_IN"; - case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; - } - return "bn"; - case LANG_BRETON: - switch (sub) - { - case SUBLANG_BRETON_FRANCE: return "br_FR"; - } - return "br"; - case LANG_BULGARIAN: - switch (sub) - { - case SUBLANG_BULGARIAN_BULGARIA: return "bg_BG"; - } - return "bg"; - case LANG_BURMESE: - switch (sub) - { - case SUBLANG_DEFAULT: return "my_MM"; - } - return "my"; - case LANG_CAMBODIAN: - switch (sub) - { - case SUBLANG_CAMBODIAN_CAMBODIA: return "km_KH"; - } - return "km"; - case LANG_CATALAN: - switch (sub) - { - case SUBLANG_CATALAN_SPAIN: return "ca_ES"; - } - return "ca"; - case LANG_CHEROKEE: - switch (sub) - { - case SUBLANG_DEFAULT: return "chr_US"; - } - return "chr"; - case LANG_CHINESE: - switch (sub) - { - case SUBLANG_CHINESE_TRADITIONAL: case 0x1f: return "zh_TW"; - case SUBLANG_CHINESE_SIMPLIFIED: case 0x00: return "zh_CN"; - case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; /* traditional */ - case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; /* simplified */ - case SUBLANG_CHINESE_MACAU: return "zh_MO"; /* traditional */ - } - return "zh"; - case LANG_CORSICAN: - switch (sub) - { - case SUBLANG_CORSICAN_FRANCE: return "co_FR"; - } - return "co"; - case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN == LANG_BOSNIAN - * What used to be called Serbo-Croatian - * should really now be two separate - * languages because of political reasons. - * (Says tml, who knows nothing about Serbian - * or Croatian.) - * (I can feel those flames coming already.) - */ - switch (sub) - { - /* Croatian */ - case 0x00: return "hr"; - case SUBLANG_CROATIAN_CROATIA: return "hr_HR"; - case SUBLANG_CROATIAN_BOSNIA_HERZEGOVINA_LATIN: return "hr_BA"; - /* Serbian */ - case 0x1f: return "sr"; - case 0x1c: return "sr"; /* latin */ - case SUBLANG_SERBIAN_LATIN: return "sr_CS"; /* latin */ - case 0x09: return "sr_RS"; /* latin */ - case 0x0b: return "sr_ME"; /* latin */ - case 0x06: return "sr_BA"; /* latin */ - case 0x1b: return "sr@cyrillic"; - case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic"; - case 0x0a: return "sr_RS@cyrillic"; - case 0x0c: return "sr_ME@cyrillic"; - case 0x07: return "sr_BA@cyrillic"; - /* Bosnian */ - case 0x1e: return "bs"; - case 0x1a: return "bs"; /* latin */ - case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_LATIN: return "bs_BA"; /* latin */ - case 0x19: return "bs@cyrillic"; - case SUBLANG_BOSNIAN_BOSNIA_HERZEGOVINA_CYRILLIC: return "bs_BA@cyrillic"; - } - return "hr"; - case LANG_CZECH: - switch (sub) - { - case SUBLANG_CZECH_CZECH_REPUBLIC: return "cs_CZ"; - } - return "cs"; - case LANG_DANISH: - switch (sub) - { - case SUBLANG_DANISH_DENMARK: return "da_DK"; - } - return "da"; - case LANG_DARI: - /* FIXME: Adjust this when such locales appear on Unix. */ - switch (sub) - { - case SUBLANG_DARI_AFGHANISTAN: return "prs_AF"; - } - return "prs"; - case LANG_DIVEHI: - switch (sub) - { - case SUBLANG_DIVEHI_MALDIVES: return "dv_MV"; - } - return "dv"; - case LANG_DUTCH: - switch (sub) - { - case SUBLANG_DUTCH: return "nl_NL"; - case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; - case SUBLANG_DUTCH_SURINAM: return "nl_SR"; - } - return "nl"; - case LANG_EDO: - switch (sub) - { - case SUBLANG_DEFAULT: return "bin_NG"; - } - return "bin"; - case LANG_ENGLISH: - switch (sub) - { - /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought - * English was the language spoken in England. - * Oh well. - */ - case SUBLANG_ENGLISH_US: return "en_US"; - case SUBLANG_ENGLISH_UK: return "en_GB"; - case SUBLANG_ENGLISH_AUS: return "en_AU"; - case SUBLANG_ENGLISH_CAN: return "en_CA"; - case SUBLANG_ENGLISH_NZ: return "en_NZ"; - case SUBLANG_ENGLISH_EIRE: return "en_IE"; - case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; - case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; - case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ - case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; - case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; - case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; - case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; - case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; - case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; - case SUBLANG_ENGLISH_INDIA: return "en_IN"; - case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; - case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; - } - return "en"; - case LANG_ESTONIAN: - switch (sub) - { - case SUBLANG_ESTONIAN_ESTONIA: return "et_EE"; - } - return "et"; - case LANG_FAEROESE: - switch (sub) - { - case SUBLANG_FAEROESE_FAROE_ISLANDS: return "fo_FO"; - } - return "fo"; - case LANG_FARSI: - switch (sub) - { - case SUBLANG_FARSI_IRAN: return "fa_IR"; - } - return "fa"; - case LANG_FINNISH: - switch (sub) - { - case SUBLANG_FINNISH_FINLAND: return "fi_FI"; - } - return "fi"; - case LANG_FRENCH: - switch (sub) - { - case SUBLANG_FRENCH: return "fr_FR"; - case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; - case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; - case SUBLANG_FRENCH_SWISS: return "fr_CH"; - case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; - case SUBLANG_FRENCH_MONACO: return "fr_MC"; - case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ - case SUBLANG_FRENCH_REUNION: return "fr_RE"; - case SUBLANG_FRENCH_CONGO: return "fr_CG"; - case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; - case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; - case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; - case SUBLANG_FRENCH_MALI: return "fr_ML"; - case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; - case SUBLANG_FRENCH_HAITI: return "fr_HT"; - } - return "fr"; - case LANG_FRISIAN: - switch (sub) - { - case SUBLANG_FRISIAN_NETHERLANDS: return "fy_NL"; - } - return "fy"; - case LANG_FULFULDE: - /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */ - switch (sub) - { - case SUBLANG_DEFAULT: return "ff_NG"; - } - return "ff"; - case LANG_GAELIC: - switch (sub) - { - case 0x01: /* SCOTTISH */ - /* old, superseded by LANG_SCOTTISH_GAELIC */ - return "gd_GB"; - case SUBLANG_IRISH_IRELAND: return "ga_IE"; - } - return "ga"; - case LANG_GALICIAN: - switch (sub) - { - case SUBLANG_GALICIAN_SPAIN: return "gl_ES"; - } - return "gl"; - case LANG_GEORGIAN: - switch (sub) - { - case SUBLANG_GEORGIAN_GEORGIA: return "ka_GE"; - } - return "ka"; - case LANG_GERMAN: - switch (sub) - { - case SUBLANG_GERMAN: return "de_DE"; - case SUBLANG_GERMAN_SWISS: return "de_CH"; - case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; - case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; - case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; - } - return "de"; - case LANG_GREEK: - switch (sub) - { - case SUBLANG_GREEK_GREECE: return "el_GR"; - } - return "el"; - case LANG_GREENLANDIC: - switch (sub) - { - case SUBLANG_GREENLANDIC_GREENLAND: return "kl_GL"; - } - return "kl"; - case LANG_GUARANI: - switch (sub) - { - case SUBLANG_DEFAULT: return "gn_PY"; - } - return "gn"; - case LANG_GUJARATI: - switch (sub) - { - case SUBLANG_GUJARATI_INDIA: return "gu_IN"; - } - return "gu"; - case LANG_HAUSA: - switch (sub) - { - case 0x1f: return "ha"; - case SUBLANG_HAUSA_NIGERIA_LATIN: return "ha_NG"; - } - return "ha"; - case LANG_HAWAIIAN: - /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) - or Hawaii Creole English ("cpe_US", 600000 speakers)? */ - switch (sub) - { - case SUBLANG_DEFAULT: return "cpe_US"; - } - return "cpe"; - case LANG_HEBREW: - switch (sub) - { - case SUBLANG_HEBREW_ISRAEL: return "he_IL"; - } - return "he"; - case LANG_HINDI: - switch (sub) - { - case SUBLANG_HINDI_INDIA: return "hi_IN"; - } - return "hi"; - case LANG_HUNGARIAN: - switch (sub) - { - case SUBLANG_HUNGARIAN_HUNGARY: return "hu_HU"; - } - return "hu"; - case LANG_IBIBIO: - switch (sub) - { - case SUBLANG_DEFAULT: return "nic_NG"; - } - return "nic"; - case LANG_ICELANDIC: - switch (sub) - { - case SUBLANG_ICELANDIC_ICELAND: return "is_IS"; - } - return "is"; - case LANG_IGBO: - switch (sub) - { - case SUBLANG_IGBO_NIGERIA: return "ig_NG"; - } - return "ig"; - case LANG_INDONESIAN: - switch (sub) - { - case SUBLANG_INDONESIAN_INDONESIA: return "id_ID"; - } - return "id"; - case LANG_INUKTITUT: - switch (sub) - { - case 0x1e: return "iu"; /* syllabic */ - case SUBLANG_INUKTITUT_CANADA: return "iu_CA"; /* syllabic */ - case 0x1f: return "iu@latin"; - case SUBLANG_INUKTITUT_CANADA_LATIN: return "iu_CA@latin"; - } - return "iu"; - case LANG_ITALIAN: - switch (sub) - { - case SUBLANG_ITALIAN: return "it_IT"; - case SUBLANG_ITALIAN_SWISS: return "it_CH"; - } - return "it"; - case LANG_JAPANESE: - switch (sub) - { - case SUBLANG_JAPANESE_JAPAN: return "ja_JP"; - } - return "ja"; - case LANG_KANNADA: - switch (sub) - { - case SUBLANG_KANNADA_INDIA: return "kn_IN"; - } - return "kn"; - case LANG_KANURI: - switch (sub) - { - case SUBLANG_DEFAULT: return "kr_NG"; - } - return "kr"; - case LANG_KASHMIRI: - switch (sub) - { - case SUBLANG_DEFAULT: return "ks_PK"; - case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; - } - return "ks"; - case LANG_KAZAK: - switch (sub) - { - case SUBLANG_KAZAK_KAZAKHSTAN: return "kk_KZ"; - } - return "kk"; - case LANG_KICHE: - /* FIXME: Adjust this when such locales appear on Unix. */ - switch (sub) - { - case SUBLANG_KICHE_GUATEMALA: return "qut_GT"; - } - return "qut"; - case LANG_KINYARWANDA: - switch (sub) - { - case SUBLANG_KINYARWANDA_RWANDA: return "rw_RW"; - } - return "rw"; - case LANG_KONKANI: - /* FIXME: Adjust this when such locales appear on Unix. */ - switch (sub) - { - case SUBLANG_KONKANI_INDIA: return "kok_IN"; - } - return "kok"; - case LANG_KOREAN: - switch (sub) - { - case SUBLANG_DEFAULT: return "ko_KR"; - } - return "ko"; - case LANG_KYRGYZ: - switch (sub) - { - case SUBLANG_KYRGYZ_KYRGYZSTAN: return "ky_KG"; - } - return "ky"; - case LANG_LAO: - switch (sub) - { - case SUBLANG_LAO_LAOS: return "lo_LA"; - } - return "lo"; - case LANG_LATIN: - switch (sub) - { - case SUBLANG_DEFAULT: return "la_VA"; - } - return "la"; - case LANG_LATVIAN: - switch (sub) - { - case SUBLANG_LATVIAN_LATVIA: return "lv_LV"; - } - return "lv"; - case LANG_LITHUANIAN: - switch (sub) - { - case SUBLANG_LITHUANIAN_LITHUANIA: return "lt_LT"; - } - return "lt"; - case LANG_LUXEMBOURGISH: - switch (sub) - { - case SUBLANG_LUXEMBOURGISH_LUXEMBOURG: return "lb_LU"; - } - return "lb"; - case LANG_MACEDONIAN: - switch (sub) - { - case SUBLANG_MACEDONIAN_MACEDONIA: return "mk_MK"; - } - return "mk"; - case LANG_MALAY: - switch (sub) - { - case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; - case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; - } - return "ms"; - case LANG_MALAYALAM: - switch (sub) - { - case SUBLANG_MALAYALAM_INDIA: return "ml_IN"; - } - return "ml"; - case LANG_MALTESE: - switch (sub) - { - case SUBLANG_MALTESE_MALTA: return "mt_MT"; - } - return "mt"; - case LANG_MANIPURI: - /* FIXME: Adjust this when such locales appear on Unix. */ - switch (sub) - { - case SUBLANG_DEFAULT: return "mni_IN"; - } - return "mni"; - case LANG_MAORI: - switch (sub) - { - case SUBLANG_MAORI_NEW_ZEALAND: return "mi_NZ"; - } - return "mi"; - case LANG_MAPUDUNGUN: - switch (sub) - { - case SUBLANG_MAPUDUNGUN_CHILE: return "arn_CL"; - } - return "arn"; - case LANG_MARATHI: - switch (sub) - { - case SUBLANG_MARATHI_INDIA: return "mr_IN"; - } - return "mr"; - case LANG_MOHAWK: - switch (sub) - { - case SUBLANG_MOHAWK_CANADA: return "moh_CA"; - } - return "moh"; - case LANG_MONGOLIAN: - switch (sub) - { - case SUBLANG_MONGOLIAN_CYRILLIC_MONGOLIA: case 0x1e: return "mn_MN"; - case SUBLANG_MONGOLIAN_PRC: case 0x1f: return "mn_CN"; - } - return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ - case LANG_NEPALI: - switch (sub) - { - case SUBLANG_NEPALI_NEPAL: return "ne_NP"; - case SUBLANG_NEPALI_INDIA: return "ne_IN"; - } - return "ne"; - case LANG_NORWEGIAN: - switch (sub) - { - case 0x1f: return "nb"; - case SUBLANG_NORWEGIAN_BOKMAL: return "nb_NO"; - case 0x1e: return "nn"; - case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; - } - return "no"; - case LANG_OCCITAN: - switch (sub) - { - case SUBLANG_OCCITAN_FRANCE: return "oc_FR"; - } - return "oc"; - case LANG_ORIYA: - switch (sub) - { - case SUBLANG_ORIYA_INDIA: return "or_IN"; - } - return "or"; - case LANG_OROMO: - switch (sub) - { - case SUBLANG_DEFAULT: return "om_ET"; - } - return "om"; - case LANG_PAPIAMENTU: - switch (sub) - { - case SUBLANG_DEFAULT: return "pap_AN"; - } - return "pap"; - case LANG_PASHTO: - switch (sub) - { - case SUBLANG_PASHTO_AFGHANISTAN: return "ps_AF"; - } - return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ - case LANG_POLISH: - switch (sub) - { - case SUBLANG_POLISH_POLAND: return "pl_PL"; - } - return "pl"; - case LANG_PORTUGUESE: - switch (sub) - { - /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. - Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ - case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; - case SUBLANG_PORTUGUESE: return "pt_PT"; - } - return "pt"; - case LANG_PUNJABI: - switch (sub) - { - case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ - case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */ - } - return "pa"; - case LANG_QUECHUA: - /* Note: Microsoft uses the non-ISO language code "quz". */ - switch (sub) - { - case SUBLANG_QUECHUA_BOLIVIA: return "qu_BO"; - case SUBLANG_QUECHUA_ECUADOR: return "qu_EC"; - case SUBLANG_QUECHUA_PERU: return "qu_PE"; - } - return "qu"; - case LANG_ROMANIAN: - switch (sub) - { - case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; - case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD"; - } - return "ro"; - case LANG_ROMANSH: - switch (sub) - { - case SUBLANG_ROMANSH_SWITZERLAND: return "rm_CH"; - } - return "rm"; - case LANG_RUSSIAN: - switch (sub) - { - case SUBLANG_RUSSIAN_RUSSIA: return "ru_RU"; - case SUBLANG_RUSSIAN_MOLDAVIA: return "ru_MD"; - } - return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ - case LANG_SAMI: - switch (sub) - { - /* Northern Sami */ - case 0x00: return "se"; - case SUBLANG_SAMI_NORTHERN_NORWAY: return "se_NO"; - case SUBLANG_SAMI_NORTHERN_SWEDEN: return "se_SE"; - case SUBLANG_SAMI_NORTHERN_FINLAND: return "se_FI"; - /* Lule Sami */ - case 0x1f: return "smj"; - case SUBLANG_SAMI_LULE_NORWAY: return "smj_NO"; - case SUBLANG_SAMI_LULE_SWEDEN: return "smj_SE"; - /* Southern Sami */ - case 0x1e: return "sma"; - case SUBLANG_SAMI_SOUTHERN_NORWAY: return "sma_NO"; - case SUBLANG_SAMI_SOUTHERN_SWEDEN: return "sma_SE"; - /* Skolt Sami */ - case 0x1d: return "sms"; - case SUBLANG_SAMI_SKOLT_FINLAND: return "sms_FI"; - /* Inari Sami */ - case 0x1c: return "smn"; - case SUBLANG_SAMI_INARI_FINLAND: return "smn_FI"; - } - return "se"; /* or "smi"? */ - case LANG_SANSKRIT: - switch (sub) - { - case SUBLANG_SANSKRIT_INDIA: return "sa_IN"; - } - return "sa"; - case LANG_SCOTTISH_GAELIC: - switch (sub) - { - case SUBLANG_DEFAULT: return "gd_GB"; - } - return "gd"; - case LANG_SINDHI: - switch (sub) - { - case SUBLANG_SINDHI_INDIA: return "sd_IN"; - case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; - /*case SUBLANG_SINDHI_AFGHANISTAN: return "sd_AF";*/ - } - return "sd"; - case LANG_SINHALESE: - switch (sub) - { - case SUBLANG_SINHALESE_SRI_LANKA: return "si_LK"; - } - return "si"; - case LANG_SLOVAK: - switch (sub) - { - case SUBLANG_SLOVAK_SLOVAKIA: return "sk_SK"; - } - return "sk"; - case LANG_SLOVENIAN: - switch (sub) - { - case SUBLANG_SLOVENIAN_SLOVENIA: return "sl_SI"; - } - return "sl"; - case LANG_SOMALI: - switch (sub) - { - case SUBLANG_DEFAULT: return "so_SO"; - } - return "so"; - case LANG_SORBIAN: - /* FIXME: Adjust this when such locales appear on Unix. */ - switch (sub) - { - /* Upper Sorbian */ - case 0x00: return "hsb"; - case SUBLANG_UPPER_SORBIAN_GERMANY: return "hsb_DE"; - /* Lower Sorbian */ - case 0x1f: return "dsb"; - case SUBLANG_LOWER_SORBIAN_GERMANY: return "dsb_DE"; - } - return "wen"; - case LANG_SOTHO: - /* calls - it "Sepedi"; according to - - - it's the same as Northern Sotho. */ - switch (sub) - { - case SUBLANG_SOTHO_SOUTH_AFRICA: return "nso_ZA"; - } - return "nso"; - case LANG_SPANISH: - switch (sub) - { - case SUBLANG_SPANISH: return "es_ES"; - case SUBLANG_SPANISH_MEXICAN: return "es_MX"; - case SUBLANG_SPANISH_MODERN: - return "es_ES@modern"; /* not seen on Unix */ - case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; - case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; - case SUBLANG_SPANISH_PANAMA: return "es_PA"; - case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; - case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; - case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; - case SUBLANG_SPANISH_PERU: return "es_PE"; - case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; - case SUBLANG_SPANISH_ECUADOR: return "es_EC"; - case SUBLANG_SPANISH_CHILE: return "es_CL"; - case SUBLANG_SPANISH_URUGUAY: return "es_UY"; - case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; - case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; - case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; - case SUBLANG_SPANISH_HONDURAS: return "es_HN"; - case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; - case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; - case SUBLANG_SPANISH_US: return "es_US"; - } - return "es"; - case LANG_SUTU: - switch (sub) - { - case SUBLANG_DEFAULT: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ - } - return "bnt"; - case LANG_SWAHILI: - switch (sub) - { - case SUBLANG_SWAHILI_KENYA: return "sw_KE"; - } - return "sw"; - case LANG_SWEDISH: - switch (sub) - { - case SUBLANG_SWEDISH_SWEDEN: return "sv_SE"; - case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; - } - return "sv"; - case LANG_SYRIAC: - switch (sub) - { - case SUBLANG_SYRIAC_SYRIA: return "syr_SY"; /* An extinct language. */ - } - return "syr"; - case LANG_TAGALOG: - switch (sub) - { - case SUBLANG_TAGALOG_PHILIPPINES: return "tl_PH"; /* or "fil_PH"? */ - } - return "tl"; /* or "fil"? */ - case LANG_TAJIK: - switch (sub) - { - case 0x1f: return "tg"; - case SUBLANG_TAJIK_TAJIKISTAN: return "tg_TJ"; - } - return "tg"; - case LANG_TAMAZIGHT: - /* Note: Microsoft uses the non-ISO language code "tmz". */ - switch (sub) - { - /* FIXME: Adjust this when Tamazight locales appear on Unix. */ - case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic"; - case 0x1f: return "ber@latin"; - case SUBLANG_TAMAZIGHT_ALGERIA_LATIN: return "ber_DZ@latin"; - } - return "ber"; - case LANG_TAMIL: - switch (sub) - { - case SUBLANG_TAMIL_INDIA: return "ta_IN"; - } - return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ - case LANG_TATAR: - switch (sub) - { - case SUBLANG_TATAR_RUSSIA: return "tt_RU"; - } - return "tt"; - case LANG_TELUGU: - switch (sub) - { - case SUBLANG_TELUGU_INDIA: return "te_IN"; - } - return "te"; - case LANG_THAI: - switch (sub) - { - case SUBLANG_THAI_THAILAND: return "th_TH"; - } - return "th"; - case LANG_TIBETAN: - switch (sub) - { - case SUBLANG_TIBETAN_PRC: - /* Most Tibetans would not like "bo_CN". But Tibet does not yet - have a country code of its own. */ - return "bo"; - case SUBLANG_TIBETAN_BHUTAN: return "bo_BT"; - } - return "bo"; - case LANG_TIGRINYA: - switch (sub) - { - case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; - case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; - } - return "ti"; - case LANG_TSONGA: - switch (sub) - { - case SUBLANG_DEFAULT: return "ts_ZA"; - } - return "ts"; - case LANG_TSWANA: - /* Spoken in South Africa, Botswana. */ - switch (sub) - { - case SUBLANG_TSWANA_SOUTH_AFRICA: return "tn_ZA"; - } - return "tn"; - case LANG_TURKISH: - switch (sub) - { - case SUBLANG_TURKISH_TURKEY: return "tr_TR"; - } - return "tr"; - case LANG_TURKMEN: - switch (sub) - { - case SUBLANG_TURKMEN_TURKMENISTAN: return "tk_TM"; - } - return "tk"; - case LANG_UIGHUR: - switch (sub) - { - case SUBLANG_UIGHUR_PRC: return "ug_CN"; - } - return "ug"; - case LANG_UKRAINIAN: - switch (sub) - { - case SUBLANG_UKRAINIAN_UKRAINE: return "uk_UA"; - } - return "uk"; - case LANG_URDU: - switch (sub) - { - case SUBLANG_URDU_PAKISTAN: return "ur_PK"; - case SUBLANG_URDU_INDIA: return "ur_IN"; - } - return "ur"; - case LANG_UZBEK: - switch (sub) - { - case 0x1f: return "uz"; - case SUBLANG_UZBEK_LATIN: return "uz_UZ"; - case 0x1e: return "uz@cyrillic"; - case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic"; - } - return "uz"; - case LANG_VENDA: - switch (sub) - { - case SUBLANG_DEFAULT: return "ve_ZA"; - } - return "ve"; - case LANG_VIETNAMESE: - switch (sub) - { - case SUBLANG_VIETNAMESE_VIETNAM: return "vi_VN"; - } - return "vi"; - case LANG_WELSH: - switch (sub) - { - case SUBLANG_WELSH_UNITED_KINGDOM: return "cy_GB"; - } - return "cy"; - case LANG_WOLOF: - switch (sub) - { - case SUBLANG_WOLOF_SENEGAL: return "wo_SN"; - } - return "wo"; - case LANG_XHOSA: - switch (sub) - { - case SUBLANG_XHOSA_SOUTH_AFRICA: return "xh_ZA"; - } - return "xh"; - case LANG_YAKUT: - switch (sub) - { - case SUBLANG_YAKUT_RUSSIA: return "sah_RU"; - } - return "sah"; - case LANG_YI: - switch (sub) - { - case SUBLANG_YI_PRC: return "ii_CN"; - } - return "ii"; - case LANG_YIDDISH: - switch (sub) - { - case SUBLANG_DEFAULT: return "yi_IL"; - } - return "yi"; - case LANG_YORUBA: - switch (sub) - { - case SUBLANG_YORUBA_NIGERIA: return "yo_NG"; - } - return "yo"; - case LANG_ZULU: - switch (sub) - { - case SUBLANG_ZULU_SOUTH_AFRICA: return "zu_ZA"; - } - return "zu"; - default: return "C"; - } - } -} - -# if !defined IN_LIBINTL -static -# endif -const char * -gl_locale_name_from_win32_LCID (LCID lcid) -{ - LANGID langid; - - /* Strip off the sorting rules, keep only the language part. */ - langid = LANGIDFROMLCID (lcid); - - return gl_locale_name_from_win32_LANGID (langid); -} - -#endif - - -#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. */ - -# define SIZE_BITS (sizeof (size_t) * CHAR_BIT) - -/* A hash function for NUL-terminated char* strings using - the method described by Bruno Haible. - See http://www.haible.de/bruno/hashfunc.html. */ -static size_t -string_hash (const void *x) -{ - const char *s = (const char *) x; - size_t h = 0; - - for (; *s; s++) - h = *s + ((h << 9) | (h >> (SIZE_BITS - 9))); - - return h; -} - -/* A hash table of fixed size. Multiple threads can access it read-only - simultaneously, but only one thread can insert into it at the same time. */ - -/* A node in a hash bucket collision list. */ -struct hash_node - { - struct hash_node * volatile next; - char contents[100]; /* has variable size */ - }; - -# define HASH_TABLE_SIZE 257 -static struct hash_node * volatile struniq_hash_table[HASH_TABLE_SIZE] - /* = { NULL, ..., NULL } */; - -/* This lock protects the struniq_hash_table against multiple simultaneous - insertions. */ -gl_lock_define_initialized(static, struniq_lock) - -/* Store a copy of the given string in a string pool with indefinite extent. - Return a pointer to this copy. */ -static const char * -struniq (const char *string) -{ - size_t hashcode = string_hash (string); - size_t slot = hashcode % HASH_TABLE_SIZE; - size_t size; - struct hash_node *new_node; - struct hash_node *p; - for (p = struniq_hash_table[slot]; p != NULL; p = p->next) - if (strcmp (p->contents, string) == 0) - return p->contents; - size = strlen (string) + 1; - new_node = - (struct hash_node *) - malloc (offsetof (struct hash_node, contents[0]) + size); - if (new_node == NULL) - /* Out of memory. Return a statically allocated string. */ - return "C"; - memcpy (new_node->contents, string, size); - /* Lock while inserting new_node. */ - gl_lock_lock (struniq_lock); - /* Check whether another thread already added the string while we were - waiting on the lock. */ - for (p = struniq_hash_table[slot]; p != NULL; p = p->next) - if (strcmp (p->contents, string) == 0) - { - free (new_node); - new_node = p; - goto done; - } - /* Really insert new_node into the hash table. Fill new_node entirely first, - because other threads may be iterating over the linked list. */ - new_node->next = struniq_hash_table[slot]; - struniq_hash_table[slot] = new_node; - done: - /* Unlock after new_node is inserted. */ - gl_lock_unlock (struniq_lock); - return new_node->contents; -} - -#endif - - -#if defined IN_LIBINTL || HAVE_USELOCALE - -/* Like gl_locale_name_thread, except that the result is not in storage of - indefinite extent. */ -# if !defined IN_LIBINTL -static -# endif -const char * -gl_locale_name_thread_unsafe (int category, const char *categoryname) -{ -# if HAVE_USELOCALE - { - locale_t thread_locale = uselocale (NULL); - if (thread_locale != LC_GLOBAL_LOCALE) - { -# if __GLIBC__ >= 2 && !defined __UCLIBC__ - /* Work around an incorrect definition of the _NL_LOCALE_NAME macro in - glibc < 2.12. - See . */ - const char *name = - nl_langinfo (_NL_ITEM ((category), _NL_ITEM_INDEX (-1))); - if (name[0] == '\0') - /* Fallback code for glibc < 2.4, which did not implement - nl_langinfo (_NL_LOCALE_NAME (category)). */ - name = thread_locale->__names[category]; - return name; -# endif -# 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 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 Mac OS X >= 10.6.0 */ - { - int32_t __refcount; - void (*__free_extra)(void *); - __darwin_mbstate_t __mbs[10]; - /*pthread_lock_t*/ int __lock; - int64_t __magic; - }; - struct _xlocale_part2 - { - int64_t __magic; - unsigned char __collate_load_error; - unsigned char __collate_substitute_nontrivial; - unsigned char _messages_using_locale; - unsigned char _monetary_using_locale; - unsigned char _numeric_using_locale; - unsigned char _time_using_locale; - unsigned char __mlocale_changed; - unsigned char __nlocale_changed; - unsigned char __numeric_fp_cvt; - struct __xlocale_st_collate *__lc_collate; - struct __xlocale_st_runelocale *__lc_ctype; - struct __xlocale_st_messages *__lc_messages; - struct __xlocale_st_monetary *__lc_monetary; - struct __xlocale_st_numeric *__lc_numeric; - struct _xlocale *__lc_numeric_loc; - struct __xlocale_st_time *__lc_time; - /* more */ - }; - struct __xlocale_st_collate - { - int32_t __refcount; - void (*__free_extra)(void *); - char __encoding[32]; - /* more */ - }; - struct __xlocale_st_runelocale - { - int32_t __refcount; - void (*__free_extra)(void *); - char __ctype_encoding[32]; - /* more */ - }; - struct __xlocale_st_messages - { - int32_t __refcount; - void (*__free_extra)(void *); - char *_messages_locale_buf; - /* more */ - }; - struct __xlocale_st_monetary - { - int32_t __refcount; - void (*__free_extra)(void *); - char *_monetary_locale_buf; - /* more */ - }; - struct __xlocale_st_numeric { - int32_t __refcount; - void (*__free_extra)(void *); - char *_numeric_locale_buf; - /* more */ - }; - struct __xlocale_st_time { - int32_t __refcount; - void (*__free_extra)(void *); - char *_time_locale_buf; - /* more */ - }; - struct _xlocale_part2 *tlp; - if (((struct _xlocale_part1_v0 *) thread_locale)->__magic - == 0x786C6F63616C6530LL) - /* 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) - /* Mac OS X >= 10.6.0 */ - tlp = - (struct _xlocale_part2 *) - &((struct _xlocale_part1_v1 *) thread_locale)->__magic; - else - /* Unsupported version of Mac OS X: The internals of 'struct _xlocale' - have changed again. */ - return ""; - switch (category) - { - case LC_CTYPE: - return tlp->__lc_ctype->__ctype_encoding; - case LC_NUMERIC: - return tlp->_numeric_using_locale - ? tlp->__lc_numeric->_numeric_locale_buf - : "C"; - case LC_TIME: - return tlp->_time_using_locale - ? tlp->__lc_time->_time_locale_buf - : "C"; - case LC_COLLATE: - return !tlp->__collate_load_error - ? tlp->__lc_collate->__encoding - : "C"; - case LC_MONETARY: - return tlp->_monetary_using_locale - ? tlp->__lc_monetary->_monetary_locale_buf - : "C"; - case LC_MESSAGES: - return tlp->_messages_using_locale - ? tlp->__lc_messages->_messages_locale_buf - : "C"; - default: /* We shouldn't get here. */ - return ""; - } -# endif - } - } -# endif - return NULL; -} - -#endif - -const char * -gl_locale_name_thread (int category, const char *categoryname) -{ -#if HAVE_USELOCALE - const char *name = gl_locale_name_thread_unsafe (category, categoryname); - if (name != NULL) - return struniq (name); -#endif - return NULL; -} - -/* XPG3 defines the result of 'setlocale (category, NULL)' as: - "Directs 'setlocale()' to query 'category' and return the current - setting of 'local'." - However it does not specify the exact format. Neither do SUSV2 and - ISO C 99. So we can use this feature only on selected systems (e.g. - those using GNU C Library). */ -#if defined _LIBC || ((defined __GLIBC__ && __GLIBC__ >= 2) && !defined __UCLIBC__) -# define HAVE_LOCALE_NULL -#endif - -const char * -gl_locale_name_posix (int category, const char *categoryname) -{ - /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. - On some systems this can be done by the 'setlocale' function itself. */ -#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - return setlocale (category, NULL); -#else - /* 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 - (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 - 1.5.x. In this case even the override from libintl cannot help. - 2. on all systems where setlocale supports only the "C" locale. */ - /* Strictly speaking, it is a POSIX violation to look at the environment - variables regardless whether setlocale has been called or not. POSIX - says: - "For C-language programs, the POSIX locale shall be the - default locale when the setlocale() function is not called." - But we assume that all programs that use internationalized APIs call - setlocale (LC_ALL, ""). */ - return gl_locale_name_environ (category, categoryname); -#endif -} - -const char * -gl_locale_name_environ (int category, const char *categoryname) -{ - const char *retval; - - /* Setting of LC_ALL overrides all other. */ - retval = getenv ("LC_ALL"); - if (retval != NULL && retval[0] != '\0') - return retval; - /* Next comes the name of the desired category. */ - retval = getenv (categoryname); - if (retval != NULL && retval[0] != '\0') - return retval; - /* Last possibility is the LANG environment variable. */ - retval = getenv ("LANG"); - if (retval != NULL && retval[0] != '\0') - { -#if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE - /* Mac OS X 10.2 or newer. - Ignore invalid LANG value set by the Terminal application. */ - if (strcmp (retval, "UTF-8") != 0) -#endif -#if defined __CYGWIN__ - /* Cygwin. - Ignore dummy LANG value set by ~/.profile. */ - if (strcmp (retval, "C.UTF-8") != 0) -#endif - return retval; - } - - return NULL; -} - -const char * -gl_locale_name_default (void) -{ - /* POSIX:2001 says: - "All implementations shall define a locale as the default locale, to be - invoked when no environment variables are set, or set to the empty - string. This default locale can be the POSIX locale or any other - implementation-defined locale. Some implementations may provide - facilities for local installation administrators to set the default - locale, customizing it for each location. POSIX:2001 does not require - such a facility. - - 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 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. - - On native Windows, by default, none of LC_* or LANG are set. - When no environment variable is set, setlocale (LC_ALL, "") uses the - locale chosen by the user. - - On Cygwin 1.5.x, by default, none of LC_* or LANG are set. - When no environment variable is set, setlocale (LC_ALL, "") uses the - "C" locale. - - On Cygwin 1.7, by default, LANG is set to "C.UTF-8" when the default - ~/.profile is executed. - When no environment variable is set, setlocale (LC_ALL, "") uses the - "C.UTF-8" locale, which operates in the same way as the "C" locale. - */ - -#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. */ - return "C"; - -#else - - /* Return an XPG style locale name language[_territory][@modifier]. - Don't even bother determining the codeset; it's not useful in this - context, because message catalogs are not specific to a single - codeset. */ - -# if HAVE_CFLOCALECOPYCURRENT || HAVE_CFPREFERENCESCOPYAPPVALUE - /* Mac OS X 10.2 or newer */ - { - /* Cache the locale name, since CoreFoundation calls are expensive. */ - static const char *cached_localename; - - if (cached_localename == NULL) - { - char namebuf[256]; -# if HAVE_CFLOCALECOPYCURRENT /* Mac OS X 10.3 or newer */ - CFLocaleRef locale = CFLocaleCopyCurrent (); - CFStringRef name = CFLocaleGetIdentifier (locale); - - if (CFStringGetCString (name, namebuf, sizeof (namebuf), - kCFStringEncodingASCII)) - { - gl_locale_name_canonicalize (namebuf); - cached_localename = strdup (namebuf); - } - CFRelease (locale); -# elif HAVE_CFPREFERENCESCOPYAPPVALUE /* Mac OS X 10.2 or newer */ - CFTypeRef value = - CFPreferencesCopyAppValue (CFSTR ("AppleLocale"), - kCFPreferencesCurrentApplication); - if (value != NULL - && CFGetTypeID (value) == CFStringGetTypeID () - && CFStringGetCString ((CFStringRef)value, - namebuf, sizeof (namebuf), - kCFStringEncodingASCII)) - { - gl_locale_name_canonicalize (namebuf); - cached_localename = strdup (namebuf); - } -# endif - if (cached_localename == NULL) - cached_localename = "C"; - } - return cached_localename; - } - -# endif - -# if defined WINDOWS_NATIVE || defined __CYGWIN__ /* Native Windows or Cygwin */ - { - LCID lcid; - - /* Use native Windows API locale ID. */ - lcid = GetThreadLocale (); - - return gl_locale_name_from_win32_LCID (lcid); - } -# endif -#endif -} - -/* Determine the current locale's name, and canonicalize it into XPG syntax - language[_territory][.codeset][@modifier] - The codeset part in the result is not reliable; the locale_charset() - should be used for codeset information instead. - The result must not be freed; it is statically allocated. */ - -const char * -gl_locale_name (int category, const char *categoryname) -{ - const char *retval; - - retval = gl_locale_name_thread (category, categoryname); - if (retval != NULL) - return retval; - - retval = gl_locale_name_posix (category, categoryname); - if (retval != NULL) - return retval; - - return gl_locale_name_default (); -} diff --git a/gnulib/tests/localename.h b/gnulib/tests/localename.h deleted file mode 100644 index 330932d..0000000 --- a/gnulib/tests/localename.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Determine name of the currently selected locale. - 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 . */ - -#ifndef _GL_LOCALENAME_H -#define _GL_LOCALENAME_H - -#ifdef __cplusplus -extern "C" { -#endif - - -/* Determine the current locale's name. - It considers both the POSIX notion of locale name (see functions - gl_locale_name_thread and gl_locale_name_posix) and the system notion - of locale name (see function gl_locale_name_default). - CATEGORY is a locale category abbreviation, as defined in , - but not LC_ALL. E.g. LC_MESSAGES. - CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". - Return the locale category's name, canonicalized into XPG syntax - language[_territory][.codeset][@modifier] - The codeset part in the result is not reliable; the locale_charset() - should be used for codeset information instead. - The result must not be freed; it is statically allocated. */ -extern const char * gl_locale_name (int category, const char *categoryname); - -/* Determine the current per-thread locale's name, as specified by uselocale() - calls. - CATEGORY is a locale category abbreviation, as defined in , - but not LC_ALL. E.g. LC_MESSAGES. - CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". - Return the locale category's name, canonicalized into XPG syntax - language[_territory][.codeset][@modifier] - or NULL if no locale has been specified for the current thread. - The codeset part in the result is not reliable; the locale_charset() - should be used for codeset information instead. - The result must not be freed; it is statically allocated. */ -extern const char * gl_locale_name_thread (int category, const char *categoryname); - -/* Determine the thread-independent current locale's name, as specified by - setlocale() calls or by environment variables. - CATEGORY is a locale category abbreviation, as defined in , - but not LC_ALL. E.g. LC_MESSAGES. - CATEGORYNAME is the name of CATEGORY as a string, e.g. "LC_MESSAGES". - Return the locale category's name, canonicalized into XPG syntax - language[_territory][.codeset][@modifier] - or NULL if no locale has been specified to setlocale() or by environment - variables. - The codeset part in the result is not reliable; the locale_charset() - should be used for codeset information instead. - The result must not be freed; it is statically allocated. */ -extern const char * gl_locale_name_posix (int category, const char *categoryname); - -/* Determine the default locale's name, as specified by environment - variables. - Return the locale category's name, or NULL if no locale has been specified - by environment variables. - The result must not be freed; it is statically allocated. */ -extern const char * gl_locale_name_environ (int category, const char *categoryname); - -/* Determine the default locale's name. This is the current locale's name, - if not specified by uselocale() calls, by setlocale() calls, or by - environment variables. This locale name is usually determined by systems - settings that the user can manipulate through a GUI. - - Quoting POSIX:2001: - "All implementations shall define a locale as the default locale, - to be invoked when no environment variables are set, or set to the - empty string. This default locale can be the C locale or any other - implementation-defined locale. Some implementations may provide - facilities for local installation administrators to set the default - locale, customizing it for each location. IEEE Std 1003.1-2001 does - not require such a facility." - - The result must not be freed; it is statically allocated. */ -extern const char * gl_locale_name_default (void); - - -#ifdef __cplusplus -} -#endif - -#endif /* _GL_LOCALENAME_H */ diff --git a/gnulib/tests/macros.h b/gnulib/tests/macros.h deleted file mode 100644 index 478004c..0000000 --- a/gnulib/tests/macros.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Common macros used by gnulib tests. - 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 - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - - -/* This file contains macros that are used by many gnulib tests. - Put here only frequently used macros, say, used by 10 tests or more. */ - -#include -#include - -/* Define ASSERT_STREAM before including this file if ASSERT must - target a stream other than stderr. */ -#ifndef ASSERT_STREAM -# define ASSERT_STREAM stderr -#endif - -/* ASSERT (condition); - verifies that the specified condition is fulfilled. If not, a message - is printed to ASSERT_STREAM if defined (defaulting to stderr if - undefined) and the program is terminated with an error code. - - This macro has the following properties: - - The programmer specifies the expected condition, not the failure - condition. This simplifies thinking. - - The condition is tested always, regardless of compilation flags. - (Unlike the macro from .) - - On Unix platforms, the tester can debug the test program with a - debugger (provided core dumps are enabled: "ulimit -c unlimited"). - - For the sake of platforms where no debugger is available (such as - some mingw systems), an error message is printed on the error - stream that includes the source location of the ASSERT invocation. - */ -#define ASSERT(expr) \ - do \ - { \ - if (!(expr)) \ - { \ - fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \ - __FILE__, __LINE__); \ - fflush (ASSERT_STREAM); \ - abort (); \ - } \ - } \ - while (0) - -/* SIZEOF (array) - returns the number of elements of an array. It works for arrays that are - declared outside functions and for local variables of array type. It does - *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 deleted file mode 100644 index ba76a7e..0000000 --- a/gnulib/tests/msvc-inval.c +++ /dev/null @@ -1,129 +0,0 @@ -/* 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 deleted file mode 100644 index eb6930b..0000000 --- a/gnulib/tests/msvc-inval.h +++ /dev/null @@ -1,222 +0,0 @@ -/* 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 deleted file mode 100644 index e5cf181..0000000 --- a/gnulib/tests/msvc-nothrow.c +++ /dev/null @@ -1,49 +0,0 @@ -/* 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 deleted file mode 100644 index 2b71945..0000000 --- a/gnulib/tests/msvc-nothrow.h +++ /dev/null @@ -1,43 +0,0 @@ -/* 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 deleted file mode 100644 index 27801b9..0000000 --- a/gnulib/tests/open.c +++ /dev/null @@ -1,181 +0,0 @@ -/* Open a descriptor to a file. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -/* If the user's config.h happens to include , let it include only - the system's here, so that orig_open doesn't recurse to - rpl_open. */ -#define __need_system_fcntl_h -#include - -/* Get the original definition of open. It might be defined as a macro. */ -#include -#include -#undef __need_system_fcntl_h - -static inline int -orig_open (const char *filename, int flags, mode_t mode) -{ - return open (filename, flags, mode); -} - -/* Specification. */ -/* Write "fcntl.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates - this include because of the preliminary #include above. */ -#include "fcntl.h" - -#include -#include -#include -#include -#include -#include - -#ifndef REPLACE_OPEN_DIRECTORY -# define REPLACE_OPEN_DIRECTORY 0 -#endif - -int -open (const char *filename, int flags, ...) -{ - mode_t mode; - int fd; - - mode = 0; - if (flags & O_CREAT) - { - va_list arg; - va_start (arg, flags); - - /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4 - creates crashing code when 'mode_t' is smaller than 'int'. */ - mode = va_arg (arg, PROMOTED_MODE_T); - - va_end (arg); - } - -#if GNULIB_defined_O_NONBLOCK - /* The only known platform that lacks O_NONBLOCK is mingw, but it - also lacks named pipes and Unix sockets, which are the only two - file types that require non-blocking handling in open(). - Therefore, it is safe to ignore O_NONBLOCK here. It is handy - that mingw also lacks openat(), so that is also covered here. */ - flags &= ~O_NONBLOCK; -#endif - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - if (strcmp (filename, "/dev/null") == 0) - filename = "NUL"; -#endif - -#if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR - is specified, then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file already exists as a directory, then - - if O_CREAT is specified, open() must fail because of the semantics - of O_CREAT, - - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX - says that it - fails with errno = EISDIR in this case. - If the named file does not exist or does not name a directory, then - - if O_CREAT is specified, open() must fail since open() cannot create - directories, - - if O_WRONLY or O_RDWR is specified, open() must fail because the - file does not contain a '.' directory. */ - if (flags & (O_CREAT | O_WRONLY | O_RDWR)) - { - size_t len = strlen (filename); - if (len > 0 && filename[len - 1] == '/') - { - errno = EISDIR; - return -1; - } - } -#endif - - fd = orig_open (filename, flags, mode); - -#if REPLACE_FCHDIR - /* Implementing fchdir and fdopendir requires the ability to open a - directory file descriptor. If open doesn't support that (as on - mingw), we use a dummy file that behaves the same as directories - on Linux (ie. always reports EOF on attempts to read()), and - override fstat() in fchdir.c to hide the fact that we have a - dummy. */ - if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES - && ((flags & O_ACCMODE) == O_RDONLY - || (O_SEARCH != O_RDONLY && (flags & O_ACCMODE) == O_SEARCH))) - { - struct stat statbuf; - if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode)) - { - /* Maximum recursion depth of 1. */ - fd = open ("/dev/null", flags, mode); - if (0 <= fd) - fd = _gl_register_fd (fd, filename); - } - else - errno = EACCES; - } -#endif - -#if OPEN_TRAILING_SLASH_BUG - /* If the filename ends in a slash and fd does not refer to a directory, - then fail. - Rationale: POSIX - says that - "A pathname that contains at least one non-slash character and that - ends with one or more trailing slashes shall be resolved as if a - single dot character ( '.' ) were appended to the pathname." - and - "The special filename dot shall refer to the directory specified by - its predecessor." - If the named file without the slash is not a directory, open() must fail - with ENOTDIR. */ - if (fd >= 0) - { - /* We know len is positive, since open did not fail with ENOENT. */ - size_t len = strlen (filename); - if (filename[len - 1] == '/') - { - struct stat statbuf; - - if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode)) - { - close (fd); - errno = ENOTDIR; - return -1; - } - } - } -#endif - -#if REPLACE_FCHDIR - if (!REPLACE_OPEN_DIRECTORY && 0 <= fd) - fd = _gl_register_fd (fd, filename); -#endif - - return fd; -} diff --git a/gnulib/tests/putenv.c b/gnulib/tests/putenv.c deleted file mode 100644 index 3c0f7ea..0000000 --- a/gnulib/tests/putenv.c +++ /dev/null @@ -1,134 +0,0 @@ -/* 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 - Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. - - This program is free software: you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 3 of the License, or any - later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Specification. */ -#include - -#include - -/* Include errno.h *after* sys/types.h to work around header problems - on AIX 3.2.5. */ -#include -#ifndef __set_errno -# define __set_errno(ev) ((errno) = (ev)) -#endif - -#include -#include - -#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'. */ -# include -__libc_lock_define_initialized (static, envlock) -# define LOCK __libc_lock_lock (envlock) -# define UNLOCK __libc_lock_unlock (envlock) -#else -# define LOCK -# define UNLOCK -#endif - -static int -_unsetenv (const char *name) -{ - size_t len; - char **ep; - - if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) - { - __set_errno (EINVAL); - return -1; - } - - len = strlen (name); - - LOCK; - - ep = environ; - while (*ep != NULL) - if (!strncmp (*ep, name, len) && (*ep)[len] == '=') - { - /* Found it. Remove this pointer by moving later ones back. */ - char **dp = ep; - - do - dp[0] = dp[1]; - while (*dp++); - /* Continue the loop in case NAME appears again. */ - } - else - ++ep; - - UNLOCK; - - return 0; -} - - -/* Put STRING, which is of the form "NAME=VALUE", in the environment. - If STRING contains no '=', then remove STRING from the environment. */ -int -putenv (char *string) -{ - const char *const name_end = strchr (string, '='); - register size_t size; - register char **ep; - - if (name_end == NULL) - { - /* Remove the variable from the environment. */ - return _unsetenv (string); - } - - size = 0; - for (ep = environ; *ep != NULL; ++ep) - if (!strncmp (*ep, string, name_end - string) && - (*ep)[name_end - string] == '=') - break; - else - ++size; - - if (*ep == NULL) - { - static char **last_environ = NULL; - char **new_environ = (char **) malloc ((size + 2) * sizeof (char *)); - if (new_environ == NULL) - return -1; - (void) memcpy ((void *) new_environ, (void *) environ, - size * sizeof (char *)); - new_environ[size] = (char *) string; - new_environ[size + 1] = NULL; - free (last_environ); - last_environ = new_environ; - environ = new_environ; - } - else - *ep = string; - - return 0; -} diff --git a/gnulib/tests/same-inode.h b/gnulib/tests/same-inode.h deleted file mode 100644 index 8c3900d..0000000 --- a/gnulib/tests/same-inode.h +++ /dev/null @@ -1,33 +0,0 @@ -/* Determine whether two stat buffers refer to the same file. - - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#ifndef SAME_INODE_H -# define SAME_INODE_H 1 - -# ifdef __VMS -# define SAME_INODE(a, b) \ - ((a).st_ino[0] == (b).st_ino[0] \ - && (a).st_ino[1] == (b).st_ino[1] \ - && (a).st_ino[2] == (b).st_ino[2] \ - && (a).st_dev == (b).st_dev) -# else -# define SAME_INODE(a, b) \ - ((a).st_ino == (b).st_ino \ - && (a).st_dev == (b).st_dev) -# endif - -#endif diff --git a/gnulib/tests/setenv.c b/gnulib/tests/setenv.c deleted file mode 100644 index 8201be2..0000000 --- a/gnulib/tests/setenv.c +++ /dev/null @@ -1,390 +0,0 @@ -/* 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 - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#if !_LIBC -# define _GL_USE_STDLIB_ALLOC 1 -# include -#endif - -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - -#include - -/* Specification. */ -#include - -#include -#ifndef __set_errno -# define __set_errno(ev) ((errno) = (ev)) -#endif - -#include -#if _LIBC || HAVE_UNISTD_H -# include -#endif - -#if !_LIBC -# include "malloca.h" -#endif - -#if _LIBC || !HAVE_SETENV - -#if !_LIBC -# define __environ environ -#endif - -#if _LIBC -/* This lock protects against simultaneous modifications of 'environ'. */ -# include -__libc_lock_define_initialized (static, envlock) -# define LOCK __libc_lock_lock (envlock) -# define UNLOCK __libc_lock_unlock (envlock) -#else -# define LOCK -# define UNLOCK -#endif - -/* In the GNU C library we must keep the namespace clean. */ -#ifdef _LIBC -# define setenv __setenv -# define clearenv __clearenv -# define tfind __tfind -# define tsearch __tsearch -#endif - -/* In the GNU C library implementation we try to be more clever and - allow arbitrarily many changes of the environment given that the used - values are from a small set. Outside glibc this will eat up all - memory after a while. */ -#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \ - && defined __GNUC__) -# define USE_TSEARCH 1 -# include -typedef int (*compar_fn_t) (const void *, const void *); - -/* This is a pointer to the root of the search tree with the known - values. */ -static void *known_values; - -# define KNOWN_VALUE(Str) \ - ({ \ - void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \ - value != NULL ? *(char **) value : NULL; \ - }) -# define STORE_VALUE(Str) \ - tsearch (Str, &known_values, (compar_fn_t) strcmp) - -#else -# undef USE_TSEARCH - -# define KNOWN_VALUE(Str) NULL -# define STORE_VALUE(Str) do { } while (0) - -#endif - - -/* If this variable is not a null pointer we allocated the current - environment. */ -static char **last_environ; - - -/* This function is used by 'setenv' and 'putenv'. The difference between - the two functions is that for the former must create a new string which - is then placed in the environment, while the argument of 'putenv' - must be used directly. This is all complicated by the fact that we try - to reuse values once generated for a 'setenv' call since we can never - free the strings. */ -int -__add_to_environ (const char *name, const char *value, const char *combined, - int replace) -{ - char **ep; - size_t size; - const size_t namelen = strlen (name); - const size_t vallen = value != NULL ? strlen (value) + 1 : 0; - - LOCK; - - /* We have to get the pointer now that we have the lock and not earlier - since another thread might have created a new environment. */ - ep = __environ; - - size = 0; - if (ep != NULL) - { - for (; *ep != NULL; ++ep) - if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=') - break; - else - ++size; - } - - if (ep == NULL || *ep == NULL) - { - char **new_environ; -#ifdef USE_TSEARCH - char *new_value; -#endif - - /* We allocated this space; we can extend it. */ - new_environ = - (char **) (last_environ == NULL - ? malloc ((size + 2) * sizeof (char *)) - : realloc (last_environ, (size + 2) * sizeof (char *))); - if (new_environ == NULL) - { - /* It's easier to set errno to ENOMEM than to rely on the - 'malloc-posix' and 'realloc-posix' gnulib modules. */ - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - - /* If the whole entry is given add it. */ - if (combined != NULL) - /* We must not add the string to the search tree since it belongs - to the user. */ - new_environ[size] = (char *) combined; - else - { - /* See whether the value is already known. */ -#ifdef USE_TSEARCH -# ifdef _LIBC - new_value = (char *) alloca (namelen + 1 + vallen); - __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), - value, vallen); -# else - new_value = (char *) malloca (namelen + 1 + vallen); - if (new_value == NULL) - { - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - memcpy (new_value, name, namelen); - new_value[namelen] = '='; - memcpy (&new_value[namelen + 1], value, vallen); -# endif - - new_environ[size] = KNOWN_VALUE (new_value); - if (new_environ[size] == NULL) -#endif - { - new_environ[size] = (char *) malloc (namelen + 1 + vallen); - if (new_environ[size] == NULL) - { -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - -#ifdef USE_TSEARCH - memcpy (new_environ[size], new_value, namelen + 1 + vallen); -#else - memcpy (new_environ[size], name, namelen); - new_environ[size][namelen] = '='; - memcpy (&new_environ[size][namelen + 1], value, vallen); -#endif - /* And save the value now. We cannot do this when we remove - the string since then we cannot decide whether it is a - user string or not. */ - STORE_VALUE (new_environ[size]); - } -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - } - - if (__environ != last_environ) - memcpy ((char *) new_environ, (char *) __environ, - size * sizeof (char *)); - - new_environ[size + 1] = NULL; - - last_environ = __environ = new_environ; - } - else if (replace) - { - char *np; - - /* Use the user string if given. */ - if (combined != NULL) - np = (char *) combined; - else - { -#ifdef USE_TSEARCH - char *new_value; -# ifdef _LIBC - new_value = alloca (namelen + 1 + vallen); - __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1), - value, vallen); -# else - new_value = malloca (namelen + 1 + vallen); - if (new_value == NULL) - { - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - memcpy (new_value, name, namelen); - new_value[namelen] = '='; - memcpy (&new_value[namelen + 1], value, vallen); -# endif - - np = KNOWN_VALUE (new_value); - if (np == NULL) -#endif - { - np = (char *) malloc (namelen + 1 + vallen); - if (np == NULL) - { -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - __set_errno (ENOMEM); - UNLOCK; - return -1; - } - -#ifdef USE_TSEARCH - memcpy (np, new_value, namelen + 1 + vallen); -#else - memcpy (np, name, namelen); - np[namelen] = '='; - memcpy (&np[namelen + 1], value, vallen); -#endif - /* And remember the value. */ - STORE_VALUE (np); - } -#if defined USE_TSEARCH && !defined _LIBC - freea (new_value); -#endif - } - - *ep = np; - } - - UNLOCK; - - return 0; -} - -int -setenv (const char *name, const char *value, int replace) -{ - if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) - { - __set_errno (EINVAL); - return -1; - } - - return __add_to_environ (name, value, NULL, replace); -} - -/* The 'clearenv' was planned to be added to POSIX.1 but probably - never made it. Nevertheless the POSIX.9 standard (POSIX bindings - for Fortran 77) requires this function. */ -int -clearenv (void) -{ - LOCK; - - if (__environ == last_environ && __environ != NULL) - { - /* We allocated this environment so we can free it. */ - free (__environ); - last_environ = NULL; - } - - /* Clear the environment pointer removes the whole environment. */ - __environ = NULL; - - UNLOCK; - - return 0; -} - -#ifdef _LIBC -static void -free_mem (void) -{ - /* Remove all traces. */ - clearenv (); - - /* Now remove the search tree. */ - __tdestroy (known_values, free); - known_values = NULL; -} -text_set_element (__libc_subfreeres, free_mem); - - -# undef setenv -# undef clearenv -weak_alias (__setenv, setenv) -weak_alias (__clearenv, clearenv) -#endif - -#endif /* _LIBC || !HAVE_SETENV */ - -/* The rest of this file is called into use when replacing an existing - but buggy setenv. Known bugs include failure to diagnose invalid - name, and consuming a leading '=' from value. */ -#if HAVE_SETENV - -# undef setenv -# if !HAVE_DECL_SETENV -extern int setenv (const char *, const char *, int); -# endif -# define STREQ(a, b) (strcmp (a, b) == 0) - -int -rpl_setenv (const char *name, const char *value, int replace) -{ - int result; - if (!name || !*name || strchr (name, '=')) - { - errno = EINVAL; - return -1; - } - /* Call the real setenv even if replace is 0, in case implementation - has underlying data to update, such as when environ changes. */ - result = setenv (name, value, replace); - if (result == 0 && replace && *value == '=') - { - char *tmp = getenv (name); - if (!STREQ (tmp, value)) - { - int saved_errno; - size_t len = strlen (value); - tmp = malloca (len + 2); - /* Since leading '=' is eaten, double it up. */ - *tmp = '='; - memcpy (tmp + 1, value, len + 1); - result = setenv (name, tmp, replace); - saved_errno = errno; - freea (tmp); - errno = saved_errno; - } - } - return result; -} - -#endif /* HAVE_SETENV */ diff --git a/gnulib/tests/setlocale.c b/gnulib/tests/setlocale.c deleted file mode 100644 index 8a47cde..0000000 --- a/gnulib/tests/setlocale.c +++ /dev/null @@ -1,938 +0,0 @@ -/* Set the current locale. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -/* Override setlocale() so that when the default locale is requested - (locale = ""), the environment variables LC_ALL, LC_*, and LANG are - considered. - Also include all the functionality from libintl's setlocale() override. */ - -/* Please keep this file in sync with - gettext/gettext-runtime/intl/setlocale.c ! */ - -/* Specification. */ -#include - -#include -#include - -#include "localename.h" - -#if 1 - -# undef setlocale - -/* Return string representation of locale category CATEGORY. */ -static const char * -category_to_name (int category) -{ - const char *retval; - - switch (category) - { - case LC_COLLATE: - retval = "LC_COLLATE"; - break; - case LC_CTYPE: - retval = "LC_CTYPE"; - break; - case LC_MONETARY: - retval = "LC_MONETARY"; - break; - case LC_NUMERIC: - retval = "LC_NUMERIC"; - break; - case LC_TIME: - retval = "LC_TIME"; - break; - case LC_MESSAGES: - retval = "LC_MESSAGES"; - break; - default: - /* If you have a better idea for a default value let me know. */ - retval = "LC_XXX"; - } - - return retval; -} - -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - -/* 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. - The three-letter identifiers known by a Windows XP SP2 or SP3 are: - AFK Afrikaans_South Africa.1252 - ARA Arabic_Saudi Arabia.1256 - ARB Arabic_Lebanon.1256 - ARE Arabic_Egypt.1256 - ARG Arabic_Algeria.1256 - ARH Arabic_Bahrain.1256 - ARI Arabic_Iraq.1256 - ARJ Arabic_Jordan.1256 - ARK Arabic_Kuwait.1256 - ARL Arabic_Libya.1256 - ARM Arabic_Morocco.1256 - ARO Arabic_Oman.1256 - ARQ Arabic_Qatar.1256 - ARS Arabic_Syria.1256 - ART Arabic_Tunisia.1256 - ARU Arabic_U.A.E..1256 - ARY Arabic_Yemen.1256 - AZE Azeri (Latin)_Azerbaijan.1254 - BEL Belarusian_Belarus.1251 - BGR Bulgarian_Bulgaria.1251 - BSB Bosnian_Bosnia and Herzegovina.1250 - BSC Bosnian (Cyrillic)_Bosnia and Herzegovina.1250 (wrong encoding!) - CAT Catalan_Spain.1252 - CHH Chinese_Hong Kong S.A.R..950 - CHI Chinese_Singapore.936 - CHS Chinese_People's Republic of China.936 - CHT Chinese_Taiwan.950 - CSY Czech_Czech Republic.1250 - CYM Welsh_United Kingdom.1252 - DAN Danish_Denmark.1252 - DEA German_Austria.1252 - DEC German_Liechtenstein.1252 - DEL German_Luxembourg.1252 - DES German_Switzerland.1252 - DEU German_Germany.1252 - ELL Greek_Greece.1253 - ENA English_Australia.1252 - ENB English_Caribbean.1252 - ENC English_Canada.1252 - ENG English_United Kingdom.1252 - ENI English_Ireland.1252 - ENJ English_Jamaica.1252 - ENL English_Belize.1252 - ENP English_Republic of the Philippines.1252 - ENS English_South Africa.1252 - ENT English_Trinidad and Tobago.1252 - ENU English_United States.1252 - ENW English_Zimbabwe.1252 - ENZ English_New Zealand.1252 - ESA Spanish_Panama.1252 - ESB Spanish_Bolivia.1252 - ESC Spanish_Costa Rica.1252 - ESD Spanish_Dominican Republic.1252 - ESE Spanish_El Salvador.1252 - ESF Spanish_Ecuador.1252 - ESG Spanish_Guatemala.1252 - ESH Spanish_Honduras.1252 - ESI Spanish_Nicaragua.1252 - ESL Spanish_Chile.1252 - ESM Spanish_Mexico.1252 - ESN Spanish_Spain.1252 - ESO Spanish_Colombia.1252 - ESP Spanish_Spain.1252 - ESR Spanish_Peru.1252 - ESS Spanish_Argentina.1252 - ESU Spanish_Puerto Rico.1252 - ESV Spanish_Venezuela.1252 - ESY Spanish_Uruguay.1252 - ESZ Spanish_Paraguay.1252 - ETI Estonian_Estonia.1257 - EUQ Basque_Spain.1252 - FAR Farsi_Iran.1256 - FIN Finnish_Finland.1252 - FOS Faroese_Faroe Islands.1252 - FPO Filipino_Philippines.1252 - FRA French_France.1252 - FRB French_Belgium.1252 - FRC French_Canada.1252 - FRL French_Luxembourg.1252 - FRM French_Principality of Monaco.1252 - FRS French_Switzerland.1252 - FYN Frisian_Netherlands.1252 - GLC Galician_Spain.1252 - HEB Hebrew_Israel.1255 - HRB Croatian_Bosnia and Herzegovina.1250 - HRV Croatian_Croatia.1250 - HUN Hungarian_Hungary.1250 - IND Indonesian_Indonesia.1252 - IRE Irish_Ireland.1252 - ISL Icelandic_Iceland.1252 - ITA Italian_Italy.1252 - ITS Italian_Switzerland.1252 - IUK Inuktitut (Latin)_Canada.1252 - JPN Japanese_Japan.932 - KKZ Kazakh_Kazakhstan.1251 - KOR Korean_Korea.949 - KYR Kyrgyz_Kyrgyzstan.1251 - LBX Luxembourgish_Luxembourg.1252 - LTH Lithuanian_Lithuania.1257 - LVI Latvian_Latvia.1257 - MKI FYRO Macedonian_Former Yugoslav Republic of Macedonia.1251 - MON Mongolian_Mongolia.1251 - MPD Mapudungun_Chile.1252 - MSB Malay_Brunei Darussalam.1252 - MSL Malay_Malaysia.1252 - MWK Mohawk_Canada.1252 - NLB Dutch_Belgium.1252 - NLD Dutch_Netherlands.1252 - NON Norwegian-Nynorsk_Norway.1252 - NOR Norwegian (BokmÃ¥l)_Norway.1252 - NSO Northern Sotho_South Africa.1252 - PLK Polish_Poland.1250 - PTB Portuguese_Brazil.1252 - PTG Portuguese_Portugal.1252 - QUB Quechua_Bolivia.1252 - QUE Quechua_Ecuador.1252 - QUP Quechua_Peru.1252 - RMC Romansh_Switzerland.1252 - ROM Romanian_Romania.1250 - RUS Russian_Russia.1251 - SKY Slovak_Slovakia.1250 - SLV Slovenian_Slovenia.1250 - SMA Sami (Southern)_Norway.1252 - SMB Sami (Southern)_Sweden.1252 - SME Sami (Northern)_Norway.1252 - SMF Sami (Northern)_Sweden.1252 - SMG Sami (Northern)_Finland.1252 - SMJ Sami (Lule)_Norway.1252 - SMK Sami (Lule)_Sweden.1252 - SMN Sami (Inari)_Finland.1252 - SMS Sami (Skolt)_Finland.1252 - SQI Albanian_Albania.1250 - SRB Serbian (Cyrillic)_Serbia and Montenegro.1251 - SRL Serbian (Latin)_Serbia and Montenegro.1250 - SRN Serbian (Cyrillic)_Bosnia and Herzegovina.1251 - SRS Serbian (Latin)_Bosnia and Herzegovina.1250 - SVE Swedish_Sweden.1252 - SVF Swedish_Finland.1252 - SWK Swahili_Kenya.1252 - THA Thai_Thailand.874 - TRK Turkish_Turkey.1254 - TSN Tswana_South Africa.1252 - TTT Tatar_Russia.1251 - UKR Ukrainian_Ukraine.1251 - URD Urdu_Islamic Republic of Pakistan.1256 - USA English_United States.1252 - UZB Uzbek (Latin)_Uzbekistan.1254 - VIT Vietnamese_Viet Nam.1258 - XHO Xhosa_South Africa.1252 - ZHH Chinese_Hong Kong S.A.R..950 - ZHI Chinese_Singapore.936 - ZHM Chinese_Macau S.A.R..950 - ZUL Zulu_South Africa.1252 - */ - -/* Table from ISO 639 language code, optionally with country or script suffix, - to English name. - Keep in sync with the gl_locale_name_from_win32_LANGID function in - localename.c! */ -struct table_entry -{ - const char *code; - const char *english; -}; -static const struct table_entry language_table[] = - { - { "af", "Afrikaans" }, - { "am", "Amharic" }, - { "ar", "Arabic" }, - { "arn", "Mapudungun" }, - { "as", "Assamese" }, - { "az@cyrillic", "Azeri (Cyrillic)" }, - { "az@latin", "Azeri (Latin)" }, - { "ba", "Bashkir" }, - { "be", "Belarusian" }, - { "ber", "Tamazight" }, - { "ber@arabic", "Tamazight (Arabic)" }, - { "ber@latin", "Tamazight (Latin)" }, - { "bg", "Bulgarian" }, - { "bin", "Edo" }, - { "bn", "Bengali" }, - { "bn_BD", "Bengali (Bangladesh)" }, - { "bn_IN", "Bengali (India)" }, - { "bnt", "Sutu" }, - { "bo", "Tibetan" }, - { "br", "Breton" }, - { "bs", "BSB" }, /* "Bosnian (Latin)" */ - { "bs@cyrillic", "BSC" }, /* Bosnian (Cyrillic) */ - { "ca", "Catalan" }, - { "chr", "Cherokee" }, - { "co", "Corsican" }, - { "cpe", "Hawaiian" }, - { "cs", "Czech" }, - { "cy", "Welsh" }, - { "da", "Danish" }, - { "de", "German" }, - { "dsb", "Lower Sorbian" }, - { "dv", "Divehi" }, - { "el", "Greek" }, - { "en", "English" }, - { "es", "Spanish" }, - { "et", "Estonian" }, - { "eu", "Basque" }, - { "fa", "Farsi" }, - { "ff", "Fulfulde" }, - { "fi", "Finnish" }, - { "fo", "Faroese" }, /* "Faeroese" does not work */ - { "fr", "French" }, - { "fy", "Frisian" }, - { "ga", "IRE" }, /* Gaelic (Ireland) */ - { "gd", "Gaelic (Scotland)" }, - { "gd", "Scottish Gaelic" }, - { "gl", "Galician" }, - { "gn", "Guarani" }, - { "gsw", "Alsatian" }, - { "gu", "Gujarati" }, - { "ha", "Hausa" }, - { "he", "Hebrew" }, - { "hi", "Hindi" }, - { "hr", "Croatian" }, - { "hsb", "Upper Sorbian" }, - { "hu", "Hungarian" }, - { "hy", "Armenian" }, - { "id", "Indonesian" }, - { "ig", "Igbo" }, - { "ii", "Yi" }, - { "is", "Icelandic" }, - { "it", "Italian" }, - { "iu", "IUK" }, /* Inuktitut */ - { "ja", "Japanese" }, - { "ka", "Georgian" }, - { "kk", "Kazakh" }, - { "kl", "Greenlandic" }, - { "km", "Cambodian" }, - { "km", "Khmer" }, - { "kn", "Kannada" }, - { "ko", "Korean" }, - { "kok", "Konkani" }, - { "kr", "Kanuri" }, - { "ks", "Kashmiri" }, - { "ks_IN", "Kashmiri_India" }, - { "ks_PK", "Kashmiri (Arabic)_Pakistan" }, - { "ky", "Kyrgyz" }, - { "la", "Latin" }, - { "lb", "Luxembourgish" }, - { "lo", "Lao" }, - { "lt", "Lithuanian" }, - { "lv", "Latvian" }, - { "mi", "Maori" }, - { "mk", "FYRO Macedonian" }, - { "mk", "Macedonian" }, - { "ml", "Malayalam" }, - { "mn", "Mongolian" }, - { "mni", "Manipuri" }, - { "moh", "Mohawk" }, - { "mr", "Marathi" }, - { "ms", "Malay" }, - { "mt", "Maltese" }, - { "my", "Burmese" }, - { "nb", "NOR" }, /* Norwegian BokmÃ¥l */ - { "ne", "Nepali" }, - { "nic", "Ibibio" }, - { "nl", "Dutch" }, - { "nn", "NON" }, /* Norwegian Nynorsk */ - { "no", "Norwegian" }, - { "nso", "Northern Sotho" }, - { "nso", "Sepedi" }, - { "oc", "Occitan" }, - { "om", "Oromo" }, - { "or", "Oriya" }, - { "pa", "Punjabi" }, - { "pap", "Papiamentu" }, - { "pl", "Polish" }, - { "prs", "Dari" }, - { "ps", "Pashto" }, - { "pt", "Portuguese" }, - { "qu", "Quechua" }, - { "qut", "K'iche'" }, - { "rm", "Romansh" }, - { "ro", "Romanian" }, - { "ru", "Russian" }, - { "rw", "Kinyarwanda" }, - { "sa", "Sanskrit" }, - { "sah", "Yakut" }, - { "sd", "Sindhi" }, - { "se", "Sami (Northern)" }, - { "se", "Northern Sami" }, - { "si", "Sinhalese" }, - { "sk", "Slovak" }, - { "sl", "Slovenian" }, - { "sma", "Sami (Southern)" }, - { "sma", "Southern Sami" }, - { "smj", "Sami (Lule)" }, - { "smj", "Lule Sami" }, - { "smn", "Sami (Inari)" }, - { "smn", "Inari Sami" }, - { "sms", "Sami (Skolt)" }, - { "sms", "Skolt Sami" }, - { "so", "Somali" }, - { "sq", "Albanian" }, - { "sr", "Serbian (Latin)" }, - { "sr@cyrillic", "SRB" }, /* Serbian (Cyrillic) */ - { "sw", "Swahili" }, - { "syr", "Syriac" }, - { "ta", "Tamil" }, - { "te", "Telugu" }, - { "tg", "Tajik" }, - { "th", "Thai" }, - { "ti", "Tigrinya" }, - { "tk", "Turkmen" }, - { "tl", "Filipino" }, - { "tn", "Tswana" }, - { "tr", "Turkish" }, - { "ts", "Tsonga" }, - { "tt", "Tatar" }, - { "ug", "Uighur" }, - { "uk", "Ukrainian" }, - { "ur", "Urdu" }, - { "uz", "Uzbek" }, - { "uz", "Uzbek (Latin)" }, - { "uz@cyrillic", "Uzbek (Cyrillic)" }, - { "ve", "Venda" }, - { "vi", "Vietnamese" }, - { "wen", "Sorbian" }, - { "wo", "Wolof" }, - { "xh", "Xhosa" }, - { "yi", "Yiddish" }, - { "yo", "Yoruba" }, - { "zh", "Chinese" }, - { "zu", "Zulu" } - }; - -/* Table from ISO 3166 country code to English name. - Keep in sync with the gl_locale_name_from_win32_LANGID function in - localename.c! */ -static const struct table_entry country_table[] = - { - { "AE", "U.A.E." }, - { "AF", "Afghanistan" }, - { "AL", "Albania" }, - { "AM", "Armenia" }, - { "AN", "Netherlands Antilles" }, - { "AR", "Argentina" }, - { "AT", "Austria" }, - { "AU", "Australia" }, - { "AZ", "Azerbaijan" }, - { "BA", "Bosnia and Herzegovina" }, - { "BD", "Bangladesh" }, - { "BE", "Belgium" }, - { "BG", "Bulgaria" }, - { "BH", "Bahrain" }, - { "BN", "Brunei Darussalam" }, - { "BO", "Bolivia" }, - { "BR", "Brazil" }, - { "BT", "Bhutan" }, - { "BY", "Belarus" }, - { "BZ", "Belize" }, - { "CA", "Canada" }, - { "CG", "Congo" }, - { "CH", "Switzerland" }, - { "CI", "Cote d'Ivoire" }, - { "CL", "Chile" }, - { "CM", "Cameroon" }, - { "CN", "People's Republic of China" }, - { "CO", "Colombia" }, - { "CR", "Costa Rica" }, - { "CS", "Serbia and Montenegro" }, - { "CZ", "Czech Republic" }, - { "DE", "Germany" }, - { "DK", "Denmark" }, - { "DO", "Dominican Republic" }, - { "DZ", "Algeria" }, - { "EC", "Ecuador" }, - { "EE", "Estonia" }, - { "EG", "Egypt" }, - { "ER", "Eritrea" }, - { "ES", "Spain" }, - { "ET", "Ethiopia" }, - { "FI", "Finland" }, - { "FO", "Faroe Islands" }, - { "FR", "France" }, - { "GB", "United Kingdom" }, - { "GD", "Caribbean" }, - { "GE", "Georgia" }, - { "GL", "Greenland" }, - { "GR", "Greece" }, - { "GT", "Guatemala" }, - { "HK", "Hong Kong" }, - { "HK", "Hong Kong S.A.R." }, - { "HN", "Honduras" }, - { "HR", "Croatia" }, - { "HT", "Haiti" }, - { "HU", "Hungary" }, - { "ID", "Indonesia" }, - { "IE", "Ireland" }, - { "IL", "Israel" }, - { "IN", "India" }, - { "IQ", "Iraq" }, - { "IR", "Iran" }, - { "IS", "Iceland" }, - { "IT", "Italy" }, - { "JM", "Jamaica" }, - { "JO", "Jordan" }, - { "JP", "Japan" }, - { "KE", "Kenya" }, - { "KG", "Kyrgyzstan" }, - { "KH", "Cambodia" }, - { "KR", "South Korea" }, - { "KW", "Kuwait" }, - { "KZ", "Kazakhstan" }, - { "LA", "Laos" }, - { "LB", "Lebanon" }, - { "LI", "Liechtenstein" }, - { "LK", "Sri Lanka" }, - { "LT", "Lithuania" }, - { "LU", "Luxembourg" }, - { "LV", "Latvia" }, - { "LY", "Libya" }, - { "MA", "Morocco" }, - { "MC", "Principality of Monaco" }, - { "MD", "Moldava" }, - { "MD", "Moldova" }, - { "ME", "Montenegro" }, - { "MK", "Former Yugoslav Republic of Macedonia" }, - { "ML", "Mali" }, - { "MM", "Myanmar" }, - { "MN", "Mongolia" }, - { "MO", "Macau S.A.R." }, - { "MT", "Malta" }, - { "MV", "Maldives" }, - { "MX", "Mexico" }, - { "MY", "Malaysia" }, - { "NG", "Nigeria" }, - { "NI", "Nicaragua" }, - { "NL", "Netherlands" }, - { "NO", "Norway" }, - { "NP", "Nepal" }, - { "NZ", "New Zealand" }, - { "OM", "Oman" }, - { "PA", "Panama" }, - { "PE", "Peru" }, - { "PH", "Philippines" }, - { "PK", "Islamic Republic of Pakistan" }, - { "PL", "Poland" }, - { "PR", "Puerto Rico" }, - { "PT", "Portugal" }, - { "PY", "Paraguay" }, - { "QA", "Qatar" }, - { "RE", "Reunion" }, - { "RO", "Romania" }, - { "RS", "Serbia" }, - { "RU", "Russia" }, - { "RW", "Rwanda" }, - { "SA", "Saudi Arabia" }, - { "SE", "Sweden" }, - { "SG", "Singapore" }, - { "SI", "Slovenia" }, - { "SK", "Slovak" }, - { "SN", "Senegal" }, - { "SO", "Somalia" }, - { "SR", "Suriname" }, - { "SV", "El Salvador" }, - { "SY", "Syria" }, - { "TH", "Thailand" }, - { "TJ", "Tajikistan" }, - { "TM", "Turkmenistan" }, - { "TN", "Tunisia" }, - { "TR", "Turkey" }, - { "TT", "Trinidad and Tobago" }, - { "TW", "Taiwan" }, - { "TZ", "Tanzania" }, - { "UA", "Ukraine" }, - { "US", "United States" }, - { "UY", "Uruguay" }, - { "VA", "Vatican" }, - { "VE", "Venezuela" }, - { "VN", "Viet Nam" }, - { "YE", "Yemen" }, - { "ZA", "South Africa" }, - { "ZW", "Zimbabwe" } - }; - -/* Given a string STRING, find the set of indices i such that TABLE[i].code is - the given STRING. It is a range [lo,hi-1]. */ -typedef struct { size_t lo; size_t hi; } range_t; -static void -search (const struct table_entry *table, size_t table_size, const char *string, - range_t *result) -{ - /* The table is sorted. Perform a binary search. */ - size_t hi = table_size; - size_t lo = 0; - while (lo < hi) - { - /* Invariant: - for i < lo, strcmp (table[i].code, string) < 0, - for i >= hi, strcmp (table[i].code, string) > 0. */ - size_t mid = (hi + lo) >> 1; /* >= lo, < hi */ - int cmp = strcmp (table[mid].code, string); - if (cmp < 0) - lo = mid + 1; - else if (cmp > 0) - hi = mid; - else - { - /* Found an i with - strcmp (language_table[i].code, string) == 0. - Find the entire interval of such i. */ - { - size_t i; - - for (i = mid; i > lo; ) - { - i--; - if (strcmp (table[i].code, string) < 0) - { - lo = i + 1; - break; - } - } - } - { - size_t i; - - for (i = mid; i < hi; i++) - { - if (strcmp (table[i].code, string) > 0) - { - hi = i; - break; - } - } - } - /* The set of i with - strcmp (language_table[i].code, string) == 0 - is the interval [lo, hi-1]. */ - break; - } - } - result->lo = lo; - result->hi = hi; -} - -/* Like setlocale, but accept also locale names in the form ll or ll_CC, - where ll is an ISO 639 language code and CC is an ISO 3166 country code. */ -static char * -setlocale_unixlike (int category, const char *locale) -{ - char *result; - char llCC_buf[64]; - char ll_buf[64]; - char CC_buf[64]; - - /* First, try setlocale with the original argument unchanged. */ - result = setlocale (category, locale); - if (result != NULL) - return result; - - /* Otherwise, assume the argument is in the form - language[_territory][.codeset][@modifier] - and try to map it using the tables. */ - if (strlen (locale) < sizeof (llCC_buf)) - { - /* Second try: Remove the codeset part. */ - { - const char *p = locale; - char *q = llCC_buf; - - /* Copy the part before the dot. */ - for (; *p != '\0' && *p != '.'; p++, q++) - *q = *p; - if (*p == '.') - /* Skip the part up to the '@', if any. */ - for (; *p != '\0' && *p != '@'; p++) - ; - /* Copy the part starting with '@', if any. */ - for (; *p != '\0'; p++, q++) - *q = *p; - *q = '\0'; - } - /* llCC_buf now contains - language[_territory][@modifier] - */ - if (strcmp (llCC_buf, locale) != 0) - { - result = setlocale (category, llCC_buf); - if (result != NULL) - return result; - } - /* Look it up in language_table. */ - { - range_t range; - size_t i; - - search (language_table, - sizeof (language_table) / sizeof (language_table[0]), - llCC_buf, - &range); - - for (i = range.lo; i < range.hi; i++) - { - /* Try the replacement in language_table[i]. */ - result = setlocale (category, language_table[i].english); - if (result != NULL) - return result; - } - } - /* Split language[_territory][@modifier] - into ll_buf = language[@modifier] - and CC_buf = territory - */ - { - const char *underscore = strchr (llCC_buf, '_'); - if (underscore != NULL) - { - const char *territory_start = underscore + 1; - const char *territory_end = strchr (territory_start, '@'); - if (territory_end == NULL) - territory_end = territory_start + strlen (territory_start); - - memcpy (ll_buf, llCC_buf, underscore - llCC_buf); - strcpy (ll_buf + (underscore - llCC_buf), territory_end); - - memcpy (CC_buf, territory_start, territory_end - territory_start); - CC_buf[territory_end - territory_start] = '\0'; - - { - /* Look up ll_buf in language_table - and CC_buf in country_table. */ - range_t language_range; - - search (language_table, - sizeof (language_table) / sizeof (language_table[0]), - ll_buf, - &language_range); - if (language_range.lo < language_range.hi) - { - range_t country_range; - - search (country_table, - sizeof (country_table) / sizeof (country_table[0]), - CC_buf, - &country_range); - if (country_range.lo < country_range.hi) - { - size_t i; - size_t j; - - for (i = language_range.lo; i < language_range.hi; i++) - for (j = country_range.lo; j < country_range.hi; j++) - { - /* Concatenate the replacements. */ - const char *part1 = language_table[i].english; - size_t part1_len = strlen (part1); - const char *part2 = country_table[j].english; - size_t part2_len = strlen (part2) + 1; - char buf[64+64]; - - if (!(part1_len + 1 + part2_len <= sizeof (buf))) - abort (); - memcpy (buf, part1, part1_len); - buf[part1_len] = '_'; - memcpy (buf + part1_len + 1, part2, part2_len); - - /* Try the concatenated replacements. */ - result = setlocale (category, buf); - if (result != NULL) - return result; - } - } - - /* Try omitting the country entirely. This may set a locale - corresponding to the wrong country, but is better than - failing entirely. */ - { - size_t i; - - for (i = language_range.lo; i < language_range.hi; i++) - { - /* Try only the language replacement. */ - result = - setlocale (category, language_table[i].english); - if (result != NULL) - return result; - } - } - } - } - } - } - } - - /* Failed. */ - return NULL; -} - -# else -# define setlocale_unixlike setlocale -# endif - -# if LC_MESSAGES == 1729 - -/* The system does not store an LC_MESSAGES locale category. Do it here. */ -static char lc_messages_name[64] = "C"; - -/* Like setlocale, but support also LC_MESSAGES. */ -static char * -setlocale_single (int category, const char *locale) -{ - if (category == LC_MESSAGES) - { - if (locale != NULL) - { - lc_messages_name[sizeof (lc_messages_name) - 1] = '\0'; - strncpy (lc_messages_name, locale, sizeof (lc_messages_name) - 1); - } - return lc_messages_name; - } - else - return setlocale_unixlike (category, locale); -} - -# else -# define setlocale_single setlocale_unixlike -# endif - -char * -rpl_setlocale (int category, const char *locale) -{ - if (locale != NULL && locale[0] == '\0') - { - /* A request to the set the current locale to the default locale. */ - if (category == LC_ALL) - { - /* Set LC_CTYPE first. Then the other categories. */ - static int const categories[] = - { - LC_NUMERIC, - LC_TIME, - LC_COLLATE, - LC_MONETARY, - LC_MESSAGES - }; - char *saved_locale; - const char *base_name; - unsigned int i; - - /* Back up the old locale, in case one of the steps fails. */ - saved_locale = setlocale (LC_ALL, NULL); - if (saved_locale == NULL) - return NULL; - saved_locale = strdup (saved_locale); - if (saved_locale == NULL) - return NULL; - - /* Set LC_CTYPE category. Set all other categories (except possibly - LC_MESSAGES) to the same value in the same call; this is likely to - save calls. */ - base_name = - gl_locale_name_environ (LC_CTYPE, category_to_name (LC_CTYPE)); - if (base_name == NULL) - base_name = gl_locale_name_default (); - - if (setlocale_unixlike (LC_ALL, base_name) == NULL) - goto fail; -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Windows, setlocale(LC_ALL,...) may succeed but set the - LC_CTYPE category to an invalid value ("C") when it does not - support the specified encoding. Report a failure instead. */ - if (strchr (base_name, '.') != NULL - && strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - goto fail; -# endif - - for (i = 0; i < sizeof (categories) / sizeof (categories[0]); i++) - { - int cat = categories[i]; - const char *name; - - name = gl_locale_name_environ (cat, category_to_name (cat)); - if (name == NULL) - name = gl_locale_name_default (); - - /* If name is the same as base_name, it has already been set - through the setlocale call before the loop. */ - if (strcmp (name, base_name) != 0 -# if LC_MESSAGES == 1729 - || cat == LC_MESSAGES -# endif - ) - if (setlocale_single (cat, name) == NULL) - goto fail; - } - - /* All steps were successful. */ - free (saved_locale); - return setlocale (LC_ALL, NULL); - - fail: - if (saved_locale[0] != '\0') /* don't risk an endless recursion */ - setlocale (LC_ALL, saved_locale); - free (saved_locale); - return NULL; - } - else - { - const char *name = - gl_locale_name_environ (category, category_to_name (category)); - if (name == NULL) - name = gl_locale_name_default (); - - return setlocale_single (category, name); - } - } - else - { -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - if (category == LC_ALL && locale != NULL && strchr (locale, '.') != NULL) - { - char *saved_locale; - - /* Back up the old locale. */ - saved_locale = setlocale (LC_ALL, NULL); - if (saved_locale == NULL) - return NULL; - saved_locale = strdup (saved_locale); - if (saved_locale == NULL) - return NULL; - - if (setlocale_unixlike (LC_ALL, locale) == NULL) - { - free (saved_locale); - return NULL; - } - - /* On native Windows, setlocale(LC_ALL,...) may succeed but set the - LC_CTYPE category to an invalid value ("C") when it does not - support the specified encoding. Report a failure instead. */ - if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - { - if (saved_locale[0] != '\0') /* don't risk an endless recursion */ - setlocale (LC_ALL, saved_locale); - free (saved_locale); - return NULL; - } - - /* It was really successful. */ - free (saved_locale); - return setlocale (LC_ALL, NULL); - } - else -# endif - return setlocale_single (category, locale); - } -} - -#endif diff --git a/gnulib/tests/signature.h b/gnulib/tests/signature.h deleted file mode 100644 index d9d8b47..0000000 --- a/gnulib/tests/signature.h +++ /dev/null @@ -1,48 +0,0 @@ -/* Macro for checking that a function declaration is compliant. - 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 SIGNATURE_CHECK - -/* Check that the function FN takes the specified arguments ARGS with - a return type of RET. This header is designed to be included after - and the one system header that is supposed to contain - the function being checked, but prior to any other system headers - that are necessary for the unit test. Therefore, this file does - not include any system headers, nor reference anything outside of - the macro arguments. For an example, if foo.h should provide: - - extern int foo (char, float); - - then the unit test named test-foo.c would start out with: - - #include - #include - #include "signature.h" - SIGNATURE_CHECK (foo, int, (char, float)); - #include - ... -*/ -# define SIGNATURE_CHECK(fn, ret, args) \ - SIGNATURE_CHECK1 (fn, ret, args, __LINE__) - -/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test. - Note that the checks must not occupy the same line. */ -# define SIGNATURE_CHECK1(fn, ret, args, id) \ - SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */ -# define SIGNATURE_CHECK2(fn, ret, args, id) \ - static ret (* _GL_UNUSED signature_check ## id) args = fn - -#endif /* SIGNATURE_CHECK */ diff --git a/gnulib/tests/symlink.c b/gnulib/tests/symlink.c deleted file mode 100644 index 642ca66..0000000 --- a/gnulib/tests/symlink.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Stub for symlink(). - 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 - -/* Specification. */ -#include - -#include -#include -#include - - -#if HAVE_SYMLINK - -# undef symlink - -/* Create a symlink, but reject trailing slash. */ -int -rpl_symlink (char const *contents, char const *name) -{ - size_t len = strlen (name); - if (len && name[len - 1] == '/') - { - struct stat st; - if (lstat (name, &st) == 0) - errno = EEXIST; - return -1; - } - return symlink (contents, name); -} - -#else /* !HAVE_SYMLINK */ - -/* The system does not support symlinks. */ -int -symlink (char const *contents _GL_UNUSED, - char const *name _GL_UNUSED) -{ - errno = ENOSYS; - return -1; -} - -#endif /* !HAVE_SYMLINK */ diff --git a/gnulib/tests/test-alloca-opt.c b/gnulib/tests/test-alloca-opt.c deleted file mode 100644 index 6b9a4d7..0000000 --- a/gnulib/tests/test-alloca-opt.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Test of optional automatic memory allocation. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 - -#if HAVE_ALLOCA - -static void -do_allocation (int n) -{ - void *ptr = alloca (n); - (void) ptr; -} - -void (*func) (int) = do_allocation; - -#endif - -int -main () -{ -#if HAVE_ALLOCA - int i; - - /* Repeat a lot of times, to make sure there's no memory leak. */ - for (i = 0; i < 100000; i++) - { - /* Try various values. - n = 0 gave a crash on Alpha with gcc-2.5.8. - Some versions of Mac OS X have a stack size limit of 512 KB. */ - func (34); - func (134); - func (399); - func (510823); - func (129321); - func (0); - func (4070); - func (4095); - func (1); - func (16582); - } -#endif - - return 0; -} diff --git a/gnulib/tests/test-binary-io.c b/gnulib/tests/test-binary-io.c deleted file mode 100644 index 4f284e7..0000000 --- a/gnulib/tests/test-binary-io.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Test of binary mode I/O. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -#include "binary-io.h" - -#include -#include -#include -#include -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - /* Test the O_BINARY macro. */ - { - int fd = - 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-out0.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 deleted file mode 100755 index c4dd6e9..0000000 --- a/gnulib/tests/test-binary-io.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -tmpfiles="" -trap 'rm -fr $tmpfiles' 1 2 3 15 - -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 - -exit 0 diff --git a/gnulib/tests/test-btowc.c b/gnulib/tests/test-btowc.c deleted file mode 100644 index 845fe06..0000000 --- a/gnulib/tests/test-btowc.c +++ /dev/null @@ -1,63 +0,0 @@ -/* Test of conversion of unibyte character to wide character. - 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 Bruno Haible , 2008. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (btowc, wint_t, (int)); - -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - int c; - - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - ASSERT (btowc (EOF) == WEOF); - - if (argc > 1) - switch (argv[1][0]) - { - case '1': - /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ - for (c = 0; c < 0x80; c++) - ASSERT (btowc (c) == c); - for (c = 0xA0; c < 0x100; c++) - ASSERT (btowc (c) != WEOF); - return 0; - - case '2': - /* Locale encoding is UTF-8. */ - for (c = 0; c < 0x80; c++) - ASSERT (btowc (c) == c); - for (c = 0x80; c < 0x100; c++) - ASSERT (btowc (c) == WEOF); - return 0; - } - - return 1; -} diff --git a/gnulib/tests/test-btowc1.sh b/gnulib/tests/test-btowc1.sh deleted file mode 100755 index aaef48d..0000000 --- a/gnulib/tests/test-btowc1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional french locale is installed" - else - echo "Skipping test: no traditional french locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR \ -./test-btowc${EXEEXT} 1 diff --git a/gnulib/tests/test-btowc2.sh b/gnulib/tests/test-btowc2.sh deleted file mode 100755 index 2e06038..0000000 --- a/gnulib/tests/test-btowc2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french Unicode locale is installed" - else - echo "Skipping test: no french Unicode locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR_UTF8 \ -./test-btowc${EXEEXT} 2 diff --git a/gnulib/tests/test-c-ctype.c b/gnulib/tests/test-c-ctype.c deleted file mode 100644 index a9cb655..0000000 --- a/gnulib/tests/test-c-ctype.c +++ /dev/null @@ -1,386 +0,0 @@ -/* Test of character handling in C locale. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -#include "c-ctype.h" - -#include - -#include "macros.h" - -static void -test_all (void) -{ - int c; - - for (c = -0x80; c < 0x100; c++) - { - ASSERT (c_isascii (c) == (c >= 0 && c < 0x80)); - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - ASSERT (c_isalnum (c) == 1); - break; - default: - ASSERT (c_isalnum (c) == 0); - break; - } - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - ASSERT (c_isalpha (c) == 1); - break; - default: - ASSERT (c_isalpha (c) == 0); - break; - } - - switch (c) - { - case '\t': case ' ': - ASSERT (c_isblank (c) == 1); - break; - default: - ASSERT (c_isblank (c) == 0); - break; - } - - ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f)); - - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - ASSERT (c_isdigit (c) == 1); - break; - default: - ASSERT (c_isdigit (c) == 0); - break; - } - - switch (c) - { - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - case 'g': case 'h': case 'i': case 'j': case 'k': case 'l': - case 'm': case 'n': case 'o': case 'p': case 'q': case 'r': - case 's': case 't': case 'u': case 'v': case 'w': case 'x': - case 'y': case 'z': - ASSERT (c_islower (c) == 1); - break; - default: - ASSERT (c_islower (c) == 0); - break; - } - - ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' ')); - - ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f)); - - ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c))); - - switch (c) - { - case ' ': case '\t': case '\n': case '\v': case '\f': case '\r': - ASSERT (c_isspace (c) == 1); - break; - default: - ASSERT (c_isspace (c) == 0); - break; - } - - switch (c) - { - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'G': case 'H': case 'I': case 'J': case 'K': case 'L': - case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R': - case 'S': case 'T': case 'U': case 'V': case 'W': case 'X': - case 'Y': case 'Z': - ASSERT (c_isupper (c) == 1); - break; - default: - ASSERT (c_isupper (c) == 0); - break; - } - - switch (c) - { - case '0': case '1': case '2': case '3': case '4': case '5': - case '6': case '7': case '8': case '9': - case 'A': case 'B': case 'C': case 'D': case 'E': case 'F': - case 'a': case 'b': case 'c': case 'd': case 'e': case 'f': - ASSERT (c_isxdigit (c) == 1); - break; - default: - ASSERT (c_isxdigit (c) == 0); - break; - } - - switch (c) - { - case 'A': - ASSERT (c_tolower (c) == 'a'); - ASSERT (c_toupper (c) == c); - break; - case 'B': - ASSERT (c_tolower (c) == 'b'); - ASSERT (c_toupper (c) == c); - break; - case 'C': - ASSERT (c_tolower (c) == 'c'); - ASSERT (c_toupper (c) == c); - break; - case 'D': - ASSERT (c_tolower (c) == 'd'); - ASSERT (c_toupper (c) == c); - break; - case 'E': - ASSERT (c_tolower (c) == 'e'); - ASSERT (c_toupper (c) == c); - break; - case 'F': - ASSERT (c_tolower (c) == 'f'); - ASSERT (c_toupper (c) == c); - break; - case 'G': - ASSERT (c_tolower (c) == 'g'); - ASSERT (c_toupper (c) == c); - break; - case 'H': - ASSERT (c_tolower (c) == 'h'); - ASSERT (c_toupper (c) == c); - break; - case 'I': - ASSERT (c_tolower (c) == 'i'); - ASSERT (c_toupper (c) == c); - break; - case 'J': - ASSERT (c_tolower (c) == 'j'); - ASSERT (c_toupper (c) == c); - break; - case 'K': - ASSERT (c_tolower (c) == 'k'); - ASSERT (c_toupper (c) == c); - break; - case 'L': - ASSERT (c_tolower (c) == 'l'); - ASSERT (c_toupper (c) == c); - break; - case 'M': - ASSERT (c_tolower (c) == 'm'); - ASSERT (c_toupper (c) == c); - break; - case 'N': - ASSERT (c_tolower (c) == 'n'); - ASSERT (c_toupper (c) == c); - break; - case 'O': - ASSERT (c_tolower (c) == 'o'); - ASSERT (c_toupper (c) == c); - break; - case 'P': - ASSERT (c_tolower (c) == 'p'); - ASSERT (c_toupper (c) == c); - break; - case 'Q': - ASSERT (c_tolower (c) == 'q'); - ASSERT (c_toupper (c) == c); - break; - case 'R': - ASSERT (c_tolower (c) == 'r'); - ASSERT (c_toupper (c) == c); - break; - case 'S': - ASSERT (c_tolower (c) == 's'); - ASSERT (c_toupper (c) == c); - break; - case 'T': - ASSERT (c_tolower (c) == 't'); - ASSERT (c_toupper (c) == c); - break; - case 'U': - ASSERT (c_tolower (c) == 'u'); - ASSERT (c_toupper (c) == c); - break; - case 'V': - ASSERT (c_tolower (c) == 'v'); - ASSERT (c_toupper (c) == c); - break; - case 'W': - ASSERT (c_tolower (c) == 'w'); - ASSERT (c_toupper (c) == c); - break; - case 'X': - ASSERT (c_tolower (c) == 'x'); - ASSERT (c_toupper (c) == c); - break; - case 'Y': - ASSERT (c_tolower (c) == 'y'); - ASSERT (c_toupper (c) == c); - break; - case 'Z': - ASSERT (c_tolower (c) == 'z'); - ASSERT (c_toupper (c) == c); - break; - case 'a': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'A'); - break; - case 'b': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'B'); - break; - case 'c': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'C'); - break; - case 'd': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'D'); - break; - case 'e': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'E'); - break; - case 'f': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'F'); - break; - case 'g': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'G'); - break; - case 'h': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'H'); - break; - case 'i': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'I'); - break; - case 'j': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'J'); - break; - case 'k': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'K'); - break; - case 'l': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'L'); - break; - case 'm': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'M'); - break; - case 'n': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'N'); - break; - case 'o': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'O'); - break; - case 'p': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'P'); - break; - case 'q': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Q'); - break; - case 'r': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'R'); - break; - case 's': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'S'); - break; - case 't': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'T'); - break; - case 'u': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'U'); - break; - case 'v': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'V'); - break; - case 'w': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'W'); - break; - case 'x': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'X'); - break; - case 'y': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Y'); - break; - case 'z': - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == 'Z'); - break; - default: - ASSERT (c_tolower (c) == c); - ASSERT (c_toupper (c) == c); - break; - } - } -} - -int -main () -{ - test_all (); - - setlocale (LC_ALL, "de_DE"); - test_all (); - - setlocale (LC_ALL, "ja_JP.EUC-JP"); - test_all (); - - return 0; -} diff --git a/gnulib/tests/test-c-strcase.sh b/gnulib/tests/test-c-strcase.sh deleted file mode 100755 index 5fcf906..0000000 --- a/gnulib/tests/test-c-strcase.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# Test in the C locale. -./test-c-strcasecmp${EXEEXT} || exit 1 -./test-c-strncasecmp${EXEEXT} || exit 1 - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR != none; then - LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1 - LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1 -fi - -# Test in a Turkish UTF-8 locale. -: ${LOCALE_TR_UTF8=tr_TR.UTF-8} -if test $LOCALE_TR_UTF8 != none; then - LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1 - LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1 -fi - -exit 0 diff --git a/gnulib/tests/test-c-strcasecmp.c b/gnulib/tests/test-c-strcasecmp.c deleted file mode 100644 index 1eb5958..0000000 --- a/gnulib/tests/test-c-strcasecmp.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Test of case-insensitive string comparison function. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "c-strcase.h" - -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - if (argc > 1) - { - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - } - - ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0); - - ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0); - - ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0); - ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0); - - ASSERT (c_strcasecmp ("para", "paragraph") < 0); - ASSERT (c_strcasecmp ("paragraph", "para") > 0); - - /* The following tests shows how c_strcasecmp() is different from - strcasecmp(). */ - - ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0); - ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0); - - /* The following tests shows how c_strcasecmp() is different from - mbscasecmp(). */ - - ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */ - ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */ - - /* This test shows how strings of different size cannot compare equal. */ - ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0); - ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0); - - return 0; -} diff --git a/gnulib/tests/test-c-strncasecmp.c b/gnulib/tests/test-c-strncasecmp.c deleted file mode 100644 index 479528b..0000000 --- a/gnulib/tests/test-c-strncasecmp.c +++ /dev/null @@ -1,79 +0,0 @@ -/* Test of case-insensitive string comparison function. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "c-strcase.h" - -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - if (argc > 1) - { - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - } - - ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0); - ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0); - - ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0); - ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0); - - ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0); - ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0); - ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0); - ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0); - ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0); - ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0); - ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0); - ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0); - - ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0); - ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0); - ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0); - ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0); - ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0); - ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0); - ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0); - ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0); - - /* The following tests shows how c_strncasecmp() is different from - strncasecmp(). */ - - ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0); - ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0); - - /* The following tests shows how c_strncasecmp() is different from - mbsncasecmp(). */ - - ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */ - ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */ - - /* This test shows how strings of different size cannot compare equal. */ - ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0); - ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0); - - return 0; -} diff --git a/gnulib/tests/test-canonicalize-lgpl.c b/gnulib/tests/test-canonicalize-lgpl.c deleted file mode 100644 index 7497e24..0000000 --- a/gnulib/tests/test-canonicalize-lgpl.c +++ /dev/null @@ -1,222 +0,0 @@ -/* Test of execution of program termination handlers. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (realpath, char *, (const char *, char *)); -SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *)); - -#include -#include -#include -#include -#include -#include - -#include "same-inode.h" -#include "ignore-value.h" -#include "macros.h" - -#define BASE "t-can-lgpl.tmp" - -static void * -null_ptr (void) -{ - return NULL; -} - -int -main (void) -{ -#if GNULIB_TEST_CANONICALIZE - /* No need to test canonicalize-lgpl module if canonicalize is also - in use. */ - return 0; -#endif - - /* Setup some hierarchy to be used by this test. Start by removing - any leftovers from a previous partial run. */ - { - int fd; - ignore_value (system ("rm -rf " BASE " ise")); - ASSERT (mkdir (BASE, 0700) == 0); - fd = creat (BASE "/tra", 0600); - ASSERT (0 <= fd); - ASSERT (close (fd) == 0); - } - - /* Check for ., .., intermediate // handling, and for error cases. */ - { - char *result = canonicalize_file_name (BASE "//./..//" BASE "/tra"); - ASSERT (result != NULL); - ASSERT (strstr (result, "/" BASE "/tra") - == result + strlen (result) - strlen ("/" BASE "/tra")); - free (result); - errno = 0; - result = canonicalize_file_name (""); - ASSERT (result == NULL); - ASSERT (errno == ENOENT); - errno = 0; - result = canonicalize_file_name (null_ptr ()); - ASSERT (result == NULL); - ASSERT (errno == EINVAL); - } - - /* Check that a non-directory with trailing slash yields NULL. */ - { - char *result; - errno = 0; - result = canonicalize_file_name (BASE "/tra/"); - ASSERT (result == NULL); - ASSERT (errno == ENOTDIR); - } - - /* Check that a missing directory yields NULL. */ - { - char *result; - errno = 0; - result = canonicalize_file_name (BASE "/zzz/.."); - ASSERT (result == NULL); - ASSERT (errno == ENOENT); - } - - /* From here on out, tests involve symlinks. */ - if (symlink (BASE "/ket", "ise") != 0) - { - ASSERT (remove (BASE "/tra") == 0); - ASSERT (rmdir (BASE) == 0); - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - ASSERT (symlink ("bef", BASE "/plo") == 0); - ASSERT (symlink ("tra", BASE "/huk") == 0); - ASSERT (symlink ("lum", BASE "/bef") == 0); - ASSERT (symlink ("wum", BASE "/ouk") == 0); - ASSERT (symlink ("../ise", BASE "/ket") == 0); - ASSERT (mkdir (BASE "/lum", 0700) == 0); - ASSERT (symlink ("//.//../..", BASE "/droot") == 0); - - /* Check that the symbolic link to a file can be resolved. */ - { - char *result1 = canonicalize_file_name (BASE "/huk"); - char *result2 = canonicalize_file_name (BASE "/tra"); - ASSERT (result1 != NULL); - ASSERT (result2 != NULL); - ASSERT (strcmp (result1, result2) == 0); - ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/tra"), - "/" BASE "/tra") == 0); - free (result1); - free (result2); - } - - /* Check that the symbolic link to a directory can be resolved. */ - { - char *result1 = canonicalize_file_name (BASE "/plo"); - char *result2 = canonicalize_file_name (BASE "/bef"); - char *result3 = canonicalize_file_name (BASE "/lum"); - ASSERT (result1 != NULL); - ASSERT (result2 != NULL); - ASSERT (result3 != NULL); - ASSERT (strcmp (result1, result2) == 0); - ASSERT (strcmp (result2, result3) == 0); - ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/lum"), - "/" BASE "/lum") == 0); - free (result1); - free (result2); - free (result3); - } - - /* Check that a symbolic link to a nonexistent file yields NULL. */ - { - char *result; - errno = 0; - result = canonicalize_file_name (BASE "/ouk"); - ASSERT (result == NULL); - ASSERT (errno == ENOENT); - } - - /* Check that a non-directory symlink with trailing slash yields NULL. */ - { - char *result; - errno = 0; - result = canonicalize_file_name (BASE "/huk/"); - ASSERT (result == NULL); - ASSERT (errno == ENOTDIR); - } - - /* Check that a missing directory via symlink yields NULL. */ - { - char *result; - errno = 0; - result = canonicalize_file_name (BASE "/ouk/.."); - ASSERT (result == NULL); - ASSERT (errno == ENOENT); - } - - /* Check that a loop of symbolic links is detected. */ - { - char *result; - errno = 0; - result = canonicalize_file_name ("ise"); - ASSERT (result == NULL); - ASSERT (errno == ELOOP); - } - - /* Check that leading // is honored correctly. */ - { - struct stat st1; - struct stat st2; - char *result1 = canonicalize_file_name ("//."); - char *result2 = canonicalize_file_name (BASE "/droot"); - ASSERT (result1); - ASSERT (result2); - ASSERT (stat ("/", &st1) == 0); - ASSERT (stat ("//", &st2) == 0); - if (SAME_INODE (st1, st2)) - { - ASSERT (strcmp (result1, "/") == 0); - ASSERT (strcmp (result2, "/") == 0); - } - else - { - ASSERT (strcmp (result1, "//") == 0); - ASSERT (strcmp (result2, "//") == 0); - } - free (result1); - free (result2); - } - - - /* Cleanup. */ - ASSERT (remove (BASE "/droot") == 0); - ASSERT (remove (BASE "/plo") == 0); - ASSERT (remove (BASE "/huk") == 0); - ASSERT (remove (BASE "/bef") == 0); - ASSERT (remove (BASE "/ouk") == 0); - ASSERT (remove (BASE "/ket") == 0); - ASSERT (remove (BASE "/lum") == 0); - ASSERT (remove (BASE "/tra") == 0); - ASSERT (remove (BASE) == 0); - ASSERT (remove ("ise") == 0); - - return 0; -} diff --git a/gnulib/tests/test-close.c b/gnulib/tests/test-close.c deleted file mode 100644 index 83f71c0..0000000 --- a/gnulib/tests/test-close.c +++ /dev/null @@ -1,44 +0,0 @@ -/* 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 deleted file mode 100644 index d6cdff9..0000000 --- a/gnulib/tests/test-ctype.c +++ /dev/null @@ -1,27 +0,0 @@ -/* Test of substitute. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-dup2.c b/gnulib/tests/test-dup2.c deleted file mode 100644 index 5043c0c..0000000 --- a/gnulib/tests/test-dup2.c +++ /dev/null @@ -1,203 +0,0 @@ -/* Test duplicating file descriptors. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (dup2, int, (int, int)); - -#include -#include - -#include "binary-io.h" - -#if GNULIB_TEST_CLOEXEC -# include "cloexec.h" -#endif - -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ -/* Get declarations of the native Windows API functions. */ -# define WIN32_LEAN_AND_MEAN -# include -/* Get _get_osfhandle. */ -# include "msvc-nothrow.h" -#endif - -#include "macros.h" - -/* Return non-zero if FD is open. */ -static int -is_open (int fd) -{ -#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Windows, the initial state of unassigned standard file - descriptors is that they are open but point to an - INVALID_HANDLE_VALUE, and there is no fcntl. */ - return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE; -#else -# ifndef F_GETFL -# error Please port fcntl to your platform -# endif - return 0 <= fcntl (fd, F_GETFL); -#endif -} - -#if GNULIB_TEST_CLOEXEC -/* Return non-zero if FD is open and inheritable across exec/spawn. */ -static int -is_inheritable (int fd) -{ -# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ - /* On native Windows, the initial state of unassigned standard file - descriptors is that they are open but point to an - INVALID_HANDLE_VALUE, and there is no fcntl. */ - HANDLE h = (HANDLE) _get_osfhandle (fd); - DWORD flags; - if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0) - return 0; - return (flags & HANDLE_FLAG_INHERIT) != 0; -# else -# ifndef F_GETFD -# error Please port fcntl to your platform -# endif - int i = fcntl (fd, F_GETFD); - return 0 <= i && (i & FD_CLOEXEC) == 0; -# endif -} -#endif /* GNULIB_TEST_CLOEXEC */ - -#if !O_BINARY -# define setmode(f,m) zero () -static int zero (void) { return 0; } -#endif - -/* Return non-zero if FD is open in the given MODE, which is either - O_TEXT or O_BINARY. */ -static int -is_mode (int fd, int mode) -{ - int value = setmode (fd, O_BINARY); - setmode (fd, value); - return mode == value; -} - -int -main (void) -{ - const char *file = "test-dup2.tmp"; - char buffer[1]; - int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600); - - /* Assume std descriptors were provided by invoker. */ - ASSERT (STDERR_FILENO < fd); - ASSERT (is_open (fd)); - /* Ignore any other fd's leaked into this process. */ - close (fd + 1); - close (fd + 2); - ASSERT (!is_open (fd + 1)); - ASSERT (!is_open (fd + 2)); - - /* Assigning to self must be a no-op. */ - ASSERT (dup2 (fd, fd) == fd); - ASSERT (is_open (fd)); - - /* The source must be valid. */ - errno = 0; - 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)); - - /* If the source is not open, then the destination is unaffected. */ - errno = 0; - ASSERT (dup2 (fd + 1, fd + 1) == -1); - ASSERT (errno == EBADF); - ASSERT (!is_open (fd + 1)); - errno = 0; - ASSERT (dup2 (fd + 1, fd) == -1); - ASSERT (errno == EBADF); - ASSERT (is_open (fd)); - - /* The destination must be valid. */ - errno = 0; - ASSERT (dup2 (fd, -2) == -1); - ASSERT (errno == EBADF); - errno = 0; - ASSERT (dup2 (fd, 10000000) == -1); - ASSERT (errno == EBADF); - - /* Using dup2 can skip fds. */ - ASSERT (dup2 (fd, fd + 2) == fd + 2); - ASSERT (is_open (fd)); - ASSERT (!is_open (fd + 1)); - ASSERT (is_open (fd + 2)); - - /* Verify that dup2 closes the previous occupant of a fd. */ - ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1); - ASSERT (dup2 (fd + 1, fd) == fd); - ASSERT (close (fd + 1) == 0); - ASSERT (write (fd, "1", 1) == 1); - ASSERT (dup2 (fd + 2, fd) == fd); - ASSERT (lseek (fd, 0, SEEK_END) == 0); - ASSERT (write (fd + 2, "2", 1) == 1); - ASSERT (lseek (fd, 0, SEEK_SET) == 0); - ASSERT (read (fd, buffer, 1) == 1); - ASSERT (*buffer == '2'); - -#if GNULIB_TEST_CLOEXEC - /* Any new fd created by dup2 must not be cloexec. */ - ASSERT (close (fd + 2) == 0); - ASSERT (dup_cloexec (fd) == fd + 1); - ASSERT (!is_inheritable (fd + 1)); - ASSERT (dup2 (fd + 1, fd + 1) == fd + 1); - ASSERT (!is_inheritable (fd + 1)); - ASSERT (dup2 (fd + 1, fd + 2) == fd + 2); - ASSERT (!is_inheritable (fd + 1)); - ASSERT (is_inheritable (fd + 2)); - errno = 0; - ASSERT (dup2 (fd + 1, -1) == -1); - ASSERT (errno == EBADF); - ASSERT (!is_inheritable (fd + 1)); -#endif - - /* On systems that distinguish between text and binary mode, dup2 - reuses the mode of the source. */ - setmode (fd, O_BINARY); - ASSERT (is_mode (fd, O_BINARY)); - ASSERT (dup2 (fd, fd + 1) == fd + 1); - ASSERT (is_mode (fd + 1, O_BINARY)); - setmode (fd, O_TEXT); - ASSERT (is_mode (fd, O_TEXT)); - ASSERT (dup2 (fd, fd + 1) == fd + 1); - ASSERT (is_mode (fd + 1, O_TEXT)); - - /* Clean up. */ - ASSERT (close (fd + 2) == 0); - ASSERT (close (fd + 1) == 0); - ASSERT (close (fd) == 0); - ASSERT (unlink (file) == 0); - - return 0; -} diff --git a/gnulib/tests/test-environ.c b/gnulib/tests/test-environ.c deleted file mode 100644 index 972ed06..0000000 --- a/gnulib/tests/test-environ.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Test of environ variable. - 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 Bruno Haible , 2008. */ - -#include - -#include - -#include - -int -main () -{ - /* The environment variables that are set even in the weirdest situations - are HOME and PATH. - POSIX says that HOME is initialized by the system, and that PATH may be - unset. But in practice it's more frequent to see HOME unset and PATH - set. So we test the presence of PATH. */ - char **remaining_variables = environ; - char *string; - - for (; (string = *remaining_variables) != NULL; remaining_variables++) - { - if (strncmp (string, "PATH=", 5) == 0) - /* Found the PATH environment variable. */ - return 0; - } - /* Failed to find the PATH environment variable. */ - return 1; -} diff --git a/gnulib/tests/test-errno.c b/gnulib/tests/test-errno.c deleted file mode 100644 index 8d00717..0000000 --- a/gnulib/tests/test-errno.c +++ /dev/null @@ -1,119 +0,0 @@ -/* Test of substitute. - 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 Bruno Haible , 2008. */ - -#include - -#include - -/* Verify that the POSIX mandated errno values exist and can be used as - initializers outside of a function. - The variable names happen to match the Linux/x86 error numbers. */ -int e1 = EPERM; -int e2 = ENOENT; -int e3 = ESRCH; -int e4 = EINTR; -int e5 = EIO; -int e6 = ENXIO; -int e7 = E2BIG; -int e8 = ENOEXEC; -int e9 = EBADF; -int e10 = ECHILD; -int e11 = EAGAIN; -int e11a = EWOULDBLOCK; -int e12 = ENOMEM; -int e13 = EACCES; -int e14 = EFAULT; -int e16 = EBUSY; -int e17 = EEXIST; -int e18 = EXDEV; -int e19 = ENODEV; -int e20 = ENOTDIR; -int e21 = EISDIR; -int e22 = EINVAL; -int e23 = ENFILE; -int e24 = EMFILE; -int e25 = ENOTTY; -int e26 = ETXTBSY; -int e27 = EFBIG; -int e28 = ENOSPC; -int e29 = ESPIPE; -int e30 = EROFS; -int e31 = EMLINK; -int e32 = EPIPE; -int e33 = EDOM; -int e34 = ERANGE; -int e35 = EDEADLK; -int e36 = ENAMETOOLONG; -int e37 = ENOLCK; -int e38 = ENOSYS; -int e39 = ENOTEMPTY; -int e40 = ELOOP; -int e42 = ENOMSG; -int e43 = EIDRM; -int e67 = ENOLINK; -int e71 = EPROTO; -int e72 = EMULTIHOP; -int e74 = EBADMSG; -int e75 = EOVERFLOW; -int e84 = EILSEQ; -int e88 = ENOTSOCK; -int e89 = EDESTADDRREQ; -int e90 = EMSGSIZE; -int e91 = EPROTOTYPE; -int e92 = ENOPROTOOPT; -int e93 = EPROTONOSUPPORT; -int e95 = EOPNOTSUPP; -int e95a = ENOTSUP; -int e97 = EAFNOSUPPORT; -int e98 = EADDRINUSE; -int e99 = EADDRNOTAVAIL; -int e100 = ENETDOWN; -int e101 = ENETUNREACH; -int e102 = ENETRESET; -int e103 = ECONNABORTED; -int e104 = ECONNRESET; -int e105 = ENOBUFS; -int e106 = EISCONN; -int e107 = ENOTCONN; -int e110 = ETIMEDOUT; -int e111 = ECONNREFUSED; -int e113 = EHOSTUNREACH; -int e114 = EALREADY; -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 - ENOTSUP == EOPNOTSUPP. */ - -int -main () -{ - /* Verify that errno can be assigned. */ - errno = EOVERFLOW; - - /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */ - if (errno == EINVAL) - return 1; - - return 0; -} diff --git a/gnulib/tests/test-fcntl-h.c b/gnulib/tests/test-fcntl-h.c deleted file mode 100644 index 00c5468..0000000 --- a/gnulib/tests/test-fcntl-h.c +++ /dev/null @@ -1,121 +0,0 @@ -/* 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 various O_* macros are defined. */ -int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK - | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT - | O_BINARY | O_TEXT; - -/* Check that the various SEEK_* macros are defined. */ -int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; - -/* Check that the FD_* macros are defined. */ -int i = FD_CLOEXEC; - -/* Check that the types are all defined. */ -pid_t t1; -off_t t2; -mode_t t3; - -int -main (void) -{ - /* 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 deleted file mode 100644 index 8e2f7bf..0000000 --- a/gnulib/tests/test-fdopen.c +++ /dev/null @@ -1,54 +0,0 @@ -/* 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 deleted file mode 100644 index f7ebbc6..0000000 --- a/gnulib/tests/test-fgetc.c +++ /dev/null @@ -1,95 +0,0 @@ -/* 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 deleted file mode 100644 index f3691be..0000000 --- a/gnulib/tests/test-float.c +++ /dev/null @@ -1,384 +0,0 @@ -/* 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 deleted file mode 100644 index 9dd0693..0000000 --- a/gnulib/tests/test-fnmatch.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Test of fnmatch string matching 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 . */ - -/* Written by Simon Josefsson , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (fnmatch, int, (char const *, char const *, int)); - -#include "macros.h" - -int -main () -{ - int res; - - ASSERT (res = fnmatch ("", "", 0) == 0); - - ASSERT (res = fnmatch ("*", "", 0) == 0); - ASSERT (res = fnmatch ("*", "foo", 0) == 0); - ASSERT (res = fnmatch ("*", "bar", 0) == 0); - ASSERT (res = fnmatch ("*", "*", 0) == 0); - ASSERT (res = fnmatch ("**", "f", 0) == 0); - ASSERT (res = fnmatch ("**", "foo.txt", 0) == 0); - ASSERT (res = fnmatch ("*.*", "foo.txt", 0) == 0); - - ASSERT (res = fnmatch ("foo*.txt", "foobar.txt", 0) == 0); - - ASSERT (res = fnmatch ("foo.txt", "foo.txt", 0) == 0); - 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 deleted file mode 100644 index fd92ae8..0000000 --- a/gnulib/tests/test-fputc.c +++ /dev/null @@ -1,89 +0,0 @@ -/* 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 deleted file mode 100644 index 792299b..0000000 --- a/gnulib/tests/test-fread.c +++ /dev/null @@ -1,98 +0,0 @@ -/* 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 deleted file mode 100644 index 7f3c3c4..0000000 --- a/gnulib/tests/test-fstat.c +++ /dev/null @@ -1,48 +0,0 @@ -/* 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 deleted file mode 100644 index 1f3a66d..0000000 --- a/gnulib/tests/test-fwrite.c +++ /dev/null @@ -1,92 +0,0 @@ -/* 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 deleted file mode 100644 index 3010760..0000000 --- a/gnulib/tests/test-getcwd-lgpl.c +++ /dev/null @@ -1,102 +0,0 @@ -/* 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 deleted file mode 100644 index daea646..0000000 --- a/gnulib/tests/test-getdelim.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Test of getdelim() function. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Eric Blake , 2007. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (getdelim, ssize_t, (char **, size_t *, int, FILE *)); - -#include -#include - -#include "macros.h" - -int -main (void) -{ - FILE *f; - char *line; - size_t len; - ssize_t result; - - /* Create test file. */ - f = fopen ("test-getdelim.txt", "wb"); - if (!f || fwrite ("anAnbcnd\0f", 1, 10, f) != 10 || fclose (f) != 0) - { - fputs ("Failed to create sample file.\n", stderr); - remove ("test-getdelim.txt"); - return 1; - } - f = fopen ("test-getdelim.txt", "rb"); - if (!f) - { - fputs ("Failed to reopen sample file.\n", stderr); - remove ("test-getdelim.txt"); - return 1; - } - - /* Test initial allocation, which must include trailing NUL. */ - line = NULL; - len = 0; - result = getdelim (&line, &len, 'n', f); - ASSERT (result == 2); - ASSERT (strcmp (line, "an") == 0); - ASSERT (2 < len); - free (line); - - /* Test initial allocation again, with line = NULL and len != 0. */ - line = NULL; - len = (size_t)(~0) / 4; - result = getdelim (&line, &len, 'n', f); - ASSERT (result == 2); - ASSERT (strcmp (line, "An") == 0); - ASSERT (2 < len); - free (line); - - /* Test growth of buffer. */ - line = malloc (1); - len = 1; - result = getdelim (&line, &len, 'n', f); - ASSERT (result == 3); - ASSERT (strcmp (line, "bcn") == 0); - ASSERT (3 < len); - - /* Test embedded NULs and EOF behavior. */ - result = getdelim (&line, &len, 'n', f); - ASSERT (result == 3); - ASSERT (memcmp (line, "d\0f", 4) == 0); - ASSERT (3 < len); - - result = getdelim (&line, &len, 'n', f); - ASSERT (result == -1); - - free (line); - fclose (f); - remove ("test-getdelim.txt"); - return 0; -} diff --git a/gnulib/tests/test-getline.c b/gnulib/tests/test-getline.c deleted file mode 100644 index ede1b85..0000000 --- a/gnulib/tests/test-getline.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Test of getline() function. - 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 - the Free Software Foundation; either version 3, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, see . */ - -/* Written by Eric Blake , 2007. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (getline, ssize_t, (char **, size_t *, FILE *)); - -#include -#include - -#include "macros.h" - -int -main (void) -{ - FILE *f; - char *line; - size_t len; - ssize_t result; - - /* Create test file. */ - f = fopen ("test-getline.txt", "wb"); - if (!f || fwrite ("a\nA\nbc\nd\0f", 1, 10, f) != 10 || fclose (f) != 0) - { - fputs ("Failed to create sample file.\n", stderr); - remove ("test-getline.txt"); - return 1; - } - f = fopen ("test-getline.txt", "rb"); - if (!f) - { - fputs ("Failed to reopen sample file.\n", stderr); - remove ("test-getline.txt"); - return 1; - } - - /* Test initial allocation, which must include trailing NUL. */ - line = NULL; - len = 0; - result = getline (&line, &len, f); - ASSERT (result == 2); - ASSERT (strcmp (line, "a\n") == 0); - ASSERT (2 < len); - free (line); - - /* Test initial allocation again, with line = NULL and len != 0. */ - line = NULL; - len = (size_t)(~0) / 4; - result = getline (&line, &len, f); - ASSERT (result == 2); - ASSERT (strcmp (line, "A\n") == 0); - ASSERT (2 < len); - free (line); - - /* Test growth of buffer, must not leak. */ - line = malloc (1); - len = 0; - result = getline (&line, &len, f); - ASSERT (result == 3); - ASSERT (strcmp (line, "bc\n") == 0); - ASSERT (3 < len); - - /* Test embedded NULs and EOF behavior. */ - result = getline (&line, &len, f); - ASSERT (result == 3); - ASSERT (memcmp (line, "d\0f", 4) == 0); - ASSERT (3 < len); - - result = getline (&line, &len, f); - ASSERT (result == -1); - - free (line); - fclose (f); - remove ("test-getline.txt"); - return 0; -} diff --git a/gnulib/tests/test-getopt.c b/gnulib/tests/test-getopt.c deleted file mode 100644 index e08a834..0000000 --- a/gnulib/tests/test-getopt.c +++ /dev/null @@ -1,99 +0,0 @@ -/* Test of command line argument processing. - 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 . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -/* None of the files accessed by this test are large, so disable the - ftell link warning if we are not using the gnulib ftell module. */ -#define _GL_NO_LARGE_FILES - -#if GNULIB_TEST_GETOPT_GNU -# include - -# ifndef __getopt_argv_const -# define __getopt_argv_const const -# endif -# include "signature.h" -SIGNATURE_CHECK (getopt_long, int, (int, char *__getopt_argv_const *, - char const *, struct option const *, - int *)); -SIGNATURE_CHECK (getopt_long_only, int, (int, char *__getopt_argv_const *, - char const *, struct option const *, - int *)); - -#endif - -#include - -#include "signature.h" -SIGNATURE_CHECK (getopt, int, (int, char * const[], char const *)); - -#include -#include -#include - -/* This test intentionally remaps stderr. So, we arrange to have fd 10 - (outside the range of interesting fd's during the test) set up to - duplicate the original stderr. */ - -#define BACKUP_STDERR_FILENO 10 -#define ASSERT_STREAM myerr -#include "macros.h" - -static FILE *myerr; - -#include "test-getopt.h" -#if GNULIB_TEST_GETOPT_GNU -# include "test-getopt_long.h" -#endif - -int -main (void) -{ - /* This test validates that stderr is used correctly, so move the - original into fd 10. */ - if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO - || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL) - return 2; - - ASSERT (freopen ("test-getopt.tmp", "w", stderr) == stderr); - - /* These default values are required by POSIX. */ - ASSERT (optind == 1); - ASSERT (opterr != 0); - - setenv ("POSIXLY_CORRECT", "1", 1); - test_getopt (); - -#if GNULIB_TEST_GETOPT_GNU - test_getopt_long_posix (); -#endif - - unsetenv ("POSIXLY_CORRECT"); - test_getopt (); - -#if GNULIB_TEST_GETOPT_GNU - test_getopt_long (); - test_getopt_long_only (); -#endif - - ASSERT (fclose (stderr) == 0); - ASSERT (remove ("test-getopt.tmp") == 0); - - return 0; -} diff --git a/gnulib/tests/test-getopt.h b/gnulib/tests/test-getopt.h deleted file mode 100644 index 978b753..0000000 --- a/gnulib/tests/test-getopt.h +++ /dev/null @@ -1,1391 +0,0 @@ -/* Test of command line argument processing. - 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 . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -/* The glibc/gnulib implementation of getopt supports setting optind = - 0, but not all other implementations do. This matters for getopt. - But for getopt_long, we require GNU compatibility. */ -#if defined __GETOPT_PREFIX || (__GLIBC__ >= 2 && !defined __UCLIBC__) -# define OPTIND_MIN 0 -#elif HAVE_DECL_OPTRESET -# define OPTIND_MIN (optreset = 1) -#else -# define OPTIND_MIN 1 -#endif - -static void -getopt_loop (int argc, const char **argv, - const char *options, - int *a_seen, int *b_seen, - const char **p_value, const char **q_value, - int *non_options_count, const char **non_options, - int *unrecognized, bool *message_issued) -{ - int c; - int pos = ftell (stderr); - - while ((c = getopt (argc, (char **) argv, options)) != -1) - { - switch (c) - { - case 'a': - (*a_seen)++; - break; - case 'b': - (*b_seen)++; - break; - case 'p': - *p_value = optarg; - break; - case 'q': - *q_value = optarg; - break; - case '\1': - /* Must only happen with option '-' at the beginning. */ - ASSERT (options[0] == '-'); - non_options[(*non_options_count)++] = optarg; - break; - case ':': - /* Must only happen with option ':' at the beginning. */ - ASSERT (options[0] == ':' - || ((options[0] == '-' || options[0] == '+') - && options[1] == ':')); - /* fall through */ - case '?': - *unrecognized = optopt; - break; - default: - *unrecognized = c; - break; - } - } - - *message_issued = pos < ftell (stderr); -} - -static void -test_getopt (void) -{ - int start; - bool posixly = !!getenv ("POSIXLY_CORRECT"); - /* See comment in getopt.c: - glibc gets a LSB-compliant getopt. - Standalone applications get a POSIX-compliant getopt. */ -#if defined __GETOPT_PREFIX || !(__GLIBC__ >= 2 || defined __MINGW32__) - /* Using getopt from gnulib or from a non-glibc system. */ - posixly = true; -#endif - - /* Test processing of boolean options. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "ab", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-b"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "ab", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ba"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "ab", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "ab", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 2); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - ASSERT (!output); - } - - /* Test processing of options with arguments. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "p:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "p:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "-q"; - argv[argc++] = "baz"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - ASSERT (!output); - } - -#if GNULIB_TEST_GETOPT_GNU - /* Test processing of options with optional arguments. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "p::q::", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "p::q::", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "abp::q::", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - ASSERT (!output); - } -#endif /* GNULIB_TEST_GETOPT_GNU */ - - /* Check that invalid options are recognized; and that both opterr - and leading ':' can silence output. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-x"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 42; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'x'); - ASSERT (optind == 5); - ASSERT (output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-x"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 0; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'x'); - ASSERT (optind == 5); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-x"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, ":abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'x'); - ASSERT (optind == 5); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-:"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 42; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == ':'); - ASSERT (optind == 5); - ASSERT (output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-:"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 0; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == ':'); - ASSERT (optind == 5); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-:"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, ":abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == ':'); - ASSERT (optind == 5); - ASSERT (!output); - } - - /* Check for missing argument behavior. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ap"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'p'); - ASSERT (optind == 2); - ASSERT (output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ap"; - argv[argc] = NULL; - optind = start; - opterr = 0; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'p'); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-ap"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, ":abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'p'); - ASSERT (optind == 2); - ASSERT (!output); - } - - /* Check that by default, non-options arguments are moved to the end. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - if (posixly) - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - else - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - ASSERT (!output); - } - } - - /* Check that '--' ends the argument processing. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[20]; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - if (posixly) - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "--") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - else - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "--") == 0); - ASSERT (strcmp (argv[5], "donald") == 0); - ASSERT (strcmp (argv[6], "duck") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - ASSERT (!output); - } - } - -#if GNULIB_TEST_GETOPT_GNU - /* Check that the '-' flag causes non-options to be returned in order. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "-abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 3); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (strcmp (non_options[2], "bar") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 7); - ASSERT (!output); - } - - /* Check that '--' ends the argument processing. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[20]; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "-abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "--") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (!output); - if (non_options_count == 2) - { - /* glibc behaviour. */ - ASSERT (non_options_count == 2); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 7); - } - else - { - /* Another valid behaviour. */ - ASSERT (non_options_count == 7); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (strcmp (non_options[2], "-b") == 0); - ASSERT (strcmp (non_options[3], "foo") == 0); - ASSERT (strcmp (non_options[4], "-q") == 0); - ASSERT (strcmp (non_options[5], "johnny") == 0); - ASSERT (strcmp (non_options[6], "bar") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 12); - } - } - - /* Check that the '-' flag has to come first. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:-", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - if (posixly) - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - else - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - ASSERT (!output); - } - } - - /* Check that the '+' flag causes the first non-option to terminate the - loop. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "+abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-+"; - argv[argc] = NULL; - optind = start; - getopt_loop (argc, argv, "+abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == '+'); - ASSERT (optind == 2); - ASSERT (output); - } - - /* Check that '--' ends the argument processing. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[20]; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - opterr = 1; - getopt_loop (argc, argv, "+abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "--") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } -#endif /* GNULIB_TEST_GETOPT_GNU */ - - /* Check that the '+' flag has to come first. */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "abp:q:+", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - if (posixly) - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - else - { - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - ASSERT (!output); - } - } - -#if GNULIB_TEST_GETOPT_GNU - /* If GNU extensions are supported, require compliance with POSIX - interpretation on leading '+' behavior. - http://austingroupbugs.net/view.php?id=191 */ - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - 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 = start; - opterr = 1; - getopt_loop (argc, argv, "+:abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc] = NULL; - optind = start; - getopt_loop (argc, argv, "+:abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'p'); - ASSERT (optind == 2); - ASSERT (!output); - } - for (start = OPTIND_MIN; start <= 1; start++) - { - int a_seen = 0; - int b_seen = 0; - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - bool output; - int argc = 0; - const char *argv[10]; - - argv[argc++] = "program"; - argv[argc++] = "-b"; - argv[argc++] = "-p"; - argv[argc] = NULL; - optind = start; - getopt_loop (argc, argv, "+:abp:q:", - &a_seen, &b_seen, &p_value, &q_value, - &non_options_count, non_options, &unrecognized, &output); - ASSERT (a_seen == 0); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'p'); - 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 deleted file mode 100644 index 9d55c65..0000000 --- a/gnulib/tests/test-getopt_long.h +++ /dev/null @@ -1,2144 +0,0 @@ -/* Test of command line argument processing. - 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 . */ - -/* Written by Bruno Haible , 2009. */ - -static int a_seen; -static int b_seen; -static int q_seen; - -static const struct option long_options_required[] = - { - { "alpha", no_argument, NULL, 'a' }, - { "beta", no_argument, &b_seen, 1 }, - { "prune", required_argument, NULL, 'p' }, - { "quetsche", required_argument, &q_seen, 1 }, - { "xtremely-",no_argument, NULL, 1003 }, - { "xtra", no_argument, NULL, 1001 }, - { "xtreme", no_argument, NULL, 1002 }, - { "xtremely", no_argument, NULL, 1003 }, - { NULL, 0, NULL, 0 } - }; - -static const struct option long_options_optional[] = - { - { "alpha", no_argument, NULL, 'a' }, - { "beta", no_argument, &b_seen, 1 }, - { "prune", optional_argument, NULL, 'p' }, - { "quetsche", optional_argument, &q_seen, 1 }, - { NULL, 0, NULL, 0 } - }; - -static void -getopt_long_loop (int argc, const char **argv, - const char *options, const struct option *long_options, - const char **p_value, const char **q_value, - int *non_options_count, const char **non_options, - int *unrecognized) -{ - int option_index = -1; - int c; - - opterr = 0; - q_seen = 0; - while ((c = getopt_long (argc, (char **) argv, options, long_options, - &option_index)) - != -1) - { - switch (c) - { - case 0: - /* An option with a non-NULL flag pointer was processed. */ - if (q_seen) - *q_value = optarg; - break; - case 'a': - a_seen++; - break; - case 'b': - b_seen = 1; - break; - case 'p': - *p_value = optarg; - break; - case 'q': - *q_value = optarg; - break; - case '\1': - /* Must only happen with option '-' at the beginning. */ - ASSERT (options[0] == '-'); - non_options[(*non_options_count)++] = optarg; - break; - case ':': - /* Must only happen with option ':' at the beginning. */ - ASSERT (options[0] == ':' - || ((options[0] == '-' || options[0] == '+') - && options[1] == ':')); - /* fall through */ - case '?': - *unrecognized = optopt; - break; - default: - *unrecognized = c; - break; - } - } -} - -/* Reduce casting, so we can use string literals elsewhere. - getopt_long takes an array of char*, but luckily does not modify - those elements, so we can pass const char*. */ -static int -do_getopt_long (int argc, const char **argv, const char *shortopts, - const struct option *longopts, int *longind) -{ - return getopt_long (argc, (char **) argv, shortopts, longopts, longind); -} - -static void -test_getopt_long (void) -{ - int start; - - /* Test disambiguation of options. */ - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--x"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xt"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtr"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtra"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == 1001); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtre"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtrem"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtreme"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == 1002); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtremel"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == 1003); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--xtremely"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "ab", long_options_required, &option_index); - ASSERT (c == 1003); - } - - /* Check that -W handles unknown options. */ - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 'W'); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-Wunknown"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); - /* glibc and BSD behave differently here, but for now, we allow - both behaviors since W support is not frequently used. */ - if (c == '?') - { - ASSERT (optopt == 0); - ASSERT (optarg == NULL); - } - else - { - ASSERT (c == 'W'); - ASSERT (strcmp (optarg, "unknown") == 0); - } - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc++] = "unknown"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long (argc, argv, "W;", long_options_required, &option_index); - /* glibc and BSD behave differently here, but for now, we allow - both behaviors since W support is not frequently used. */ - if (c == '?') - { - ASSERT (optopt == 0); - ASSERT (optarg == NULL); - } - else - { - ASSERT (c == 'W'); - ASSERT (strcmp (optarg, "unknown") == 0); - } - } - - /* 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++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-b"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-ba"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "-a"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 2); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - - /* Test processing of boolean long options. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--alpha"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--beta"; - argv[argc++] = "--alpha"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--alpha"; - argv[argc++] = "--beta"; - argv[argc++] = "--alpha"; - argv[argc++] = "--beta"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 2); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - - /* Test processing of boolean long options via -W. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Walpha"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abW;", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc++] = "beta"; - argv[argc++] = "-W"; - argv[argc++] = "alpha"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "aW;b", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Walpha"; - argv[argc++] = "-Wbeta"; - argv[argc++] = "-Walpha"; - argv[argc++] = "-Wbeta"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "W;ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 2); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - - /* Test processing of short options with arguments. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "-q"; - argv[argc++] = "baz"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - - /* Test processing of long options with arguments. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "--q"; - argv[argc++] = "baz"; - argv[argc++] = "--p=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - - /* Test processing of long options with arguments via -W. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Wp=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:q:W;", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc++] = "p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p:W;q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-ab"; - argv[argc++] = "-Wq"; - argv[argc++] = "baz"; - argv[argc++] = "-W"; - argv[argc++] = "p=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "W;abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value != NULL && strcmp (q_value, "baz") == 0); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 6); - } - - /* Test processing of short options with optional arguments. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-pfoo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - - /* Test processing of long options with optional arguments. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p="; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && *p_value == '\0'); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "--p"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - - /* Test processing of long options with optional arguments via -W. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Wp=foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::W;", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Wp"; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::q::W;", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-Wp="; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "W;p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && *p_value == '\0'); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc++] = "p="; - argv[argc++] = "foo"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "W;p::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && *p_value == '\0'); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 3); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-W"; - argv[argc++] = "p"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "W;abp::q::", long_options_optional, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - /* ASSERT (p_value == NULL); */ - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } - - /* Check that invalid options are recognized. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-x"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'x'); - ASSERT (optind == 5); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "-:"; - argv[argc++] = "-a"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == ':'); - ASSERT (optind == 5); - } - - /* Check that unexpected arguments are recognized. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "--a="; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 'a'); - ASSERT (optind == 4); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "foo"; - argv[argc++] = "--b="; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "foo") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - /* When flag is non-zero, glibc sets optopt anyway, but BSD - leaves optopt unchanged. */ - ASSERT (unrecognized == 1 || unrecognized == 0); - ASSERT (optind == 4); - } - - /* Check that by default, non-options arguments are moved to the end. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } - - /* Check that '--' ends the argument processing. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[20]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "--") == 0); - ASSERT (strcmp (argv[5], "donald") == 0); - ASSERT (strcmp (argv[6], "duck") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 5); - } - - /* Check that the '-' flag causes non-options to be returned in order. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "-abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 3); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (strcmp (non_options[2], "bar") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 7); - } - - /* Check that '--' ends the argument processing. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[20]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "-abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "--") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - if (non_options_count == 2) - { - /* glibc behaviour. */ - ASSERT (non_options_count == 2); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 7); - } - else - { - /* Another valid behaviour. */ - ASSERT (non_options_count == 7); - ASSERT (strcmp (non_options[0], "donald") == 0); - ASSERT (strcmp (non_options[1], "duck") == 0); - ASSERT (strcmp (non_options[2], "-b") == 0); - ASSERT (strcmp (non_options[3], "foo") == 0); - ASSERT (strcmp (non_options[4], "-q") == 0); - ASSERT (strcmp (non_options[5], "johnny") == 0); - ASSERT (strcmp (non_options[6], "bar") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 12); - } - } - - /* Check that the '-' flag has to come first. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "abp:q:-", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } - - /* Check that the '+' flag causes the first non-option to terminate the - loop. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "+abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - } - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-+"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "+abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == '+'); - ASSERT (optind == 2); - } - - /* Check that '--' ends the argument processing. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[20]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "donald"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc++] = "duck"; - argv[argc++] = "-a"; - argv[argc++] = "--"; - argv[argc++] = "-b"; - argv[argc++] = "foo"; - argv[argc++] = "-q"; - argv[argc++] = "johnny"; - argv[argc++] = "bar"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "+abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "--") == 0); - ASSERT (strcmp (argv[7], "-b") == 0); - ASSERT (strcmp (argv[8], "foo") == 0); - ASSERT (strcmp (argv[9], "-q") == 0); - ASSERT (strcmp (argv[10], "johnny") == 0); - ASSERT (strcmp (argv[11], "bar") == 0); - ASSERT (argv[12] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - } - - /* Check that the '+' flag has to come first. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "abp:q:+", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "-p") == 0); - ASSERT (strcmp (argv[2], "billy") == 0); - ASSERT (strcmp (argv[3], "-a") == 0); - ASSERT (strcmp (argv[4], "donald") == 0); - ASSERT (strcmp (argv[5], "duck") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 1); - ASSERT (b_seen == 0); - ASSERT (p_value != NULL && strcmp (p_value, "billy") == 0); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } -} - -/* Test behavior of getopt_long when POSIXLY_CORRECT is set in the - environment. Options with optional arguments should not change - behavior just because of an environment variable. - http://lists.gnu.org/archive/html/bug-m4/2006-09/msg00028.html */ -static void -test_getopt_long_posix (void) -{ - int start; - - /* Check that POSIXLY_CORRECT stops parsing the same as leading '+'. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - 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 = start; - getopt_long_loop (argc, argv, "abp:q:", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (strcmp (argv[0], "program") == 0); - ASSERT (strcmp (argv[1], "donald") == 0); - ASSERT (strcmp (argv[2], "-p") == 0); - ASSERT (strcmp (argv[3], "billy") == 0); - ASSERT (strcmp (argv[4], "duck") == 0); - ASSERT (strcmp (argv[5], "-a") == 0); - ASSERT (strcmp (argv[6], "bar") == 0); - ASSERT (argv[7] == NULL); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 1); - } - - /* Check that POSIXLY_CORRECT doesn't change optional arguments. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-p"; - argv[argc++] = "billy"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "p::", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 0); - ASSERT (b_seen == 0); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 2); - } - - /* Check that leading - still sees options after non-options. */ - for (start = 0; start <= 1; start++) - { - const char *p_value = NULL; - const char *q_value = NULL; - int non_options_count = 0; - const char *non_options[10]; - int unrecognized = 0; - int argc = 0; - const char *argv[10]; - a_seen = 0; - b_seen = 0; - - argv[argc++] = "program"; - argv[argc++] = "-a"; - argv[argc++] = "billy"; - argv[argc++] = "-b"; - argv[argc] = NULL; - optind = start; - getopt_long_loop (argc, argv, "-ab", long_options_required, - &p_value, &q_value, - &non_options_count, non_options, &unrecognized); - ASSERT (a_seen == 1); - ASSERT (b_seen == 1); - ASSERT (p_value == NULL); - ASSERT (q_value == NULL); - ASSERT (non_options_count == 1); - ASSERT (strcmp (non_options[0], "billy") == 0); - ASSERT (unrecognized == 0); - ASSERT (optind == 4); - } -} - -/* Reduce casting, so we can use string literals elsewhere. - getopt_long_only takes an array of char*, but luckily does not - modify those elements, so we can pass const char*. */ -static int -do_getopt_long_only (int argc, const char **argv, const char *shortopts, - const struct option *longopts, int *longind) -{ - return getopt_long_only (argc, (char **) argv, shortopts, longopts, longind); -} - -static void -test_getopt_long_only (void) -{ - /* Test disambiguation of options. */ - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-x"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "ab", long_options_required, - &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-x"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx", long_options_required, - &option_index); - ASSERT (c == 'x'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--x"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx", long_options_required, - &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-b"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - b_seen = 0; - c = do_getopt_long_only (argc, argv, "abx", long_options_required, - &option_index); - ASSERT (c == 'b'); - ASSERT (b_seen == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "--b"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - b_seen = 0; - c = do_getopt_long_only (argc, argv, "abx", long_options_required, - &option_index); - ASSERT (c == 0); - ASSERT (b_seen == 1); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xt"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "ab", long_options_required, - &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xt"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx", long_options_required, - &option_index); - ASSERT (c == '?'); - ASSERT (optopt == 0); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xtra"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "ab", long_options_required, - &option_index); - ASSERT (c == 1001); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xtreme"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx:", long_options_required, - &option_index); - ASSERT (c == 1002); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xtremel"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "ab", long_options_required, - &option_index); - /* glibc getopt_long_only is intentionally different from - getopt_long when handling a prefix that is common to two - spellings, when both spellings have the same option directives. - BSD getopt_long_only treats both cases the same. */ - ASSERT (c == 1003 || c == '?'); - ASSERT (optind == 2); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xtremel"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx::", long_options_required, - &option_index); - /* glibc getopt_long_only is intentionally different from - getopt_long when handling a prefix that is common to two - spellings, when both spellings have the same option directives. - BSD getopt_long_only treats both cases the same. */ - ASSERT (c == 1003 || c == '?'); - ASSERT (optind == 2); - ASSERT (optarg == NULL); - } - { - int argc = 0; - const char *argv[10]; - int option_index; - int c; - - argv[argc++] = "program"; - argv[argc++] = "-xtras"; - argv[argc] = NULL; - optind = 1; - opterr = 0; - c = do_getopt_long_only (argc, argv, "abx::", long_options_required, - &option_index); - ASSERT (c == 'x'); - ASSERT (strcmp (optarg, "tras") == 0); - } -} diff --git a/gnulib/tests/test-gettimeofday.c b/gnulib/tests/test-gettimeofday.c deleted file mode 100644 index 4a9d264..0000000 --- a/gnulib/tests/test-gettimeofday.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - * 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 deleted file mode 100644 index f036134..0000000 --- a/gnulib/tests/test-ignore-value.c +++ /dev/null @@ -1,84 +0,0 @@ -/* Test the "ignore-value" module. - - 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 Eric Blake. */ - -#include - -#include "ignore-value.h" - -#include - -#ifndef _GL_ATTRIBUTE_RETURN_CHECK -# if __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) -# define _GL_ATTRIBUTE_RETURN_CHECK -# else -# define _GL_ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__)) -# endif -#endif - -struct s { int i; }; -static char doChar (void) _GL_ATTRIBUTE_RETURN_CHECK; -static int doInt (void) _GL_ATTRIBUTE_RETURN_CHECK; -static off_t doOff (void) _GL_ATTRIBUTE_RETURN_CHECK; -static void *doPtr (void) _GL_ATTRIBUTE_RETURN_CHECK; -static struct s doStruct (void) _GL_ATTRIBUTE_RETURN_CHECK; - -static char -doChar (void) -{ - return 0; -} - -static int -doInt (void) -{ - return 0; -} - -static off_t -doOff (void) -{ - return 0; -} - -static void * -doPtr (void) -{ - return NULL; -} - -static struct s -doStruct (void) -{ - static struct s s1; - return s1; -} - -int -main (void) -{ - /* If this test can compile with -Werror and the same warnings as - the rest of the project, then we are properly silencing warnings - about ignored return values. */ - ignore_value (doChar ()); - ignore_value (doInt ()); - ignore_value (doOff ()); - ignore_value (doPtr ()); - ignore_value (doStruct ()); - return 0; -} diff --git a/gnulib/tests/test-init.sh b/gnulib/tests/test-init.sh deleted file mode 100755 index a2825cc..0000000 --- a/gnulib/tests/test-init.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/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 deleted file mode 100644 index aeb1168..0000000 --- a/gnulib/tests/test-intprops.c +++ /dev/null @@ -1,275 +0,0 @@ -/* 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 deleted file mode 100644 index 698d3dc..0000000 --- a/gnulib/tests/test-inttypes.c +++ /dev/null @@ -1,118 +0,0 @@ -/* 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 deleted file mode 100644 index 878ee42..0000000 --- a/gnulib/tests/test-isblank.c +++ /dev/null @@ -1,50 +0,0 @@ -/* Test of isblank() 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 . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (isblank, int, (int)); - -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - unsigned int c; - - /* Verify the property in the "C" locale. - POSIX specifies in - - that - - in all locales, the blank characters include the and - characters, - - in the "POSIX" locale (which is usually the same as the "C" locale), - the blank characters include only the ASCII and - characters. */ - for (c = 0; c <= UCHAR_MAX; c++) - ASSERT (!isblank (c) == !(c == ' ' || c == '\t')); - ASSERT (!isblank (EOF)); - - return 0; -} diff --git a/gnulib/tests/test-langinfo.c b/gnulib/tests/test-langinfo.c deleted file mode 100644 index 02b4637..0000000 --- a/gnulib/tests/test-langinfo.c +++ /dev/null @@ -1,92 +0,0 @@ -/* Test of substitute. - 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 . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -#include - -/* Check that all the nl_item values are defined. */ -int items[] = - { - /* nl_langinfo items of the LC_CTYPE category */ - CODESET, - /* nl_langinfo items of the LC_NUMERIC category */ - RADIXCHAR, - THOUSEP, - /* nl_langinfo items of the LC_TIME category */ - D_T_FMT, - D_FMT, - T_FMT, - T_FMT_AMPM, - AM_STR, - PM_STR, - DAY_1, - DAY_2, - DAY_3, - DAY_4, - DAY_5, - DAY_6, - DAY_7, - ABDAY_1, - ABDAY_2, - ABDAY_3, - ABDAY_4, - ABDAY_5, - ABDAY_6, - ABDAY_7, - MON_1, - MON_2, - MON_3, - MON_4, - MON_5, - MON_6, - MON_7, - MON_8, - MON_9, - MON_10, - MON_11, - MON_12, - ABMON_1, - ABMON_2, - ABMON_3, - ABMON_4, - ABMON_5, - ABMON_6, - ABMON_7, - ABMON_8, - ABMON_9, - ABMON_10, - ABMON_11, - ABMON_12, - ERA, - ERA_D_FMT, - ERA_D_T_FMT, - ERA_T_FMT, - ALT_DIGITS, - /* nl_langinfo items of the LC_MONETARY category */ - CRNCYSTR, - /* nl_langinfo items of the LC_MESSAGES category */ - YESEXPR, - NOEXPR - }; - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-locale.c b/gnulib/tests/test-locale.c deleted file mode 100644 index e884ea1..0000000 --- a/gnulib/tests/test-locale.c +++ /dev/null @@ -1,79 +0,0 @@ -/* 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 - -#include "verify.h" - -int a[] = - { - LC_ALL, - LC_COLLATE, - LC_CTYPE, - LC_MESSAGES, - LC_MONETARY, - LC_NUMERIC, - LC_TIME - }; - -#if HAVE_NEWLOCALE -/* Check that the locale_t type and the LC_GLOBAL_LOCALE macro are defined. */ -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 *)); - -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 deleted file mode 100644 index 9125800..0000000 --- a/gnulib/tests/test-localeconv.c +++ /dev/null @@ -1,72 +0,0 @@ -/* 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 deleted file mode 100644 index 37b76a3..0000000 --- a/gnulib/tests/test-localename.c +++ /dev/null @@ -1,747 +0,0 @@ -/* Test of gl_locale_name function and its variants. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "localename.h" - -#include -#include -#include - -#include "macros.h" - - -#if HAVE_NEWLOCALE - -static struct { int cat; int mask; const char *string; } const categories[] = - { - { LC_CTYPE, LC_CTYPE_MASK, "LC_CTYPE" }, - { LC_NUMERIC, LC_NUMERIC_MASK, "LC_NUMERIC" }, - { LC_TIME, LC_TIME_MASK, "LC_TIME" }, - { LC_COLLATE, LC_COLLATE_MASK, "LC_COLLATE" }, - { LC_MONETARY, LC_MONETARY_MASK, "LC_MONETARY" }, - { LC_MESSAGES, LC_MESSAGES_MASK, "LC_MESSAGES" } -# ifdef LC_PAPER - , { LC_PAPER, LC_PAPER_MASK, "LC_PAPER" } -# endif -# ifdef LC_NAME - , { LC_NAME, LC_NAME_MASK, "LC_NAME" } -# endif -# ifdef LC_ADDRESS - , { LC_ADDRESS, LC_ADDRESS_MASK, "LC_ADDRESS" } -# endif -# ifdef LC_TELEPHONE - , { LC_TELEPHONE, LC_TELEPHONE_MASK, "LC_TELEPHONE" } -# endif -# ifdef LC_MEASUREMENT - , { LC_MEASUREMENT, LC_MEASUREMENT_MASK, "LC_MEASUREMENT" } -# endif -# ifdef LC_IDENTIFICATION - , { LC_IDENTIFICATION, LC_IDENTIFICATION_MASK, "LC_IDENTIFICATION" } -# endif - }; - -#endif - -/* Test the gl_locale_name() function. */ -static void -test_locale_name (void) -{ - const char *name; - - /* Check that gl_locale_name returns non-NULL. */ - ASSERT (gl_locale_name (LC_MESSAGES, "LC_MESSAGES") != NULL); - - /* Get into a defined state, */ - setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE - uselocale (LC_GLOBAL_LOCALE); -#endif - - /* Check that when all environment variables are unset, - gl_locale_name returns the default locale. */ - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LC_NUMERIC"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), - gl_locale_name_default ()) == 0); - ASSERT (strcmp (gl_locale_name (LC_NUMERIC, "LC_NUMERIC"), - gl_locale_name_default ()) == 0); - - /* Check that an empty environment variable is treated like an unset - environment variable. */ - - setenv ("LC_ALL", "", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), - gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "", 1); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), - gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "", 1); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), - gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "", 1); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), - gl_locale_name_default ()) == 0); - - /* Check that LC_ALL overrides the others, and LANG is overridden by the - others. */ - - setenv ("LC_ALL", "C", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "C", 1); - setenv ("LC_MESSAGES", "C", 1); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "C", 1); - setlocale (LC_ALL, ""); - ASSERT (strcmp (gl_locale_name (LC_MESSAGES, "LC_MESSAGES"), "C") == 0); - - /* Check mixed situations. */ - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - setenv ("LANG", "de_DE.UTF-8", 1); - if (setlocale (LC_ALL, "") != NULL) - { - name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, "de_DE.UTF-8") == 0); - name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - unsetenv ("LANG"); - if (setlocale (LC_ALL, "") != NULL) - { - name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, gl_locale_name_default ()) == 0); - name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - -#if HAVE_NEWLOCALE - /* Check that gl_locale_name considers the thread locale. */ - { - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - uselocale (locale); - name = gl_locale_name (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - name = gl_locale_name (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - } - - /* Check that gl_locale_name distinguishes different categories of the - thread locale, and that the name is the right one for each. */ - { - unsigned int i; - - for (i = 0; i < SIZEOF (categories); i++) - { - int category_mask = categories[i].mask; - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - locale = newlocale (category_mask, "de_DE.UTF-8", locale); - if (locale != NULL) - { - unsigned int j; - - uselocale (locale); - for (j = 0; j < SIZEOF (categories); j++) - { - const char *name_j = - gl_locale_name (categories[j].cat, categories[j].string); - if (j == i) - ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0); - else - ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); - } - } - } - } - } -#endif -} - -/* Test the gl_locale_name_thread() function. */ -static void -test_locale_name_thread (void) -{ - /* Get into a defined state, */ - setlocale (LC_ALL, "en_US.UTF-8"); - -#if HAVE_NEWLOCALE - /* Check that gl_locale_name_thread returns NULL when no thread locale is - set. */ - uselocale (LC_GLOBAL_LOCALE); - ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL); - ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL); - - /* Check that gl_locale_name_thread considers the thread locale. */ - { - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - const char *name; - - uselocale (locale); - name = gl_locale_name_thread (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - name = gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - } - - /* Check that gl_locale_name_thread distinguishes different categories of the - thread locale, and that the name is the right one for each. */ - { - unsigned int i; - - for (i = 0; i < SIZEOF (categories); i++) - { - int category_mask = categories[i].mask; - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - locale = newlocale (category_mask, "de_DE.UTF-8", locale); - if (locale != NULL) - { - unsigned int j; - - uselocale (locale); - for (j = 0; j < SIZEOF (categories); j++) - { - const char *name_j = - gl_locale_name_thread (categories[j].cat, - categories[j].string); - if (j == i) - ASSERT (strcmp (name_j, "de_DE.UTF-8") == 0); - else - ASSERT (strcmp (name_j, "fr_FR.UTF-8") == 0); - } - } - } - } - } - - /* Check that gl_locale_name_thread returns a string that is allocated with - indefinite extent. */ - { - /* Try many locale names in turn, in order to defeat possible caches. */ - static const char * const choices[] = - { - "C", - "POSIX", - "af_ZA", - "af_ZA.UTF-8", - "am_ET", - "am_ET.UTF-8", - "be_BY", - "be_BY.UTF-8", - "bg_BG", - "bg_BG.UTF-8", - "ca_ES", - "ca_ES.UTF-8", - "cs_CZ", - "cs_CZ.UTF-8", - "da_DK", - "da_DK.UTF-8", - "de_AT", - "de_AT.UTF-8", - "de_CH", - "de_CH.UTF-8", - "de_DE", - "de_DE.UTF-8", - "el_GR", - "el_GR.UTF-8", - "en_AU", - "en_AU.UTF-8", - "en_CA", - "en_CA.UTF-8", - "en_GB", - "en_GB.UTF-8", - "en_IE", - "en_IE.UTF-8", - "en_NZ", - "en_NZ.UTF-8", - "en_US", - "en_US.UTF-8", - "es_ES", - "es_ES.UTF-8", - "et_EE", - "et_EE.UTF-8", - "eu_ES", - "eu_ES.UTF-8", - "fi_FI", - "fi_FI.UTF-8", - "fr_BE", - "fr_BE.UTF-8", - "fr_CA", - "fr_CA.UTF-8", - "fr_CH", - "fr_CH.UTF-8", - "fr_FR", - "fr_FR.UTF-8", - "he_IL", - "he_IL.UTF-8", - "hr_HR", - "hr_HR.UTF-8", - "hu_HU", - "hu_HU.UTF-8", - "hy_AM", - "is_IS", - "is_IS.UTF-8", - "it_CH", - "it_CH.UTF-8", - "it_IT", - "it_IT.UTF-8", - "ja_JP.UTF-8", - "kk_KZ", - "kk_KZ.UTF-8", - "ko_KR.UTF-8", - "lt_LT", - "lt_LT.UTF-8", - "nl_BE", - "nl_BE.UTF-8", - "nl_NL", - "nl_NL.UTF-8", - "no_NO", - "no_NO.UTF-8", - "pl_PL", - "pl_PL.UTF-8", - "pt_BR", - "pt_BR.UTF-8", - "pt_PT", - "pt_PT.UTF-8", - "ro_RO", - "ro_RO.UTF-8", - "ru_RU", - "ru_RU.UTF-8", - "sk_SK", - "sk_SK.UTF-8", - "sl_SI", - "sl_SI.UTF-8", - "sv_SE", - "sv_SE.UTF-8", - "tr_TR", - "tr_TR.UTF-8", - "uk_UA", - "uk_UA.UTF-8", - "zh_CN", - "zh_CN.UTF-8", - "zh_HK", - "zh_HK.UTF-8", - "zh_TW", - "zh_TW.UTF-8" - }; - /* Remember which locales are available. */ - unsigned char /* bool */ available[SIZEOF (choices)]; - /* Array of remembered results of gl_locale_name_thread. */ - const char *unsaved_names[SIZEOF (choices)][SIZEOF (categories)]; - /* Array of remembered results of gl_locale_name_thread, stored in safe - memory. */ - char *saved_names[SIZEOF (choices)][SIZEOF (categories)]; - unsigned int j; - - for (j = 0; j < SIZEOF (choices); j++) - { - locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL); - available[j] = (locale != NULL); - if (locale != NULL) - { - unsigned int i; - - uselocale (locale); - for (i = 0; i < SIZEOF (categories); i++) - { - unsaved_names[j][i] = gl_locale_name_thread (categories[i].cat, categories[i].string); - saved_names[j][i] = strdup (unsaved_names[j][i]); - } - uselocale (LC_GLOBAL_LOCALE); - freelocale (locale); - } - } - /* Verify the unsaved_names are still valid. */ - for (j = 0; j < SIZEOF (choices); j++) - if (available[j]) - { - unsigned int i; - - for (i = 0; i < SIZEOF (categories); i++) - ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); - } - /* Allocate many locales, without freeing them. This is an attempt at - overwriting as much of the previously allocated memory as possible. */ - for (j = SIZEOF (choices); j > 0; ) - { - j--; - if (available[j]) - { - locale_t locale = newlocale (LC_ALL_MASK, choices[j], NULL); - unsigned int i; - - ASSERT (locale != NULL); - uselocale (locale); - for (i = 0; i < SIZEOF (categories); i++) - { - const char *name = gl_locale_name_thread (categories[i].cat, categories[i].string); - ASSERT (strcmp (unsaved_names[j][i], name) == 0); - } - uselocale (LC_GLOBAL_LOCALE); - } - } - /* Verify the unsaved_names are still valid. */ - for (j = 0; j < SIZEOF (choices); j++) - if (available[j]) - { - unsigned int i; - - for (i = 0; i < SIZEOF (categories); i++) - ASSERT (strcmp (unsaved_names[j][i], saved_names[j][i]) == 0); - } - } -#else - /* Check that gl_locale_name_thread always returns NULL. */ - ASSERT (gl_locale_name_thread (LC_CTYPE, "LC_CTYPE") == NULL); - ASSERT (gl_locale_name_thread (LC_MESSAGES, "LC_MESSAGES") == NULL); -#endif -} - -/* Test the gl_locale_name_posix() function. */ -static void -test_locale_name_posix (void) -{ - const char *name; - - /* Get into a defined state, */ - setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE - uselocale (LC_GLOBAL_LOCALE); -#endif - - /* Check that when all environment variables are unset, - gl_locale_name_posix returns either NULL or the default locale. */ - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LC_NUMERIC"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - name = gl_locale_name_posix (LC_NUMERIC, "LC_NUMERIC"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - - /* Check that an empty environment variable is treated like an unset - environment variable. */ - - setenv ("LC_ALL", "", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "", 1); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "", 1); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "", 1); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - - /* Check that LC_ALL overrides the others, and LANG is overridden by the - others. */ - - setenv ("LC_ALL", "C", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "C", 1); - setenv ("LC_MESSAGES", "C", 1); - unsetenv ("LANG"); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "C", 1); - setlocale (LC_ALL, ""); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - /* Check mixed situations. */ - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - setenv ("LANG", "de_DE.UTF-8", 1); - if (setlocale (LC_ALL, "") != NULL) - { - name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, "de_DE.UTF-8") == 0); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - unsetenv ("LANG"); - if (setlocale (LC_ALL, "") != NULL) - { - name = gl_locale_name_posix (LC_CTYPE, "LC_CTYPE"); - ASSERT (name == NULL || strcmp (name, gl_locale_name_default ()) == 0); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - } - -#if HAVE_NEWLOCALE - /* Check that gl_locale_name_posix ignores the thread locale. */ - { - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "C", 1); - setlocale (LC_ALL, ""); - uselocale (locale); - name = gl_locale_name_posix (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - } - } -#endif -} - -/* Test the gl_locale_name_environ() function. */ -static void -test_locale_name_environ (void) -{ - const char *name; - - /* Get into a defined state, */ - setlocale (LC_ALL, "en_US.UTF-8"); -#if HAVE_NEWLOCALE - uselocale (LC_GLOBAL_LOCALE); -#endif - - /* Check that when all environment variables are unset, - gl_locale_name_environ returns NULL. */ - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LC_NUMERIC"); - unsetenv ("LANG"); - ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); - ASSERT (gl_locale_name_environ (LC_NUMERIC, "LC_NUMERIC") == NULL); - - /* Check that an empty environment variable is treated like an unset - environment variable. */ - - setenv ("LC_ALL", "", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "", 1); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "", 1); - unsetenv ("LANG"); - ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "", 1); - ASSERT (gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES") == NULL); - - /* Check that LC_ALL overrides the others, and LANG is overridden by the - others. */ - - setenv ("LC_ALL", "C", 1); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - unsetenv ("LANG"); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - unsetenv ("LC_ALL"); - setenv ("LC_CTYPE", "C", 1); - setenv ("LC_MESSAGES", "C", 1); - unsetenv ("LANG"); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "C", 1); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - - /* Check mixed situations. */ - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - setenv ("LANG", "de_DE.UTF-8", 1); - name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE"); - ASSERT (strcmp (name, "de_DE.UTF-8") == 0); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - setenv ("LC_MESSAGES", "fr_FR.UTF-8", 1); - unsetenv ("LANG"); - name = gl_locale_name_environ (LC_CTYPE, "LC_CTYPE"); - ASSERT (name == NULL); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "fr_FR.UTF-8") == 0); - -#if HAVE_NEWLOCALE - /* Check that gl_locale_name_environ ignores the thread locale. */ - { - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - unsetenv ("LC_ALL"); - unsetenv ("LC_CTYPE"); - unsetenv ("LC_MESSAGES"); - setenv ("LANG", "C", 1); - setlocale (LC_ALL, ""); - uselocale (locale); - name = gl_locale_name_environ (LC_MESSAGES, "LC_MESSAGES"); - ASSERT (strcmp (name, "C") == 0); - } - } -#endif -} - -/* Test the gl_locale_name_default() function. */ -static void -test_locale_name_default (void) -{ - const char *name = gl_locale_name_default (); - - ASSERT (name != NULL); - - /* 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); -#endif - -#if HAVE_NEWLOCALE - /* Check that gl_locale_name_default ignores the thread locale. */ - { - locale_t locale = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", NULL); - if (locale != NULL) - { - uselocale (locale); - ASSERT (strcmp (gl_locale_name_default (), name) == 0); - } - } -#endif -} - -int -main () -{ - test_locale_name (); - test_locale_name_thread (); - test_locale_name_posix (); - test_locale_name_environ (); - test_locale_name_default (); - - return 0; -} diff --git a/gnulib/tests/test-lock.c b/gnulib/tests/test-lock.c deleted file mode 100644 index 5cada7d..0000000 --- a/gnulib/tests/test-lock.c +++ /dev/null @@ -1,601 +0,0 @@ -/* Test of locking in multithreaded situations. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -#if USE_POSIX_THREADS || USE_SOLARIS_THREADS || USE_PTH_THREADS || USE_WINDOWS_THREADS - -#if USE_POSIX_THREADS -# define TEST_POSIX_THREADS 1 -#endif -#if USE_SOLARIS_THREADS -# define TEST_SOLARIS_THREADS 1 -#endif -#if USE_PTH_THREADS -# define TEST_PTH_THREADS 1 -#endif -#if USE_WINDOWS_THREADS -# define TEST_WINDOWS_THREADS 1 -#endif - -/* Whether to enable locking. - Uncomment this to get a test program without locking, to verify that - it crashes. */ -#define ENABLE_LOCKING 1 - -/* Which tests to perform. - Uncomment some of these, to verify that all tests crash if no locking - is enabled. */ -#define DO_TEST_LOCK 1 -#define DO_TEST_RWLOCK 1 -#define DO_TEST_RECURSIVE_LOCK 1 -#define DO_TEST_ONCE 1 - -/* Whether to help the scheduler through explicit yield(). - Uncomment this to see if the operating system has a fair scheduler. */ -#define EXPLICIT_YIELD 1 - -/* Whether to print debugging messages. */ -#define ENABLE_DEBUGGING 0 - -/* Number of simultaneous threads. */ -#define THREAD_COUNT 10 - -/* Number of operations performed in each thread. - This is quite high, because with a smaller count, say 5000, we often get - an "OK" result even without ENABLE_LOCKING (on Linux/x86). */ -#define REPEAT_COUNT 50000 - -#include -#include -#include - -#if !ENABLE_LOCKING -# undef USE_POSIX_THREADS -# undef USE_SOLARIS_THREADS -# undef USE_PTH_THREADS -# undef USE_WINDOWS_THREADS -#endif -#include "glthread/lock.h" - -#if !ENABLE_LOCKING -# if TEST_POSIX_THREADS -# define USE_POSIX_THREADS 1 -# endif -# if TEST_SOLARIS_THREADS -# define USE_SOLARIS_THREADS 1 -# endif -# if TEST_PTH_THREADS -# define USE_PTH_THREADS 1 -# endif -# if TEST_WINDOWS_THREADS -# define USE_WINDOWS_THREADS 1 -# endif -#endif - -#include "glthread/thread.h" -#include "glthread/yield.h" - -#if ENABLE_DEBUGGING -# define dbgprintf printf -#else -# define dbgprintf if (0) printf -#endif - -#if EXPLICIT_YIELD -# define yield() gl_thread_yield () -#else -# define yield() -#endif - -#define ACCOUNT_COUNT 4 - -static int account[ACCOUNT_COUNT]; - -static int -random_account (void) -{ - return ((unsigned int) rand () >> 3) % ACCOUNT_COUNT; -} - -static void -check_accounts (void) -{ - int i, sum; - - sum = 0; - for (i = 0; i < ACCOUNT_COUNT; i++) - sum += account[i]; - if (sum != ACCOUNT_COUNT * 1000) - abort (); -} - - -/* ------------------- Test normal (non-recursive) locks ------------------- */ - -/* Test normal locks by having several bank accounts and several threads - which shuffle around money between the accounts and another thread - checking that all the money is still there. */ - -gl_lock_define_initialized(static, my_lock) - -static void * -lock_mutator_thread (void *arg) -{ - int repeat; - - for (repeat = REPEAT_COUNT; repeat > 0; repeat--) - { - int i1, i2, value; - - dbgprintf ("Mutator %p before lock\n", gl_thread_self_pointer ()); - gl_lock_lock (my_lock); - dbgprintf ("Mutator %p after lock\n", gl_thread_self_pointer ()); - - i1 = random_account (); - i2 = random_account (); - value = ((unsigned int) rand () >> 3) % 10; - account[i1] += value; - account[i2] -= value; - - dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); - gl_lock_unlock (my_lock); - dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); - - 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_pointer ()); - - yield (); - } - - dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static volatile int lock_checker_done; - -static void * -lock_checker_thread (void *arg) -{ - while (!lock_checker_done) - { - 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_pointer ()); - - yield (); - } - - dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static void -test_lock (void) -{ - int i; - gl_thread_t checkerthread; - gl_thread_t threads[THREAD_COUNT]; - - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; - lock_checker_done = 0; - - /* Spawn the threads. */ - checkerthread = gl_thread_create (lock_checker_thread, NULL); - for (i = 0; i < THREAD_COUNT; i++) - threads[i] = gl_thread_create (lock_mutator_thread, NULL); - - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); - lock_checker_done = 1; - gl_thread_join (checkerthread, NULL); - check_accounts (); -} - - -/* ----------------- Test read-write (non-recursive) locks ----------------- */ - -/* Test read-write locks by having several bank accounts and several threads - which shuffle around money between the accounts and several other threads - that check that all the money is still there. */ - -gl_rwlock_define_initialized(static, my_rwlock) - -static void * -rwlock_mutator_thread (void *arg) -{ - int repeat; - - for (repeat = REPEAT_COUNT; repeat > 0; repeat--) - { - int i1, i2, value; - - dbgprintf ("Mutator %p before wrlock\n", gl_thread_self_pointer ()); - gl_rwlock_wrlock (my_rwlock); - dbgprintf ("Mutator %p after wrlock\n", gl_thread_self_pointer ()); - - i1 = random_account (); - i2 = random_account (); - value = ((unsigned int) rand () >> 3) % 10; - account[i1] += value; - account[i2] -= value; - - dbgprintf ("Mutator %p before unlock\n", gl_thread_self_pointer ()); - gl_rwlock_unlock (my_rwlock); - dbgprintf ("Mutator %p after unlock\n", gl_thread_self_pointer ()); - - yield (); - } - - dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static volatile int rwlock_checker_done; - -static void * -rwlock_checker_thread (void *arg) -{ - while (!rwlock_checker_done) - { - 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_pointer ()); - - yield (); - } - - dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static void -test_rwlock (void) -{ - int i; - gl_thread_t checkerthreads[THREAD_COUNT]; - gl_thread_t threads[THREAD_COUNT]; - - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; - rwlock_checker_done = 0; - - /* Spawn the threads. */ - for (i = 0; i < THREAD_COUNT; i++) - checkerthreads[i] = gl_thread_create (rwlock_checker_thread, NULL); - for (i = 0; i < THREAD_COUNT; i++) - threads[i] = gl_thread_create (rwlock_mutator_thread, NULL); - - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); - rwlock_checker_done = 1; - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (checkerthreads[i], NULL); - check_accounts (); -} - - -/* -------------------------- Test recursive locks -------------------------- */ - -/* Test recursive locks by having several bank accounts and several threads - which shuffle around money between the accounts (recursively) and another - thread checking that all the money is still there. */ - -gl_recursive_lock_define_initialized(static, my_reclock) - -static void -recshuffle (void) -{ - int i1, i2, value; - - 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_pointer ()); - - i1 = random_account (); - i2 = random_account (); - value = ((unsigned int) rand () >> 3) % 10; - account[i1] += value; - account[i2] -= value; - - /* Recursive with probability 0.5. */ - if (((unsigned int) rand () >> 3) % 2) - recshuffle (); - - 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_pointer ()); -} - -static void * -reclock_mutator_thread (void *arg) -{ - int repeat; - - for (repeat = REPEAT_COUNT; repeat > 0; repeat--) - { - recshuffle (); - - 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_pointer ()); - - yield (); - } - - dbgprintf ("Mutator %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static volatile int reclock_checker_done; - -static void * -reclock_checker_thread (void *arg) -{ - while (!reclock_checker_done) - { - 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_pointer ()); - - yield (); - } - - dbgprintf ("Checker %p dying.\n", gl_thread_self_pointer ()); - return NULL; -} - -static void -test_recursive_lock (void) -{ - int i; - gl_thread_t checkerthread; - gl_thread_t threads[THREAD_COUNT]; - - /* Initialization. */ - for (i = 0; i < ACCOUNT_COUNT; i++) - account[i] = 1000; - reclock_checker_done = 0; - - /* Spawn the threads. */ - checkerthread = gl_thread_create (reclock_checker_thread, NULL); - for (i = 0; i < THREAD_COUNT; i++) - threads[i] = gl_thread_create (reclock_mutator_thread, NULL); - - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); - reclock_checker_done = 1; - gl_thread_join (checkerthread, NULL); - check_accounts (); -} - - -/* ------------------------ Test once-only execution ------------------------ */ - -/* Test once-only execution by having several threads attempt to grab a - once-only task simultaneously (triggered by releasing a read-write lock). */ - -gl_once_define(static, fresh_once) -static int ready[THREAD_COUNT]; -static gl_lock_t ready_lock[THREAD_COUNT]; -#if ENABLE_LOCKING -static gl_rwlock_t fire_signal[REPEAT_COUNT]; -#else -static volatile int fire_signal_state; -#endif -static gl_once_t once_control; -static int performed; -gl_lock_define_initialized(static, performed_lock) - -static void -once_execute (void) -{ - gl_lock_lock (performed_lock); - performed++; - gl_lock_unlock (performed_lock); -} - -static void * -once_contender_thread (void *arg) -{ - int id = (int) (long) arg; - int repeat; - - for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) - { - /* Tell the main thread that we're ready. */ - gl_lock_lock (ready_lock[id]); - ready[id] = 1; - gl_lock_unlock (ready_lock[id]); - - if (repeat == REPEAT_COUNT) - break; - - dbgprintf ("Contender %p waiting for signal for round %d\n", - gl_thread_self_pointer (), repeat); -#if ENABLE_LOCKING - /* Wait for the signal to go. */ - gl_rwlock_rdlock (fire_signal[repeat]); - /* And don't hinder the others (if the scheduler is unfair). */ - gl_rwlock_unlock (fire_signal[repeat]); -#else - /* Wait for the signal to go. */ - while (fire_signal_state <= repeat) - yield (); -#endif - dbgprintf ("Contender %p got the signal for round %d\n", - gl_thread_self_pointer (), repeat); - - /* Contend for execution. */ - gl_once (once_control, once_execute); - } - - return NULL; -} - -static void -test_once (void) -{ - int i, repeat; - gl_thread_t threads[THREAD_COUNT]; - - /* Initialize all variables. */ - for (i = 0; i < THREAD_COUNT; i++) - { - ready[i] = 0; - gl_lock_init (ready_lock[i]); - } -#if ENABLE_LOCKING - for (i = 0; i < REPEAT_COUNT; i++) - gl_rwlock_init (fire_signal[i]); -#else - fire_signal_state = 0; -#endif - - /* Block all fire_signals. */ - for (i = REPEAT_COUNT-1; i >= 0; i--) - gl_rwlock_wrlock (fire_signal[i]); - - /* Spawn the threads. */ - for (i = 0; i < THREAD_COUNT; i++) - threads[i] = gl_thread_create (once_contender_thread, (void *) (long) i); - - for (repeat = 0; repeat <= REPEAT_COUNT; repeat++) - { - /* Wait until every thread is ready. */ - dbgprintf ("Main thread before synchronizing for round %d\n", repeat); - for (;;) - { - int ready_count = 0; - for (i = 0; i < THREAD_COUNT; i++) - { - gl_lock_lock (ready_lock[i]); - ready_count += ready[i]; - gl_lock_unlock (ready_lock[i]); - } - if (ready_count == THREAD_COUNT) - break; - yield (); - } - dbgprintf ("Main thread after synchronizing for round %d\n", repeat); - - if (repeat > 0) - { - /* Check that exactly one thread executed the once_execute() - function. */ - if (performed != 1) - abort (); - } - - if (repeat == REPEAT_COUNT) - break; - - /* Preparation for the next round: Initialize once_control. */ - memcpy (&once_control, &fresh_once, sizeof (gl_once_t)); - - /* Preparation for the next round: Reset the performed counter. */ - performed = 0; - - /* Preparation for the next round: Reset the ready flags. */ - for (i = 0; i < THREAD_COUNT; i++) - { - gl_lock_lock (ready_lock[i]); - ready[i] = 0; - gl_lock_unlock (ready_lock[i]); - } - - /* Signal all threads simultaneously. */ - dbgprintf ("Main thread giving signal for round %d\n", repeat); -#if ENABLE_LOCKING - gl_rwlock_unlock (fire_signal[repeat]); -#else - fire_signal_state = repeat + 1; -#endif - } - - /* Wait for the threads to terminate. */ - for (i = 0; i < THREAD_COUNT; i++) - gl_thread_join (threads[i], NULL); -} - - -/* -------------------------------------------------------------------------- */ - -int -main () -{ -#if TEST_PTH_THREADS - if (!pth_init ()) - abort (); -#endif - -#if DO_TEST_LOCK - printf ("Starting test_lock ..."); fflush (stdout); - test_lock (); - printf (" OK\n"); fflush (stdout); -#endif -#if DO_TEST_RWLOCK - printf ("Starting test_rwlock ..."); fflush (stdout); - test_rwlock (); - printf (" OK\n"); fflush (stdout); -#endif -#if DO_TEST_RECURSIVE_LOCK - printf ("Starting test_recursive_lock ..."); fflush (stdout); - test_recursive_lock (); - printf (" OK\n"); fflush (stdout); -#endif -#if DO_TEST_ONCE - printf ("Starting test_once ..."); fflush (stdout); - test_once (); - printf (" OK\n"); fflush (stdout); -#endif - - return 0; -} - -#else - -/* No multithreading available. */ - -#include - -int -main () -{ - fputs ("Skipping test: multithreading not enabled\n", stderr); - return 77; -} - -#endif diff --git a/gnulib/tests/test-lstat.c b/gnulib/tests/test-lstat.c deleted file mode 100644 index 459bf88..0000000 --- a/gnulib/tests/test-lstat.c +++ /dev/null @@ -1,60 +0,0 @@ -/* Test of lstat() function. - 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 Simon Josefsson, 2008; and Eric Blake, 2009. */ - -#include - -#include - -/* Caution: lstat may be a function-like macro. Although this - signature check must pass, it may be the signature of the real (and - broken) lstat rather than rpl_lstat. Most code should not use the - address of lstat. */ -#include "signature.h" -SIGNATURE_CHECK (lstat, int, (char const *, struct stat *)); - -#include -#include -#include -#include -#include -#include - -#include "same-inode.h" -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-lstat.t" - -#include "test-lstat.h" - -/* Wrapper around lstat, which works even if lstat is a function-like - macro, where test_lstat_func(lstat) would do the wrong thing. */ -static int -do_lstat (char const *name, struct stat *st) -{ - return lstat (name, st); -} - -int -main (void) -{ - /* Remove any leftovers from a previous partial run. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_lstat_func (do_lstat, true); -} diff --git a/gnulib/tests/test-lstat.h b/gnulib/tests/test-lstat.h deleted file mode 100644 index 4a81494..0000000 --- a/gnulib/tests/test-lstat.h +++ /dev/null @@ -1,116 +0,0 @@ -/* Test of lstat() function. - 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 Simon Josefsson, 2008; and Eric Blake, 2009. */ - -/* This file is designed to test both lstat(n,buf) and - fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW). FUNC is the function - to test. Assumes that BASE and ASSERT are already defined, and - that appropriate headers are already included. If PRINT, warn - before skipping symlink tests with status 77. */ - -static int -test_lstat_func (int (*func) (char const *, struct stat *), bool print) -{ - struct stat st1; - struct stat st2; - - /* Test for common directories. */ - ASSERT (func (".", &st1) == 0); - ASSERT (func ("./", &st2) == 0); - ASSERT (SAME_INODE (st1, st2)); - ASSERT (S_ISDIR (st1.st_mode)); - ASSERT (S_ISDIR (st2.st_mode)); - ASSERT (func ("/", &st1) == 0); - ASSERT (func ("///", &st2) == 0); - ASSERT (SAME_INODE (st1, st2)); - ASSERT (S_ISDIR (st1.st_mode)); - ASSERT (S_ISDIR (st2.st_mode)); - ASSERT (func ("..", &st1) == 0); - ASSERT (S_ISDIR (st1.st_mode)); - - /* Test for error conditions. */ - errno = 0; - ASSERT (func ("", &st1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("nosuch", &st1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("nosuch/", &st1) == -1); - ASSERT (errno == ENOENT); - - ASSERT (close (creat (BASE "file", 0600)) == 0); - ASSERT (func (BASE "file", &st1) == 0); - ASSERT (S_ISREG (st1.st_mode)); - errno = 0; - ASSERT (func (BASE "file/", &st1) == -1); - ASSERT (errno == ENOTDIR); - - /* Now for some symlink tests, where supported. We set up: - link1 -> directory - link2 -> file - link3 -> dangling - link4 -> loop - then test behavior both with and without trailing slash. - */ - if (symlink (".", BASE "link1") != 0) - { - ASSERT (unlink (BASE "file") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - ASSERT (symlink (BASE "file", BASE "link2") == 0); - ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); - ASSERT (symlink (BASE "link4", BASE "link4") == 0); - - ASSERT (func (BASE "link1", &st1) == 0); - ASSERT (S_ISLNK (st1.st_mode)); - ASSERT (func (BASE "link1/", &st1) == 0); - ASSERT (stat (BASE "link1", &st2) == 0); - ASSERT (S_ISDIR (st1.st_mode)); - ASSERT (S_ISDIR (st2.st_mode)); - ASSERT (SAME_INODE (st1, st2)); - - ASSERT (func (BASE "link2", &st1) == 0); - ASSERT (S_ISLNK (st1.st_mode)); - errno = 0; - ASSERT (func (BASE "link2/", &st1) == -1); - ASSERT (errno == ENOTDIR); - - ASSERT (func (BASE "link3", &st1) == 0); - ASSERT (S_ISLNK (st1.st_mode)); - errno = 0; - ASSERT (func (BASE "link3/", &st1) == -1); - ASSERT (errno == ENOENT); - - ASSERT (func (BASE "link4", &st1) == 0); - ASSERT (S_ISLNK (st1.st_mode)); - errno = 0; - ASSERT (func (BASE "link4/", &st1) == -1); - ASSERT (errno == ELOOP); - - /* Cleanup. */ - ASSERT (unlink (BASE "file") == 0); - ASSERT (unlink (BASE "link1") == 0); - ASSERT (unlink (BASE "link2") == 0); - ASSERT (unlink (BASE "link3") == 0); - ASSERT (unlink (BASE "link4") == 0); - - return 0; -} diff --git a/gnulib/tests/test-malloc-gnu.c b/gnulib/tests/test-malloc-gnu.c deleted file mode 100644 index 16b3a0a..0000000 --- a/gnulib/tests/test-malloc-gnu.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Test of malloc function. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General 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 - -int -main () -{ - /* Check that malloc (0) is not a NULL pointer. */ - if (malloc (0) == NULL) - return 1; - - return 0; -} diff --git a/gnulib/tests/test-malloca.c b/gnulib/tests/test-malloca.c deleted file mode 100644 index 9c7109c..0000000 --- a/gnulib/tests/test-malloca.c +++ /dev/null @@ -1,62 +0,0 @@ -/* Test of safe automatic memory allocation. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2005. */ - -#include - -#include "malloca.h" - -#include - -static void -do_allocation (int n) -{ - void *ptr = malloca (n); - freea (ptr); - safe_alloca (n); -} - -void (*func) (int) = do_allocation; - -int -main () -{ - int i; - - /* This slows down malloc a lot. */ - unsetenv ("MALLOC_PERTURB_"); - - /* Repeat a lot of times, to make sure there's no memory leak. */ - for (i = 0; i < 50000; i++) - { - /* Try various values. - n = 0 gave a crash on Alpha with gcc-2.5.8. - Some versions of Mac OS X have a stack size limit of 512 KB. */ - func (34); - func (134); - func (399); - func (510823); - func (129321); - func (0); - func (4070); - func (4095); - func (1); - func (16582); - } - - return 0; -} diff --git a/gnulib/tests/test-mbrtowc-w32-1.sh b/gnulib/tests/test-mbrtowc-w32-1.sh deleted file mode 100755 index 3f12e44..0000000 --- a/gnulib/tests/test-mbrtowc-w32-1.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP1252 locale. -./test-mbrtowc-w32${EXEEXT} French_France 1252 diff --git a/gnulib/tests/test-mbrtowc-w32-2.sh b/gnulib/tests/test-mbrtowc-w32-2.sh deleted file mode 100755 index 9e1a765..0000000 --- a/gnulib/tests/test-mbrtowc-w32-2.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP1256 locale. -./test-mbrtowc-w32${EXEEXT} "Arabic_Saudi Arabia" 1256 diff --git a/gnulib/tests/test-mbrtowc-w32-3.sh b/gnulib/tests/test-mbrtowc-w32-3.sh deleted file mode 100755 index 782c2d0..0000000 --- a/gnulib/tests/test-mbrtowc-w32-3.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP932 locale. -./test-mbrtowc-w32${EXEEXT} Japanese_Japan 932 diff --git a/gnulib/tests/test-mbrtowc-w32-4.sh b/gnulib/tests/test-mbrtowc-w32-4.sh deleted file mode 100755 index 0630f30..0000000 --- a/gnulib/tests/test-mbrtowc-w32-4.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP950 locale. -./test-mbrtowc-w32${EXEEXT} Chinese_Taiwan 950 diff --git a/gnulib/tests/test-mbrtowc-w32-5.sh b/gnulib/tests/test-mbrtowc-w32-5.sh deleted file mode 100755 index 7d7faa9..0000000 --- a/gnulib/tests/test-mbrtowc-w32-5.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP936 locale. -./test-mbrtowc-w32${EXEEXT} Chinese_China 936 diff --git a/gnulib/tests/test-mbrtowc-w32.c b/gnulib/tests/test-mbrtowc-w32.c deleted file mode 100644 index 50006c0..0000000 --- a/gnulib/tests/test-mbrtowc-w32.c +++ /dev/null @@ -1,735 +0,0 @@ -/* Test of conversion of multibyte character to wide character. - 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 - -#include - -#include -#include -#include -#include -#include - -#include "macros.h" - -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - -static int -test_one_locale (const char *name, int codepage) -{ - mbstate_t state; - wchar_t wc; - size_t ret; - -# if 1 - /* Portable code to set the locale. */ - { - char name_with_codepage[1024]; - - sprintf (name_with_codepage, "%s.%d", name, codepage); - - /* Set the locale. */ - if (setlocale (LC_ALL, name_with_codepage) == NULL) - return 77; - } -# else - /* Hacky way to set a locale.codepage combination that setlocale() refuses - to set. */ - { - /* Codepage of the current locale, set with setlocale(). - Not necessarily the same as GetACP(). */ - extern __declspec(dllimport) unsigned int __lc_codepage; - - /* Set the locale. */ - if (setlocale (LC_ALL, name) == NULL) - return 77; - - /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */ - __lc_codepage = codepage; - switch (codepage) - { - case 1252: - case 1256: - MB_CUR_MAX = 1; - break; - case 932: - case 950: - case 936: - MB_CUR_MAX = 2; - break; - case 54936: - case 65001: - MB_CUR_MAX = 4; - break; - } - - /* Test whether the codepage is really available. */ - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1)) - return 77; - } -# endif - - /* Test zero-length input. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "x", 0, &state); - /* gnulib's implementation returns (size_t)(-2). - The AIX 5.1 implementation returns (size_t)(-1). - glibc's implementation returns 0. */ - ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0); - ASSERT (mbsinit (&state)); - } - - /* Test NUL byte input. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "", 1, &state); - ASSERT (ret == 0); - ASSERT (wc == 0); - ASSERT (mbsinit (&state)); - ret = mbrtowc (NULL, "", 1, &state); - ASSERT (ret == 0); - ASSERT (mbsinit (&state)); - } - - /* Test single-byte input. */ - { - int c; - char buf[1]; - - memset (&state, '\0', sizeof (mbstate_t)); - for (c = 0; c < 0x100; c++) - switch (c) - { - case '\t': case '\v': case '\f': - case ' ': case '!': case '"': case '#': case '%': - case '&': case '\'': case '(': case ')': case '*': - case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': - case '?': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': - case '[': case '\\': case ']': case '^': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ - buf[0] = c; - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, buf, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == c); - ASSERT (mbsinit (&state)); - ret = mbrtowc (NULL, buf, 1, &state); - ASSERT (ret == 1); - ASSERT (mbsinit (&state)); - break; - } - } - - /* Test special calling convention, passing a NULL pointer. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, NULL, 5, &state); - ASSERT (ret == 0); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - - switch (codepage) - { - case 1252: - /* Locale encoding is CP1252, an extension of ISO-8859-1. */ - { - char input[] = "B\374\337er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\374'); - ASSERT (wc == 0x00FC); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\337'); - ASSERT (wc == 0x00DF); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - } - return 0; - - case 1256: - /* Locale encoding is CP1256, not the same as ISO-8859-6. */ - { - char input[] = "x\302\341\346y"; /* "xآلوy" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'x'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\302'); - ASSERT (wc == 0x0622); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\341'); - ASSERT (wc == 0x0644); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 2, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\346'); - ASSERT (wc == 0x0648); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'y'); - ASSERT (mbsinit (&state)); - } - return 0; - - case 932: - /* Locale encoding is CP932, similar to Shift_JIS. */ - { - char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '<'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 2, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x65E5); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 4, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x672C); - ASSERT (mbsinit (&state)); - input[4] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x8A9E); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '>'); - ASSERT (mbsinit (&state)); - - /* Test some invalid input. */ - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - } - return 0; - - case 950: - /* Locale encoding is CP950, similar to Big5. */ - { - char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '<'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 2, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x65E5); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 4, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x672C); - ASSERT (mbsinit (&state)); - input[4] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x8A9E); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '>'); - ASSERT (mbsinit (&state)); - - /* Test some invalid input. */ - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - } - return 0; - - case 936: - /* Locale encoding is CP936 = GBK, an extension of GB2312. */ - { - char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '<'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 2, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x65E5); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 4, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x672C); - ASSERT (mbsinit (&state)); - input[4] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x8A9E); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '>'); - ASSERT (mbsinit (&state)); - - /* Test some invalid input. */ - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - } - return 0; - - case 54936: - /* Locale encoding is CP54936 = GB18030. */ - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 7, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x00FC); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 3, 6, &state); - ASSERT (ret == 4); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 6, &state); - ASSERT (ret == 4); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x00DF); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - input[4] = '\0'; - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 8, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - - /* Test some invalid input. */ - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\225\377", 2, &state); /* 0x95 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\201\045", 2, &state); /* 0x81 0x25 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\201\060\377", 3, &state); /* 0x81 0x30 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\201\060\377\064", 4, &state); /* 0x81 0x30 0xFF 0x34 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\201\060\211\072", 4, &state); /* 0x81 0x30 0x89 0x3A */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - } - return 0; - - case 65001: - /* Locale encoding is CP65001 = UTF-8. */ - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 5, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x00FC); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 3, 4, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 4, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (wc == 0x00DF); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - input[4] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 6, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - - /* Test some invalid input. */ - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\377", 1, &state); /* 0xFF */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\303\300", 2, &state); /* 0xC3 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\343\300", 2, &state); /* 0xE3 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\343\300\200", 3, &state); /* 0xE3 0xC0 0x80 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\343\200\300", 3, &state); /* 0xE3 0x80 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\363\300", 2, &state); /* 0xF3 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\363\300\200\200", 4, &state); /* 0xF3 0xC0 0x80 0x80 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\363\200\300", 3, &state); /* 0xF3 0x80 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\363\200\300\200", 4, &state); /* 0xF3 0x80 0xC0 0x80 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "\363\200\200\300", 4, &state); /* 0xF3 0x80 0x80 0xC0 */ - ASSERT (ret == (size_t)-1); - ASSERT (errno == EILSEQ); - } - return 0; - - default: - return 1; - } -} - -int -main (int argc, char *argv[]) -{ - int codepage = atoi (argv[argc - 1]); - int result; - int i; - - result = 77; - for (i = 1; i < argc - 1; i++) - { - int ret = test_one_locale (argv[i], codepage); - - if (ret != 77) - result = ret; - } - - if (result == 77) - { - fprintf (stderr, "Skipping test: found no locale with codepage %d\n", - codepage); - } - return result; -} - -#else - -int -main (int argc, char *argv[]) -{ - fputs ("Skipping test: not a native Windows system\n", stderr); - return 77; -} - -#endif diff --git a/gnulib/tests/test-mbrtowc.c b/gnulib/tests/test-mbrtowc.c deleted file mode 100644 index 02b7841..0000000 --- a/gnulib/tests/test-mbrtowc.c +++ /dev/null @@ -1,343 +0,0 @@ -/* Test of conversion of multibyte character to wide character. - 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 Bruno Haible , 2008. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t, - mbstate_t *)); - -#include -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - mbstate_t state; - wchar_t wc; - size_t ret; - - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - /* Test zero-length input. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "x", 0, &state); - /* gnulib's implementation returns (size_t)(-2). - The AIX 5.1 implementation returns (size_t)(-1). - glibc's implementation returns 0. */ - ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0); - ASSERT (mbsinit (&state)); - } - - /* Test NUL byte input. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, "", 1, &state); - ASSERT (ret == 0); - ASSERT (wc == 0); - ASSERT (mbsinit (&state)); - ret = mbrtowc (NULL, "", 1, &state); - ASSERT (ret == 0); - ASSERT (mbsinit (&state)); - } - - /* Test single-byte input. */ - { - int c; - char buf[1]; - - memset (&state, '\0', sizeof (mbstate_t)); - for (c = 0; c < 0x100; c++) - switch (c) - { - case '\t': case '\v': case '\f': - case ' ': case '!': case '"': case '#': case '%': - case '&': case '\'': case '(': case ')': case '*': - case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': - case '?': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': - case '[': case '\\': case ']': case '^': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ - buf[0] = c; - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, buf, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == c); - ASSERT (mbsinit (&state)); - ret = mbrtowc (NULL, buf, 1, &state); - ASSERT (ret == 1); - ASSERT (mbsinit (&state)); - break; - } - } - - /* Test special calling convention, passing a NULL pointer. */ - { - memset (&state, '\0', sizeof (mbstate_t)); - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, NULL, 5, &state); - ASSERT (ret == 0); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - - if (argc > 1) - switch (argv[1][0]) - { - case '1': - /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ - { - char input[] = "B\374\337er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\374'); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 3, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\337'); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - } - return 0; - - case '2': - /* Locale encoding is UTF-8. */ - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 5, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 3, 4, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 4, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - input[4] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 6, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - } - return 0; - - case '3': - /* Locale encoding is EUC-JP. */ - { - char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '<'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 2, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[3] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 4, 4, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[4] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 5, 3, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '>'); - ASSERT (mbsinit (&state)); - } - return 0; - - case '4': - /* Locale encoding is GB18030. */ - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 2, 7, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[2] = '\0'; - - /* Test support of NULL first argument. */ - ret = mbrtowc (NULL, input + 3, 6, &state); - ASSERT (ret == 4); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 6, &state); - ASSERT (ret == 4); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[3] = '\0'; - input[4] = '\0'; - input[5] = '\0'; - input[6] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 7, 2, &state); - ASSERT (ret == 1); - ASSERT (wc == 'e'); - ASSERT (mbsinit (&state)); - input[5] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 8, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'r'); - ASSERT (mbsinit (&state)); - } - return 0; - } - - return 1; -} diff --git a/gnulib/tests/test-mbrtowc1.sh b/gnulib/tests/test-mbrtowc1.sh deleted file mode 100755 index 3becba3..0000000 --- a/gnulib/tests/test-mbrtowc1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional french locale is installed" - else - echo "Skipping test: no traditional french locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR \ -./test-mbrtowc${EXEEXT} 1 diff --git a/gnulib/tests/test-mbrtowc2.sh b/gnulib/tests/test-mbrtowc2.sh deleted file mode 100755 index 0405aba..0000000 --- a/gnulib/tests/test-mbrtowc2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french Unicode locale is installed" - else - echo "Skipping test: no french Unicode locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR_UTF8 \ -./test-mbrtowc${EXEEXT} 2 diff --git a/gnulib/tests/test-mbrtowc3.sh b/gnulib/tests/test-mbrtowc3.sh deleted file mode 100755 index 63a89a2..0000000 --- a/gnulib/tests/test-mbrtowc3.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific EUC-JP locale is installed. -: ${LOCALE_JA=ja_JP} -if test $LOCALE_JA = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional japanese locale is installed" - else - echo "Skipping test: no traditional japanese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_JA \ -./test-mbrtowc${EXEEXT} 3 diff --git a/gnulib/tests/test-mbrtowc4.sh b/gnulib/tests/test-mbrtowc4.sh deleted file mode 100755 index b299a2c..0000000 --- a/gnulib/tests/test-mbrtowc4.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific GB18030 locale is installed. -: ${LOCALE_ZH_CN=zh_CN.GB18030} -if test $LOCALE_ZH_CN = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no transitional chinese locale is installed" - else - echo "Skipping test: no transitional chinese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_ZH_CN \ -./test-mbrtowc${EXEEXT} 4 diff --git a/gnulib/tests/test-mbsinit.c b/gnulib/tests/test-mbsinit.c deleted file mode 100644 index dae7569..0000000 --- a/gnulib/tests/test-mbsinit.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Test of test for initial conversion state. - 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 Bruno Haible , 2008. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *)); - -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - static mbstate_t state; - - ASSERT (mbsinit (NULL)); - - ASSERT (mbsinit (&state)); - - if (argc > 1) - { - static const char input[1] = "\303"; - wchar_t wc; - size_t ret; - - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (!mbsinit (&state)); - } - - return 0; -} diff --git a/gnulib/tests/test-mbsinit.sh b/gnulib/tests/test-mbsinit.sh deleted file mode 100755 index bbda48d..0000000 --- a/gnulib/tests/test-mbsinit.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french Unicode locale is installed" - else - echo "Skipping test: no french Unicode locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR_UTF8 \ -./test-mbsinit${EXEEXT} diff --git a/gnulib/tests/test-mbsrtowcs.c b/gnulib/tests/test-mbsrtowcs.c deleted file mode 100644 index f93677e..0000000 --- a/gnulib/tests/test-mbsrtowcs.c +++ /dev/null @@ -1,293 +0,0 @@ -/* Test of conversion of string to wide 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 General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2008. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (mbsrtowcs, size_t, (wchar_t *, char const **, size_t, - mbstate_t *)); - -#include -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - mbstate_t state; - wchar_t wc; - size_t ret; - - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - /* Test NUL byte input. */ - { - const char *src; - - memset (&state, '\0', sizeof (mbstate_t)); - - src = ""; - ret = mbsrtowcs (NULL, &src, 0, &state); - ASSERT (ret == 0); - ASSERT (mbsinit (&state)); - - src = ""; - ret = mbsrtowcs (NULL, &src, 1, &state); - ASSERT (ret == 0); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - src = ""; - ret = mbsrtowcs (&wc, &src, 0, &state); - ASSERT (ret == 0); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - - wc = (wchar_t) 0xBADFACE; - src = ""; - ret = mbsrtowcs (&wc, &src, 1, &state); - ASSERT (ret == 0); - ASSERT (wc == 0); - ASSERT (mbsinit (&state)); - } - - if (argc > 1) - { - int unlimited; - - for (unlimited = 0; unlimited < 2; unlimited++) - { - #define BUFSIZE 10 - wchar_t buf[BUFSIZE]; - const char *src; - mbstate_t temp_state; - - { - size_t i; - for (i = 0; i < BUFSIZE; i++) - buf[i] = (wchar_t) 0xBADFACE; - } - - switch (argv[1][0]) - { - case '1': - /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ - { - char input[] = "B\374\337er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == 1); - ASSERT (wctob (wc) == (unsigned char) '\374'); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - - src = input + 2; - temp_state = state; - ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 1, &temp_state); - ASSERT (ret == 3); - ASSERT (src == input + 2); - ASSERT (mbsinit (&state)); - - src = input + 2; - ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 1, &state); - ASSERT (ret == (unlimited ? 3 : 1)); - ASSERT (src == (unlimited ? NULL : input + 3)); - ASSERT (wctob (buf[0]) == (unsigned char) '\337'); - if (unlimited) - { - ASSERT (buf[1] == 'e'); - ASSERT (buf[2] == 'r'); - ASSERT (buf[3] == 0); - ASSERT (buf[4] == (wchar_t) 0xBADFACE); - } - else - ASSERT (buf[1] == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - break; - - case '2': - /* Locale encoding is UTF-8. */ - { - char input[] = "B\303\274\303\237er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - src = input + 2; - temp_state = state; - ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); - ASSERT (ret == 4); - ASSERT (src == input + 2); - ASSERT (!mbsinit (&state)); - - src = input + 2; - ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); - ASSERT (ret == (unlimited ? 4 : 2)); - ASSERT (src == (unlimited ? NULL : input + 5)); - ASSERT (wctob (buf[0]) == EOF); - ASSERT (wctob (buf[1]) == EOF); - if (unlimited) - { - ASSERT (buf[2] == 'e'); - ASSERT (buf[3] == 'r'); - ASSERT (buf[4] == 0); - ASSERT (buf[5] == (wchar_t) 0xBADFACE); - } - else - ASSERT (buf[2] == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - break; - - case '3': - /* Locale encoding is EUC-JP. */ - { - char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == '<'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 2, &state); - ASSERT (ret == 2); - ASSERT (wctob (wc) == EOF); - ASSERT (mbsinit (&state)); - input[1] = '\0'; - input[2] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 3, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[3] = '\0'; - - src = input + 4; - temp_state = state; - ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); - ASSERT (ret == 3); - ASSERT (src == input + 4); - ASSERT (!mbsinit (&state)); - - src = input + 4; - ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); - ASSERT (ret == (unlimited ? 3 : 2)); - ASSERT (src == (unlimited ? NULL : input + 7)); - ASSERT (wctob (buf[0]) == EOF); - ASSERT (wctob (buf[1]) == EOF); - if (unlimited) - { - ASSERT (buf[2] == '>'); - ASSERT (buf[3] == 0); - ASSERT (buf[4] == (wchar_t) 0xBADFACE); - } - else - ASSERT (buf[2] == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - break; - - case '4': - /* Locale encoding is GB18030. */ - { - char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - memset (&state, '\0', sizeof (mbstate_t)); - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input, 1, &state); - ASSERT (ret == 1); - ASSERT (wc == 'B'); - ASSERT (mbsinit (&state)); - input[0] = '\0'; - - wc = (wchar_t) 0xBADFACE; - ret = mbrtowc (&wc, input + 1, 1, &state); - ASSERT (ret == (size_t)(-2)); - ASSERT (wc == (wchar_t) 0xBADFACE); - ASSERT (!mbsinit (&state)); - input[1] = '\0'; - - src = input + 2; - temp_state = state; - ret = mbsrtowcs (NULL, &src, unlimited ? BUFSIZE : 2, &temp_state); - ASSERT (ret == 4); - ASSERT (src == input + 2); - ASSERT (!mbsinit (&state)); - - src = input + 2; - ret = mbsrtowcs (buf, &src, unlimited ? BUFSIZE : 2, &state); - ASSERT (ret == (unlimited ? 4 : 2)); - ASSERT (src == (unlimited ? NULL : input + 7)); - ASSERT (wctob (buf[0]) == EOF); - ASSERT (wctob (buf[1]) == EOF); - if (unlimited) - { - ASSERT (buf[2] == 'e'); - ASSERT (buf[3] == 'r'); - ASSERT (buf[4] == 0); - ASSERT (buf[5] == (wchar_t) 0xBADFACE); - } - else - ASSERT (buf[2] == (wchar_t) 0xBADFACE); - ASSERT (mbsinit (&state)); - } - break; - - default: - return 1; - } - } - - return 0; - } - - return 1; -} diff --git a/gnulib/tests/test-mbsrtowcs1.sh b/gnulib/tests/test-mbsrtowcs1.sh deleted file mode 100755 index 01916e7..0000000 --- a/gnulib/tests/test-mbsrtowcs1.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional french locale is installed" - else - echo "Skipping test: no traditional french locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR \ -./test-mbsrtowcs${EXEEXT} 1 diff --git a/gnulib/tests/test-mbsrtowcs2.sh b/gnulib/tests/test-mbsrtowcs2.sh deleted file mode 100755 index f72ceb6..0000000 --- a/gnulib/tests/test-mbsrtowcs2.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no french Unicode locale is installed" - else - echo "Skipping test: no french Unicode locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_FR_UTF8 \ -./test-mbsrtowcs${EXEEXT} 2 diff --git a/gnulib/tests/test-mbsrtowcs3.sh b/gnulib/tests/test-mbsrtowcs3.sh deleted file mode 100755 index b3c01d4..0000000 --- a/gnulib/tests/test-mbsrtowcs3.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific EUC-JP locale is installed. -: ${LOCALE_JA=ja_JP} -if test $LOCALE_JA = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no traditional japanese locale is installed" - else - echo "Skipping test: no traditional japanese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_JA \ -./test-mbsrtowcs${EXEEXT} 3 diff --git a/gnulib/tests/test-mbsrtowcs4.sh b/gnulib/tests/test-mbsrtowcs4.sh deleted file mode 100755 index 226d6ff..0000000 --- a/gnulib/tests/test-mbsrtowcs4.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -# Test whether a specific GB18030 locale is installed. -: ${LOCALE_ZH_CN=zh_CN.GB18030} -if test $LOCALE_ZH_CN = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no transitional chinese locale is installed" - else - echo "Skipping test: no transitional chinese locale is supported" - fi - exit 77 -fi - -LC_ALL=$LOCALE_ZH_CN \ -./test-mbsrtowcs${EXEEXT} 4 diff --git a/gnulib/tests/test-memchr.c b/gnulib/tests/test-memchr.c deleted file mode 100644 index 1298c27..0000000 --- a/gnulib/tests/test-memchr.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - * 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 (memchr, void *, (void const *, int, size_t)); - -#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 MEMCHR (char *) memchr - -int -main (void) -{ - size_t n = 0x100000; - char *input = malloc (n); - 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'; - - /* Basic behavior tests. */ - ASSERT (MEMCHR (input, 'a', n) == input); - - ASSERT (MEMCHR (input, 'a', 0) == NULL); - ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL); - - ASSERT (MEMCHR (input, 'b', n) == input + 1); - ASSERT (MEMCHR (input, 'c', n) == input + 2); - ASSERT (MEMCHR (input, 'd', n) == input + 1026); - - ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1); - ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2); - ASSERT (MEMCHR (input + 1, 0x789abc00 | 'e', n - 1) == input + n - 2); - - ASSERT (MEMCHR (input, 'f', n) == NULL); - ASSERT (MEMCHR (input, '\0', n) == NULL); - - /* 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 (MEMCHR (input, 'c', n) == input + 2); - } - } - - /* 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 (MEMCHR (input + i, j, 256) == input + i + j); - } - } - } - - /* Check that memchr() does not read past the first occurrence of the - byte being searched. See the Austin Group's clarification - . - Test both '\0' and something else, since some implementations - special-case searching for NUL. - */ - { - char *page_boundary = (char *) zerosize_ptr (); - /* Too small, and we miss cache line boundary tests; too large, - and the test takes cubically longer to complete. */ - int limit = 257; - - if (page_boundary != NULL) - { - for (n = 1; n <= limit; n++) - { - char *mem = page_boundary - n; - memset (mem, 'X', n); - ASSERT (MEMCHR (mem, 'U', n) == NULL); - ASSERT (MEMCHR (mem, 0, n) == NULL); - - { - size_t i; - size_t k; - - for (i = 0; i < n; i++) - { - mem[i] = 'U'; - for (k = i + 1; k < n + limit; k++) - ASSERT (MEMCHR (mem, 'U', k) == mem + i); - mem[i] = 0; - for (k = i + 1; k < n + limit; k++) - ASSERT (MEMCHR (mem, 0, k) == mem + i); - mem[i] = 'X'; - } - } - } - } - } - - free (input); - - return 0; -} diff --git a/gnulib/tests/test-nl_langinfo.c b/gnulib/tests/test-nl_langinfo.c deleted file mode 100644 index d3384f4..0000000 --- a/gnulib/tests/test-nl_langinfo.c +++ /dev/null @@ -1,126 +0,0 @@ -/* Test of nl_langinfo replacement. - 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 . */ - -/* Written by Bruno Haible , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (nl_langinfo, char *, (nl_item)); - -#include -#include -#include - -#include "c-strcase.h" -#include "macros.h" - -/* For GCC >= 4.3, silence the warnings - "comparison of unsigned expression >= 0 is always true" - in this file. */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) -# pragma GCC diagnostic ignored "-Wtype-limits" -#endif - -int -main (int argc, char *argv[]) -{ - int pass = atoi (argv[1]); - /* pass locale - 0 C - 1 traditional French locale - 2 French UTF-8 locale - */ - - setlocale (LC_ALL, ""); - - /* nl_langinfo items of the LC_CTYPE category */ - ASSERT (strlen (nl_langinfo (CODESET)) > 0); - if (pass == 2) - { - const char *codeset = nl_langinfo (CODESET); - ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0); - } - /* nl_langinfo items of the LC_NUMERIC category */ - ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0); - ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0); - /* nl_langinfo items of the LC_TIME category */ - ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0); - ASSERT (strlen (nl_langinfo (D_FMT)) > 0); - ASSERT (strlen (nl_langinfo (T_FMT)) > 0); - ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0)); - ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0)); - ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0)); - ASSERT (strlen (nl_langinfo (DAY_1)) > 0); - ASSERT (strlen (nl_langinfo (DAY_2)) > 0); - ASSERT (strlen (nl_langinfo (DAY_3)) > 0); - ASSERT (strlen (nl_langinfo (DAY_4)) > 0); - ASSERT (strlen (nl_langinfo (DAY_5)) > 0); - ASSERT (strlen (nl_langinfo (DAY_6)) > 0); - ASSERT (strlen (nl_langinfo (DAY_7)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0); - ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0); - ASSERT (strlen (nl_langinfo (MON_1)) > 0); - ASSERT (strlen (nl_langinfo (MON_2)) > 0); - ASSERT (strlen (nl_langinfo (MON_3)) > 0); - ASSERT (strlen (nl_langinfo (MON_4)) > 0); - ASSERT (strlen (nl_langinfo (MON_5)) > 0); - ASSERT (strlen (nl_langinfo (MON_6)) > 0); - ASSERT (strlen (nl_langinfo (MON_7)) > 0); - ASSERT (strlen (nl_langinfo (MON_8)) > 0); - ASSERT (strlen (nl_langinfo (MON_9)) > 0); - ASSERT (strlen (nl_langinfo (MON_10)) > 0); - ASSERT (strlen (nl_langinfo (MON_11)) > 0); - ASSERT (strlen (nl_langinfo (MON_12)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_1)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_2)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_3)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_4)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_5)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_6)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_7)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_8)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_9)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_10)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_11)) > 0); - ASSERT (strlen (nl_langinfo (ABMON_12)) > 0); - ASSERT (strlen (nl_langinfo (ERA)) >= 0); - ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0); - ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0); - ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0); - ASSERT (nl_langinfo (ALT_DIGITS) != NULL); - /* nl_langinfo items of the LC_MONETARY category */ - { - const char *currency = nl_langinfo (CRNCYSTR); - ASSERT (strlen (currency) >= 0); -#if !defined __NetBSD__ - if (pass > 0) - ASSERT (strlen (currency) >= 1); -#endif - } - /* nl_langinfo items of the LC_MESSAGES category */ - ASSERT (strlen (nl_langinfo (YESEXPR)) > 0); - ASSERT (strlen (nl_langinfo (NOEXPR)) > 0); - - return 0; -} diff --git a/gnulib/tests/test-nl_langinfo.sh b/gnulib/tests/test-nl_langinfo.sh deleted file mode 100755 index 3168f42..0000000 --- a/gnulib/tests/test-nl_langinfo.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1 - -# Test whether a specific traditional locale is installed. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR != none; then - LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1 -fi - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 != none; then - LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1 -fi - -exit 0 diff --git a/gnulib/tests/test-open.c b/gnulib/tests/test-open.c deleted file mode 100644 index b9ec9bf..0000000 --- a/gnulib/tests/test-open.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Test of opening a file descriptor. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (open, int, (char const *, int, ...)); - -#include -#include -#include -#include - -#include "macros.h" - -#define BASE "test-open.t" - -#include "test-open.h" - -int -main (void) -{ - return test_open (open, true); -} diff --git a/gnulib/tests/test-open.h b/gnulib/tests/test-open.h deleted file mode 100644 index cab1d27..0000000 --- a/gnulib/tests/test-open.h +++ /dev/null @@ -1,93 +0,0 @@ -/* Test of opening a file descriptor. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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. */ - -/* This file is designed to test both open(n,buf[,mode]) and - openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test. - Assumes that BASE and ASSERT are already defined, and that - appropriate headers are already included. If PRINT, warn before - skipping symlink tests with status 77. */ - -static int -test_open (int (*func) (char const *, int, ...), bool print) -{ - int fd; - /* Remove anything from prior partial run. */ - unlink (BASE "file"); - - /* Cannot create directory. */ - errno = 0; - ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1); - ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT - || errno == EINVAL); - - /* Create a regular file. */ - fd = func (BASE "file", O_CREAT | O_RDONLY, 0600); - ASSERT (0 <= fd); - ASSERT (close (fd) == 0); - - /* Trailing slash handling. */ - errno = 0; - ASSERT (func (BASE "file/", O_RDONLY) == -1); - ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); - - /* Directories cannot be opened for writing. */ - errno = 0; - ASSERT (func (".", O_WRONLY) == -1); - ASSERT (errno == EISDIR || errno == EACCES); - - /* /dev/null must exist, and be writable. */ - fd = func ("/dev/null", O_RDONLY); - ASSERT (0 <= fd); - { - char c; - ASSERT (read (fd, &c, 1) == 0); - } - ASSERT (close (fd) == 0); - fd = func ("/dev/null", O_WRONLY); - ASSERT (0 <= fd); - 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) - { - ASSERT (unlink (BASE "file") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - errno = 0; - ASSERT (func (BASE "link/", O_RDONLY) == -1); - ASSERT (errno == ENOTDIR); - fd = func (BASE "link", O_RDONLY); - ASSERT (0 <= fd); - ASSERT (close (fd) == 0); - - /* Cleanup. */ - ASSERT (unlink (BASE "file") == 0); - ASSERT (unlink (BASE "link") == 0); - - return 0; -} diff --git a/gnulib/tests/test-pathmax.c b/gnulib/tests/test-pathmax.c deleted file mode 100644 index c6d0ccc..0000000 --- a/gnulib/tests/test-pathmax.c +++ /dev/null @@ -1,32 +0,0 @@ -/* 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 deleted file mode 100644 index 9e31500..0000000 --- a/gnulib/tests/test-rawmemchr.c +++ /dev/null @@ -1,92 +0,0 @@ -/* - * 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 deleted file mode 100644 index d755182..0000000 --- a/gnulib/tests/test-readlink.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Tests of readlink. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t)); - -#include -#include -#include -#include -#include -#include -#include - -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-readlink.t" - -#include "test-readlink.h" - -int -main (void) -{ - /* Remove any leftovers from a previous partial run. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_readlink (readlink, true); -} diff --git a/gnulib/tests/test-readlink.h b/gnulib/tests/test-readlink.h deleted file mode 100644 index 284152a..0000000 --- a/gnulib/tests/test-readlink.h +++ /dev/null @@ -1,119 +0,0 @@ -/* Tests of readlink. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -/* This file is designed to test both readlink(a,b,c) and - readlinkat(AT_FDCWD,a,b,c). FUNC is the function to test. Assumes - that BASE and ASSERT are already defined, and that appropriate - headers are already included. If PRINT, warn before skipping - symlink tests with status 77. */ - -static int -test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print) -{ - char buf[80]; - - /* Sanity checks of failures. Mingw lacks symlink, but readlink can - still distinguish between various errors. */ - memset (buf, 0xff, sizeof buf); - errno = 0; - ASSERT (func ("no_such", buf, sizeof buf) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("no_such/", buf, sizeof buf) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("", buf, sizeof buf) == -1); - ASSERT (errno == ENOENT || errno == EINVAL); - errno = 0; - ASSERT (func (".", buf, sizeof buf) == -1); - ASSERT (errno == EINVAL); - errno = 0; - ASSERT (func ("./", buf, sizeof buf) == -1); - ASSERT (errno == EINVAL); - ASSERT (close (creat (BASE "file", 0600)) == 0); - errno = 0; - ASSERT (func (BASE "file", buf, sizeof buf) == -1); - ASSERT (errno == EINVAL); - errno = 0; - ASSERT (func (BASE "file/", buf, sizeof buf) == -1); - ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */ - - /* Now test actual symlinks. */ - if (symlink (BASE "dir", BASE "link")) - { - ASSERT (unlink (BASE "file") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - ASSERT (mkdir (BASE "dir", 0700) == 0); - errno = 0; - ASSERT (func (BASE "link/", buf, sizeof buf) == -1); - ASSERT (errno == EINVAL); - ASSERT (symlink (BASE "link", BASE "link2") == 0); - errno = 0; - ASSERT (func (BASE "link2/", buf, sizeof buf) == -1); - ASSERT (errno == EINVAL); - ASSERT (unlink (BASE "link2") == 0); - ASSERT (symlink (BASE "file", BASE "link2") == 0); - errno = 0; - ASSERT (func (BASE "link2/", buf, sizeof buf) == -1); - ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */ - ASSERT (unlink (BASE "file") == 0); - ASSERT (unlink (BASE "link2") == 0); - { - /* Up till now, no readlink has been successful, so buf should be - unchanged. */ - int i; - for (i = 0; i < sizeof buf; i++) - ASSERT (buf[i] == (char) 0xff); - } - { - size_t len = strlen (BASE "dir"); - /* When passing too small of a buffer, expect the truncated - length, or an ERANGE failure. However, a size of 0 is not - portable enough to test. */ - ssize_t result; - errno = 0; - result = readlink (BASE "link", buf, 1); - if (result == -1) - { - ASSERT (errno == ERANGE); - ASSERT (buf[0] == (char) 0xff); - } - else - { - ASSERT (result == 1); - ASSERT (buf[0] == BASE[0]); - } - ASSERT (buf[1] == (char) 0xff); - ASSERT (func (BASE "link", buf, len) == len); - ASSERT (strncmp (buf, BASE "dir", len) == 0); - ASSERT (buf[len] == (char) 0xff); - ASSERT (func (BASE "link", buf, sizeof buf) == len); - ASSERT (strncmp (buf, BASE "dir", len) == 0); - /* POSIX says rest of buf is unspecified; but in practice, it is - either left alone, or NUL-terminated. */ - ASSERT (buf[len] == '\0' || buf[len] == (char) 0xff); - } - ASSERT (rmdir (BASE "dir") == 0); - ASSERT (unlink (BASE "link") == 0); - - return 0; -} diff --git a/gnulib/tests/test-safe-alloc.c b/gnulib/tests/test-safe-alloc.c deleted file mode 100644 index 36a4be9..0000000 --- a/gnulib/tests/test-safe-alloc.c +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Test the safe-alloc macros - * - * 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 - * License as published by the Free Software Foundation; either - * version 3.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, see . - * - * Author: David Lutterkort - */ - -#include - -#include "safe-alloc.h" - -#include "macros.h" - -int -main () -{ - struct tst - { - int a; - int b; - }; - - struct tst *p = NULL; - int r; - - r = ALLOC (p); - ASSERT (r >= 0); - - ASSERT (p->a == 0 && p->b == 0); - - p->a = p->b = 42; - r = REALLOC_N (p, 5); - - ASSERT (p[0].a == 42 && p[0].b == 42); - - FREE (p); - ASSERT (p == NULL); - - return 0; -} diff --git a/gnulib/tests/test-setenv.c b/gnulib/tests/test-setenv.c deleted file mode 100644 index 4752a11..0000000 --- a/gnulib/tests/test-setenv.c +++ /dev/null @@ -1,56 +0,0 @@ -/* Tests of setenv. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (setenv, int, (char const *, char const *, int)); - -#include -#include -#include - -#include "macros.h" - -int -main (void) -{ - /* Test overwriting. */ - ASSERT (setenv ("a", "==", -1) == 0); - ASSERT (setenv ("a", "2", 0) == 0); - ASSERT (strcmp (getenv ("a"), "==") == 0); - - /* Required to fail with EINVAL. */ - errno = 0; - ASSERT (setenv ("", "", 1) == -1); - ASSERT (errno == EINVAL); - errno = 0; - ASSERT (setenv ("a=b", "", 0) == -1); - ASSERT (errno == EINVAL); -#if 0 - /* glibc and gnulib's implementation guarantee this, but POSIX no - longer requires it: http://austingroupbugs.net/view.php?id=185 */ - errno = 0; - ASSERT (setenv (NULL, "", 0) == -1); - ASSERT (errno == EINVAL); -#endif - - return 0; -} diff --git a/gnulib/tests/test-setlocale1.c b/gnulib/tests/test-setlocale1.c deleted file mode 100644 index 08f9224..0000000 --- a/gnulib/tests/test-setlocale1.c +++ /dev/null @@ -1,59 +0,0 @@ -/* Test of setting the current locale. - 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 (setlocale, char *, (int, const char *)); - -#include -#include - -#include "macros.h" - -int -main (int argc, char *argv[]) -{ - char *name1; - char *name2; - - /* Try to set the locale by implicitly looking at the LC_ALL environment - variable. - configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - name1 = strdup (setlocale (LC_ALL, NULL)); - - /* Reset the locale. */ - if (setlocale (LC_ALL, "C") == NULL) - return 1; - - /* Try to set the locale by explicitly looking at the LC_ALL environment - variable. - configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL) - return 1; - - name2 = strdup (setlocale (LC_ALL, NULL)); - - /* Test that the two results are the same. */ - ASSERT (strcmp (name1, name2) == 0); - - return 0; -} diff --git a/gnulib/tests/test-setlocale1.sh b/gnulib/tests/test-setlocale1.sh deleted file mode 100755 index 59a0532..0000000 --- a/gnulib/tests/test-setlocale1.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh - -: ${LOCALE_FR=fr_FR} -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -: ${LOCALE_JA=ja_JP} -: ${LOCALE_ZH_CN=zh_CN.GB18030} - -if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none \ - && test $LOCALE_JA = none && test $LOCALE_ZH_CN = none; then - if test -f /usr/bin/localedef; then - echo "Skipping test: no locale for testing is installed" - else - echo "Skipping test: no locale for testing is supported" - fi - exit 77 -fi - -if test $LOCALE_FR != none; then - LC_ALL=$LOCALE_FR ./test-setlocale1${EXEEXT} || exit 1 -fi - -if test $LOCALE_FR_UTF8 != none; then - LC_ALL=$LOCALE_FR_UTF8 ./test-setlocale1${EXEEXT} || exit 1 -fi - -if test $LOCALE_JA != none; then - LC_ALL=$LOCALE_JA ./test-setlocale1${EXEEXT} || exit 1 -fi - -if test $LOCALE_ZH_CN != none; then - LC_ALL=$LOCALE_ZH_CN ./test-setlocale1${EXEEXT} || exit 1 -fi - -exit 0 diff --git a/gnulib/tests/test-setlocale2.c b/gnulib/tests/test-setlocale2.c deleted file mode 100644 index 7416647..0000000 --- a/gnulib/tests/test-setlocale2.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Test of setting the current locale. - 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 -#include -#include - -int -main () -{ - /* Try to set the locale by implicitly looking at the LC_ALL environment - variable. */ - if (setlocale (LC_ALL, "") != NULL) - /* It was successful. Check whether LC_CTYPE is non-trivial. */ - if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - { - fprintf (stderr, "setlocale did not fail for implicit %s\n", - getenv ("LC_ALL")); - return 1; - } - - /* Reset the locale. */ - if (setlocale (LC_ALL, "C") == NULL) - return 1; - - /* Try to set the locale by explicitly looking at the LC_ALL environment - variable. */ - if (setlocale (LC_ALL, getenv ("LC_ALL")) != NULL) - /* It was successful. Check whether LC_CTYPE is non-trivial. */ - if (strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) - { - fprintf (stderr, "setlocale did not fail for explicit %s\n", - getenv ("LC_ALL")); - return 1; - } - - return 0; -} diff --git a/gnulib/tests/test-setlocale2.sh b/gnulib/tests/test-setlocale2.sh deleted file mode 100755 index 904e147..0000000 --- a/gnulib/tests/test-setlocale2.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# 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 - 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 - # 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 deleted file mode 100644 index db9adf9..0000000 --- a/gnulib/tests/test-stat.c +++ /dev/null @@ -1,55 +0,0 @@ -/* Tests of stat. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -/* Caution: stat may be a function-like macro. Although this - signature check must pass, it may be the signature of the real (and - broken) stat rather than rpl_stat. Most code should not use the - address of stat. */ -#include "signature.h" -SIGNATURE_CHECK (stat, int, (char const *, struct stat *)); - -#include -#include -#include -#include -#include - -#include "same-inode.h" -#include "macros.h" - -#define BASE "test-stat.t" - -#include "test-stat.h" - -/* Wrapper around stat, which works even if stat is a function-like - macro, where test_stat_func(stat) would do the wrong thing. */ -static int -do_stat (char const *name, struct stat *st) -{ - return stat (name, st); -} - -int -main (void) -{ - return test_stat_func (do_stat, true); -} diff --git a/gnulib/tests/test-stat.h b/gnulib/tests/test-stat.h deleted file mode 100644 index 2c9afc0..0000000 --- a/gnulib/tests/test-stat.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Tests of stat. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -/* This file is designed to test both stat(n,buf) and - fstatat(AT_FDCWD,n,buf,0). FUNC is the function to test. Assumes - that BASE and ASSERT are already defined, and that appropriate - headers are already included. If PRINT, warn before skipping - symlink tests with status 77. */ - -static int -test_stat_func (int (*func) (char const *, struct stat *), bool print) -{ - struct stat st1; - struct stat st2; - char *cwd = getcwd (NULL, 0); - - ASSERT (cwd); - ASSERT (func (".", &st1) == 0); - ASSERT (func ("./", &st2) == 0); - ASSERT (SAME_INODE (st1, st2)); - ASSERT (func (cwd, &st2) == 0); - ASSERT (SAME_INODE (st1, st2)); - ASSERT (func ("/", &st1) == 0); - ASSERT (func ("///", &st2) == 0); - ASSERT (SAME_INODE (st1, st2)); - - errno = 0; - ASSERT (func ("", &st1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("nosuch", &st1) == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("nosuch/", &st1) == -1); - ASSERT (errno == ENOENT); - - ASSERT (close (creat (BASE "file", 0600)) == 0); - ASSERT (func (BASE "file", &st1) == 0); - errno = 0; - ASSERT (func (BASE "file/", &st1) == -1); - ASSERT (errno == ENOTDIR); - - /* Now for some symlink tests, where supported. We set up: - link1 -> directory - link2 -> file - link3 -> dangling - link4 -> loop - then test behavior with trailing slash. - */ - if (symlink (".", BASE "link1") != 0) - { - ASSERT (unlink (BASE "file") == 0); - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - ASSERT (symlink (BASE "file", BASE "link2") == 0); - ASSERT (symlink (BASE "nosuch", BASE "link3") == 0); - ASSERT (symlink (BASE "link4", BASE "link4") == 0); - - ASSERT (func (BASE "link1/", &st1) == 0); - ASSERT (S_ISDIR (st1.st_mode)); - - errno = 0; - ASSERT (func (BASE "link2/", &st1) == -1); - ASSERT (errno == ENOTDIR); - - errno = 0; - ASSERT (func (BASE "link3/", &st1) == -1); - ASSERT (errno == ENOENT); - - errno = 0; - ASSERT (func (BASE "link4/", &st1) == -1); - ASSERT (errno == ELOOP); - - /* Cleanup. */ - ASSERT (unlink (BASE "file") == 0); - ASSERT (unlink (BASE "link1") == 0); - ASSERT (unlink (BASE "link2") == 0); - ASSERT (unlink (BASE "link3") == 0); - ASSERT (unlink (BASE "link4") == 0); - - return 0; -} diff --git a/gnulib/tests/test-stdbool.c b/gnulib/tests/test-stdbool.c deleted file mode 100644 index c22ca1f..0000000 --- a/gnulib/tests/test-stdbool.c +++ /dev/null @@ -1,118 +0,0 @@ -/* Test of substitute. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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. */ - -/* We want this test to succeed even when using gcc's -Werror; but to - do that requires a pragma that didn't exist before 4.3.0. */ -#ifndef __GNUC__ -# define ADDRESS_CHECK_OKAY -#elif __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) -/* No way to silence -Waddress. */ -#else -# pragma GCC diagnostic ignored "-Waddress" -# define ADDRESS_CHECK_OKAY -#endif - -#include - -#include - -#ifndef bool - "error: bool is not defined" -#endif -#ifndef false - "error: false is not defined" -#endif -#if false - "error: false is not 0" -#endif -#ifndef true - "error: true is not defined" -#endif -#if true != 1 - "error: true is not 1" -#endif -#ifndef __bool_true_false_are_defined - "error: __bool_true_false_are_defined is not defined" -#endif - -/* Several tests cannot be guaranteed with gnulib's , at - least, not for all compilers and compiler options. */ -#if HAVE_STDBOOL_H || 3 <= __GNUC__ -struct s { _Bool s: 1; _Bool t; } s; -#endif - -char a[true == 1 ? 1 : -1]; -char b[false == 0 ? 1 : -1]; -char c[__bool_true_false_are_defined == 1 ? 1 : -1]; -#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ -char d[(bool) 0.5 == true ? 1 : -1]; -# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */ -/* C99 may plausibly be interpreted as not requiring support for a cast from - a variable's address to bool in a static initializer. So treat it like a - GCC extension. */ -# ifdef __GNUC__ -bool e = &s; -# endif -# endif -char f[(_Bool) 0.0 == false ? 1 : -1]; -#endif -char g[true]; -char h[sizeof (_Bool)]; -#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ -char i[sizeof s.t]; -#endif -enum { j = false, k = true, l = false * true, m = true * 256 }; -_Bool n[m]; -char o[sizeof n == m * sizeof n[0] ? 1 : -1]; -char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; -/* Catch a bug in an HP-UX C compiler. See - http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html - http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html - */ -_Bool q = true; -_Bool *pq = &q; - -int -main () -{ - int error = 0; - -#if HAVE_STDBOOL_H || 3 <= __GNUC__ /* See above. */ -# ifdef ADDRESS_CHECK_OKAY /* Avoid gcc warning. */ - /* A cast from a variable's address to bool is valid in expressions. */ - { - bool e1 = &s; - if (!e1) - error = 1; - } -# endif -#endif - - /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0 - reported by James Lemley on 2005-10-05; see - http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html - This is a runtime test, since a corresponding compile-time - test would rely on initializer extensions. */ - { - char digs[] = "0123456789"; - if (&(digs + 5)[-2 + (bool) 1] != &digs[4]) - error = 1; - } - - return error; -} diff --git a/gnulib/tests/test-stddef.c b/gnulib/tests/test-stddef.c deleted file mode 100644 index d7237b3..0000000 --- a/gnulib/tests/test-stddef.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Test of substitute. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "verify.h" - -/* Check that appropriate types are defined. */ -wchar_t a = 'c'; -ptrdiff_t b = 1; -size_t c = 2; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that offsetof produces integer constants with correct type. */ -struct d -{ - char e; - char f; -}; -/* Solaris 10 has a bug where offsetof is under-parenthesized, and - cannot be used as an arbitrary expression. However, since it is - unlikely to bite real code, we ignore that short-coming. */ -/* verify (sizeof offsetof (struct d, e) == sizeof (size_t)); */ -verify (sizeof (offsetof (struct d, e)) == sizeof (size_t)); -verify (offsetof (struct d, e) < -1); /* Must be unsigned. */ -verify (offsetof (struct d, f) == 1); - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-stdint.c b/gnulib/tests/test-stdint.c deleted file mode 100644 index 23b2b28..0000000 --- a/gnulib/tests/test-stdint.c +++ /dev/null @@ -1,359 +0,0 @@ -/* Test of substitute. - 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 - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 , 2006. */ - -#include - -/* Whether to enable pedantic checks. */ -#define DO_PEDANTIC 0 - -#include - -#include "verify.h" -#include "intprops.h" - -#if __GNUC__ >= 2 && DO_PEDANTIC -# define verify_same_types(expr1,expr2) \ - extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \ - extern void _verify_func(__LINE__) (__typeof__ (expr2) *); -# define _verify_func(line) _verify_func2(line) -# define _verify_func2(line) verify_func_ ## line -#else -# define verify_same_types(expr1,expr2) extern void verify_func (int) -#endif - -/* 7.18.1.1. Exact-width integer types */ -/* 7.18.2.1. Limits of exact-width integer types */ - -int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX }; -verify (TYPE_MINIMUM (int8_t) == INT8_MIN); -verify (TYPE_MAXIMUM (int8_t) == INT8_MAX); -verify_same_types (INT8_MIN, (int8_t) 0 + 0); -verify_same_types (INT8_MAX, (int8_t) 0 + 0); - -int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX }; -verify (TYPE_MINIMUM (int16_t) == INT16_MIN); -verify (TYPE_MAXIMUM (int16_t) == INT16_MAX); -verify_same_types (INT16_MIN, (int16_t) 0 + 0); -verify_same_types (INT16_MAX, (int16_t) 0 + 0); - -int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX }; -verify (TYPE_MINIMUM (int32_t) == INT32_MIN); -verify (TYPE_MAXIMUM (int32_t) == INT32_MAX); -verify_same_types (INT32_MIN, (int32_t) 0 + 0); -verify_same_types (INT32_MAX, (int32_t) 0 + 0); - -#ifdef INT64_MAX -int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX }; -verify (TYPE_MINIMUM (int64_t) == INT64_MIN); -verify (TYPE_MAXIMUM (int64_t) == INT64_MAX); -verify_same_types (INT64_MIN, (int64_t) 0 + 0); -verify_same_types (INT64_MAX, (int64_t) 0 + 0); -#endif - -uint8_t b1[2] = { UINT8_C (17), UINT8_MAX }; -verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX); -verify_same_types (UINT8_MAX, (uint8_t) 0 + 0); - -uint16_t b2[2] = { UINT16_C (17), UINT16_MAX }; -verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX); -verify_same_types (UINT16_MAX, (uint16_t) 0 + 0); - -uint32_t b3[2] = { UINT32_C (17), UINT32_MAX }; -verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX); -verify_same_types (UINT32_MAX, (uint32_t) 0 + 0); - -#ifdef UINT64_MAX -uint64_t b4[2] = { UINT64_C (17), UINT64_MAX }; -verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX); -verify_same_types (UINT64_MAX, (uint64_t) 0 + 0); -#endif - -#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT8_MAX && UINT16_MAX && UINT32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.2. Minimum-width integer types */ -/* 7.18.2.2. Limits of minimum-width integer types */ - -int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX }; -verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN); -verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX); -verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0); -verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0); - -int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX }; -verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN); -verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX); -verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0); -verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0); - -int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX }; -verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN); -verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX); -verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0); -verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0); - -#ifdef INT_LEAST64_MAX -int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX }; -verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN); -verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX); -verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0); -verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0); -#endif - -uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX }; -verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX); -verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0); - -uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX }; -verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX); -verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0); - -uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX }; -verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX); -verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0); - -#ifdef UINT_LEAST64_MAX -uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX }; -verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX); -verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0); -#endif - -#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.3. Fastest minimum-width integer types */ -/* 7.18.2.3. Limits of fastest minimum-width integer types */ - -int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX }; -verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN); -verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX); -verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0); -verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0); - -int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX }; -verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN); -verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX); -verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0); -verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0); - -int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX }; -verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN); -verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX); -verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0); -verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0); - -#ifdef INT_FAST64_MAX -int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX }; -verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN); -verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX); -verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0); -verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0); -#endif - -uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX }; -verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX); -verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0); - -uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX }; -verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX); -verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0); - -uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX }; -verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX); -verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0); - -#ifdef UINT_FAST64_MAX -uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX }; -verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX); -verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0); -#endif - -#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX -/* ok */ -#else -err or; -#endif - -#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.4. Integer types capable of holding object pointers */ -/* 7.18.2.4. Limits of integer types capable of holding object pointers */ - -intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX }; -verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN); -verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX); -verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0); -verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0); - -uintptr_t h[2] = { 17, UINTPTR_MAX }; -verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX); -verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0); - -#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX -/* ok */ -#else -err or; -#endif - -/* 7.18.1.5. Greatest-width integer types */ -/* 7.18.2.5. Limits of greatest-width integer types */ - -intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX }; -verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN); -verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX); -verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0); -verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0); - -uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX }; -verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX); -verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0); - -/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in - the preprocessor. */ -#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__)) -#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX -/* ok */ -#else -err or; -#endif -#endif - -/* 7.18.3. Limits of other integer types */ - -#include - -verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN); -verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX); -verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0); -verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0); - -#if PTRDIFF_MIN && PTRDIFF_MAX -/* ok */ -#else -err or; -#endif - -#include - -verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN); -verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX); -verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0); -verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0); - -#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX -/* ok */ -#else -err or; -#endif - -verify (TYPE_MAXIMUM (size_t) == SIZE_MAX); -verify_same_types (SIZE_MAX, (size_t) 0 + 0); - -#if SIZE_MAX -/* ok */ -#else -err or; -#endif - -#if HAVE_WCHAR_T -verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN); -verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX); -verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0); -verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0); - -# if WCHAR_MIN != 17 && WCHAR_MAX -/* ok */ -# else -err or; -# endif -#endif - -#if HAVE_WINT_T -# include - -verify (TYPE_MINIMUM (wint_t) == WINT_MIN); -verify (TYPE_MAXIMUM (wint_t) == WINT_MAX); -verify_same_types (WINT_MIN, (wint_t) 0 + 0); -verify_same_types (WINT_MAX, (wint_t) 0 + 0); - -# if WINT_MIN != 17 && WINT_MAX -/* ok */ -# else -err or; -# endif -#endif - -/* 7.18.4. Macros for integer constants */ - -verify (INT8_C (17) == 17); -verify_same_types (INT8_C (17), (int_least8_t)0 + 0); -verify (UINT8_C (17) == 17); -verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0); - -verify (INT16_C (17) == 17); -verify_same_types (INT16_C (17), (int_least16_t)0 + 0); -verify (UINT16_C (17) == 17); -verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0); - -verify (INT32_C (17) == 17); -verify_same_types (INT32_C (17), (int_least32_t)0 + 0); -verify (UINT32_C (17) == 17); -verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0); - -#ifdef INT64_C -verify (INT64_C (17) == 17); -verify_same_types (INT64_C (17), (int_least64_t)0 + 0); -#endif -#ifdef UINT64_C -verify (UINT64_C (17) == 17); -verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0); -#endif - -verify (INTMAX_C (17) == 17); -verify_same_types (INTMAX_C (17), (intmax_t)0 + 0); -verify (UINTMAX_C (17) == 17); -verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0); - - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-stdio.c b/gnulib/tests/test-stdio.c deleted file mode 100644 index 7bd67c2..0000000 --- a/gnulib/tests/test-stdio.c +++ /dev/null @@ -1,43 +0,0 @@ -/* 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 - -#include "verify.h" - -/* Check that the various SEEK_* macros are defined. */ -int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that the types are all defined. */ -fpos_t t1; -off_t t2; -size_t t3; -ssize_t t4; -va_list t5; - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-stdlib.c b/gnulib/tests/test-stdlib.c deleted file mode 100644 index 7eeb410..0000000 --- a/gnulib/tests/test-stdlib.c +++ /dev/null @@ -1,54 +0,0 @@ -/* 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 - -#include "verify.h" - -/* Check that EXIT_SUCCESS is 0, per POSIX. */ -static int exitcode = EXIT_SUCCESS; -#if EXIT_SUCCESS -"oops" -#endif - -/* Check for GNU value (not guaranteed by POSIX, but is guaranteed by - gnulib). */ -#if EXIT_FAILURE != 1 -"oops" -#endif - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -#if GNULIB_TEST_SYSTEM_POSIX -# include "test-sys_wait.h" -#else -# define test_sys_wait_macros() 0 -#endif - -int -main (void) -{ - if (test_sys_wait_macros ()) - return 1; - - return exitcode; -} diff --git a/gnulib/tests/test-strchrnul.c b/gnulib/tests/test-strchrnul.c deleted file mode 100644 index f1d0928..0000000 --- a/gnulib/tests/test-strchrnul.c +++ /dev/null @@ -1,86 +0,0 @@ -/* - * 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 deleted file mode 100644 index 56e5974..0000000 --- a/gnulib/tests/test-string.c +++ /dev/null @@ -1,33 +0,0 @@ -/* 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 - -#include "verify.h" - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-strnlen.c b/gnulib/tests/test-strnlen.c deleted file mode 100644 index cbc1883..0000000 --- a/gnulib/tests/test-strnlen.c +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2010-2012 Free Software Foundation, Inc. - * Written by Eric Blake - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 (strnlen, size_t, (char const *, size_t)); - -#include - -#include "zerosize-ptr.h" -#include "macros.h" - -int -main (void) -{ - size_t i; - char *page_boundary = (char *) zerosize_ptr (); - if (!page_boundary) - { - page_boundary = malloc (0x1000); - ASSERT (page_boundary); - page_boundary += 0x1000; - } - - /* Basic behavior tests. */ - ASSERT (strnlen ("a", 0) == 0); - ASSERT (strnlen ("a", 1) == 1); - ASSERT (strnlen ("a", 2) == 1); - ASSERT (strnlen ("", 0x100000) == 0); - - /* Memory fence and alignment testing. */ - for (i = 0; i < 512; i++) - { - char *start = page_boundary - i; - size_t j = i; - memset (start, 'x', i); - do - { - if (i != j) - { - start[j] = 0; - ASSERT (strnlen (start, i + j) == j); - } - ASSERT (strnlen (start, i) == j); - ASSERT (strnlen (start, j) == j); - } - while (j--); - } - - return 0; -} diff --git a/gnulib/tests/test-strstr.c b/gnulib/tests/test-strstr.c deleted file mode 100644 index 9d44dfb..0000000 --- a/gnulib/tests/test-strstr.c +++ /dev/null @@ -1,277 +0,0 @@ -/* - * 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 - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General 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 (strstr, char *, (char const *, char const *)); - -#include -#include -#include - -#include "zerosize-ptr.h" -#include "macros.h" - -int -main (int argc, char *argv[]) -{ -#if HAVE_DECL_ALARM - /* Declare failure if test takes too long, by using default abort - caused by SIGALRM. All known platforms that lack alarm also have - a quadratic strstr, and the replacement strstr is known to not - take too long. */ - signal (SIGALRM, SIG_DFL); - alarm (50); -#endif - - { - const char input[] = "foo"; - const char *result = strstr (input, ""); - ASSERT (result == input); - } - - { - const char input[] = "foo"; - const char *result = strstr (input, "o"); - ASSERT (result == input + 1); - } - - { - /* On some platforms, the memchr() functions reads past the first - occurrence of the byte to be searched, leading to an out-of-bounds - read access for strstr(). - See . - This is a bug in memchr(), see the Austin Group's clarification - . */ - const char *fix = "aBaaaaaaaaaaax"; - char *page_boundary = (char *) zerosize_ptr (); - size_t len = strlen (fix) + 1; - char *input = page_boundary ? page_boundary - len : malloc (len); - const char *result; - - strcpy (input, fix); - result = strstr (input, "B1x"); - ASSERT (result == NULL); - if (!page_boundary) - free (input); - } - - { - const char input[] = "ABC ABCDAB ABCDABCDABDE"; - const char *result = strstr (input, "ABCDABD"); - ASSERT (result == input + 15); - } - - { - const char input[] = "ABC ABCDAB ABCDABCDABDE"; - const char *result = strstr (input, "ABCDABE"); - ASSERT (result == NULL); - } - - { - const char input[] = "ABC ABCDAB ABCDABCDABDE"; - const char *result = strstr (input, "ABCDABCD"); - ASSERT (result == input + 11); - } - - /* Check that a long periodic needle does not cause false positives. */ - { - const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD" - "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD" - "_C3_A7_20_EF_BF_BD"; - const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"; - const char *result = strstr (input, need); - ASSERT (result == NULL); - } - { - const char input[] = "F_BD_CE_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD" - "_C3_88_20_EF_BF_BD_EF_BF_BD_EF_BF_BD" - "_C3_A7_20_EF_BF_BD_DA_B5_C2_A6_20" - "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"; - const char need[] = "_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD_EF_BF_BD"; - const char *result = strstr (input, need); - ASSERT (result == input + 115); - } - - /* Check that a very long haystack is handled quickly if the needle is - short and occurs near the beginning. */ - { - size_t repeat = 10000; - size_t m = 1000000; - const char *needle = - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"; - char *haystack = (char *) malloc (m + 1); - if (haystack != NULL) - { - memset (haystack, 'A', m); - haystack[0] = 'B'; - haystack[m] = '\0'; - - for (; repeat > 0; repeat--) - { - ASSERT (strstr (haystack, needle) == haystack + 1); - } - - free (haystack); - } - } - - /* Check that a very long needle is discarded quickly if the haystack is - short. */ - { - size_t repeat = 10000; - size_t m = 1000000; - const char *haystack = - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB"; - char *needle = (char *) malloc (m + 1); - if (needle != NULL) - { - memset (needle, 'A', m); - needle[m] = '\0'; - - for (; repeat > 0; repeat--) - { - ASSERT (strstr (haystack, needle) == NULL); - } - - free (needle); - } - } - - /* Check that the asymptotic worst-case complexity is not quadratic. */ - { - size_t m = 1000000; - char *haystack = (char *) malloc (2 * m + 2); - char *needle = (char *) malloc (m + 2); - if (haystack != NULL && needle != NULL) - { - const char *result; - - memset (haystack, 'A', 2 * m); - haystack[2 * m] = 'B'; - haystack[2 * m + 1] = '\0'; - - memset (needle, 'A', m); - needle[m] = 'B'; - needle[m + 1] = '\0'; - - result = strstr (haystack, needle); - ASSERT (result == haystack + m); - } - free (needle); - free (haystack); - } - - /* Sublinear speed is only possible in memmem; strstr must examine - every character of haystack to find its length. */ - - - { - /* Ensure that with a barely periodic "short" needle, strstr's - search does not mistakenly skip just past the match point. - This use of strstr would mistakenly return NULL before - gnulib v0.0-4927. */ - const char *haystack = - "\n" - "with_build_libsubdir\n" - "with_local_prefix\n" - "with_gxx_include_dir\n" - "with_cpp_install_dir\n" - "enable_generated_files_in_srcdir\n" - "with_gnu_ld\n" - "with_ld\n" - "with_demangler_in_ld\n" - "with_gnu_as\n" - "with_as\n" - "enable_largefile\n" - "enable_werror_always\n" - "enable_checking\n" - "enable_coverage\n" - "enable_gather_detailed_mem_stats\n" - "enable_build_with_cxx\n" - "with_stabs\n" - "enable_multilib\n" - "enable___cxa_atexit\n" - "enable_decimal_float\n" - "enable_fixed_point\n" - "enable_threads\n" - "enable_tls\n" - "enable_objc_gc\n" - "with_dwarf2\n" - "enable_shared\n" - "with_build_sysroot\n" - "with_sysroot\n" - "with_specs\n" - "with_pkgversion\n" - "with_bugurl\n" - "enable_languages\n" - "with_multilib_list\n"; - const char *needle = "\n" - "with_gnu_ld\n"; - const char* p = strstr (haystack, needle); - ASSERT (p - haystack == 114); - } - - { - /* Same bug, shorter trigger. */ - const char *haystack = "..wi.d."; - const char *needle = ".d."; - const char* p = strstr (haystack, needle); - ASSERT (p - haystack == 4); - } - - { - /* Like the above, but trigger the flaw in two_way_long_needle - by using a needle of length LONG_NEEDLE_THRESHOLD (32) or greater. - Rather than trying to find the right alignment manually, I've - arbitrarily chosen the following needle and template for the - haystack, and ensure that for each placement of the needle in - that haystack, strstr finds it. */ - const char *needle = "\nwith_gnu_ld-extend-to-len-32-b\n"; - const char *h = - "\n" - "with_build_libsubdir\n" - "with_local_prefix\n" - "with_gxx_include_dir\n" - "with_cpp_install_dir\n" - "with_e_\n" - "..............................\n" - "with_FGHIJKLMNOPQRSTUVWXYZ\n" - "with_567890123456789\n" - "with_multilib_list\n"; - size_t h_len = strlen (h); - char *haystack = malloc (h_len + 1); - size_t i; - ASSERT (haystack); - for (i = 0; i < h_len - strlen (needle); i++) - { - const char *p; - memcpy (haystack, h, h_len + 1); - memcpy (haystack + i, needle, strlen (needle) + 1); - p = strstr (haystack, needle); - ASSERT (p); - ASSERT (p - haystack == i); - } - } - - return 0; -} diff --git a/gnulib/tests/test-symlink.c b/gnulib/tests/test-symlink.c deleted file mode 100644 index b3caac9..0000000 --- a/gnulib/tests/test-symlink.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Tests of symlink. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (symlink, int, (char const *, char const *)); - -#include -#include -#include -#include -#include -#include - -#include "ignore-value.h" -#include "macros.h" - -#define BASE "test-symlink.t" - -#include "test-symlink.h" - -int -main (void) -{ - /* Remove any leftovers from a previous partial run. */ - ignore_value (system ("rm -rf " BASE "*")); - - return test_symlink (symlink, true); -} diff --git a/gnulib/tests/test-symlink.h b/gnulib/tests/test-symlink.h deleted file mode 100644 index a7c4079..0000000 --- a/gnulib/tests/test-symlink.h +++ /dev/null @@ -1,95 +0,0 @@ -/* Tests of symlink. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -/* This file is designed to test both symlink(a,b) and - symlinkat(a,AT_FDCWD,b). FUNC is the function to test. Assumes - that BASE and ASSERT are already defined, and that appropriate - headers are already included. If PRINT, warn before skipping - symlink tests with status 77. */ - -static int -test_symlink (int (*func) (char const *, char const *), bool print) -{ - if (func ("nowhere", BASE "link1")) - { - if (print) - fputs ("skipping test: symlinks not supported on this file system\n", - stderr); - return 77; - } - - /* Some systems allow the creation of 0-length symlinks as a synonym - for "."; but most reject it. */ - { - int status; - errno = 0; - status = func ("", BASE "link2"); - if (status == -1) - ASSERT (errno == ENOENT || errno == EINVAL); - else - { - ASSERT (status == 0); - ASSERT (unlink (BASE "link2") == 0); - } - } - - /* Sanity checks of failures. */ - errno = 0; - ASSERT (func ("nowhere", "") == -1); - ASSERT (errno == ENOENT); - errno = 0; - ASSERT (func ("nowhere", ".") == -1); - ASSERT (errno == EEXIST || errno == EINVAL); - errno = 0; - ASSERT (func ("somewhere", BASE "link1") == -1); - ASSERT (errno == EEXIST); - errno = 0; - ASSERT (func ("nowhere", BASE "link2/") == -1); - ASSERT (errno == ENOTDIR || errno == ENOENT); - ASSERT (mkdir (BASE "dir", 0700) == 0); - errno = 0; - ASSERT (func ("nowhere", BASE "dir") == -1); - ASSERT (errno == EEXIST); - errno = 0; - ASSERT (func ("nowhere", BASE "dir/") == -1); - ASSERT (errno == EEXIST || errno == EINVAL); - ASSERT (close (creat (BASE "file", 0600)) == 0); - errno = 0; - ASSERT (func ("nowhere", BASE "file") == -1); - ASSERT (errno == EEXIST); - errno = 0; - ASSERT (func ("nowhere", BASE "file/") == -1); - ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); - - /* Trailing slash must always be rejected. */ - ASSERT (unlink (BASE "link1") == 0); - ASSERT (func (BASE "link2", BASE "link1") == 0); - errno = 0; - ASSERT (func (BASE "nowhere", BASE "link1/") == -1); - ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT); - errno = 0; - ASSERT (unlink (BASE "link2") == -1); - ASSERT (errno == ENOENT); - - /* Cleanup. */ - ASSERT (rmdir (BASE "dir") == 0); - ASSERT (unlink (BASE "file") == 0); - ASSERT (unlink (BASE "link1") == 0); - - return 0; -} diff --git a/gnulib/tests/test-sys_stat.c b/gnulib/tests/test-sys_stat.c deleted file mode 100644 index 0702e04..0000000 --- a/gnulib/tests/test-sys_stat.c +++ /dev/null @@ -1,325 +0,0 @@ -/* Test of substitute. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "verify.h" - -/* Check the existence of some macros. */ -int a[] = - { - S_IFMT, -#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 native Windows and DJGPP */ - S_IFSOCK, -#endif - S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR, - S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP, - S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH, - S_ISUID, S_ISGID, S_ISVTX, - S_ISBLK (S_IFREG), - S_ISCHR (S_IFREG), - S_ISDIR (S_IFREG), - S_ISFIFO (S_IFREG), - S_ISREG (S_IFREG), - S_ISLNK (S_IFREG), - S_ISSOCK (S_IFREG), - S_ISDOOR (S_IFREG), - S_ISMPB (S_IFREG), - S_ISNAM (S_IFREG), - S_ISNWK (S_IFREG), - S_ISPORT (S_IFREG), - S_ISCTG (S_IFREG), - S_ISOFD (S_IFREG), - S_ISOFL (S_IFREG), - S_ISWHT (S_IFREG) - }; - -/* Sanity checks. */ - -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)); -verify (!S_ISBLK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISBLK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISCHR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISCHR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISDIR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISDIR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISFIFO (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISFIFO (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (S_ISREG (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISREG (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISLNK (S_IFREG)); -#ifdef S_IFLNK -verify (S_ISLNK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISSOCK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISSOCK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISDOOR (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISDOOR (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISMPB (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISMPB (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISNAM (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISNAM (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISNWK (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISNWK (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISPORT (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISPORT (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISCTG (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISCTG (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISOFD (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISOFD (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISOFL (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISOFL (S_IFLNK)); -#endif -#ifdef S_IFSOCK -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)); -verify (!S_ISWHT (S_IFREG)); -#ifdef S_IFLNK -verify (!S_ISWHT (S_IFLNK)); -#endif -#ifdef S_IFSOCK -verify (!S_ISWHT (S_IFSOCK)); -#endif - -/* POSIX 2008 requires traditional encoding of permission constants. */ -verify (S_IRWXU == 00700); -verify (S_IRUSR == 00400); -verify (S_IWUSR == 00200); -verify (S_IXUSR == 00100); -verify (S_IRWXG == 00070); -verify (S_IRGRP == 00040); -verify (S_IWGRP == 00020); -verify (S_IXGRP == 00010); -verify (S_IRWXO == 00007); -verify (S_IROTH == 00004); -verify (S_IWOTH == 00002); -verify (S_IXOTH == 00001); -verify (S_ISUID == 04000); -verify (S_ISGID == 02000); -verify (S_ISVTX == 01000); - -#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \ - || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \ - || UTIME_NOW == UTIME_OMIT) -invalid UTIME macros -#endif - -/* Check the existence of some types. */ -nlink_t t1; -off_t t2; -mode_t t3; - -struct timespec st; - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-sys_time.c b/gnulib/tests/test-sys_time.c deleted file mode 100644 index 44e21a2..0000000 --- a/gnulib/tests/test-sys_time.c +++ /dev/null @@ -1,33 +0,0 @@ -/* 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 deleted file mode 100644 index c2af992..0000000 --- a/gnulib/tests/test-sys_types.c +++ /dev/null @@ -1,34 +0,0 @@ -/* 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 deleted file mode 100644 index 3ed2e2e..0000000 --- a/gnulib/tests/test-sys_wait.c +++ /dev/null @@ -1,47 +0,0 @@ -/* Test of substitute. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -/* Check for existence of required types. */ -static pid_t a; - -#include "test-sys_wait.h" - -int -main (void) -{ - if (test_sys_wait_macros ()) - return 1; - - switch (0) - { -#if 0 - /* Gnulib doesn't guarantee these, yet. */ - case WCONTINUED: - case WEXITED: - case WNOWAIT: - case WSTOPPED: -#endif - break; - } - - return a ? 1 : 0; -} diff --git a/gnulib/tests/test-sys_wait.h b/gnulib/tests/test-sys_wait.h deleted file mode 100644 index d3726df..0000000 --- a/gnulib/tests/test-sys_wait.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Test of macros shared between and . - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Eric Blake , 2010. */ - -static int -test_sys_wait_macros (void) -{ - /* Check subset of macros that must be visible here. - Note that some of these macros are only portable when operating - on an lvalue. */ - int i; - for (i = 0; i < 0x8000; i = (i ? i << 1 : 1)) - { - /* POSIX requires that for all valid process statuses, that - exactly one of these three macros is true. But not all - possible 16-bit values map to valid process status. - Traditionally, 8 of the bits are for WIFEXITED, 7 of the bits - to tell between WIFSIGNALED and WIFSTOPPED, and either 0x80 - or 0x8000 to flag that core was also dumped. Since we don't - know which byte is WIFEXITED, we skip the both possible bits - that can signal core dump. */ - if (i == 0x80) - continue; - if (!!WIFSIGNALED (i) + !!WIFEXITED (i) + !!WIFSTOPPED (i) != 1) - return 1; - } - i = WEXITSTATUS (i) + WSTOPSIG (i) + WTERMSIG (i); - - switch (i) - { -#if 0 - /* Gnulib doesn't guarantee these, yet. */ - case WNOHANG: - case WUNTRACED: -#endif - break; - } - return 0; -} diff --git a/gnulib/tests/test-thread_create.c b/gnulib/tests/test-thread_create.c deleted file mode 100644 index 0f86771..0000000 --- a/gnulib/tests/test-thread_create.c +++ /dev/null @@ -1,78 +0,0 @@ -/* 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 deleted file mode 100644 index 707f7fe..0000000 --- a/gnulib/tests/test-thread_self.c +++ /dev/null @@ -1,34 +0,0 @@ -/* 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 deleted file mode 100644 index 11a4208..0000000 --- a/gnulib/tests/test-time.c +++ /dev/null @@ -1,41 +0,0 @@ -/* 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 - -#include "verify.h" - -/* 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. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-unistd.c b/gnulib/tests/test-unistd.c deleted file mode 100644 index e53fd7a..0000000 --- a/gnulib/tests/test-unistd.c +++ /dev/null @@ -1,56 +0,0 @@ -/* 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 - -#include "verify.h" - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -/* Check that the various SEEK_* macros are defined. */ -int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET }; - -/* Check that the various *_FILENO macros are defined. */ -#if ! (defined STDIN_FILENO \ - && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3)) -missing or broken *_FILENO macros -#endif - -/* Check that the types are all defined. */ -size_t t1; -ssize_t t2; -#ifdef TODO /* Not implemented in gnulib yet */ -uid_t t3; -gid_t t4; -#endif -off_t t5; -pid_t t6; -#ifdef TODO -useconds_t t7; -intptr_t t8; -#endif - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-unsetenv.c b/gnulib/tests/test-unsetenv.c deleted file mode 100644 index 926526d..0000000 --- a/gnulib/tests/test-unsetenv.c +++ /dev/null @@ -1,61 +0,0 @@ -/* Tests of unsetenv. - 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 . */ - -/* Written by Eric Blake , 2009. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (unsetenv, int, (char const *)); - -#include -#include -#include - -#include "macros.h" - -int -main (void) -{ - char entry[] = "b=2"; - - /* Test removal when multiple entries present. */ - ASSERT (putenv ((char *) "a=1") == 0); - ASSERT (putenv (entry) == 0); - entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */ - ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */ - ASSERT (getenv ("a") == NULL); - ASSERT (unsetenv ("a") == 0); - - /* Required to fail with EINVAL. */ - errno = 0; - ASSERT (unsetenv ("") == -1); - ASSERT (errno == EINVAL); - errno = 0; - ASSERT (unsetenv ("a=b") == -1); - ASSERT (errno == EINVAL); -#if 0 - /* glibc and gnulib's implementation guarantee this, but POSIX no - longer requires it: http://austingroupbugs.net/view.php?id=185 */ - errno = 0; - ASSERT (unsetenv (NULL) == -1); - ASSERT (errno == EINVAL); -#endif - - return 0; -} diff --git a/gnulib/tests/test-vasnprintf.c b/gnulib/tests/test-vasnprintf.c deleted file mode 100644 index 4e548b1..0000000 --- a/gnulib/tests/test-vasnprintf.c +++ /dev/null @@ -1,94 +0,0 @@ -/* Test of vasnprintf() and asnprintf() functions. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "vasnprintf.h" - -#include -#include -#include - -#include "macros.h" - -static void -test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...)) -{ - char buf[8]; - int size; - - for (size = 0; size <= 8; size++) - { - size_t length = size; - char *result = my_asnprintf (NULL, &length, "%d", 12345); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - ASSERT (length == 5); - free (result); - } - - for (size = 0; size <= 8; size++) - { - size_t length; - char *result; - - memcpy (buf, "DEADBEEF", 8); - length = size; - result = my_asnprintf (buf, &length, "%d", 12345); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - ASSERT (length == 5); - if (size < 6) - ASSERT (result != buf); - ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0); - if (result != buf) - free (result); - } -} - -static char * -my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...) -{ - va_list args; - char *ret; - - va_start (args, format); - ret = vasnprintf (resultbuf, lengthp, format, args); - va_end (args); - return ret; -} - -static void -test_vasnprintf () -{ - test_function (my_asnprintf); -} - -static void -test_asnprintf () -{ - test_function (asnprintf); -} - -int -main (int argc, char *argv[]) -{ - test_vasnprintf (); - test_asnprintf (); - return 0; -} diff --git a/gnulib/tests/test-vasprintf.c b/gnulib/tests/test-vasprintf.c deleted file mode 100644 index 4d7635b..0000000 --- a/gnulib/tests/test-vasprintf.c +++ /dev/null @@ -1,103 +0,0 @@ -/* Test of vasprintf() and asprintf() functions. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...)); -SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list)); - -#include -#include -#include - -#include "macros.h" - -static int -my_asprintf (char **result, const char *format, ...) -{ - va_list args; - int ret; - - va_start (args, format); - ret = vasprintf (result, format, args); - va_end (args); - return ret; -} - -static void -test_vasprintf () -{ - int repeat; - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = my_asprintf (&result, "%d", 12345); - ASSERT (retval == 5); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - free (result); - } - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = my_asprintf (&result, "%08lx", 12345UL); - ASSERT (retval == 8); - ASSERT (result != NULL); - ASSERT (strcmp (result, "00003039") == 0); - free (result); - } -} - -static void -test_asprintf () -{ - int repeat; - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = asprintf (&result, "%d", 12345); - ASSERT (retval == 5); - ASSERT (result != NULL); - ASSERT (strcmp (result, "12345") == 0); - free (result); - } - - for (repeat = 0; repeat <= 8; repeat++) - { - char *result; - int retval = asprintf (&result, "%08lx", 12345UL); - ASSERT (retval == 8); - ASSERT (result != NULL); - ASSERT (strcmp (result, "00003039") == 0); - free (result); - } -} - -int -main (int argc, char *argv[]) -{ - test_vasprintf (); - test_asprintf (); - return 0; -} diff --git a/gnulib/tests/test-verify.c b/gnulib/tests/test-verify.c deleted file mode 100644 index 5ab9c58..0000000 --- a/gnulib/tests/test-verify.c +++ /dev/null @@ -1,69 +0,0 @@ -/* Test the "verify" module. - - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible. */ - -#include - -#include "verify.h" - -#ifndef EXP_FAIL -# define EXP_FAIL 0 -#endif - -int x; -enum { a, b, c }; - -#if EXP_FAIL == 1 -verify (x >= 0); /* should give ERROR: non-constant expression */ -#endif -verify (c == 2); /* should be ok */ -#if EXP_FAIL == 2 -verify (1 + 1 == 3); /* should give ERROR */ -#endif -verify (1 == 1); verify (1 == 1); /* should be ok */ - -enum -{ - item = verify_true (1 == 1) * 0 + 17 /* should be ok */ -}; - -static int -function (int n) -{ -#if EXP_FAIL == 3 - verify (n >= 0); /* should give ERROR: non-constant expression */ -#endif - verify (c == 2); /* should be ok */ -#if EXP_FAIL == 4 - verify (1 + 1 == 3); /* should give ERROR */ -#endif - verify (1 == 1); verify (1 == 1); /* should be ok */ - - if (n) - return ((void) verify_expr (1 == 1, 1), verify_expr (1 == 1, 8)); /* should be ok */ -#if EXP_FAIL == 5 - return verify_expr (1 == 2, 5); /* should give ERROR */ -#endif - return 0; -} - -int -main (void) -{ - return !(function (0) == 0 && function (1) == 8); -} diff --git a/gnulib/tests/test-verify.sh b/gnulib/tests/test-verify.sh deleted file mode 100755 index 3e76761..0000000 --- a/gnulib/tests/test-verify.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -. "${srcdir=.}/init.sh" - -# We are not interested in triggering bugs in the compilers and tools -# (such as gcc 4.3.1 on openSUSE 11.0). -unset MALLOC_PERTURB_ - -# Rather than figure out how to invoke the compiler with the right -# include path ourselves, we let make do it: -(cd "$initial_cwd_" && rm -f test-verify.o \ - && $MAKE test-verify.o >/dev/null 2>&1) \ - || skip_ "cannot compile error-free" - -# Now, prove that we encounter all expected compilation failures: -: >out -: >err -for i in 1 2 3 4 5; do - (cd "$initial_cwd_" - rm -f test-verify.o - $MAKE CFLAGS=-DEXP_FAIL=$i test-verify.o) >>out 2>>err \ - && { warn_ "compiler didn't detect verification failure $i"; fail=1; } -done - -Exit $fail diff --git a/gnulib/tests/test-wchar.c b/gnulib/tests/test-wchar.c deleted file mode 100644 index 0d72005..0000000 --- a/gnulib/tests/test-wchar.c +++ /dev/null @@ -1,37 +0,0 @@ -/* Test of substitute. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License 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 "verify.h" - -/* Check that the types wchar_t and wint_t are defined. */ -wchar_t a = 'c'; -wint_t b = 'x'; - -/* Check that NULL can be passed through varargs as a pointer type, - per POSIX 2008. */ -verify (sizeof NULL == sizeof (void *)); - -int -main (void) -{ - return 0; -} diff --git a/gnulib/tests/test-wcrtomb-w32-1.sh b/gnulib/tests/test-wcrtomb-w32-1.sh deleted file mode 100755 index 50c82f5..0000000 --- a/gnulib/tests/test-wcrtomb-w32-1.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP1252 locale. -./test-wcrtomb-w32${EXEEXT} French_France 1252 diff --git a/gnulib/tests/test-wcrtomb-w32-2.sh b/gnulib/tests/test-wcrtomb-w32-2.sh deleted file mode 100755 index 783c70c..0000000 --- a/gnulib/tests/test-wcrtomb-w32-2.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP1256 locale. -./test-wcrtomb-w32${EXEEXT} "Arabic_Saudi Arabia" 1256 diff --git a/gnulib/tests/test-wcrtomb-w32-3.sh b/gnulib/tests/test-wcrtomb-w32-3.sh deleted file mode 100755 index 619ea64..0000000 --- a/gnulib/tests/test-wcrtomb-w32-3.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP932 locale. -./test-wcrtomb-w32${EXEEXT} Japanese_Japan 932 diff --git a/gnulib/tests/test-wcrtomb-w32-4.sh b/gnulib/tests/test-wcrtomb-w32-4.sh deleted file mode 100755 index 67b6803..0000000 --- a/gnulib/tests/test-wcrtomb-w32-4.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP950 locale. -./test-wcrtomb-w32${EXEEXT} Chinese_Taiwan 950 diff --git a/gnulib/tests/test-wcrtomb-w32-5.sh b/gnulib/tests/test-wcrtomb-w32-5.sh deleted file mode 100755 index 9841fa9..0000000 --- a/gnulib/tests/test-wcrtomb-w32-5.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -# Test a CP936 locale. -./test-wcrtomb-w32${EXEEXT} Chinese_China 936 diff --git a/gnulib/tests/test-wcrtomb-w32.c b/gnulib/tests/test-wcrtomb-w32.c deleted file mode 100644 index 9342f78..0000000 --- a/gnulib/tests/test-wcrtomb-w32.c +++ /dev/null @@ -1,332 +0,0 @@ -/* Test of conversion of wide character to multibyte character. - 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 - -#include - -#include -#include -#include -#include - -#include "macros.h" - -#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ - -static int -test_one_locale (const char *name, int codepage) -{ - char buf[64]; - size_t ret; - -# if 1 - /* Portable code to set the locale. */ - { - char name_with_codepage[1024]; - - sprintf (name_with_codepage, "%s.%d", name, codepage); - - /* Set the locale. */ - if (setlocale (LC_ALL, name_with_codepage) == NULL) - return 77; - } -# else - /* Hacky way to set a locale.codepage combination that setlocale() refuses - to set. */ - { - /* Codepage of the current locale, set with setlocale(). - Not necessarily the same as GetACP(). */ - extern __declspec(dllimport) unsigned int __lc_codepage; - - /* Set the locale. */ - if (setlocale (LC_ALL, name) == NULL) - return 77; - - /* Clobber the codepage and MB_CUR_MAX, both set by setlocale(). */ - __lc_codepage = codepage; - switch (codepage) - { - case 1252: - case 1256: - MB_CUR_MAX = 1; - break; - case 932: - case 950: - case 936: - MB_CUR_MAX = 2; - break; - case 54936: - case 65001: - MB_CUR_MAX = 4; - break; - } - - /* Test whether the codepage is really available. */ - { - mbstate_t state; - wchar_t wc; - - memset (&state, '\0', sizeof (mbstate_t)); - if (mbrtowc (&wc, " ", 1, &state) == (size_t)(-1)) - return 77; - } - } -# endif - - /* Test NUL character. */ - { - buf[0] = 'x'; - ret = wcrtomb (buf, 0, NULL); - ASSERT (ret == 1); - ASSERT (buf[0] == '\0'); - } - - /* Test single bytes. */ - { - int c; - - for (c = 0; c < 0x100; c++) - switch (c) - { - case '\t': case '\v': case '\f': - case ' ': case '!': case '"': case '#': case '%': - case '&': case '\'': case '(': case ')': case '*': - case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': - case '?': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': - case '[': case '\\': case ']': case '^': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ - ret = wcrtomb (buf, btowc (c), NULL); - ASSERT (ret == 1); - ASSERT (buf[0] == (char) c); - break; - } - } - - /* Test special calling convention, passing a NULL pointer. */ - { - ret = wcrtomb (NULL, '\0', NULL); - ASSERT (ret == 1); - ret = wcrtomb (NULL, btowc ('x'), NULL); - ASSERT (ret == 1); - } - - switch (codepage) - { - case 1252: - /* Locale encoding is CP1252, an extension of ISO-8859-1. */ - { - /* Convert "B\374\337er": "Büßer" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00FC, NULL); - ASSERT (ret == 1); - ASSERT (memcmp (buf, "\374", 1) == 0); - ASSERT (buf[1] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00DF, NULL); - ASSERT (ret == 1); - ASSERT (memcmp (buf, "\337", 1) == 0); - ASSERT (buf[1] == 'x'); - } - return 0; - - case 1256: - /* Locale encoding is CP1256, not the same as ISO-8859-6. */ - { - /* Convert "x\302\341\346y": "xآلوy" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x0622, NULL); - ASSERT (ret == 1); - ASSERT (memcmp (buf, "\302", 1) == 0); - ASSERT (buf[1] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x0644, NULL); - ASSERT (ret == 1); - ASSERT (memcmp (buf, "\341", 1) == 0); - ASSERT (buf[1] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x0648, NULL); - ASSERT (ret == 1); - ASSERT (memcmp (buf, "\346", 1) == 0); - ASSERT (buf[1] == 'x'); - } - return 0; - - case 932: - /* Locale encoding is CP932, similar to Shift_JIS. */ - { - /* Convert "<\223\372\226\173\214\352>": "<日本語>" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x65E5, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\223\372", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x672C, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\226\173", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x8A9E, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\214\352", 2) == 0); - ASSERT (buf[2] == 'x'); - } - return 0; - - case 950: - /* Locale encoding is CP950, similar to Big5. */ - { - /* Convert "<\244\351\245\273\273\171>": "<日本語>" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x65E5, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\244\351", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x672C, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\245\273", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x8A9E, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\273\171", 2) == 0); - ASSERT (buf[2] == 'x'); - } - return 0; - - case 936: - /* Locale encoding is CP936 = GBK, an extension of GB2312. */ - { - /* Convert "<\310\325\261\276\325\132>": "<日本語>" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x65E5, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\310\325", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x672C, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\261\276", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x8A9E, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\325\132", 2) == 0); - ASSERT (buf[2] == 'x'); - } - return 0; - - case 54936: - /* Locale encoding is CP54936 = GB18030. */ - { - /* Convert "B\250\271\201\060\211\070er": "Büßer" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00FC, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\250\271", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00DF, NULL); - ASSERT (ret == 4); - ASSERT (memcmp (buf, "\201\060\211\070", 4) == 0); - ASSERT (buf[4] == 'x'); - } - return 0; - - case 65001: - /* Locale encoding is CP65001 = UTF-8. */ - { - /* Convert "B\303\274\303\237er": "Büßer" */ - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00FC, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\303\274", 2) == 0); - ASSERT (buf[2] == 'x'); - - memset (buf, 'x', 8); - ret = wcrtomb (buf, 0x00DF, NULL); - ASSERT (ret == 2); - ASSERT (memcmp (buf, "\303\237", 2) == 0); - ASSERT (buf[2] == 'x'); - } - return 0; - - default: - return 1; - } -} - -int -main (int argc, char *argv[]) -{ - int codepage = atoi (argv[argc - 1]); - int result; - int i; - - result = 77; - for (i = 1; i < argc - 1; i++) - { - int ret = test_one_locale (argv[i], codepage); - - if (ret != 77) - result = ret; - } - - if (result == 77) - { - fprintf (stderr, "Skipping test: found no locale with codepage %d\n", - codepage); - } - return result; -} - -#else - -int -main (int argc, char *argv[]) -{ - fputs ("Skipping test: not a native Windows system\n", stderr); - return 77; -} - -#endif diff --git a/gnulib/tests/test-wcrtomb.c b/gnulib/tests/test-wcrtomb.c deleted file mode 100644 index 99e427d..0000000 --- a/gnulib/tests/test-wcrtomb.c +++ /dev/null @@ -1,162 +0,0 @@ -/* Test of conversion of wide character to multibyte character. - 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 Bruno Haible , 2008. */ - -#include - -#include - -#include "signature.h" -SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *)); - -#include -#include -#include - -#include "macros.h" - -/* Check the multibyte character s[0..n-1]. */ -static void -check_character (const char *s, size_t n) -{ - wchar_t wc; - char buf[64]; - int iret; - size_t ret; - - wc = (wchar_t) 0xBADFACE; - iret = mbtowc (&wc, s, n); - ASSERT (iret == n); - - ret = wcrtomb (buf, wc, NULL); - ASSERT (ret == n); - ASSERT (memcmp (buf, s, n) == 0); - - /* Test special calling convention, passing a NULL pointer. */ - ret = wcrtomb (NULL, wc, NULL); - ASSERT (ret == 1); -} - -int -main (int argc, char *argv[]) -{ - char buf[64]; - size_t ret; - - /* configure should already have checked that the locale is supported. */ - if (setlocale (LC_ALL, "") == NULL) - return 1; - - /* Test NUL character. */ - { - buf[0] = 'x'; - ret = wcrtomb (buf, 0, NULL); - ASSERT (ret == 1); - ASSERT (buf[0] == '\0'); - } - - /* Test single bytes. */ - { - int c; - - for (c = 0; c < 0x100; c++) - switch (c) - { - case '\t': case '\v': case '\f': - case ' ': case '!': case '"': case '#': case '%': - case '&': case '\'': case '(': case ')': case '*': - case '+': case ',': case '-': case '.': case '/': - case '0': case '1': case '2': case '3': case '4': - case '5': case '6': case '7': case '8': case '9': - case ':': case ';': case '<': case '=': case '>': - case '?': - case 'A': case 'B': case 'C': case 'D': case 'E': - case 'F': case 'G': case 'H': case 'I': case 'J': - case 'K': case 'L': case 'M': case 'N': case 'O': - case 'P': case 'Q': case 'R': case 'S': case 'T': - case 'U': case 'V': case 'W': case 'X': case 'Y': - case 'Z': - case '[': case '\\': case ']': case '^': case '_': - case 'a': case 'b': case 'c': case 'd': case 'e': - case 'f': case 'g': case 'h': case 'i': case 'j': - case 'k': case 'l': case 'm': case 'n': case 'o': - case 'p': case 'q': case 'r': case 's': case 't': - case 'u': case 'v': case 'w': case 'x': case 'y': - case 'z': case '{': case '|': case '}': case '~': - /* c is in the ISO C "basic character set". */ - ret = wcrtomb (buf, btowc (c), NULL); - ASSERT (ret == 1); - ASSERT (buf[0] == (char) c); - break; - } - } - - /* Test special calling convention, passing a NULL pointer. */ - { - ret = wcrtomb (NULL, '\0', NULL); - ASSERT (ret == 1); - ret = wcrtomb (NULL, btowc ('x'), NULL); - ASSERT (ret == 1); - } - - if (argc > 1) - switch (argv[1][0]) - { - case '1': - /* Locale encoding is ISO-8859-1 or ISO-8859-15. */ - { - const char input[] = "B\374\337er"; /* "Büßer" */ - - check_character (input + 1, 1); - check_character (input + 2, 1); - } - return 0; - - case '2': - /* Locale encoding is UTF-8. */ - { - const char input[] = "B\303\274\303\237er"; /* "Büßer" */ - - check_character (input + 1, 2); - check_character (input + 3, 2); - } - return 0; - - case '3': - /* Locale encoding is EUC-JP. */ - { - const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */ - - check_character (input + 1, 2); - check_character (input + 3, 2); - check_character (input + 5, 2); - } - return 0; - - case '4': - /* Locale encoding is GB18030. */ - { - const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ - - check_character (input + 1, 2); - check_character (input + 3, 4); - } - return 0; - } - - return 1; -} diff --git a/gnulib/tests/test-wcrtomb.sh b/gnulib/tests/test-wcrtomb.sh deleted file mode 100755 index 3eda8f3..0000000 --- a/gnulib/tests/test-wcrtomb.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# Test in an ISO-8859-1 or ISO-8859-15 locale. -: ${LOCALE_FR=fr_FR} -if test $LOCALE_FR != none; then - LC_ALL=$LOCALE_FR \ - ./test-wcrtomb${EXEEXT} 1 \ - || exit 1 -fi - -# Test whether a specific UTF-8 locale is installed. -: ${LOCALE_FR_UTF8=fr_FR.UTF-8} -if test $LOCALE_FR_UTF8 != none; then - LC_ALL=$LOCALE_FR_UTF8 \ - ./test-wcrtomb${EXEEXT} 2 \ - || exit 1 -fi - -# Test whether a specific EUC-JP locale is installed. -: ${LOCALE_JA=ja_JP} -if test $LOCALE_JA != none; then - LC_ALL=$LOCALE_JA \ - ./test-wcrtomb${EXEEXT} 3 \ - || exit 1 -fi - -# Test whether a specific GB18030 locale is installed. -: ${LOCALE_ZH_CN=zh_CN.GB18030} -if test $LOCALE_ZH_CN != none; then - LC_ALL=$LOCALE_ZH_CN \ - ./test-wcrtomb${EXEEXT} 4 \ - || exit 1 -fi - -exit 0 diff --git a/gnulib/tests/test-wctype-h.c b/gnulib/tests/test-wctype-h.c deleted file mode 100644 index 467f05b..0000000 --- a/gnulib/tests/test-wctype-h.c +++ /dev/null @@ -1,74 +0,0 @@ -/* Test of substitute. - 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 - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* Written by Bruno Haible , 2007. */ - -#include - -#include - -#include "macros.h" - -/* Check that the type wint_t is defined. */ -wint_t a = 'x'; -/* Check that WEOF is defined. */ -wint_t e = WEOF; - -/* Check that the type wctype_t is defined. */ -wctype_t p; - -/* Check that the type wctrans_t is defined. */ -wctrans_t q; - -int -main (void) -{ - /* Check that the isw* functions exist as functions or as macros. */ - (void) iswalnum (0); - (void) iswalpha (0); - (void) iswcntrl (0); - (void) iswdigit (0); - (void) iswgraph (0); - (void) iswlower (0); - (void) iswprint (0); - (void) iswpunct (0); - (void) iswspace (0); - (void) iswupper (0); - (void) iswxdigit (0); - - /* Check that the isw* functions map WEOF to 0. */ - ASSERT (!iswalnum (e)); - ASSERT (!iswalpha (e)); - ASSERT (!iswcntrl (e)); - ASSERT (!iswdigit (e)); - ASSERT (!iswgraph (e)); - ASSERT (!iswlower (e)); - ASSERT (!iswprint (e)); - ASSERT (!iswpunct (e)); - ASSERT (!iswspace (e)); - ASSERT (!iswupper (e)); - ASSERT (!iswxdigit (e)); - - /* Check that the tow* functions exist as functions or as macros. */ - (void) towlower (0); - (void) towupper (0); - - /* Check that the tow* functions map WEOF to WEOF. */ - ASSERT (towlower (e) == e); - ASSERT (towupper (e) == e); - - return 0; -} diff --git a/gnulib/tests/unsetenv.c b/gnulib/tests/unsetenv.c deleted file mode 100644 index ddbe9a4..0000000 --- a/gnulib/tests/unsetenv.c +++ /dev/null @@ -1,127 +0,0 @@ -/* 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 - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc - optimizes away the name == NULL test below. */ -#define _GL_ARG_NONNULL(params) - -/* Specification. */ -#include - -#include -#if !_LIBC -# define __set_errno(ev) ((errno) = (ev)) -#endif - -#include -#include - -#if !_LIBC -# define __environ environ -#endif - -#if _LIBC -/* This lock protects against simultaneous modifications of 'environ'. */ -# include -__libc_lock_define_initialized (static, envlock) -# define LOCK __libc_lock_lock (envlock) -# define UNLOCK __libc_lock_unlock (envlock) -#else -# define LOCK -# define UNLOCK -#endif - -/* In the GNU C library we must keep the namespace clean. */ -#ifdef _LIBC -# define unsetenv __unsetenv -#endif - -#if _LIBC || !HAVE_UNSETENV - -int -unsetenv (const char *name) -{ - size_t len; - char **ep; - - if (name == NULL || *name == '\0' || strchr (name, '=') != NULL) - { - __set_errno (EINVAL); - return -1; - } - - len = strlen (name); - - LOCK; - - ep = __environ; - while (*ep != NULL) - if (!strncmp (*ep, name, len) && (*ep)[len] == '=') - { - /* Found it. Remove this pointer by moving later ones back. */ - char **dp = ep; - - do - dp[0] = dp[1]; - while (*dp++); - /* Continue the loop in case NAME appears again. */ - } - else - ++ep; - - UNLOCK; - - return 0; -} - -#ifdef _LIBC -# undef unsetenv -weak_alias (__unsetenv, unsetenv) -#endif - -#else /* HAVE_UNSETENV */ - -# undef unsetenv -# if !HAVE_DECL_UNSETENV -# if VOID_UNSETENV -extern void unsetenv (const char *); -# else -extern int unsetenv (const char *); -# endif -# endif - -/* Call the underlying unsetenv, in case there is hidden bookkeeping - that needs updating beyond just modifying environ. */ -int -rpl_unsetenv (const char *name) -{ - int result = 0; - if (!name || !*name || strchr (name, '=')) - { - errno = EINVAL; - return -1; - } - while (getenv (name)) -# if !VOID_UNSETENV - result = -# endif - unsetenv (name); - return result; -} - -#endif /* HAVE_UNSETENV */ diff --git a/gnulib/tests/wctob.c b/gnulib/tests/wctob.c deleted file mode 100644 index 0885c1b..0000000 --- a/gnulib/tests/wctob.c +++ /dev/null @@ -1,38 +0,0 @@ -/* Convert wide character to unibyte character. - 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 - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General 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 - -int -wctob (wint_t wc) -{ - char buf[64]; - - if (!(MB_CUR_MAX <= sizeof (buf))) - abort (); - /* Handle the case where WEOF is a value that does not fit in a wchar_t. */ - if (wc == (wchar_t)wc) - if (wctomb (buf, (wchar_t)wc) == 1) - return (unsigned char) buf[0]; - return EOF; -} diff --git a/gnulib/tests/wctomb-impl.h b/gnulib/tests/wctomb-impl.h deleted file mode 100644 index 68264cf..0000000 --- a/gnulib/tests/wctomb-impl.h +++ /dev/null @@ -1,34 +0,0 @@ -/* Convert wide character to multibyte character. - 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 General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -int -wctomb (char *s, wchar_t wc) -{ - if (s == NULL) - return 0; - else - { - mbstate_t state; - size_t result; - - memset (&state, 0, sizeof (mbstate_t)); - result = wcrtomb (s, wc, &state); - if (result == (size_t)-1) - return -1; - return result; - } -} diff --git a/gnulib/tests/wctomb.c b/gnulib/tests/wctomb.c deleted file mode 100644 index 736a7c7..0000000 --- a/gnulib/tests/wctomb.c +++ /dev/null @@ -1,25 +0,0 @@ -/* Convert wide character to multibyte character. - 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 General Public License as published by - the Free Software Foundation; either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -#include - -#include - -#include -#include - -#include "wctomb-impl.h" diff --git a/gnulib/tests/zerosize-ptr.h b/gnulib/tests/zerosize-ptr.h deleted file mode 100644 index 9c060e7..0000000 --- a/gnulib/tests/zerosize-ptr.h +++ /dev/null @@ -1,68 +0,0 @@ -/* Return a pointer to a zero-size object in memory. - 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 . */ - -/* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL - argument. Therefore this file produces a non-NULL pointer which cannot - be dereferenced, if possible. */ - -#include - -/* Test whether mmap() and mprotect() are available. - We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. - HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an - mprotect() function in libgcc.a. */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# include -# include -# include -# include -/* Define MAP_FILE when it isn't otherwise. */ -# ifndef MAP_FILE -# define MAP_FILE 0 -# endif -#endif - -/* Return a pointer to a zero-size object in memory (that is, actually, a - pointer to a page boundary where the previous page is readable and writable - and the next page is neither readable not writable), if possible. - Return NULL otherwise. */ - -static void * -zerosize_ptr (void) -{ -/* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is - not defined on HP-UX 11 (since it does not support MAP_FIXED). */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT -# if HAVE_MAP_ANONYMOUS - const int flags = MAP_ANONYMOUS | MAP_PRIVATE; - const int fd = -1; -# else /* !HAVE_MAP_ANONYMOUS */ - const int flags = MAP_FILE | MAP_PRIVATE; - int fd = open ("/dev/zero", O_RDONLY, 0666); - if (fd >= 0) -# endif - { - int pagesize = getpagesize (); - char *two_pages = - (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, - flags, fd, 0); - if (two_pages != (char *)(-1) - && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) - return two_pages + pagesize; - } -#endif - return NULL; -} diff --git a/lenses/afs_cellalias.aug b/lenses/afs_cellalias.aug new file mode 100644 index 0000000..6b67675 --- /dev/null +++ b/lenses/afs_cellalias.aug @@ -0,0 +1,60 @@ +(* +Module: AFS_cellalias + Parses AFS configuration file CellAlias + +Author: Pat Riehecky + +About: Reference + This lens is targeted at the OpenAFS CellAlias file + +About: Lens Usage + Sample usage of this lens in augtool + + * Add a CellAlias for fnal.gov/files to fnal-files + > set /files/usr/vice/etc/CellAlias/target[99] fnal.gov/files + > set /files/usr/vice/etc/CellAlias/target[99]/linkname fnal-files + +About: License + This file is licensed under the LGPL v2+, like the rest of Augeas. +*) + +module AFS_cellalias = + autoload xfm + + (************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) + + (* Group: Comments and empty lines *) + + (* View: eol *) + let eol = Util.eol + (* View: comment *) + let comment = Util.comment + (* View: empty *) + let empty = Util.empty + + (* Group: separators *) + + (* View: space + * Separation between key and value + *) + let space = Util.del_ws_spc + let target = /[^ \t\n#]+/ + let linkname = Rx.word + + (************************************************************************ + * Group: ENTRIES + *************************************************************************) + + (* View: entry *) + let entry = [ label "target" . store target . space . [ label "linkname" . store linkname . eol ] ] + + (* View: lns *) + let lns = (empty | comment | entry)* + + let xfm = transform lns (incl "/usr/vice/etc/CellAlias") + +(* Local Variables: *) +(* mode: caml *) +(* End: *) diff --git a/lenses/authorized_keys.aug b/lenses/authorized_keys.aug index 97552c5..e913d4b 100644 --- a/lenses/authorized_keys.aug +++ b/lenses/authorized_keys.aug @@ -33,7 +33,9 @@ let option = 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 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 diff --git a/lenses/build.aug b/lenses/build.aug index f5c153e..6c20903 100644 --- a/lenses/build.aug +++ b/lenses/build.aug @@ -259,7 +259,7 @@ let block (entry:lens) = block_setdelim entry block_ldelim_default block_rdelim_default (* Variable: block_ldelim_newlines_re *) -let block_ldelim_newlines_re = /[ \t\n]+\{([ \t\n]*\n)?/ +let block_ldelim_newlines_re = /[ \t\n]*\{([ \t\n]*\n)?/ (* Variable: block_rdelim_newlines_re *) let block_rdelim_newlines_re = /[ \t]*\}/ @@ -287,6 +287,23 @@ let block_newlines (entry:lens) (comment:lens) = . del block_rdelim_newlines_re block_rdelim_newlines_default (************************************************************************ + * View: block_newlines_spc + * A block enclosed in brackets, with newlines forced + * and indentation defaulting to a tab. The opening brace + * must be preceded by whitespace + * + * Parameters: + * entry:lens - the entry to be stored inside the block. + * This entry should not include , + * or , + * should be indented and finish with an eol. + ************************************************************************) +let block_newlines_spc (entry:lens) (comment:lens) = + del (/[ \t\n]/ . block_ldelim_newlines_re) block_ldelim_newlines_default + . ((entry | comment) . (Util.empty | entry | comment)*)? + . del block_rdelim_newlines_re block_rdelim_newlines_default + +(************************************************************************ * View: named_block * A named enclosed in brackets * @@ -401,4 +418,3 @@ let combine_three_opt (a:lens) (b:lens) (c:lens) = combine_three_opt_ord a b c | combine_three_opt_ord b a c | combine_three_opt_ord c b a - diff --git a/lenses/chrony.aug b/lenses/chrony.aug index ede2c94..3257568 100644 --- a/lenses/chrony.aug +++ b/lenses/chrony.aug @@ -112,7 +112,7 @@ module Chrony = (* Variable: log_flags log has a specific options list *) - let log_flags = /measurments|statistics|tracking|rtc|refclocks|tempcomp/ + let log_flags = /measurements|statistics|tracking|rtc|refclocks|tempcomp/ (* Variable: simple_keys Options with single values diff --git a/lenses/clamav.aug b/lenses/clamav.aug new file mode 100644 index 0000000..eeb08c0 --- /dev/null +++ b/lenses/clamav.aug @@ -0,0 +1,52 @@ +(* +Module: ClamAV + Parses ClamAV clamd and freshclam configuration files. + +Author: Andrew Colin Kissa + Baruwa Enterprise Edition http://www.baruwa.com + +About: License + This file is licensed under the LGPL v2+. + +About: Configuration files + This lens applies to /etc/clamd.conf, /etc/freshclam.conf and files in + /etc/clamd.d. See . +*) + +module Clamav = +autoload xfm + +(************************************************************************ + * Group: USEFUL PRIMITIVES + ************************************************************************) + +let word = /[A-Za-z][A-Za-z0-9]+/ + +let comment = Util.comment + +let some_value = Sep.space . store Rx.space_in + +(************************************************************************ + * Group: Entry + ************************************************************************) + +let example_entry = [ key "Example" . Util.eol ] + +let clamd_entry = [ key word . some_value . Util.eol ] + +(****************************************************************** + * Group: LENS AND FILTER + ******************************************************************) + +(************************************************************************ + * View: Lns + ************************************************************************) + +let lns = (Util.empty | example_entry | clamd_entry | comment )* + +(* Variable: filter *) +let filter = (incl "/etc/clamd.conf") + . (incl "/etc/freshclam.conf") + . (incl "/etc/clamd.d/*.conf") + +let xfm = transform lns filter diff --git a/lenses/dns_zone.aug b/lenses/dns_zone.aug new file mode 100644 index 0000000..4db194c --- /dev/null +++ b/lenses/dns_zone.aug @@ -0,0 +1,113 @@ +(* +Module: Dns_Zone + Lens for parsing DNS zone files + +Authors: + Kaarle Ritvanen + +About: Reference + RFC 1035, RFC 2782, RFC 3403 + +About: License + This file is licensed under the LGPL v2+ +*) + +module Dns_Zone = + +autoload xfm + +let eol = del /([ \t\n]*(;[^\n]*)?\n)+/ "\n" +let opt_eol = del /([ \t\n]*(;[^\n]*)?\n)*/ "" + +let ws = del /[ \t]+|(([ \t\n]*;[^\n]*)?\n)+[ \t]*/ " " +let opt_ws = del /(([ \t\n]*;[^\n]*)?\n)*[ \t]*/ "" + +let token = /([^ \t\n";()\\]|\\\\.)+|"([^"\\]|\\\\.)*"/ + + +let control = [ key /\$[^ \t\n\/]+/ + . Util.del_ws_tab + . store token + . eol ] + + +let labeled_token (lbl:string) (re:regexp) (sep:lens) = + [ label lbl . store re . sep ] + +let regexp_token (lbl:string) (re:regexp) = + labeled_token lbl re Util.del_ws_tab + +let type_token (re:regexp) = regexp_token "type" re + +let simple_token (lbl:string) = regexp_token lbl token + +let enclosed_token (lbl:string) = labeled_token lbl token ws + +let last_token (lbl:string) = labeled_token lbl token eol + + +let class_re = /IN/ + +let ttl = regexp_token "ttl" /[0-9]+[DHMWdhmw]?/ +let class = regexp_token "class" class_re + +let rr = + let simple_type = /[A-Z]+/ - class_re - /MX|NAPTR|SOA|SRV/ + in type_token simple_type . last_token "rdata" + + +let mx = type_token "MX" + . simple_token "priority" + . last_token "exchange" + +let naptr = type_token "NAPTR" + . simple_token "order" + . simple_token "preference" + . simple_token "flags" + . simple_token "service" + . simple_token "regexp" + . last_token "replacement" + +let soa = type_token "SOA" + . simple_token "mname" + . simple_token "rname" + . Util.del_str "(" + . opt_ws + . enclosed_token "serial" + . enclosed_token "refresh" + . enclosed_token "retry" + . enclosed_token "expiry" + . labeled_token "minimum" token opt_ws + . Util.del_str ")" + . eol + +let srv = type_token "SRV" + . simple_token "priority" + . simple_token "weight" + . simple_token "port" + . last_token "target" + + +let record = seq "owner" + . ((ttl? . class?) | (class . ttl)) + . (rr|mx|naptr|soa|srv) +let ws_record = [ Util.del_ws_tab . record ] +let records (k:regexp) = [ key k . counter "owner" . ws_record+ ] + +let any_record_block = records /[^ \t\n;\/$][^ \t\n;\/]*/ +let non_root_records = records /@[^ \t\n;\/]+|[^ \t\n;\/$@][^ \t\n;\/]*/ + +let root_records = [ del /@?/ "@" + . Util.del_ws_tab + . label "@" + . counter "owner" + . [ record ] + . ws_record* ] + +let lns = opt_eol + . control* + . ( (root_records|non_root_records) + . (control|any_record_block)* )? + +let filter = incl "/var/bind/pri/*.zone" +let xfm = transform Dns_Zone.lns filter diff --git a/lenses/dnsmasq.aug b/lenses/dnsmasq.aug index e19aab8..f7ef907 100644 --- a/lenses/dnsmasq.aug +++ b/lenses/dnsmasq.aug @@ -17,26 +17,42 @@ module Dnsmasq = * USEFUL PRIMITIVES *************************************************************************) -let eol = Util.eol -let spc = Util.del_ws_spc -let comment = Util.comment -let empty = Util.empty +let eol = Util.eol +let spc = Util.del_ws_spc +let comment = Util.comment +let empty = Util.empty -let sep_eq = del /=/ "=" -let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ +let sep_eq = Sep.equal +let sto_to_eol = store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ + +let slash = Util.del_str "/" +let sto_no_slash = store /([^\/ \t\n]+)/ +let domains = slash . [ label "domain" . sto_no_slash . slash ]+ (************************************************************************ - * ENTRIES + * SIMPLE ENTRIES *************************************************************************) -let entry_re = /[A-Za-z0-9._-]+/ +let entry_re = Rx.word - /(address|server)/ let entry = [ key entry_re . (sep_eq . sto_to_eol)? . eol ] (************************************************************************ + * STRUCTURED ENTRIES + *************************************************************************) + +let address = [ key "address" . sep_eq . domains . sto_no_slash . eol ] + +let server = + let port = [ Build.xchgs "#" "port" . store Rx.integer ] + in let source = [ Build.xchgs "@" "source" . store /[^#\/ \t\n]+/ . port? ] + in let srv_spec = store /(#|([^#@\/ \t\n]+))/ . port? . source? + in [ key "server" . sep_eq . domains? . srv_spec? . eol ] + +(************************************************************************ * LENS *************************************************************************) -let lns = (comment|empty|entry) * +let lns = (comment|empty|address|server|entry) * let filter = incl "/etc/dnsmasq.conf" . incl "/etc/dnsmasq.d/*" diff --git a/lenses/dovecot.aug b/lenses/dovecot.aug index e3558d0..f7afc8f 100644 --- a/lenses/dovecot.aug +++ b/lenses/dovecot.aug @@ -10,18 +10,18 @@ About: License This file is licensed under the LGPL v2+. About: Configuration files - This lens applies to /etc/dovecot/dovecot.conf and files in + This lens applies to /etc/dovecot/dovecot.conf and files in /etc/dovecot/conf.d/. See . About: Examples The file contains various examples and tests. About: TODO - Support for multiline values like queries in dict-sql.conf + Support for multiline values like queries in dict-sql.conf *) module Dovecot = - + autoload xfm (****************************************************************** @@ -48,10 +48,10 @@ let eq = del /[ \t]*=/ " =" (* Variable: any *) let any = Rx.no_spaces -(* Variable: value +(* Variable: value Match any value after " =". Should not start and end with spaces. May contain spaces inside *) -let value = any . (Rx.space . any)* +let value = any . (Rx.space . any)* (* View: command_start *) let command_start = Util.del_str "!" @@ -67,7 +67,7 @@ let commands = /include|include_try/ (* Variable: block_names *) let block_names = /dict|userdb|passdb|protocol|service|plugin|namespace|map|fields|unix_listener|fifo_listener|inet_listener/ -(* Variable: keys +(* Variable: keys Match any possible key except commands and block names. *) let keys = Rx.word - (commands | block_names) @@ -100,7 +100,7 @@ let dquote_spaces (lns1:lens) (lns2:lens) = let mailbox = indent . dquote_spaces (key /mailbox/ . Sep.space) - (Build.block_newlines (entry) comment . eol) + (Build.block_newlines_spc entry comment . eol) let block_ldelim_newlines_re = /[ \t]+\{([ \t\n]*\n)?/ @@ -111,7 +111,7 @@ let block_newlines (entry:lens) (comment:lens) = . del Build.block_rdelim_newlines_re Build.block_rdelim_newlines_default (* View: block -Map block enclosed in brackets recursively. +Map block enclosed in brackets recursively. Block may be indented and have optional argument. Block body may have entries, comments, empty lines, and nested blocks recursively. *) let rec block = [ indent . key block_names . (Sep.space . Quote.do_dquote_opt (store /[\/A-Za-z0-9_-]+/))? . block_newlines (entry|block|mailbox) comment . eol ] diff --git a/lenses/erlang.aug b/lenses/erlang.aug index 8fa51b6..2d73d25 100644 --- a/lenses/erlang.aug +++ b/lenses/erlang.aug @@ -24,6 +24,9 @@ module Erlang = (* Group: Spacing Functions *) +(* View: space *) +let space = del /[ \t\n]*/ "" + (* View: lspace Add spaces to the left of char *) let lspace (char:string) = del (/[ \t\n]*/ . char) char @@ -72,8 +75,8 @@ let comma = "," (* View: opt_list An optional list of elements, in square brackets *) let opt_list (lns:lens) = rspace lbrack - . Build.opt_list lns (lrspace comma) - . lspace rbrack + . (Build.opt_list lns (lrspace comma) . space)? + . Util.del_str rbrack (* View: integer Store a *) @@ -119,7 +122,7 @@ let value (kw:regexp) (sto:lens) = . sto . lspace rbrace ] -(* View: value +(* View: tuple A tuple of values *) let tuple (one:lens) (two:lens) = [ rspace lbrace @@ -147,6 +150,26 @@ let value_list (kw:regexp) (sto:lens) = let application (name:regexp) (parameter:lens) = list name parameter +(* View: kernel_parameters + Config parameters accepted for kernel app *) +let kernel_parameters = + value "browser_cmd" path + | value "dist_auto_connect" (store /never|once/) + | value "error_logger" (store /tty|false|silent/) + | value "net_setuptime" integer + | value "net_ticktime" integer + | value "shutdown_timeout" integer + | value "sync_nodes_timeout" integer + | value "start_dist_ac" boolean + | value "start_boot_server" boolean + | value "start_disk_log" boolean + | value "start_pg2" boolean + | value "start_timer" boolean + +(* View: kernel + Core Erlang kernel app configuration *) +let kernel = application "kernel" kernel_parameters + (* View: comment *) let comment = Util.comment_generic /%[ \t]*/ "% " @@ -155,7 +178,7 @@ let comment = Util.comment_generic /%[ \t]*/ "% " let config (app:lens) = (Util.empty | comment)* . rspace lbrack - . Build.opt_list app (lrspace comma) + . Build.opt_list (kernel | app) (lrspace comma) . lrspace rbrack . Util.del_str "." . Util.eol . (Util.empty | comment)* diff --git a/lenses/exports.aug b/lenses/exports.aug index 3de0de1..066eece 100644 --- a/lenses/exports.aug +++ b/lenses/exports.aug @@ -76,7 +76,7 @@ About: Limitations module Exports = autoload xfm - let client_re = /[a-zA-Z0-9.@*?\/:-]+/ + let client_re = /[][a-zA-Z0-9.@*?\/:-]+/ let eol = Util.eol let lbracket = Util.del_str "(" @@ -93,6 +93,6 @@ module Exports = let entry = [ label "dir" . store /\/[^ \t]*/ . sep_spc . Build.opt_list client sep_spc . eol ] - let lns = (Hosts.empty | Hosts.comment | entry)* + let lns = (Util.empty | Util.comment | entry)* let xfm = transform lns (incl "/etc/exports") diff --git a/lenses/grub.aug b/lenses/grub.aug index d587606..c52d16c 100644 --- a/lenses/grub.aug +++ b/lenses/grub.aug @@ -84,7 +84,7 @@ module Grub = let kw_menu_arg (kw:regexp) = kw_arg kw "" " " (* View: password_arg *) - let password_arg = [ key "password" . + let password_arg = [ command "password" "" . (spc . [ switch "md5" ])? . (spc . [ switch "encrypted" ])? . spc . store (/[^ \t\n]+/ - /--[^ \t\n]+/) . @@ -220,6 +220,7 @@ module Grub = | map_line | kw_pres "lock" | kw_pres "makeactive" + | password_arg (* View: boot *) let boot = @@ -281,7 +282,8 @@ module Grub = *************************************************************************) (* View: lns *) - let lns = (comment | empty | menu_setting | boot | debian)* + let lns = (comment | empty | menu_setting | debian)* + . (boot . (comment | empty | boot)*)? (* View: filter *) let filter = incl "/boot/grub/grub.conf" diff --git a/lenses/hosts.aug b/lenses/hosts.aug index b4c8c97..6c01367 100644 --- a/lenses/hosts.aug +++ b/lenses/hosts.aug @@ -3,23 +3,13 @@ module Hosts = autoload xfm - let sep_tab = Util.del_ws_tab - let sep_spc = Util.del_ws_spc - - let eol = Util.eol - let indent = Util.indent - - let comment = Util.comment - let comment_or_eol = Util.comment_or_eol - let empty = [ del /[ \t]*#?[ \t]*\n/ "\n" ] - let word = /[^# \n\t]+/ - let record = [ seq "host" . indent . - [ label "ipaddr" . store word ] . sep_tab . + let record = [ seq "host" . Util.indent . + [ label "ipaddr" . store word ] . Sep.tab . [ label "canonical" . store word ] . - [ label "alias" . sep_spc . store word ]* - . comment_or_eol ] + [ label "alias" . Sep.space . store word ]* + . Util.comment_or_eol ] - let lns = ( empty | comment | record ) * + let lns = ( Util.empty | Util.comment | record ) * let xfm = transform lns (incl "/etc/hosts") diff --git a/lenses/httpd.aug b/lenses/httpd.aug index 46336ac..9b50a8f 100644 --- a/lenses/httpd.aug +++ b/lenses/httpd.aug @@ -59,7 +59,7 @@ let empty = Util.empty_dos let indent = Util.indent (* borrowed from shellvars.aug *) -let char_arg_dir = /[^ '"\t\r\n]|\\\\"|\\\\'/ +let char_arg_dir = /[^\\ '"\t\r\n]|\\\\"|\\\\'/ let char_arg_sec = /[^ '"\t\r\n>]|\\\\"|\\\\'/ let cdot = /\\\\./ let cl = /\\\\\n/ @@ -84,15 +84,16 @@ let directive = [ indent . label "directive" . store word . (sep_spc . argv arg_dir)? . eol ] let section (body:lens) = - let eol_comment = Util.comment_generic /[ \t\n]*#[ \t]*/ "# " in + (* opt_eol includes empty lines *) + let opt_eol = del /([ \t]*#?\r?\n)*/ "\n" in let inner = (sep_spc . argv arg_sec)? . sep_osp . - dels ">" . (eol|eol_comment) . (body . (body|comment)*)? . + dels ">" . opt_eol . ((body|comment) . (body|empty|comment)*)? . indent . dels "" ">" . eol ] -let rec content = section (content|directive|empty) +let rec content = section (content|directive) let lns = (content|directive|comment|empty)* @@ -100,6 +101,7 @@ let filter = (incl "/etc/apache2/apache2.conf") . (incl "/etc/apache2/httpd.conf") . (incl "/etc/apache2/ports.conf") . (incl "/etc/apache2/conf.d/*") . + (incl "/etc/apache2/conf-available/*.conf") . (incl "/etc/apache2/mods-available/*") . (incl "/etc/apache2/sites-available/*") . (incl "/etc/httpd/conf.d/*.conf") . diff --git a/lenses/iscsid.aug b/lenses/iscsid.aug new file mode 100644 index 0000000..0f373da --- /dev/null +++ b/lenses/iscsid.aug @@ -0,0 +1,28 @@ +(* +Module: Iscsid +Parses iscsid configuration file +Author: Joey Boggs +About: Reference +This lens is targeted at /etc/iscsi/iscsid.conf +*) +module Iscsid = + autoload xfm + + let filter = incl "/etc/iscsi/iscsid.conf" + + let eol = Util.eol + let indent = Util.indent + let key_re = /[][A-Za-z0-9_.-]+/ + let eq = del /[ \t]*=[ \t]*/ " = " + let value_re = /[^ \t\n](.*[^ \t\n])?/ + + let comment = [ indent . label "#comment" . del /[#;][ \t]*/ "# " + . store /([^ \t\n].*[^ \t\n]|[^ \t\n])/ . eol ] + + let empty = Util.empty + + let kv = [ indent . key key_re . eq . store value_re . eol ] + + let lns = (empty | comment | kv) * + + let xfm = transform lns filter diff --git a/lenses/jaas.aug b/lenses/jaas.aug index 5bf4dae..4f06bad 100644 --- a/lenses/jaas.aug +++ b/lenses/jaas.aug @@ -1,28 +1,36 @@ (* Module Jaas *) -(* Author: Simon Vocella *) +(* Original Author: Simon Vocella *) +(* Updated by: Steve Shipway *) +(* Changes: allow comments within Modules, allow optionless flags, *) +(* allow options without linebreaks, allow naked true/false options *) +(* Trailing ';' terminator should not be included in option value *) +(* Note: requires latest Util.aug for multiline comments to work *) module Jaas = autoload xfm let space_equal = del (/[ \t]*/ . "=" . /[ \t]*/) (" = ") -let lbrace = del (/[ \t\n]*/ . "{") "{" -let rbrace = del ("};") "};" +let lbrace = del (/[ \t\n]*\{[ \t]*\n/) " {\n" +let rbrace = del (/[ \t]*}[ \t]*;/) " };" let word = /[A-Za-z0-9_.-]+/ +let wsnl = del (/[ \t\n]+/) ("\n") +let endflag = del ( /[ \t]*;/ ) ( ";" ) let value_re = let value_squote = /'[^\n']*'/ - in let value_squote_2 = /'[^\n']*';/ in let value_dquote = /"[^\n"]*"/ - in let value_dquote_2 = /"[^\n"]*";/ - in value_squote | value_squote_2 | value_dquote | value_dquote_2 + in let value_tf = /(true|false)/ + in value_squote | value_dquote | value_tf -let moduleOption = [Util.del_opt_ws "" . key word . space_equal . (store value_re . Util.comment_or_eol)] -let flag = [label "flag" . (store word . Util.eol) . moduleOption*] -let loginModuleClass = [Util.del_opt_ws "" . label "loginModuleClass" . (store word . Util.del_ws_spc) . flag] +let moduleOption = [ wsnl . key word . space_equal . (store value_re) ] +let moduleSuffix = ( moduleOption | Util.eol . Util.comment_c_style | Util.comment_multiline ) +let flag = [ Util.del_ws_spc . label "flag" . (store word) . moduleSuffix* . endflag ] +let loginModuleClass = [( Util.del_opt_ws "" . label "loginModuleClass" . (store word) . flag ) ] let content = (Util.empty | Util.comment_c_style | Util.comment_multiline | loginModuleClass)* let loginModule = [Util.del_opt_ws "" . label "login" . (store word . lbrace) . (content . rbrace)] + let lns = (Util.empty | Util.comment_c_style | Util.comment_multiline | loginModule)* let filter = incl "/opt/shibboleth-idp/conf/login.config" let xfm = transform lns filter diff --git a/lenses/known_hosts.aug b/lenses/known_hosts.aug index 157edd1..357fdf3 100644 --- a/lenses/known_hosts.aug +++ b/lenses/known_hosts.aug @@ -32,12 +32,15 @@ autoload xfm (* View: entry A known_hosts entry *) -let entry = [ Util.indent . seq "entry" . store Rx.neg1 - . Sep.space - . [ label "type" . store Rx.no_spaces ] - . Sep.space - . [ label "key" . store Rx.no_spaces ] - . Util.eol ] +let entry = + let alias = [ label "alias" . store Rx.neg1 ] + in [ Util.indent . seq "entry" . store Rx.neg1 + . (Sep.comma . Build.opt_list alias Sep.comma)? + . Sep.space + . [ label "type" . store Rx.no_spaces ] + . Sep.space + . [ label "key" . store Rx.no_spaces ] + . Util.eol ] (* View: lns The known_hosts lens *) diff --git a/lenses/krb5.aug b/lenses/krb5.aug index 8b4ebe4..37778fd 100644 --- a/lenses/krb5.aug +++ b/lenses/krb5.aug @@ -22,6 +22,7 @@ let closebr = del /[ \t]*\}/ "}" *) let realm_re = /[A-Z][.a-zA-Z0-9-]*/ +let realm_anycase_re = /[A-Za-z][.a-zA-Z0-9-]*/ let app_re = /[a-z][a-zA-Z0-9_]*/ let name_re = /[.a-zA-Z0-9_-]+/ @@ -84,14 +85,14 @@ let appdefaults = let realms = let simple_option = /kdc|admin_server|database_module|default_domain/ |/v4_realm|auth_to_local(_names)?|master_kdc|kpasswd_server/ - |/admin_server|ticket_lifetime|pkinit_anchors/ in + |/admin_server|ticket_lifetime|pkinit_anchors|krb524_server/ in let subsec_option = /v4_instance_convert/ in let option = subsec_entry simple_option eq comment in let subsec = [ indent . key subsec_option . eq_openbr . (subsec_entry name_re eq comment)* . closebr . eol ] in let v4subsec = [ indent . key /host|plain/ . eq_openbr . (subsec_entry name_re eq comment)* . closebr . eol ] in - let realm = [ indent . label "realm" . store realm_re . + let realm = [ indent . label "realm" . store realm_anycase_re . eq_openbr . (option|subsec|(v4_name_convert v4subsec))* . closebr . eol ] in record "realms" (realm|comment) diff --git a/lenses/limits.aug b/lenses/limits.aug index c935a75..90a25c8 100644 --- a/lenses/limits.aug +++ b/lenses/limits.aug @@ -14,6 +14,7 @@ module Limits = *************************************************************************) let eol = Util.eol +let comment_or_eol = Util.comment_or_eol let spc = Util.del_ws_spc let comment = Util.comment let empty = Util.empty @@ -56,7 +57,7 @@ let value = [ label "value" . store /[A-Za-z0-9_.\/-]+/ ] let entry = [ domain . spc . type . spc . item . spc - . value . eol ] + . value . comment_or_eol ] (************************************************************************ * LENS diff --git a/lenses/logrotate.aug b/lenses/logrotate.aug index 2afa0f6..7385392 100644 --- a/lenses/logrotate.aug +++ b/lenses/logrotate.aug @@ -57,37 +57,39 @@ module Logrotate = let attrs = select_to_eol "schedule" /(daily|weekly|monthly|yearly)/ | value_to_eol "rotate" num - | create - | flag_to_eol "nocreate" - | su - | value_to_eol "include" word - | select_to_eol "missingok" /(no)?missingok/ - | select_to_eol "compress" /(no)?compress/ - | select_to_eol "delaycompress" /(no)?delaycompress/ - | select_to_eol "ifempty" /(not)?ifempty/ - | select_to_eol "sharedscripts" /(no)?sharedscripts/ - | value_to_eol "size" size - | tabooext - | value_to_eol "olddir" word - | flag_to_eol "noolddir" - | value_to_eol "mail" word - | flag_to_eol "mailfirst" - | flag_to_eol "maillast" - | flag_to_eol "nomail" - | value_to_eol "errors" word - | value_to_eol "extension" word - | select_to_eol "dateext" /(no)?dateext/ - | value_to_eol "compresscmd" word - | value_to_eol "uncompresscmd" word - | value_to_eol "compressext" word - | list_to_eol "compressoptions" - | select_to_eol "copy" /(no)?copy/ - | select_to_eol "copytruncate" /(no)?copytruncate/ - | value_to_eol "maxage" num - | value_to_eol "minsize" size - | select_to_eol "shred" /(no)?shred/ - | value_to_eol "shredcycles" num - | value_to_eol "start" num + | create + | flag_to_eol "nocreate" + | su + | value_to_eol "include" word + | select_to_eol "missingok" /(no)?missingok/ + | select_to_eol "compress" /(no)?compress/ + | select_to_eol "delaycompress" /(no)?delaycompress/ + | select_to_eol "ifempty" /(not)?ifempty/ + | select_to_eol "sharedscripts" /(no)?sharedscripts/ + | value_to_eol "size" size + | tabooext + | value_to_eol "olddir" word + | flag_to_eol "noolddir" + | value_to_eol "mail" word + | flag_to_eol "mailfirst" + | flag_to_eol "maillast" + | flag_to_eol "nomail" + | value_to_eol "errors" word + | value_to_eol "extension" word + | select_to_eol "dateext" /(no)?dateext/ + | value_to_eol "dateformat" word + | value_to_eol "compresscmd" word + | value_to_eol "uncompresscmd" word + | value_to_eol "compressext" word + | list_to_eol "compressoptions" + | select_to_eol "copy" /(no)?copy/ + | select_to_eol "copytruncate" /(no)?copytruncate/ + | value_to_eol "maxage" num + | value_to_eol "minsize" size + | value_to_eol "maxsize" size + | select_to_eol "shred" /(no)?shred/ + | value_to_eol "shredcycles" num + | value_to_eol "start" num (* Define hooks *) @@ -118,6 +120,6 @@ module Logrotate = let filter = incl "/etc/logrotate.d/*" . incl "/etc/logrotate.conf" - . Util.stdexcl + . Util.stdexcl let xfm = transform lns filter diff --git a/lenses/mailscanner.aug b/lenses/mailscanner.aug new file mode 100644 index 0000000..972ae4a --- /dev/null +++ b/lenses/mailscanner.aug @@ -0,0 +1,65 @@ +(* +Module: Mailscanner + Parses MailScanner configuration files. + +Author: Andrew Colin Kissa + Baruwa Enterprise Edition http://www.baruwa.com + +About: License + This file is licensed under the LGPL v2+. + +About: Configuration files + This lens applies to /etc/MailScanner/MailScanner.conf and files in + /etc/MailScanner/conf.d/. See . +*) + +module Mailscanner = +autoload xfm + +(************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) +let comment = Util.comment + +let empty = Util.empty + +let space = Sep.space + +let eol = Util.eol + +let non_eq = /[^ =\t\r\n]+/ + +let non_space = /[^# \t\n]/ + +let any = /.*/ + +let word = /[A-Za-z%][ :<>%A-Za-z0-9_.-]+[A-Za-z%2]/ + +let include_kw = /include/ + +let keys = word - include_kw + +let eq = del /[ \t]*=/ " =" + +let indent = del /[ \t]*(\n[ \t]+)?/ " " + +let line_value = store (non_space . any . non_space | non_space) + +(************************************************************************ + * Group: Entries + *************************************************************************) + +let include_line = Build.key_value_line include_kw space (store non_eq) + +let normal_line = [ key keys . eq . (indent . line_value)? . eol ] + +(************************************************************************ + * Group: Lns and Filter + *************************************************************************) + +let lns = (empty|include_line|normal_line|comment) * + +let filter = (incl "/etc/MailScanner/MailScanner.conf") + . (incl "/etc/MailScanner/conf.d/*.conf") + +let xfm = transform lns filter diff --git a/lenses/mailscanner_rules.aug b/lenses/mailscanner_rules.aug new file mode 100644 index 0000000..87ba227 --- /dev/null +++ b/lenses/mailscanner_rules.aug @@ -0,0 +1,75 @@ +(* +Module: Mailscanner_rules + Parses MailScanner rules files. + +Author: Andrew Colin Kissa + Baruwa Enterprise Edition http://www.baruwa.com + +About: License + This file is licensed under the LGPL v2+. + +About: Configuration files + This lens applies to MailScanner rules files + The format is described below: + + # NOTE: Fields are separated by TAB characters --- Important! + # + # Syntax is allow/deny/deny+delete/rename/rename to replacement-text/email-addresses, + # then regular expression, + # then log text, + # then user report text. + # The "email-addresses" can be a space or comma-separated list of email + # addresses. If the rule hits, the message will be sent to these address(es) + # instead of the original recipients. + + # If a rule is a "rename" rule, then the attachment filename will be renamed + # according to the "Default Rename Pattern" setting in MailScanner.conf. + # If a rule is a "rename" rule and the "to replacement-text" is supplied, then + # the text matched by the regular expression in the 2nd field of the line + # will be replaced with the "replacement-text" string. + # For example, the rule + # rename to .ppt \.pps$ Renamed .pps to .ppt Renamed .pps to .ppt + # will find all filenames ending in ".pps" and rename them so they end in + # ".ppt" instead. +*) + +module Mailscanner_Rules = +autoload xfm + +(************************************************************************ + * USEFUL PRIMITIVES + *************************************************************************) + +let eol = del /\n/ "\n" +let ws = del /[\t]+/ "\t" +let comment = Util.comment +let empty = Util.empty +let action = /allow|deny|deny\+delete|rename|rename[ ]+to[ ]+[^# \t\n]+|([A-Za-z0-9_+.-]+@[A-Za-z0-9_.-]+[, ]?)+/ +let non_space = /[^# \t\n]+/ +let non_tab = /[^\t\n]+/ + +let field (l:string) (r:regexp) + = [ label l . store r ] + +(************************************************************************ + * ENTRIES + *************************************************************************) + +let entry = [ seq "rule" . field "action" action + . ws . field "regex" non_tab + . ws . field "log-text" non_tab + . ws . field "user-report" non_tab + . eol ] + +(************************************************************************ + * LENS + *************************************************************************) + +let lns = (comment|empty|entry)* + +let filter = (incl "/etc/MailScanner/filename.rules.conf") + . (incl "/etc/MailScanner/filetype.rules.conf") + . (incl "/etc/MailScanner/archives.filename.rules.conf") + . (incl "/etc/MailScanner/archives.filetype.rules.conf") + +let xfm = transform lns filter diff --git a/lenses/mcollective.aug b/lenses/mcollective.aug index e3099c5..e23b372 100644 --- a/lenses/mcollective.aug +++ b/lenses/mcollective.aug @@ -35,5 +35,7 @@ let lns = Simplevars.lns let filter = incl "/etc/mcollective/client.cfg" . incl "/etc/mcollective/server.cfg" + . incl "/etc/puppetlabs/mcollective/client.cfg" + . incl "/etc/puppetlabs/mcollective/server.cfg" let xfm = transform lns filter diff --git a/lenses/nagioscfg.aug b/lenses/nagioscfg.aug index bc0be65..c760875 100644 --- a/lenses/nagioscfg.aug +++ b/lenses/nagioscfg.aug @@ -26,7 +26,7 @@ autoload xfm let param_def = let space_in = /[^ \t\n][^\n=]*[^ \t\n]|[^ \t\n]/ in key /[A-Za-z0-9_]+/ - . Sep.space_equal + . Sep.opt_space . Sep.equal . Sep.opt_space . store space_in (* View: macro_def diff --git a/lenses/nginx.aug b/lenses/nginx.aug index 7d72c47..082fd91 100644 --- a/lenses/nginx.aug +++ b/lenses/nginx.aug @@ -33,28 +33,75 @@ autoload xfm (* Variable: block_re The keywords reserved for block entries *) -let block_re = "http" | "events" - | "server" | "upstream" - | "location" | "if" +let block_re = "http" | "events" | "server" | "mail" | "stream" + +(* All block keywords, including the ones we treat specially *) +let block_re_all = block_re | "if" | "location" | "geo" | "map" + | "split_clients" | "upstream" (* View: simple A simple entry *) -let simple = - let kw = Rx.word - block_re +let simple = + let kw = Rx.word - block_re_all in let sto = store /[^ \t\n;][^;]*/ . Sep.semicolon - in Build.key_value_line_comment - kw Sep.space sto Util.comment_eol + in [ Util.indent . key kw . Sep.space . sto . (Util.eol|Util.comment_eol) ] + +let arg (name:string) (rx:regexp) = + [ label name . Sep.space . store rx ] + +(* Match any argument (as much as possible) *) +let any_rx = + let bare_rx = /[^" \t\n{][^ \t\n{]*/ in + let dquote_rx = /"([^\"]|\\.)*"/ in + bare_rx | dquote_rx + +let any_arg (name:string) = arg name any_rx + +(* 'if' conditions are enclosed in matching parens which we can't match + precisely with a regular expression. Instead, we gobble up anything that + doesn't contain an opening brace. That can of course lead to trouble if + a condition actually contains an opening brace *) +let block_if = key "if" + . arg "#cond" /\(([^ \t\n{]|[ \t\n][^{])*\)/ + +let block_location = key "location" + . (arg "#comp" /=|~|~\*|\^~/)? + . any_arg "#uri" + +let block_geo = key "geo" + . (any_arg "#address")? + . any_arg "#geo" + +let block_map = key "map" + . any_arg "#source" + . any_arg "#variable" + +let block_split_clients = key "split_clients" + . any_arg "#string" + . any_arg "#variable" + +let block_upstream = key "upstream" + . any_arg "#name" + +let block_head = key block_re + | block_if + | block_location + | block_geo + | block_map + | block_split_clients + | block_upstream (* View: block A block containing entries *) -let block = - let entry = Util.indent . simple - in [ key block_re - . Build.block_newlines entry Util.comment - . Util.eol ] +let block (entry : lens) = + [ Util.indent . block_head + . Build.block_newlines entry Util.comment + . Util.eol ] + +let rec directive = simple | block directive (* View: lns *) -let lns = ( Util.comment | Util.empty | simple | block )* +let lns = ( Util.comment | Util.empty | directive )* (* Variable: filter *) let filter = incl "/etc/nginx/nginx.conf" diff --git a/lenses/pagekite.aug b/lenses/pagekite.aug index a5a8610..83ced80 100644 --- a/lenses/pagekite.aug +++ b/lenses/pagekite.aug @@ -1,5 +1,5 @@ (* -Module: Hostname +Module: Pagekite Parses /etc/pagekite.d/ Author: Michael Pimmer @@ -16,6 +16,7 @@ autoload xfm (* Variables *) let equals = del /[ \t]*=[ \t]*/ "=" let neg2 = /[^# \n\t]+/ +let neg3 = /[^# \:\n\t]+/ let eol = del /\n/ "\n" (* Match everything from here to eol, cropping whitespace at both ends *) let to_eol = /[^ \t\n](.*[^ \t\n])?/ @@ -44,14 +45,16 @@ let kv_frontend = Build.key_value_line ( "kitename" | "fe_certname" | "ca_certs" | "tls_endpoint" ) equals (store Rx.neg1) -(* entries for 80_*.rc *) +(* entries for services like 80_httpd.rc *) let service_colon = del /[ \t]*:[ \t]*/ " : " -let store_domain = store /[^: \t\n]+:[^: \t\n]+/ let service_on = [ key "service_on" . [ seq "service_on" . equals . - [ label "source" . store_domain ] . service_colon . - [label "destination" . store_domain] . service_colon . ( - [ label "secret" . store Rx.no_spaces . Util.eol ] | eol + [ label "protocol" . store neg3 ] . service_colon . + [ label "kitename" . (store neg3) ] . service_colon . + [ label "backend_host" . (store neg3) ] . service_colon . + [ label "backend_port" . (store neg3) ] . service_colon . ( + [ label "secret" . (store Rx.no_spaces) . Util.eol ] | eol ) ] ] + let service_cfg = [ key "service_cfg" . equals . store to_eol . eol ] let flags = ( "defaults" | "isfrontend" | "abort_not_configured" | "insecure" ) diff --git a/lenses/passwd.aug b/lenses/passwd.aug index c82ed81..a2ab4f9 100644 --- a/lenses/passwd.aug +++ b/lenses/passwd.aug @@ -35,11 +35,15 @@ let colon = Sep.colon let sto_to_eol = store Rx.space_in let sto_to_col = store /[^:\r\n]+/ +(* Store an empty string if nothing matches *) +let sto_to_col_or_empty = store /[^:\r\n]*/ (************************************************************************ * Group: ENTRIES *************************************************************************) +let username = /[_.A-Za-z0-9][-_.A-Za-z0-9]*\$?/ + (* View: password pw_passwd *) let password = [ label "password" . sto_to_col? . colon ] @@ -66,7 +70,7 @@ let shell = [ label "shell" . sto_to_eol? ] (* View: entry struct passwd *) -let entry = [ key word +let entry = [ key username . colon . password . uid @@ -76,22 +80,36 @@ let entry = [ key word . shell . eol ] -(* A NIS entry has nothing bar the +@:::::: bits. *) +(* NIS entries *) +let niscommon = [ label "password" . sto_to_col ]? . colon + . [ label "uid" . store integer ]? . colon + . [ label "gid" . store integer ]? . colon + . [ label "name" . sto_to_col ]? . colon + . [ label "home" . sto_to_col ]? . colon + . [ label "shell" . sto_to_eol ]? + let nisentry = let overrides = colon - . [ label "password" . sto_to_col ]? . colon - . [ label "uid" . store integer ]? . colon - . [ label "gid" . store integer ]? . colon - . [ label "name" . sto_to_col ]? . colon - . [ label "home" . sto_to_col ]? . colon - . [ label "shell" . sto_to_eol ]? in - [ dels "+@" . label "@nis" . store word . overrides . eol ] + . niscommon in + [ dels "+@" . label "@nis" . store username . overrides . eol ] + +let nisuserplus = + let overrides = + colon + . niscommon in + [ dels "+" . label "@+nisuser" . store username . overrides . eol ] + +let nisuserminus = + let overrides = + colon + . niscommon in + [ dels "-" . label "@-nisuser" . store username . overrides . eol ] let nisdefault = let overrides = colon - . [ label "password" . store word? . colon ] + . [ label "password" . sto_to_col_or_empty . colon ] . [ label "uid" . store integer? . colon ] . [ label "gid" . store integer? . colon ] . [ label "name" . sto_to_col? . colon ] @@ -103,7 +121,7 @@ let nisdefault = * LENS *************************************************************************) -let lns = (comment|empty|entry|nisentry|nisdefault) * +let lns = (comment|empty|entry|nisentry|nisdefault|nisuserplus|nisuserminus) * let filter = incl "/etc/passwd" diff --git a/lenses/pgbouncer.aug b/lenses/pgbouncer.aug new file mode 100644 index 0000000..5539587 --- /dev/null +++ b/lenses/pgbouncer.aug @@ -0,0 +1,55 @@ +(* +Module: Pgbouncer + Parses Pgbouncer ini configuration files. + +Author: Andrew Colin Kissa + Baruwa Enterprise Edition http://www.baruwa.com + +About: License + This file is licensed under the LGPL v2+. + +About: Configuration files + This lens applies to /etc/pgbouncer.ini See . + +About: TODO + Create a tree for the database options +*) + +module Pgbouncer = +autoload xfm + +(************************************************************************ + * Group: USEFUL PRIMITIVES + ************************************************************************) + +let comment = IniFile.comment IniFile.comment_re IniFile.comment_default + +let sep = IniFile.sep "=" "=" + +let eol = Util.eol + +let entry_re = ( /[A-Za-z][:#A-Za-z0-9._-]+|\*/) + +(************************************************************************ + * Group: ENTRY + *************************************************************************) + +let non_db_line = [ key entry_re . sep . IniFile.sto_to_eol? . eol ] + +let entry = non_db_line|comment + +let title = IniFile.title IniFile.record_re + +let record = IniFile.record title entry + +(****************************************************************** + * Group: LENS AND FILTER + ******************************************************************) + +let lns = IniFile.lns record comment + +(* Variable: filter *) +let filter = incl "/etc/pgbouncer.ini" + +let xfm = transform lns filter + diff --git a/lenses/postfix_sasl_smtpd.aug b/lenses/postfix_sasl_smtpd.aug new file mode 100644 index 0000000..c5bf7ec --- /dev/null +++ b/lenses/postfix_sasl_smtpd.aug @@ -0,0 +1,22 @@ +module Postfix_sasl_smtpd = + autoload xfm + + let eol = Util.eol + let colon = del /:[ \t]*/ ": " + let value_to_eol = store Rx.space_in + + let simple_entry (kw:string) = [ key kw . colon . value_to_eol . eol ] + + let entries = simple_entry "pwcheck_method" + | simple_entry "auxprop_plugin" + | simple_entry "saslauthd_path" + | simple_entry "mech_list" + | simple_entry "sql_engine" + | simple_entry "log_level" + | simple_entry "auto_transition" + + let lns = entries+ + + let filter = incl "/etc/postfix/sasl/smtpd.conf" + + let xfm = transform lns filter diff --git a/lenses/postgresql.aug b/lenses/postgresql.aug index 93a7047..5f0470b 100644 --- a/lenses/postgresql.aug +++ b/lenses/postgresql.aug @@ -69,7 +69,9 @@ let entry = entry_gen number let lns = (Util.empty | Util.comment | entry)* (* Variable: filter *) -let filter = incl "/etc/postgresql/*/*/postgresql.conf" +let filter = (incl "/var/lib/pgsql/data/postgresql.conf" . + incl "/var/lib/pgsql/*/data/postgresql.conf" . + incl "/etc/postgresql/*/*/postgresql.conf" ) let xfm = transform lns filter diff --git a/lenses/puppetfile.aug b/lenses/puppetfile.aug new file mode 100644 index 0000000..5389bd1 --- /dev/null +++ b/lenses/puppetfile.aug @@ -0,0 +1,52 @@ +(* +Module: Puppetfile + Parses libarian-puppet's Puppetfile format + +Author: Raphael Pinson + +About: Reference + See https://github.com/rodjek/librarian-puppet + +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 Puppetfiles. + +About: Examples + The file contains various examples and tests. +*) + +module Puppetfile = + +(* View: comma + a comma, optionally preceded or followed by spaces or newlines *) +let comma = del /[ \t\n]*,[ \t\n]*/ ", " + +(* View: forge + a forge entry *) +let forge = [ Util.indent . key "forge" . Sep.space . Quote.any . Util.eol ] + +(* View: metadata + a metadata entry *) +let metadata = [ Util.indent . key "metadata" . Util.eol ] + +(* View: mod + a module entry, with optional version and options *) +let mod = + let mod_name = Quote.do_quote (store (Rx.word . /[\/-]/ . Rx.word)) + in let version = [ label "@version" . Quote.do_quote (store /[^:\n]+/) ] + in let opt = [ Util.del_str ":" . key Rx.word . del /[ \t]*=>[ \t]*/ " => " + . Quote.do_quote (store /[^,\n]*/) ] + in let opts = Build.opt_list opt comma + in [ Util.indent . Util.del_str "mod" . seq "mod" . Sep.space . mod_name + . (comma . version)? + . (comma . opts)? + . Util.eol ] + +(* View: lns + the Puppetfile lens *) +let lns = (Util.empty | Util.comment | forge | metadata | mod)* diff --git a/lenses/pylonspaste.aug b/lenses/pylonspaste.aug new file mode 100644 index 0000000..0b56ddd --- /dev/null +++ b/lenses/pylonspaste.aug @@ -0,0 +1,78 @@ +(* +Module: PylonsPaste + Parses Pylons Paste ini configuration files. + +Author: Andrew Colin Kissa + Baruwa Enterprise Edition http://www.baruwa.com + +About: License + This file is licensed under the LGPL v2+. + +About: Configuration files + This lens applies to /etc/baruwa See . +*) + +module Pylonspaste = +autoload xfm + +(************************************************************************ + * Group: USEFUL PRIMITIVES + *************************************************************************) + +let comment = IniFile.comment IniFile.comment_re IniFile.comment_default + +let sep = IniFile.sep "=" "=" + +let eol = Util.eol + +let optspace = del /\n/ "\n" + +let entry_re = ( /[A-Za-z][:#A-Za-z0-9._-]+/) + +let plugin_re = /[A-Za-z][;:#A-Za-z0-9._-]+/ + +let plugins_kw = /plugins/ + +let debug_kw = /debug/ + +let normal_opts = entry_re - (debug_kw|plugins_kw) + +let del_opt_ws = del /[\t ]*/ "" + +let new_ln_sep = optspace . del_opt_ws . store plugin_re + +let plugins_multiline = sep . counter "items" . [ seq "items" . new_ln_sep]* + +let sto_multiline = optspace . Sep.opt_space . store (Rx.space_in . (/[ \t]*\n/ . Rx.space . Rx.space_in)*) + +(************************************************************************ + * Group: ENTRY + *************************************************************************) + +let set_option = Util.del_str "set " +let no_inline_comment_entry (kw:regexp) (sep:lens) (comment:lens) = + [ set_option . key debug_kw . sep . IniFile.sto_to_eol . eol ] + | [ key plugins_kw . plugins_multiline . eol] + | [ key kw . sep . IniFile.sto_to_eol? . eol ] + | comment + +let entry = no_inline_comment_entry normal_opts sep comment + +(************************************************************************ + * RECORD + *************************************************************************) + +let title = IniFile.title IniFile.record_re + +let record = IniFile.record title entry + +(************************************************************************ + * Group: LENS & FILTER + *************************************************************************) + +let lns = IniFile.lns record comment + +let filter = incl "/etc/baruwa/*.ini" + +let xfm = transform lns filter + diff --git a/lenses/pythonpaste.aug b/lenses/pythonpaste.aug index 213e435..e9a1f78 100644 --- a/lenses/pythonpaste.aug +++ b/lenses/pythonpaste.aug @@ -20,8 +20,10 @@ let eol = Util.eol let url_entry = /\/[\/A-Za-z0-9.-_]* ?[:|=] [A-Za-z0-9.-_]+/ +let set_kw = [ Util.del_str "set" . Util.del_ws_spc . label "@set" ] + let no_inline_comment_entry (kw:regexp) (sep:lens) (comment:lens) - = [ key kw . sep . IniFile.sto_to_eol? . eol ] + = [ set_kw? . key kw . sep . IniFile.sto_to_eol? . eol ] | comment | [ seq "urls" . store url_entry . eol ] diff --git a/lenses/shadow.aug b/lenses/shadow.aug index dc2ace3..959cb3a 100644 --- a/lenses/shadow.aug +++ b/lenses/shadow.aug @@ -45,25 +45,34 @@ let sto_to_eol = Passwd.sto_to_eol (************************************************************************ * Group: ENTRIES *************************************************************************) - +(* Common for entry and nisdefault *) +let common = [ label "lastchange_date" . store integer? . colon ] + . [ label "minage_days" . store integer? . colon ] + . [ label "maxage_days" . store integer? . colon ] + . [ label "warn_days" . store integer? . colon ] + . [ label "inactive_days" . store integer? . colon ] + . [ label "expire_date" . store integer? . colon ] + . [ label "flag" . store integer? ] + (* View: entry *) -let entry = [ key word - . colon - . [ label "password" . sto_to_col? . colon ] - . [ label "lastchange_date" . store integer? . colon ] - . [ label "minage_days" . store integer? . colon ] - . [ label "maxage_days" . store integer? . colon ] - . [ label "warn_days" . store integer? . colon ] - . [ label "inactive_days" . store integer? . colon ] - . [ label "expire_date" . store integer? . colon ] - . [ label "flag" . store integer? ] - . eol ] +let entry = [ key word + . colon + . [ label "password" . sto_to_col? . colon ] + . common + . eol ] + +let nisdefault = + let overrides = + colon + . [ label "password" . store word? . colon ] + . common in + [ dels "+" . label "@nisdefault" . overrides? . eol ] (************************************************************************ * LENS *************************************************************************) -let lns = (comment|empty|entry) * +let lns = (comment|empty|entry|nisdefault) * let filter = incl "/etc/shadow" diff --git a/lenses/shellvars.aug b/lenses/shellvars.aug index 073f69b..25bb82b 100644 --- a/lenses/shellvars.aug +++ b/lenses/shellvars.aug @@ -13,12 +13,15 @@ About: Lens Usage module Shellvars = autoload xfm + (* Delete a blank line, rather than mapping it *) + let del_empty = del (Util.empty_generic_re . "\n") "\n" + let empty = Util.empty let empty_part_re = Util.empty_generic_re . /\n+/ let eol = del (/[ \t]+|[ \t]*[;\n]/ . empty_part_re*) "\n" let semicol_eol = del (/[ \t]*[;\n]/ . empty_part_re*) "\n" - let key_re = /[A-Za-z0-9_]+(\[[0-9]+\])?/ - ("unset" | "export") + let key_re = /[A-Za-z0-9_]+(\[[0-9A-Za-z_,]+\])?/ - ("unset" | "export") let matching_re = "${!" . key_re . /[\*@]\}/ let eq = Util.del_str "=" @@ -140,7 +143,7 @@ module Shellvars = let case_entry = [ label "@case_entry" . Util.indent . store /[^ \t\n\)]+/ . Util.del_str ")" . eol - . ( entry+ | entry_noeol )? + . entry* . entry_noeol? . Util.indent . Util.del_str ";;" . eol ] in [ keyword_label "case" "@case" . Sep.space . store (char+ | ("\"" . char+ . "\"")) @@ -186,9 +189,9 @@ module Shellvars = | case entry entry_noeol | function entry - let lns_norec = empty* . (comment | entry_eol) * + let lns_norec = del_empty* . (comment | entry_eol) * - let lns = empty* . (comment | entry_eol | rec_entry) * + let lns = del_empty* . (comment | entry_eol | rec_entry) * let sc_incl (n:string) = (incl ("/etc/sysconfig/" . n)) let sc_excl (n:string) = (excl ("/etc/sysconfig/" . n)) @@ -244,6 +247,7 @@ module Shellvars = . incl "/etc/lintianrc" . incl "/etc/lsb-release" . incl "/etc/os-release" + . incl "/etc/periodic.conf" . incl "/etc/popularity-contest.conf" . incl "/etc/rc.conf" . incl "/etc/rc.conf.local" diff --git a/lenses/shellvars_list.aug b/lenses/shellvars_list.aug index 53c79a9..f2c0c19 100644 --- a/lenses/shellvars_list.aug +++ b/lenses/shellvars_list.aug @@ -17,22 +17,24 @@ module Shellvars_list = let dqword = /([^ "\\\t\n]|\\\\.)+/ let uqword = /([^ `"'\\\t\n]|\\\\.)+/ let bqword = /`[^`\n]*`/ + let space_or_nl = /[ \t\n]+/ + let space_or_cl = space_or_nl | Rx.cl (* lists values of the form ... val1 val2 val3 ... *) - let list(word:regexp) = + let list (word:regexp) (sep:regexp) = let list_value = store word in indent . [ label "value" . list_value ] . - [ del /[ \t\n]+/ " " . label "value" . list_value ]* . indent + [ del sep " " . label "value" . list_value ]* . indent (* handle single quoted lists *) let squote_arr = [ label "quote" . store /'/ ] - . (list sqword)? . del /'/ "'" + . (list sqword space_or_nl)? . del /'/ "'" (* similarly handle double qouted lists *) let dquote_arr = [ label "quote" . store /"/ ] - . (list dqword)? . del /"/ "\"" + . (list dqword space_or_cl)? . del /"/ "\"" (* handle unquoted single value *) let unquot_val = [ label "quote" . store "" ] diff --git a/lenses/ssh.aug b/lenses/ssh.aug index d09f529..d686594 100644 --- a/lenses/ssh.aug +++ b/lenses/ssh.aug @@ -51,7 +51,7 @@ module Ssh = let commas_entry (k:regexp) = let value = [ seq "commas_entry" . value_to_comma] - in [ key k . counter "commas_entry" . spc . + in [ indent . key k . counter "commas_entry" . spc . Build.opt_list value comma . eol ] let fw_entry (k:regexp) = [ indent . key k . spc . diff --git a/lenses/sudoers.aug b/lenses/sudoers.aug index 53516f6..7567772 100644 --- a/lenses/sudoers.aug +++ b/lenses/sudoers.aug @@ -105,7 +105,7 @@ let sto_to_com_host = store /[^,=:#() \t\n\\]+/ Escaped spaces and NIS domains and allowed*) let sto_to_com_user = let nis_re = /([A-Z]([-A-Z0-9]|(\\\\[ \t]))*+\\\\\\\\)/ - in let user_re = /[%+@a-z]([-A-Za-z0-9._]|(\\\\[ \t]))*/ + in let user_re = /[%+@a-z]([-A-Za-z0-9._+]|(\\\\[ \t]))*/ in let alias_re = /[A-Z_]+/ in store ((nis_re? . user_re) | alias_re) diff --git a/lenses/sysconfig.aug b/lenses/sysconfig.aug index 8c505b3..5fd6c38 100644 --- a/lenses/sysconfig.aug +++ b/lenses/sysconfig.aug @@ -46,8 +46,10 @@ module Sysconfig = let word = char* . "\"" . char* in Quote.do_squote (store word+) - let export = Shellvars.export - let kv (value:lens) = [ export? . key key_re . eq . value . comment_or_eol ] + let kv (value:lens) = + let export = Shellvars.export in + let indent = Util.del_opt_ws "" in + [ indent . export? . key key_re . eq . value . comment_or_eol ] let assign = let nothing = del /(""|'')?/ "" . value "" in diff --git a/lenses/sysctl.aug b/lenses/sysctl.aug index cd98b53..2803145 100644 --- a/lenses/sysctl.aug +++ b/lenses/sysctl.aug @@ -23,7 +23,8 @@ module Sysctl = autoload xfm (* Variable: filter *) -let filter = incl "/etc/sysctl.conf" +let filter = incl "/boot/loader.conf" + . incl "/etc/sysctl.conf" . incl "/etc/sysctl.d/*" . excl "/etc/sysctl.d/README" . excl "/etc/sysctl.d/README.sysctl" diff --git a/lenses/tests/test_afs_cellalias.aug b/lenses/tests/test_afs_cellalias.aug new file mode 100644 index 0000000..eee3d43 --- /dev/null +++ b/lenses/tests/test_afs_cellalias.aug @@ -0,0 +1,42 @@ +(* +Module: Test_AFS_cellalias + Provides unit tests and examples for the lens. +*) + +module Test_AFS_cellalias = + +(* Variable: conf + A full configuration *) +let conf = "# Cell Aliases are meant to act like symlinks like '/afs/openafs.org -> oao' +# in root.afs, so sites relying on such a link for their cell can use dynroot. +# These aliases are set with 'fs newalias', or read from +# /usr/vice/etc/CellAlias +# +# Formating for /usr/vice/etc/CellAlias is in the form +# +# an example would be +# fnal.gov/common/usr usr + +fnal.gov fnal +fnal.gov/files fnal-files +" + +(* Test: AFS_cellalias.lns + Test the full *) +test AFS_cellalias.lns get conf = { "#comment" = "Cell Aliases are meant to act like symlinks like '/afs/openafs.org -> oao'" } + { "#comment" = "in root.afs, so sites relying on such a link for their cell can use dynroot." } + { "#comment" = "These aliases are set with 'fs newalias', or read from" } + { "#comment" = "/usr/vice/etc/CellAlias" } + { } + { "#comment" = "Formating for /usr/vice/etc/CellAlias is in the form" } + { "#comment" = " " } + { "#comment" = "an example would be" } + { "#comment" = "fnal.gov/common/usr usr" } + { } + { "target" = "fnal.gov" + { "linkname" = "fnal" } + } + { "target" = "fnal.gov/files" + { "linkname" = "fnal-files" } + } + diff --git a/lenses/tests/test_authorized_keys.aug b/lenses/tests/test_authorized_keys.aug index 9935e57..69f2f3c 100644 --- a/lenses/tests/test_authorized_keys.aug +++ b/lenses/tests/test_authorized_keys.aug @@ -115,3 +115,14 @@ test Authorized_Keys.lns get options = } { "type" = "ssh-dsa" } } + +(* Test: Authorized_keys.lns + GH 165 *) +test Authorized_keys.lns get "command=\"echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10\" ssh-rsa DEADBEEF== username1\n" = + { "key" = "DEADBEEF==" + { "options" + { "command" = "echo 'Please login as the user \\\"blaauser\\\" rather than the user \\\"root\\\".';echo;sleep 10" } + } + { "type" = "ssh-rsa" } + { "comment" = "username1" } + } diff --git a/lenses/tests/test_chrony.aug b/lenses/tests/test_chrony.aug index 4917358..c4b552e 100644 --- a/lenses/tests/test_chrony.aug +++ b/lenses/tests/test_chrony.aug @@ -35,7 +35,7 @@ generatecommandkey noclientlog logchange 0.5 logdir /var/log/chrony -log rtc +log rtc measurements leapsectz right/UTC broadcast 10 192.168.1.255 broadcast 10 192.168.100.255 123 @@ -102,6 +102,7 @@ initstepslew 30 foo.bar.com baz.quz.com { "logdir" = "/var/log/chrony" } { "log" { "rtc" } + { "measurements" } } { "leapsectz" = "right/UTC" } { "broadcast" diff --git a/lenses/tests/test_clamav.aug b/lenses/tests/test_clamav.aug new file mode 100644 index 0000000..5764e26 --- /dev/null +++ b/lenses/tests/test_clamav.aug @@ -0,0 +1,299 @@ +module Test_ClamAV = + +let clamd_conf ="## +## Example config file for the Clam AV daemon +## Please read the clamd.conf(5) manual before editing this file. +## + +# Comment or remove the line below. +Example +# LogFile must be writable for the user running daemon. +LogFile /var/log/clamav/clamd.log +LogFileUnlock yes +LogFileMaxSize 0 +LogTime yes +LogClean yes +LogSyslog yes +LogFacility LOG_MAIL +LogVerbose yes +LogRotate yes +ExtendedDetectionInfo yes +PidFile /var/run/clamav/clamd.pid +TemporaryDirectory /var/tmp +DatabaseDirectory /var/lib/clamav +OfficialDatabaseOnly no +LocalSocket /var/run/clamav/clamd.sock +LocalSocketGroup virusgroup +LocalSocketMode 660 +FixStaleSocket yes +TCPSocket 3310 +TCPAddr 127.0.0.1 +MaxConnectionQueueLength 30 +StreamMaxLength 10M +StreamMinPort 30000 +StreamMaxPort 32000 +MaxThreads 50 +ReadTimeout 300 +CommandReadTimeout 5 +SendBufTimeout 200 +MaxQueue 200 +IdleTimeout 60 +ExcludePath ^/proc/ +ExcludePath ^/sys/ +MaxDirectoryRecursion 20 +FollowDirectorySymlinks yes +FollowFileSymlinks yes +CrossFilesystems yes +SelfCheck 600 +VirusEvent /usr/local/bin/send_sms 123456789 \"VIRUS ALERT: %v\" +User clam +AllowSupplementaryGroups yes +ExitOnOOM yes +Foreground yes +Debug yes +LeaveTemporaryFiles yes +AllowAllMatchScan no +DetectPUA yes +ExcludePUA NetTool +ExcludePUA PWTool +IncludePUA Spy +IncludePUA Scanner +IncludePUA RAT +AlgorithmicDetection yes +ForceToDisk yes +DisableCache yes +ScanPE yes +DisableCertCheck yes +ScanELF yes +DetectBrokenExecutables yes +ScanOLE2 yes +OLE2BlockMacros no +ScanPDF yes +ScanSWF yes +ScanMail yes +ScanPartialMessages yes +PhishingSignatures yes +PhishingScanURLs yes +PhishingAlwaysBlockSSLMismatch no +PhishingAlwaysBlockCloak no +PartitionIntersection no +HeuristicScanPrecedence yes +StructuredDataDetection yes +StructuredMinCreditCardCount 5 +StructuredMinSSNCount 5 +StructuredSSNFormatNormal yes +StructuredSSNFormatStripped yes +ScanHTML yes +ScanArchive yes +ArchiveBlockEncrypted no +MaxScanSize 150M +MaxFileSize 30M +MaxRecursion 10 +MaxFiles 15000 +MaxEmbeddedPE 10M +MaxHTMLNormalize 10M +" + +let freshclam_conf ="## +## Example config file for freshclam +## Please read the freshclam.conf(5) manual before editing this file. +## + + +# Comment or remove the line below. +Example + +DatabaseDirectory /var/lib/clamav +UpdateLogFile /var/log/clamav/freshclam.log +LogFileMaxSize 2M +LogTime yes +LogVerbose yes +LogSyslog yes +LogFacility LOG_MAIL +LogRotate yes +PidFile /var/run/freshclam.pid +DatabaseOwner clam +AllowSupplementaryGroups yes +DNSDatabaseInfo current.cvd.clamav.net +DatabaseMirror db.XY.clamav.net +DatabaseMirror database.clamav.net +MaxAttempts 5 +ScriptedUpdates yes +CompressLocalDatabase no +DatabaseCustomURL http://myserver.com/mysigs.ndb +DatabaseCustomURL file:///mnt/nfs/local.hdb +PrivateMirror mirror1.mynetwork.com +PrivateMirror mirror2.mynetwork.com +Checks 24 +HTTPProxyServer myproxy.com +HTTPProxyPort 1234 +HTTPProxyUsername myusername +HTTPProxyPassword mypass +HTTPUserAgent SomeUserAgentIdString +LocalIPAddress aaa.bbb.ccc.ddd +NotifyClamd /etc/clamd.conf +OnUpdateExecute command +OnErrorExecute command +OnOutdatedExecute command +Foreground yes +Debug yes +ConnectTimeout 60 +ReceiveTimeout 60 +TestDatabases yes +SubmitDetectionStats /etc/clamd.conf +DetectionStatsCountry za +DetectionStatsCountry zw +SafeBrowsing yes +Bytecode yes +ExtraDatabase dbname1 +ExtraDatabase dbname2 +" + +test ClamAV.lns get clamd_conf = + { "#comment" = "#" } + { "#comment" = "# Example config file for the Clam AV daemon" } + { "#comment" = "# Please read the clamd.conf(5) manual before editing this file." } + { "#comment" = "#" } + { } + { "#comment" = "Comment or remove the line below." } + { "Example" } + { "#comment" = "LogFile must be writable for the user running daemon." } + { "LogFile" = "/var/log/clamav/clamd.log" } + { "LogFileUnlock" = "yes" } + { "LogFileMaxSize" = "0" } + { "LogTime" = "yes" } + { "LogClean" = "yes" } + { "LogSyslog" = "yes" } + { "LogFacility" = "LOG_MAIL" } + { "LogVerbose" = "yes" } + { "LogRotate" = "yes" } + { "ExtendedDetectionInfo" = "yes" } + { "PidFile" = "/var/run/clamav/clamd.pid" } + { "TemporaryDirectory" = "/var/tmp" } + { "DatabaseDirectory" = "/var/lib/clamav" } + { "OfficialDatabaseOnly" = "no" } + { "LocalSocket" = "/var/run/clamav/clamd.sock" } + { "LocalSocketGroup" = "virusgroup" } + { "LocalSocketMode" = "660" } + { "FixStaleSocket" = "yes" } + { "TCPSocket" = "3310" } + { "TCPAddr" = "127.0.0.1" } + { "MaxConnectionQueueLength" = "30" } + { "StreamMaxLength" = "10M" } + { "StreamMinPort" = "30000" } + { "StreamMaxPort" = "32000" } + { "MaxThreads" = "50" } + { "ReadTimeout" = "300" } + { "CommandReadTimeout" = "5" } + { "SendBufTimeout" = "200" } + { "MaxQueue" = "200" } + { "IdleTimeout" = "60" } + { "ExcludePath" = "^/proc/" } + { "ExcludePath" = "^/sys/" } + { "MaxDirectoryRecursion" = "20" } + { "FollowDirectorySymlinks" = "yes" } + { "FollowFileSymlinks" = "yes" } + { "CrossFilesystems" = "yes" } + { "SelfCheck" = "600" } + { "VirusEvent" = "/usr/local/bin/send_sms 123456789 \"VIRUS ALERT: %v\"" } + { "User" = "clam" } + { "AllowSupplementaryGroups" = "yes" } + { "ExitOnOOM" = "yes" } + { "Foreground" = "yes" } + { "Debug" = "yes" } + { "LeaveTemporaryFiles" = "yes" } + { "AllowAllMatchScan" = "no" } + { "DetectPUA" = "yes" } + { "ExcludePUA" = "NetTool" } + { "ExcludePUA" = "PWTool" } + { "IncludePUA" = "Spy" } + { "IncludePUA" = "Scanner" } + { "IncludePUA" = "RAT" } + { "AlgorithmicDetection" = "yes" } + { "ForceToDisk" = "yes" } + { "DisableCache" = "yes" } + { "ScanPE" = "yes" } + { "DisableCertCheck" = "yes" } + { "ScanELF" = "yes" } + { "DetectBrokenExecutables" = "yes" } + { "ScanOLE2" = "yes" } + { "OLE2BlockMacros" = "no" } + { "ScanPDF" = "yes" } + { "ScanSWF" = "yes" } + { "ScanMail" = "yes" } + { "ScanPartialMessages" = "yes" } + { "PhishingSignatures" = "yes" } + { "PhishingScanURLs" = "yes" } + { "PhishingAlwaysBlockSSLMismatch" = "no" } + { "PhishingAlwaysBlockCloak" = "no" } + { "PartitionIntersection" = "no" } + { "HeuristicScanPrecedence" = "yes" } + { "StructuredDataDetection" = "yes" } + { "StructuredMinCreditCardCount" = "5" } + { "StructuredMinSSNCount" = "5" } + { "StructuredSSNFormatNormal" = "yes" } + { "StructuredSSNFormatStripped" = "yes" } + { "ScanHTML" = "yes" } + { "ScanArchive" = "yes" } + { "ArchiveBlockEncrypted" = "no" } + { "MaxScanSize" = "150M" } + { "MaxFileSize" = "30M" } + { "MaxRecursion" = "10" } + { "MaxFiles" = "15000" } + { "MaxEmbeddedPE" = "10M" } + { "MaxHTMLNormalize" = "10M" } + +test ClamAV.lns get freshclam_conf = + { "#comment" = "#" } + { "#comment" = "# Example config file for freshclam" } + { "#comment" = "# Please read the freshclam.conf(5) manual before editing this file." } + { "#comment" = "#" } + { } + { } + { "#comment" = "Comment or remove the line below." } + { "Example" } + { } + { "DatabaseDirectory" = "/var/lib/clamav" } + { "UpdateLogFile" = "/var/log/clamav/freshclam.log" } + { "LogFileMaxSize" = "2M" } + { "LogTime" = "yes" } + { "LogVerbose" = "yes" } + { "LogSyslog" = "yes" } + { "LogFacility" = "LOG_MAIL" } + { "LogRotate" = "yes" } + { "PidFile" = "/var/run/freshclam.pid" } + { "DatabaseOwner" = "clam" } + { "AllowSupplementaryGroups" = "yes" } + { "DNSDatabaseInfo" = "current.cvd.clamav.net" } + { "DatabaseMirror" = "db.XY.clamav.net" } + { "DatabaseMirror" = "database.clamav.net" } + { "MaxAttempts" = "5" } + { "ScriptedUpdates" = "yes" } + { "CompressLocalDatabase" = "no" } + { "DatabaseCustomURL" = "http://myserver.com/mysigs.ndb" } + { "DatabaseCustomURL" = "file:///mnt/nfs/local.hdb" } + { "PrivateMirror" = "mirror1.mynetwork.com" } + { "PrivateMirror" = "mirror2.mynetwork.com" } + { "Checks" = "24" } + { "HTTPProxyServer" = "myproxy.com" } + { "HTTPProxyPort" = "1234" } + { "HTTPProxyUsername" = "myusername" } + { "HTTPProxyPassword" = "mypass" } + { "HTTPUserAgent" = "SomeUserAgentIdString" } + { "LocalIPAddress" = "aaa.bbb.ccc.ddd" } + { "NotifyClamd" = "/etc/clamd.conf" } + { "OnUpdateExecute" = "command" } + { "OnErrorExecute" = "command" } + { "OnOutdatedExecute" = "command" } + { "Foreground" = "yes" } + { "Debug" = "yes" } + { "ConnectTimeout" = "60" } + { "ReceiveTimeout" = "60" } + { "TestDatabases" = "yes" } + { "SubmitDetectionStats" = "/etc/clamd.conf" } + { "DetectionStatsCountry" = "za" } + { "DetectionStatsCountry" = "zw" } + { "SafeBrowsing" = "yes" } + { "Bytecode" = "yes" } + { "ExtraDatabase" = "dbname1" } + { "ExtraDatabase" = "dbname2" } diff --git a/lenses/tests/test_dns_zone.aug b/lenses/tests/test_dns_zone.aug new file mode 100644 index 0000000..2537c4d --- /dev/null +++ b/lenses/tests/test_dns_zone.aug @@ -0,0 +1,384 @@ +module Test_Dns_Zone = + +let lns = Dns_Zone.lns + +(* RFC 1034 §6 *) +test lns get " +EDU. IN SOA SRI-NIC.ARPA. HOSTMASTER.SRI-NIC.ARPA. ( + 870729 ;serial + 1800 ;refresh every 30 minutes + 300 ;retry every 5 minutes + 604800 ;expire after a week + 86400 ;minimum of a day + ) + NS SRI-NIC.ARPA. + NS C.ISI.EDU. + +UCI 172800 NS ICS.UCI + 172800 NS ROME.UCI +ICS.UCI 172800 A 192.5.19.1 +ROME.UCI 172800 A 192.5.19.31 + +ISI 172800 NS VAXA.ISI + 172800 NS A.ISI + 172800 NS VENERA.ISI.EDU. +VAXA.ISI 172800 A 10.2.0.27 + 172800 A 128.9.0.33 +VENERA.ISI.EDU. 172800 A 10.1.0.52 + 172800 A 128.9.0.32 +A.ISI 172800 A 26.3.0.103 + +UDEL.EDU. 172800 NS LOUIE.UDEL.EDU. + 172800 NS UMN-REI-UC.ARPA. +LOUIE.UDEL.EDU. 172800 A 10.0.0.96 + 172800 A 192.5.39.3 + +YALE.EDU. 172800 NS YALE.ARPA. +YALE.EDU. 172800 NS YALE-BULLDOG.ARPA. + +MIT.EDU. 43200 NS XX.LCS.MIT.EDU. + 43200 NS ACHILLES.MIT.EDU. +XX.LCS.MIT.EDU. 43200 A 10.0.0.44 +ACHILLES.MIT.EDU. 43200 A 18.72.0.8 +" = + { "EDU." + { "1" + { "class" = "IN" } + { "type" = "SOA" } + { "mname" = "SRI-NIC.ARPA." } + { "rname" = "HOSTMASTER.SRI-NIC.ARPA." } + { "serial" = "870729" } + { "refresh" = "1800" } + { "retry" = "300" } + { "expiry" = "604800" } + { "minimum" = "86400" } + } + { "2" { "type" = "NS" } { "rdata" = "SRI-NIC.ARPA." } } + { "3" { "type" = "NS" } { "rdata" = "C.ISI.EDU." } } + } + { "UCI" + { "1" { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "ICS.UCI" } } + { "2" { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "ROME.UCI" } } + } + { "ICS.UCI" + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "192.5.19.1" } } + } + { "ROME.UCI" + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "192.5.19.31" } } + } + { "ISI" + { "1" { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "VAXA.ISI" } } + { "2" { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "A.ISI" } } + { "3" + { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "VENERA.ISI.EDU." } + } + } + { "VAXA.ISI" + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "10.2.0.27" } } + { "2" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "128.9.0.33" } } + } + { "VENERA.ISI.EDU." + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "10.1.0.52" } } + { "2" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "128.9.0.32" } } + } + { "A.ISI" + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "26.3.0.103" } } + } + { "UDEL.EDU." + { "1" + { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "LOUIE.UDEL.EDU." } + } + { "2" + { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "UMN-REI-UC.ARPA." } + } + } + { "LOUIE.UDEL.EDU." + { "1" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "10.0.0.96" } } + { "2" { "ttl" = "172800" } { "type" = "A" } { "rdata" = "192.5.39.3" } } + } + { "YALE.EDU." + { "1" { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "YALE.ARPA." } } + } + { "YALE.EDU." + { "1" + { "ttl" = "172800" } { "type" = "NS" } { "rdata" = "YALE-BULLDOG.ARPA." } + } + } + { "MIT.EDU." + { "1" + { "ttl" = "43200" } { "type" = "NS" } { "rdata" = "XX.LCS.MIT.EDU." } + } + { "2" + { "ttl" = "43200" } { "type" = "NS" } { "rdata" = "ACHILLES.MIT.EDU." } + } + } + { "XX.LCS.MIT.EDU." + { "1" { "ttl" = "43200" } { "type" = "A" } { "rdata" = "10.0.0.44" } } + } + { "ACHILLES.MIT.EDU." + { "1" { "ttl" = "43200" } { "type" = "A" } { "rdata" = "18.72.0.8" } } + } + + +(* RFC 1035 §5.3 *) +test lns get " +@ IN SOA VENERA Action\.domains ( + 20 ; SERIAL + 7200 ; REFRESH + 600 ; RETRY + 3600000; EXPIRE + 60) ; MINIMUM + + NS A.ISI.EDU. + NS VENERA + NS VAXA + MX 10 VENERA + MX 20 VAXA + +A A 26.3.0.103 + +VENERA A 10.1.0.52 + A 128.9.0.32 + +VAXA A 10.2.0.27 + A 128.9.0.33 +" = + { "@" + { "1" + { "class" = "IN" } + { "type" = "SOA" } + { "mname" = "VENERA" } + { "rname" = "Action\\.domains" } + { "serial" = "20" } + { "refresh" = "7200" } + { "retry" = "600" } + { "expiry" = "3600000" } + { "minimum" = "60" } + } + { "2" { "type" = "NS" } { "rdata" = "A.ISI.EDU." } } + { "3" { "type" = "NS" } { "rdata" = "VENERA" } } + { "4" { "type" = "NS" } { "rdata" = "VAXA" } } + { "5" { "type" = "MX" } { "priority" = "10" } { "exchange" = "VENERA" } } + { "6" { "type" = "MX" } { "priority" = "20" } { "exchange" = "VAXA" } } + } + { "A" { "1" { "type" = "A" } { "rdata" = "26.3.0.103" } } } + { "VENERA" + { "1" { "type" = "A" } { "rdata" = "10.1.0.52" } } + { "2" { "type" = "A" } { "rdata" = "128.9.0.32" } } + } + { "VAXA" + { "1" { "type" = "A" } { "rdata" = "10.2.0.27" } } + { "2" { "type" = "A" } { "rdata" = "128.9.0.33" } } + } + + +(* RFC 2782 *) +test lns get " +$ORIGIN example.com. +@ SOA server.example.com. root.example.com. ( + 1995032001 3600 3600 604800 86400 ) + NS server.example.com. + NS ns1.ip-provider.net. + NS ns2.ip-provider.net. +; foobar - use old-slow-box or new-fast-box if either is +; available, make three quarters of the logins go to +; new-fast-box. +_foobar._tcp SRV 0 1 9 old-slow-box.example.com. + SRV 0 3 9 new-fast-box.example.com. +; if neither old-slow-box or new-fast-box is up, switch to +; using the sysdmin's box and the server + SRV 1 0 9 sysadmins-box.example.com. + SRV 1 0 9 server.example.com. +server A 172.30.79.10 +old-slow-box A 172.30.79.11 +sysadmins-box A 172.30.79.12 +new-fast-box A 172.30.79.13 +; NO other services are supported +*._tcp SRV 0 0 0 . +*._udp SRV 0 0 0 . +" = + { "$ORIGIN" = "example.com." } + { "@" + { "1" + { "type" = "SOA" } + { "mname" = "server.example.com." } + { "rname" = "root.example.com." } + { "serial" = "1995032001" } + { "refresh" = "3600" } + { "retry" = "3600" } + { "expiry" = "604800" } + { "minimum" = "86400" } + } + { "2" { "type" = "NS" } { "rdata" = "server.example.com." } } + { "3" { "type" = "NS" } { "rdata" = "ns1.ip-provider.net." } } + { "4" { "type" = "NS" } { "rdata" = "ns2.ip-provider.net." } } + } + { "_foobar._tcp" + { "1" + { "type" = "SRV" } + { "priority" = "0" } + { "weight" = "1" } + { "port" = "9" } + { "target" = "old-slow-box.example.com." } + } + { "2" + { "type" = "SRV" } + { "priority" = "0" } + { "weight" = "3" } + { "port" = "9" } + { "target" = "new-fast-box.example.com." } + } + { "3" + { "type" = "SRV" } + { "priority" = "1" } + { "weight" = "0" } + { "port" = "9" } + { "target" = "sysadmins-box.example.com." } + } + { "4" + { "type" = "SRV" } + { "priority" = "1" } + { "weight" = "0" } + { "port" = "9" } + { "target" = "server.example.com." } + } + } + { "server" { "1" { "type" = "A" } { "rdata" = "172.30.79.10" } } } + { "old-slow-box" { "1" { "type" = "A" } { "rdata" = "172.30.79.11" } } } + { "sysadmins-box" { "1" { "type" = "A" } { "rdata" = "172.30.79.12" } } } + { "new-fast-box" { "1" { "type" = "A" } { "rdata" = "172.30.79.13" } } } + { "*._tcp" + { "1" + { "type" = "SRV" } + { "priority" = "0" } + { "weight" = "0" } + { "port" = "0" } + { "target" = "." } + } + } + { "*._udp" + { "1" + { "type" = "SRV" } + { "priority" = "0" } + { "weight" = "0" } + { "port" = "0" } + { "target" = "." } + } + } + + +(* RFC 3403 §6.2 *) +test lns get " +$ORIGIN 2.1.2.1.5.5.5.0.7.7.1.e164.arpa. + IN NAPTR 100 10 \"u\" \"sip+E2U\" \"!^.*$!sip:information@foo.se!i\" . + IN NAPTR 102 10 \"u\" \"smtp+E2U\" \"!^.*$!mailto:information@foo.se!i\" . +" = + { "$ORIGIN" = "2.1.2.1.5.5.5.0.7.7.1.e164.arpa." } + { "@" + { "1" + { "class" = "IN" } + { "type" = "NAPTR" } + { "order" = "100" } + { "preference" = "10" } + { "flags" = "\"u\"" } + { "service" = "\"sip+E2U\"" } + { "regexp" = "\"!^.*$!sip:information@foo.se!i\"" } + { "replacement" = "." } + } + { "2" + { "class" = "IN" } + { "type" = "NAPTR" } + { "order" = "102" } + { "preference" = "10" } + { "flags" = "\"u\"" } + { "service" = "\"smtp+E2U\"" } + { "regexp" = "\"!^.*$!mailto:information@foo.se!i\"" } + { "replacement" = "." } + } + } + + +(* SOA record on a single line *) +test lns get " +$ORIGIN example.com. +@ IN SOA ns root.example.com. (1 2 3 4 5) +" = + { "$ORIGIN" = "example.com." } + { "@" + { "1" + { "class" = "IN" } + { "type" = "SOA" } + { "mname" = "ns" } + { "rname" = "root.example.com." } + { "serial" = "1" } + { "refresh" = "2" } + { "retry" = "3" } + { "expiry" = "4" } + { "minimum" = "5" } + } + } + + +(* Different ordering of TTL and class *) +test lns get " +$ORIGIN example.com. +foo 1D IN A 10.1.2.3 +bar IN 2W A 10.4.5.6 +" = + { "$ORIGIN" = "example.com." } + { "foo" + { "1" + { "ttl" = "1D" } + { "class" = "IN" } + { "type" = "A" } + { "rdata" = "10.1.2.3" } + } + } + { "bar" + { "1" + { "class" = "IN" } + { "ttl" = "2W" } + { "type" = "A" } + { "rdata" = "10.4.5.6" } + } + } + + +(* Escaping *) +test lns get " +$ORIGIN example.com. +foo TXT abc\\\\def\\\"ghi +bar TXT \"ab cd\\\\ef\\\"gh\" +" = + { "$ORIGIN" = "example.com." } + { "foo" { "1" { "type" = "TXT" } { "rdata" = "abc\\\\def\\\"ghi" } } } + { "bar" { "1" { "type" = "TXT" } { "rdata" = "\"ab cd\\\\ef\\\"gh\"" } } } + + +(* Whitespace at the end of the line *) +test lns get " +$ORIGIN example.com. \n@ IN SOA ns root.example.com. (1 2 3 4 5) \t +foo 1D IN A 10.1.2.3\t +" = + { "$ORIGIN" = "example.com." } + { "@" + { "1" + { "class" = "IN" } + { "type" = "SOA" } + { "mname" = "ns" } + { "rname" = "root.example.com." } + { "serial" = "1" } + { "refresh" = "2" } + { "retry" = "3" } + { "expiry" = "4" } + { "minimum" = "5" } + } + } + { "foo" + { "1" + { "ttl" = "1D" } + { "class" = "IN" } + { "type" = "A" } + { "rdata" = "10.1.2.3" } + } + } diff --git a/lenses/tests/test_dnsmasq.aug b/lenses/tests/test_dnsmasq.aug index 0abfa6b..c6a63d9 100644 --- a/lenses/tests/test_dnsmasq.aug +++ b/lenses/tests/test_dnsmasq.aug @@ -6,6 +6,16 @@ let conf = "# Configuration file for dnsmasq. conf-dir=/etc/dnsmasq.d selfmx + +address=/foo.com/bar.net/10.1.2.3 + +server=10.4.5.6#1234 +server=/bar.com/foo.net/10.7.8.9 +server=/foo.org/bar.org/10.3.2.1@eth0#5678 +server=/baz.org/# +server=/baz.net/#@eth1 +server=10.6.5.4#1234@eth0#5678 +server=/qux.com/qux.net/ " test Dnsmasq.lns get conf = @@ -15,3 +25,40 @@ test Dnsmasq.lns get conf = {} { "conf-dir" = "/etc/dnsmasq.d" } { "selfmx" } + {} + { "address" = "10.1.2.3" + { "domain" = "foo.com" } + { "domain" = "bar.net" } + } + {} + { "server" = "10.4.5.6" + { "port" = "1234" } + } + { "server" = "10.7.8.9" + { "domain" = "bar.com" } + { "domain" = "foo.net" } + } + { "server" = "10.3.2.1" + { "domain" = "foo.org" } + { "domain" = "bar.org" } + { "source" = "eth0" + { "port" = "5678" } + } + } + { "server" = "#" + { "domain" = "baz.org" } + } + { "server" = "#" + { "domain" = "baz.net" } + { "source" = "eth1" } + } + { "server" = "10.6.5.4" + { "port" = "1234" } + { "source" = "eth0" + { "port" = "5678" } + } + } + { "server" + { "domain" = "qux.com" } + { "domain" = "qux.net" } + } diff --git a/lenses/tests/test_erlang.aug b/lenses/tests/test_erlang.aug index 5560a71..44bb095 100644 --- a/lenses/tests/test_erlang.aug +++ b/lenses/tests/test_erlang.aug @@ -51,7 +51,7 @@ test tuple_bare get "{foo, bar}" = (* Group: application *) -let list_bare_app = Erlang.application Rx.word list_bare +let list_bare_app = Erlang.application (Rx.word - "kernel") list_bare test list_bare_app get "{foo, [{bar, [baz, bat]}]}" = { "foo" @@ -59,6 +59,26 @@ test list_bare_app get "{foo, [{bar, [baz, bat]}]}" = { "value" = "baz" } { "value" = "bat" } } } +(* no settings *) +test list_bare_app get "{foo, []}" = + { "foo" } + +(* Group: kernel *) + +test Erlang.kernel get "{kernel, [ + {browser_cmd, \"/foo/bar\"}, + {dist_auto_connect, once}, + {error_logger, tty}, + {net_setuptime, 5}, + {start_dist_ac, true} +]}" = + { "kernel" + { "browser_cmd" = "/foo/bar" } + { "dist_auto_connect" = "once" } + { "error_logger" = "tty" } + { "net_setuptime" = "5" } + { "start_dist_ac" = "true" } } + (* Group: config *) let list_bare_config = Erlang.config list_bare_app @@ -76,3 +96,14 @@ test list_bare_config get "[ { "value" = "gaz" } { "value" = "gat" } } } +(* Test Erlang's kernel app config is parsed *) +test list_bare_config get "[ + {foo, [{bar, [baz, bat]}]}, + {kernel, [{start_timer, true}]} + ].\n" = + { "foo" + { "bar" + { "value" = "baz" } + { "value" = "bat" } } } + { "kernel" + { "start_timer" = "true" } } diff --git a/lenses/tests/test_exports.aug b/lenses/tests/test_exports.aug index 3d0e9c2..0c90b4b 100644 --- a/lenses/tests/test_exports.aug +++ b/lenses/tests/test_exports.aug @@ -1,4 +1,4 @@ -module Test_exports = +module Test_exports = let s = "/local 172.31.0.0/16(rw,sync) \t @@ -9,6 +9,7 @@ let s = "/local 172.31.0.0/16(rw,sync) \t /local3 some-host(rw,sync) /local3 an-other-host(rw,sync) /local4 2000:123:456::/64(rw) +/local5 somehost-[01](rw) " test Exports.lns get s = @@ -47,3 +48,6 @@ test Exports.lns get s = { "dir" = "/local4" { "client" = "2000:123:456::/64" { "option" = "rw" } } } + { "dir" = "/local5" + { "client" = "somehost-[01]" + { "option" = "rw" } } } diff --git a/lenses/tests/test_grub.aug b/lenses/tests/test_grub.aug index 71b84dd..f022ef7 100644 --- a/lenses/tests/test_grub.aug +++ b/lenses/tests/test_grub.aug @@ -240,3 +240,20 @@ password --encrypted ^9^32kwzzX./3WISQ0C /boot/grub/custom.lst { "splash" = "silent" } { "showopts" } } { "initrd" = "(hd0,0)/initrd" } } + + (* Password protected kernel, issue #229 *) + test Grub.lns get "title Password Protected Kernel + root (hd0,0) + kernel /vmlinuz ro root=/dev/mapper/root + initrd /initramfs + password --md5 secret\n" = + { "title" = "Password Protected Kernel" + { "root" = "(hd0,0)" } + { "kernel" = "/vmlinuz" + { "ro" } + { "root" = "/dev/mapper/root" } + } + { "initrd" = "/initramfs" } + { "password" = "secret" + { "md5" } + } } diff --git a/lenses/tests/test_httpd.aug b/lenses/tests/test_httpd.aug index c1dd808..f63a692 100644 --- a/lenses/tests/test_httpd.aug +++ b/lenses/tests/test_httpd.aug @@ -1,5 +1,11 @@ module Test_httpd = +(* Check that we can iterate on directive *) +let _ = Httpd.directive+ + +(* Check that we can do a non iterative section *) +let _ = Httpd.section Httpd.directive + (* directives testing *) let d1 = "ServerRoot \"/etc/apache2\"\n" test Httpd.directive get d1 = @@ -404,3 +410,59 @@ test Httpd.lns get versioncheck = } } } + + +(* GH #220 *) +let double_comment = " +## +## Comment +## +\n" + +test Httpd.lns get double_comment = + { "IfDefine" + { "arg" = "Foo" } + { "#comment" = "#" } + { "#comment" = "# Comment" } + { "#comment" = "#" } + } + +let single_comment = " +# +## Comment +## +\n" + +test Httpd.lns get single_comment = + { "IfDefine" + { "arg" = "Foo" } + { "#comment" = "# Comment" } + { "#comment" = "#" } + } + +let single_empty = " +# + +\n" +test Httpd.lns get single_empty = + { "IfDefine" + { "arg" = "Foo" } + } + +let eol_empty = " # +\n" +test Httpd.lns get eol_empty = + { "IfDefine" + { "arg" = "Foo" } + } + +(* Issue #140 *) +test Httpd.lns get " + # one comment + # another comment +\n" = + { "IfModule" + { "arg" = "mod_ssl.c" } + { "#comment" = "one comment" } + { "#comment" = "another comment" } + } diff --git a/lenses/tests/test_iscsid.aug b/lenses/tests/test_iscsid.aug new file mode 100644 index 0000000..2a8a532 --- /dev/null +++ b/lenses/tests/test_iscsid.aug @@ -0,0 +1,69 @@ +(* +Module: Test_Iscsid + Provides unit tests and examples for the lens. +*) + +module Test_Iscsid = + +(* Variable: conf + A full configuration *) +let conf = "################ +# iSNS settings +################ +# Address of iSNS server +isns.address = 127.0.0.1 +isns.port = 3260 + +# ************* +# CHAP Settings +# ************* + +# To enable CHAP authentication set node.session.auth.authmethod +# to CHAP. The default is None. +node.session.auth.authmethod = CHAP + +# To set a CHAP username and password for initiator +# authentication by the target(s), uncomment the following lines: +node.session.auth.username = someuser1 +node.session.auth.password = somep$31#$^&7! + +# To enable CHAP authentication for a discovery session to the target +# set discovery.sendtargets.auth.authmethod to CHAP. The default is None. +discovery.sendtargets.auth.authmethod = CHAP + +# To set a discovery session CHAP username and password for the initiator +# authentication by the target(s), uncomment the following lines: +discovery.sendtargets.auth.username = someuser3 +discovery.sendtargets.auth.password = _09+7)(,./?;'p[] +" + +(* Test: Iscsid.lns + Test the full *) +test Iscsid.lns get conf = { "#comment" = "###############" } + { "#comment" = "iSNS settings" } + { "#comment" = "###############" } + { "#comment" = "Address of iSNS server" } + { "isns.address" = "127.0.0.1" } + { "isns.port" = "3260" } + { } + { "#comment" = "*************" } + { "#comment" = "CHAP Settings" } + { "#comment" = "*************" } + { } + { "#comment" = "To enable CHAP authentication set node.session.auth.authmethod" } + { "#comment" = "to CHAP. The default is None." } + { "node.session.auth.authmethod" = "CHAP" } + { } + { "#comment" = "To set a CHAP username and password for initiator" } + { "#comment" = "authentication by the target(s), uncomment the following lines:" } + { "node.session.auth.username" = "someuser1" } + { "node.session.auth.password" = "somep$31#$^&7!" } + { } + { "#comment" = "To enable CHAP authentication for a discovery session to the target" } + { "#comment" = "set discovery.sendtargets.auth.authmethod to CHAP. The default is None." } + { "discovery.sendtargets.auth.authmethod" = "CHAP" } + { } + { "#comment" = "To set a discovery session CHAP username and password for the initiator" } + { "#comment" = "authentication by the target(s), uncomment the following lines:" } + { "discovery.sendtargets.auth.username" = "someuser3" } + { "discovery.sendtargets.auth.password" = "_09+7)(,./?;'p[]" } diff --git a/lenses/tests/test_jaas.aug b/lenses/tests/test_jaas.aug index dc27838..5f2bfb1 100644 --- a/lenses/tests/test_jaas.aug +++ b/lenses/tests/test_jaas.aug @@ -54,7 +54,18 @@ ShibUserPassAuth { serviceCredential = \"ldappassword\" ssl = \"false\" userField = \"uid\" + // Example comment within definition subtreeSearch = \"true\"; +}; + +NetAccountAuth { + // Test of optionless flag + nz.ac.auckland.jaas.Krb5LoginModule required; +}; + +com.sun.security.jgss.krb5.initiate { + // Test of omitted linebreaks and naked boolean + com.sun.security.auth.module.Krb5LoginModule required useTicketCache=true; };" test Jaas.lns get conf = @@ -79,7 +90,6 @@ test Jaas.lns get conf = { } { "login" = "ShibUserPassAuth" { } - { } { "#comment" = "Example LDAP authentication" } { "#comment" = "See: https://wiki.shibboleth.net/confluence/display/SHIB2/IdPAuthUserPass" } { "#mcomment" @@ -106,7 +116,29 @@ test Jaas.lns get conf = { "serviceCredential" = "\"ldappassword\"" } { "ssl" = "\"false\"" } { "userField" = "\"uid\"" } - { "subtreeSearch" = "\"true\";" } + { "#comment" = "Example comment within definition" } + { "subtreeSearch" = "\"true\"" } + } + } + { } + } + { } + { } + { "login" = "NetAccountAuth" + { "#comment" = "Test of optionless flag" } + { "loginModuleClass" = "nz.ac.auckland.jaas.Krb5LoginModule" + { "flag" = "required" } + } + { } + } + { } + { } + { "login" = "com.sun.security.jgss.krb5.initiate" + { "#comment" = "Test of omitted linebreaks and naked boolean" } + { "loginModuleClass" = "com.sun.security.auth.module.Krb5LoginModule" + { "flag" = "required" + { "useTicketCache" = "true" } } } + { } } diff --git a/lenses/tests/test_known_hosts.aug b/lenses/tests/test_known_hosts.aug index 19bec0e..6f46a57 100644 --- a/lenses/tests/test_known_hosts.aug +++ b/lenses/tests/test_known_hosts.aug @@ -8,10 +8,12 @@ module Test_Known_Hosts = (* Test: Known_Hosts.lns Simple get test *) test Known_Hosts.lns get "# A comment -foo.example.com ecdsa-sha2-nistp256 AAABBBDKDFX= +foo.example.com,foo,bar ecdsa-sha2-nistp256 AAABBBDKDFX= |1|FhUqf1kMlRWNfK6InQSAmXiNiSY=|jwbKFwD4ipl6D0k6OoshmW7xOao= ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBIvNOU8OedkWalFmoFcJWP3nasnCLx6M78F9y0rzTQtplggNd0dvR0A4SQOBfHInmk5dH6YGGcpT3PM3cJBR7rI=\n" = { "#comment" = "A comment" } { "1" = "foo.example.com" + { "alias" = "foo" } + { "alias" = "bar" } { "type" = "ecdsa-sha2-nistp256" } { "key" = "AAABBBDKDFX=" } } { "2" = "|1|FhUqf1kMlRWNfK6InQSAmXiNiSY=|jwbKFwD4ipl6D0k6OoshmW7xOao=" diff --git a/lenses/tests/test_krb5.aug b/lenses/tests/test_krb5.aug index b0ec6d6..e17a659 100644 --- a/lenses/tests/test_krb5.aug +++ b/lenses/tests/test_krb5.aug @@ -92,6 +92,15 @@ module Test_krb5 = } } } + stanford.edu = { + kdc = krb5auth1.stanford.edu + kdc = krb5auth2.stanford.edu + kdc = krb5auth3.stanford.edu + master_kdc = krb5auth1.stanford.edu + admin_server = krb5-admin.stanford.edu + default_domain = stanford.edu + krb524_server = krb524.stanford.edu + } [instancemapping] afs = { @@ -358,6 +367,15 @@ test Krb5.lns get fermi_str = } } } + { "realm" = "stanford.edu" + { "kdc" = "krb5auth1.stanford.edu" } + { "kdc" = "krb5auth2.stanford.edu" } + { "kdc" = "krb5auth3.stanford.edu" } + { "master_kdc" = "krb5auth1.stanford.edu" } + { "admin_server" = "krb5-admin.stanford.edu" } + { "default_domain" = "stanford.edu" } + { "krb524_server" = "krb524.stanford.edu" } + } { } } { "instancemapping" { "afs" diff --git a/lenses/tests/test_limits.aug b/lenses/tests/test_limits.aug index 0d95ccd..231b33e 100644 --- a/lenses/tests/test_limits.aug +++ b/lenses/tests/test_limits.aug @@ -29,3 +29,10 @@ ftp hard nproc /ftp ftp hard nproc /ftp * soft core 0 * - nofile 4096\n" + + test Limits.lns get "* soft core 0 # clever comment\n" = + { "domain" = "*" + { "type" = "soft" } + { "item" = "core" } + { "value" = "0" } + { "#comment" = "clever comment" } } diff --git a/lenses/tests/test_logrotate.aug b/lenses/tests/test_logrotate.aug index 1c2c035..27e405c 100644 --- a/lenses/tests/test_logrotate.aug +++ b/lenses/tests/test_logrotate.aug @@ -264,3 +264,22 @@ test Logrotate.lns get conf2 = { "file" = "/var/log/mail.warn" } { "file" = "/var/log/mail.err" } { "schedule" = "weekly" } } + +(* Issue #217: support for dateformat *) +let dateformat = "dateformat -%Y%m%d\n" + +test Logrotate.lns get dateformat = + { "dateformat" = "-%Y%m%d" } + +(* Issue #123: no space before '{' *) +test Logrotate.lns get "/file{\n missingok \t\n}\n" = + { "rule" + { "file" = "/file" } + { "missingok" = "missingok" } } + +(* RHBZ#1213292: maxsize 30k *) +test Logrotate.lns get "/var/log/yum.log {\n maxsize 30k\n}\n" = + { "rule" + { "file" = "/var/log/yum.log" } + { "maxsize" = "30k" } } + diff --git a/lenses/tests/test_mailscanner.aug b/lenses/tests/test_mailscanner.aug new file mode 100644 index 0000000..4c60e31 --- /dev/null +++ b/lenses/tests/test_mailscanner.aug @@ -0,0 +1,745 @@ +module Test_Mailscanner = + +let conf = "# Main configuration file for the MailScanner E-Mail Virus Scanner +%org-name% = BARUWA +%org-long-name% = BARUWA MAILFW +%web-site% = www.baruwa.com +%etc-dir% = /etc/MailScanner +%reports-base% = /etc/MailScanner/reports +%report-dir% = /etc/MailScanner/reports/en +%rules-dir% = /etc/MailScanner/rules +%mcp-dir% = /etc/MailScanner/mcp +%spool-dir% = /var/spool/MailScanner +%signature-dir% = /etc/MailScanner/baruwa/signatures +%brules-dir% = /etc/MailScanner/baruwa/rules +Max Children = 5 +Run As User = exim +Run As Group = exim +Queue Scan Interval = 6 +Incoming Queue Dir = /var/spool/exim.in/input +Outgoing Queue Dir = /var/spool/exim/input +Incoming Work Dir = %spool-dir%/incoming +Quarantine Dir = %spool-dir%/quarantine +PID file = /var/run/MailScanner/MailScanner.pid +Restart Every = 7200 +MTA = exim +Sendmail = /usr/sbin/exim -C /etc/exim/exim_out.conf +Sendmail2 = /usr/sbin/exim -C /etc/exim/exim_out.conf +Incoming Work User = exim +Incoming Work Group = clam +Incoming Work Permissions = 0640 +Quarantine User = exim +Quarantine Group = baruwa +Quarantine Permissions = 0660 +Max Unscanned Bytes Per Scan = 100m +Max Unsafe Bytes Per Scan = 50m +Max Unscanned Messages Per Scan = 30 +Max Unsafe Messages Per Scan = 30 +Max Normal Queue Size = 800 +Scan Messages = %rules-dir%/scan.messages.rules +Reject Message = no +Maximum Processing Attempts = 6 +Processing Attempts Database = %spool-dir%/incoming/Processing.db +Maximum Attachments Per Message = 200 +Expand TNEF = yes +Use TNEF Contents = replace +Deliver Unparsable TNEF = no +TNEF Expander = /usr/bin/tnef --maxsize=100000000 +TNEF Timeout = 120 +File Command = /usr/sbin/file-wrapper +File Timeout = 20 +Gunzip Command = /bin/gunzip +Gunzip Timeout = 50 +Unrar Command = /usr/bin/unrar +Unrar Timeout = 50 +Find UU-Encoded Files = no +Maximum Message Size = %brules-dir%/message.size.rules +Maximum Attachment Size = -1 +Minimum Attachment Size = -1 +Maximum Archive Depth = 4 +Find Archives By Content = yes +Unpack Microsoft Documents = yes +Zip Attachments = no +Attachments Zip Filename = MessageAttachments.zip +Attachments Min Total Size To Zip = 100k +Attachment Extensions Not To Zip = .zip .rar .gz .tgz .jpg .jpeg .mpg .mpe .mpeg .mp3 .rpm .htm .html .eml +Add Text Of Doc = no +Antiword = /usr/bin/antiword -f +Antiword Timeout = 50 +Unzip Maximum Files Per Archive = 0 +Unzip Maximum File Size = 50k +Unzip Filenames = *.txt *.ini *.log *.csv +Unzip MimeType = text/plain +Virus Scanning = %brules-dir%/virus.checks.rules +Virus Scanners = auto +Virus Scanner Timeout = 300 +Deliver Disinfected Files = no +Silent Viruses = HTML-IFrame All-Viruses +Still Deliver Silent Viruses = no +Non-Forging Viruses = Joke/ OF97/ WM97/ W97M/ eicar +Spam-Virus Header = X-%org-name%-BaruwaFW-SpamVirus-Report: +Virus Names Which Are Spam = Sanesecurity.Spam*UNOFFICIAL HTML/* *Phish* *Suspected-phishing_safebrowsing* +Block Encrypted Messages = no +Block Unencrypted Messages = no +Allow Password-Protected Archives = yes +Check Filenames In Password-Protected Archives = yes +Allowed Sophos Error Messages = +Sophos IDE Dir = /opt/sophos-av/lib/sav +Sophos Lib Dir = /opt/sophos-av/lib +Monitors For Sophos Updates = /opt/sophos-av/lib/sav/*.ide +Monitors for ClamAV Updates = /var/lib/clamav/*.cvd +ClamAVmodule Maximum Recursion Level = 8 +ClamAVmodule Maximum Files = 1000 +ClamAVmodule Maximum File Size = 10000000 +ClamAVmodule Maximum Compression Ratio = 250 +Clamd Port = 3310 +Clamd Socket = /var/run/clamav/clamd.sock +Clamd Lock File = +Clamd Use Threads = no +ClamAV Full Message Scan = yes +Fpscand Port = 10200 +Dangerous Content Scanning = %rules-dir%/content.scanning.rules +Allow Partial Messages = no +Allow External Message Bodies = no +Find Phishing Fraud = yes +Also Find Numeric Phishing = yes +Use Stricter Phishing Net = yes +Highlight Phishing Fraud = yes +Phishing Safe Sites File = %etc-dir%/phishing.safe.sites.conf +Phishing Bad Sites File = %etc-dir%/phishing.bad.sites.conf +Country Sub-Domains List = %etc-dir%/country.domains.conf +Allow IFrame Tags = disarm +Allow Form Tags = disarm +Allow Script Tags = disarm +Allow WebBugs = disarm +Ignored Web Bug Filenames = spacer pixel.gif pixel.png gap +Known Web Bug Servers = msgtag.com +Web Bug Replacement = https://datafeeds.baruwa.com/1x1spacer.gif +Allow Object Codebase Tags = disarm +Convert Dangerous HTML To Text = no +Convert HTML To Text = no +Archives Are = zip rar ole +Allow Filenames = +Deny Filenames = +Filename Rules = %rules-dir%/filename.rules +Allow Filetypes = +Allow File MIME Types = +Deny Filetypes = +Deny File MIME Types = +Filetype Rules = %rules-dir%/filetype.rules +Archives: Allow Filenames = +Archives: Deny Filenames = +Archives: Filename Rules = %etc-dir%/archives.filename.rules.conf +Archives: Allow Filetypes = +Archives: Allow File MIME Types = +Archives: Deny Filetypes = +Archives: Deny File MIME Types = +Archives: Filetype Rules = %etc-dir%/archives.filetype.rules.conf +Default Rename Pattern = __FILENAME__.disarmed +Quarantine Infections = yes +Quarantine Silent Viruses = no +Quarantine Modified Body = no +Quarantine Whole Message = yes +Quarantine Whole Messages As Queue Files = no +Keep Spam And MCP Archive Clean = yes +Language Strings = %brules-dir%/languages.rules +Rejection Report = %brules-dir%/rejectionreport.rules +Deleted Bad Content Message Report = %brules-dir%/deletedcontentmessage.rules +Deleted Bad Filename Message Report = %brules-dir%/deletedfilenamemessage.rules +Deleted Virus Message Report = %brules-dir%/deletedvirusmessage.rules +Deleted Size Message Report = %brules-dir%/deletedsizemessage.rules +Stored Bad Content Message Report = %brules-dir%/storedcontentmessage.rules +Stored Bad Filename Message Report = %brules-dir%/storedfilenamemessage.rules +Stored Virus Message Report = %brules-dir%/storedvirusmessage.rules +Stored Size Message Report = %brules-dir%/storedsizemessage.rules +Disinfected Report = %brules-dir%/disinfectedreport.rules +Inline HTML Signature = %brules-dir%/html.sigs.rules +Inline Text Signature = %brules-dir%/text.sigs.rules +Signature Image Filename = %brules-dir%/sig.imgs.names.rules +Signature Image Filename = %brules-dir%/sig.imgs.rules +Inline HTML Warning = %brules-dir%/inlinewarninghtml.rules +Inline Text Warning = %brules-dir%/inlinewarningtxt.rules +Sender Content Report = %brules-dir%/sendercontentreport.rules +Sender Error Report = %brules-dir%/sendererrorreport.rules +Sender Bad Filename Report = %brules-dir%/senderfilenamereport.rules +Sender Virus Report = %brules-dir%/sendervirusreport.rules +Sender Size Report = %brules-dir%/sendersizereport.rules +Hide Incoming Work Dir = yes +Include Scanner Name In Reports = yes +Mail Header = X-%org-name%-BaruwaFW: +Spam Header = X-%org-name%-BaruwaFW-SpamCheck: +Spam Score Header = X-%org-name%-BaruwaFW-SpamScore: +Information Header = X-%org-name%-BaruwaFW-Information: +Add Envelope From Header = yes +Add Envelope To Header = no +Envelope From Header = X-BARUWA-BaruwaFW-From: +Envelope To Header = X-%org-name%-BaruwaFW-To: +ID Header = X-%org-name%-BaruwaFW-ID: +IP Protocol Version Header = +Spam Score Character = s +SpamScore Number Instead Of Stars = no +Minimum Stars If On Spam List = 0 +Clean Header Value = Found to be clean +Infected Header Value = Found to be infected +Disinfected Header Value = Disinfected +Information Header Value = Please contact %org-long-name% for more information +Detailed Spam Report = yes +Include Scores In SpamAssassin Report = yes +Always Include SpamAssassin Report = no +Multiple Headers = add +Place New Headers At Top Of Message = yes +Hostname = the %org-name% ($HOSTNAME) Baruwa +Sign Messages Already Processed = no +Sign Clean Messages = %brules-dir%/sign.clean.msgs.rules +Attach Image To Signature = yes +Attach Image To HTML Message Only = yes +Allow Multiple HTML Signatures = no +Dont Sign HTML If Headers Exist = +Mark Infected Messages = yes +Mark Unscanned Messages = no +Unscanned Header Value = Not scanned: please contact %org-long-name% for details +Remove These Headers = X-Mozilla-Status: X-Mozilla-Status2: +Deliver Cleaned Messages = yes +Notify Senders = no +Notify Senders Of Viruses = no +Notify Senders Of Blocked Filenames Or Filetypes = no +Notify Senders Of Blocked Size Attachments = no +Notify Senders Of Other Blocked Content = no +Never Notify Senders Of Precedence = list bulk +Scanned Modify Subject = no +Scanned Subject Text = {Scanned} +Virus Modify Subject = no +Virus Subject Text = {Virus?} +Filename Modify Subject = no +Filename Subject Text = {Filename?} +Content Modify Subject = no +Content Subject Text = {Dangerous Content?} +Size Modify Subject = no +Size Subject Text = {Size} +Disarmed Modify Subject = no +Disarmed Subject Text = {Disarmed} +Phishing Modify Subject = yes +Phishing Subject Text = {Suspected Phishing?} +Spam Modify Subject = no +Spam Subject Text = {Spam?} +High Scoring Spam Modify Subject = no +High Scoring Spam Subject Text = {Spam?} +Warning Is Attachment = yes +Attachment Warning Filename = %org-name%-Attachment-Warning.txt +Attachment Encoding Charset = ISO-8859-1 +Archive Mail = +Missing Mail Archive Is = file +Send Notices = no +Notices Include Full Headers = yes +Hide Incoming Work Dir in Notices = yes +Notice Signature = -- \\n%org-name%\\nEmail Security\\n%website% +Notices From = Baruwa +Notices To = postmaster +Local Postmaster = postmaster +Spam List Definitions = %etc-dir%/spam.lists.conf +Virus Scanner Definitions = %etc-dir%/virus.scanners.conf +Spam Checks = %brules-dir%/spam.checks.rules +Spam List = +Spam Domain List = +Spam Lists To Be Spam = 1 +Spam Lists To Reach High Score = 3 +Spam List Timeout = 10 +Max Spam List Timeouts = 7 +Spam List Timeouts History = 10 +Is Definitely Not Spam = %brules-dir%/approved.senders.rules +Is Definitely Spam = %brules-dir%/banned.senders.rules +Definite Spam Is High Scoring = yes +Ignore Spam Whitelist If Recipients Exceed = 20 +Max Spam Check Size = 4000k +Use Watermarking = no +Add Watermark = yes +Check Watermarks With No Sender = yes +Treat Invalid Watermarks With No Sender as Spam = nothing +Check Watermarks To Skip Spam Checks = yes +Watermark Secret = %org-name%-BaruwaFW-Secret +Watermark Lifetime = 604800 +Watermark Header = X-%org-name%-BaruwaFW-Watermark: +Use SpamAssassin = yes +Max SpamAssassin Size = 800k +Required SpamAssassin Score = %brules-dir%/spam.score.rules +High SpamAssassin Score = %brules-dir%/highspam.score.rules +SpamAssassin Auto Whitelist = yes +SpamAssassin Timeout = 75 +Max SpamAssassin Timeouts = 10 +SpamAssassin Timeouts History = 30 +Check SpamAssassin If On Spam List = yes +Include Binary Attachments In SpamAssassin = no +Spam Score = yes +Cache SpamAssassin Results = yes +SpamAssassin Cache Database File = %spool-dir%/incoming/SpamAssassin.cache.db +Rebuild Bayes Every = 0 +Wait During Bayes Rebuild = no +Use Custom Spam Scanner = no +Max Custom Spam Scanner Size = 20k +Custom Spam Scanner Timeout = 20 +Max Custom Spam Scanner Timeouts = 10 +Custom Spam Scanner Timeout History = 20 +Spam Actions = %brules-dir%/spam.actions.rules +High Scoring Spam Actions = %brules-dir%/highspam.actions.rules +Non Spam Actions = %rules-dir%/nonspam.actions.rules +SpamAssassin Rule Actions = +Sender Spam Report = %brules-dir%/senderspamreport.rules +Sender Spam List Report = %brules-dir%/senderspamrblreport.rules +Sender SpamAssassin Report = %brules-dir%/senderspamsareport.rules +Inline Spam Warning = %brules-dir%/inlinespamwarning.rules +Recipient Spam Report = %brules-dir%/recipientspamreport.rules +Enable Spam Bounce = %rules-dir%/bounce.rules +Bounce Spam As Attachment = no +Syslog Facility = mail +Log Speed = no +Log Spam = no +Log Non Spam = no +Log Delivery And Non-Delivery = no +Log Permitted Filenames = no +Log Permitted Filetypes = no +Log Permitted File MIME Types = no +Log Silent Viruses = no +Log Dangerous HTML Tags = no +Log SpamAssassin Rule Actions = no +SpamAssassin Temporary Dir = /var/spool/MailScanner/incoming/SpamAssassin-Temp +SpamAssassin User State Dir = +SpamAssassin Install Prefix = +SpamAssassin Site Rules Dir = /etc/mail/spamassassin +SpamAssassin Local Rules Dir = +SpamAssassin Local State Dir = +SpamAssassin Default Rules Dir = +DB DSN = DBI:Pg:database=baruwa +DB Username = baruwa +DB Password = password +SQL Serial Number = SELECT MAX(value) AS confserialnumber FROM configurations WHERE internal='confserialnumber' +SQL Quick Peek = SELECT dbvalue(value) AS value FROM quickpeek WHERE external = ? AND (hostname = ? OR hostname='default') LIMIT 1 +SQL Config = SELECT internal, dbvalue(value) AS value, hostname FROM quickpeek WHERE hostname=? OR hostname='default' +SQL Ruleset = SELECT row_number, ruleset AS rule FROM msrulesets WHERE name=? +SQL SpamAssassin Config = +SQL Debug = no +Sphinx Host = 127.0.0.1 +Sphinx Port = 9306 +MCP Checks = no +First Check = spam +MCP Required SpamAssassin Score = 1 +MCP High SpamAssassin Score = 10 +MCP Error Score = 1 +MCP Header = X-%org-name%-BaruwaFW-MCPCheck: +Non MCP Actions = deliver +MCP Actions = deliver +High Scoring MCP Actions = deliver +Bounce MCP As Attachment = no +MCP Modify Subject = start +MCP Subject Text = {MCP?} +High Scoring MCP Modify Subject = start +High Scoring MCP Subject Text = {MCP?} +Is Definitely MCP = no +Is Definitely Not MCP = no +Definite MCP Is High Scoring = no +Always Include MCP Report = no +Detailed MCP Report = yes +Include Scores In MCP Report = no +Log MCP = no +MCP Max SpamAssassin Timeouts = 20 +MCP Max SpamAssassin Size = 100k +MCP SpamAssassin Timeout = 10 +MCP SpamAssassin Prefs File = %mcp-dir%/mcp.spam.assassin.prefs.conf +MCP SpamAssassin User State Dir = +MCP SpamAssassin Local Rules Dir = %mcp-dir% +MCP SpamAssassin Default Rules Dir = %mcp-dir% +MCP SpamAssassin Install Prefix = %mcp-dir% +Recipient MCP Report = %report-dir%/recipient.mcp.report.txt +Sender MCP Report = %report-dir%/sender.mcp.report.txt +Use Default Rules With Multiple Recipients = no +Read IP Address From Received Header = no +Spam Score Number Format = %d.1f +MailScanner Version Number = 4.85.5 +SpamAssassin Cache Timings = 1800,300,10800,172800,600 +Debug = no +Debug SpamAssassin = no +Run In Foreground = no +Always Looked Up Last = &BaruwaLog +Always Looked Up Last After Batch = no +Deliver In Background = yes +Delivery Method = batch +Split Exim Spool = no +Lockfile Dir = %spool-dir%/incoming/Locks +Custom Functions Dir = /usr/share/baruwa/CustomFunctions +Lock Type = +Syslog Socket Type = +Automatic Syntax Check = yes +Minimum Code Status = supported +include /etc/MailScanner/conf.d/*.conf +" + +test Mailscanner.lns get conf = + { "#comment" = "Main configuration file for the MailScanner E-Mail Virus Scanner"} + { "%org-name%" = "BARUWA" } + { "%org-long-name%" = "BARUWA MAILFW" } + { "%web-site%" = "www.baruwa.com" } + { "%etc-dir%" = "/etc/MailScanner" } + { "%reports-base%" = "/etc/MailScanner/reports" } + { "%report-dir%" = "/etc/MailScanner/reports/en" } + { "%rules-dir%" = "/etc/MailScanner/rules" } + { "%mcp-dir%" = "/etc/MailScanner/mcp" } + { "%spool-dir%" = "/var/spool/MailScanner" } + { "%signature-dir%" = "/etc/MailScanner/baruwa/signatures" } + { "%brules-dir%" = "/etc/MailScanner/baruwa/rules" } + { "Max Children" = "5" } + { "Run As User" = "exim" } + { "Run As Group" = "exim" } + { "Queue Scan Interval" = "6" } + { "Incoming Queue Dir" = "/var/spool/exim.in/input" } + { "Outgoing Queue Dir" = "/var/spool/exim/input" } + { "Incoming Work Dir" = "%spool-dir%/incoming" } + { "Quarantine Dir" = "%spool-dir%/quarantine" } + { "PID file" = "/var/run/MailScanner/MailScanner.pid" } + { "Restart Every" = "7200" } + { "MTA" = "exim" } + { "Sendmail" = "/usr/sbin/exim -C /etc/exim/exim_out.conf" } + { "Sendmail2" = "/usr/sbin/exim -C /etc/exim/exim_out.conf" } + { "Incoming Work User" = "exim" } + { "Incoming Work Group" = "clam" } + { "Incoming Work Permissions" = "0640" } + { "Quarantine User" = "exim" } + { "Quarantine Group" = "baruwa" } + { "Quarantine Permissions" = "0660" } + { "Max Unscanned Bytes Per Scan" = "100m" } + { "Max Unsafe Bytes Per Scan" = "50m" } + { "Max Unscanned Messages Per Scan" = "30" } + { "Max Unsafe Messages Per Scan" = "30" } + { "Max Normal Queue Size" = "800" } + { "Scan Messages" = "%rules-dir%/scan.messages.rules" } + { "Reject Message" = "no" } + { "Maximum Processing Attempts" = "6" } + { "Processing Attempts Database" = "%spool-dir%/incoming/Processing.db" } + { "Maximum Attachments Per Message" = "200" } + { "Expand TNEF" = "yes" } + { "Use TNEF Contents" = "replace" } + { "Deliver Unparsable TNEF" = "no" } + { "TNEF Expander" = "/usr/bin/tnef --maxsize=100000000" } + { "TNEF Timeout" = "120" } + { "File Command" = "/usr/sbin/file-wrapper" } + { "File Timeout" = "20" } + { "Gunzip Command" = "/bin/gunzip" } + { "Gunzip Timeout" = "50" } + { "Unrar Command" = "/usr/bin/unrar" } + { "Unrar Timeout" = "50" } + { "Find UU-Encoded Files" = "no" } + { "Maximum Message Size" = "%brules-dir%/message.size.rules" } + { "Maximum Attachment Size" = "-1" } + { "Minimum Attachment Size" = "-1" } + { "Maximum Archive Depth" = "4" } + { "Find Archives By Content" = "yes" } + { "Unpack Microsoft Documents" = "yes" } + { "Zip Attachments" = "no" } + { "Attachments Zip Filename" = "MessageAttachments.zip" } + { "Attachments Min Total Size To Zip" = "100k" } + { "Attachment Extensions Not To Zip" = ".zip .rar .gz .tgz .jpg .jpeg .mpg .mpe .mpeg .mp3 .rpm .htm .html .eml" } + { "Add Text Of Doc" = "no" } + { "Antiword" = "/usr/bin/antiword -f" } + { "Antiword Timeout" = "50" } + { "Unzip Maximum Files Per Archive" = "0" } + { "Unzip Maximum File Size" = "50k" } + { "Unzip Filenames" = "*.txt *.ini *.log *.csv" } + { "Unzip MimeType" = "text/plain" } + { "Virus Scanning" = "%brules-dir%/virus.checks.rules" } + { "Virus Scanners" = "auto" } + { "Virus Scanner Timeout" = "300" } + { "Deliver Disinfected Files" = "no" } + { "Silent Viruses" = "HTML-IFrame All-Viruses" } + { "Still Deliver Silent Viruses" = "no" } + { "Non-Forging Viruses" = "Joke/ OF97/ WM97/ W97M/ eicar" } + { "Spam-Virus Header" = "X-%org-name%-BaruwaFW-SpamVirus-Report:" } + { "Virus Names Which Are Spam" = "Sanesecurity.Spam*UNOFFICIAL HTML/* *Phish* *Suspected-phishing_safebrowsing*" } + { "Block Encrypted Messages" = "no" } + { "Block Unencrypted Messages" = "no" } + { "Allow Password-Protected Archives" = "yes" } + { "Check Filenames In Password-Protected Archives" = "yes" } + { "Allowed Sophos Error Messages" } + { "Sophos IDE Dir" = "/opt/sophos-av/lib/sav" } + { "Sophos Lib Dir" = "/opt/sophos-av/lib" } + { "Monitors For Sophos Updates" = "/opt/sophos-av/lib/sav/*.ide" } + { "Monitors for ClamAV Updates" = "/var/lib/clamav/*.cvd" } + { "ClamAVmodule Maximum Recursion Level" = "8" } + { "ClamAVmodule Maximum Files" = "1000" } + { "ClamAVmodule Maximum File Size" = "10000000" } + { "ClamAVmodule Maximum Compression Ratio" = "250" } + { "Clamd Port" = "3310" } + { "Clamd Socket" = "/var/run/clamav/clamd.sock" } + { "Clamd Lock File" } + { "Clamd Use Threads" = "no" } + { "ClamAV Full Message Scan" = "yes" } + { "Fpscand Port" = "10200" } + { "Dangerous Content Scanning" = "%rules-dir%/content.scanning.rules" } + { "Allow Partial Messages" = "no" } + { "Allow External Message Bodies" = "no" } + { "Find Phishing Fraud" = "yes" } + { "Also Find Numeric Phishing" = "yes" } + { "Use Stricter Phishing Net" = "yes" } + { "Highlight Phishing Fraud" = "yes" } + { "Phishing Safe Sites File" = "%etc-dir%/phishing.safe.sites.conf" } + { "Phishing Bad Sites File" = "%etc-dir%/phishing.bad.sites.conf" } + { "Country Sub-Domains List" = "%etc-dir%/country.domains.conf" } + { "Allow IFrame Tags" = "disarm" } + { "Allow Form Tags" = "disarm" } + { "Allow Script Tags" = "disarm" } + { "Allow WebBugs" = "disarm" } + { "Ignored Web Bug Filenames" = "spacer pixel.gif pixel.png gap" } + { "Known Web Bug Servers" = "msgtag.com" } + { "Web Bug Replacement" = "https://datafeeds.baruwa.com/1x1spacer.gif" } + { "Allow Object Codebase Tags" = "disarm" } + { "Convert Dangerous HTML To Text" = "no" } + { "Convert HTML To Text" = "no" } + { "Archives Are" = "zip rar ole" } + { "Allow Filenames" } + { "Deny Filenames" } + { "Filename Rules" = "%rules-dir%/filename.rules" } + { "Allow Filetypes" } + { "Allow File MIME Types" } + { "Deny Filetypes" } + { "Deny File MIME Types" } + { "Filetype Rules" = "%rules-dir%/filetype.rules" } + { "Archives: Allow Filenames" } + { "Archives: Deny Filenames" } + { "Archives: Filename Rules" = "%etc-dir%/archives.filename.rules.conf" } + { "Archives: Allow Filetypes" } + { "Archives: Allow File MIME Types" } + { "Archives: Deny Filetypes" } + { "Archives: Deny File MIME Types" } + { "Archives: Filetype Rules" = "%etc-dir%/archives.filetype.rules.conf" } + { "Default Rename Pattern" = "__FILENAME__.disarmed" } + { "Quarantine Infections" = "yes" } + { "Quarantine Silent Viruses" = "no" } + { "Quarantine Modified Body" = "no" } + { "Quarantine Whole Message" = "yes" } + { "Quarantine Whole Messages As Queue Files" = "no" } + { "Keep Spam And MCP Archive Clean" = "yes" } + { "Language Strings" = "%brules-dir%/languages.rules" } + { "Rejection Report" = "%brules-dir%/rejectionreport.rules" } + { "Deleted Bad Content Message Report" = "%brules-dir%/deletedcontentmessage.rules" } + { "Deleted Bad Filename Message Report" = "%brules-dir%/deletedfilenamemessage.rules" } + { "Deleted Virus Message Report" = "%brules-dir%/deletedvirusmessage.rules" } + { "Deleted Size Message Report" = "%brules-dir%/deletedsizemessage.rules" } + { "Stored Bad Content Message Report" = "%brules-dir%/storedcontentmessage.rules" } + { "Stored Bad Filename Message Report" = "%brules-dir%/storedfilenamemessage.rules" } + { "Stored Virus Message Report" = "%brules-dir%/storedvirusmessage.rules" } + { "Stored Size Message Report" = "%brules-dir%/storedsizemessage.rules" } + { "Disinfected Report" = "%brules-dir%/disinfectedreport.rules" } + { "Inline HTML Signature" = "%brules-dir%/html.sigs.rules" } + { "Inline Text Signature" = "%brules-dir%/text.sigs.rules" } + { "Signature Image Filename" = "%brules-dir%/sig.imgs.names.rules" } + { "Signature Image Filename" = "%brules-dir%/sig.imgs.rules" } + { "Inline HTML Warning" = "%brules-dir%/inlinewarninghtml.rules" } + { "Inline Text Warning" = "%brules-dir%/inlinewarningtxt.rules" } + { "Sender Content Report" = "%brules-dir%/sendercontentreport.rules" } + { "Sender Error Report" = "%brules-dir%/sendererrorreport.rules" } + { "Sender Bad Filename Report" = "%brules-dir%/senderfilenamereport.rules" } + { "Sender Virus Report" = "%brules-dir%/sendervirusreport.rules" } + { "Sender Size Report" = "%brules-dir%/sendersizereport.rules" } + { "Hide Incoming Work Dir" = "yes" } + { "Include Scanner Name In Reports" = "yes" } + { "Mail Header" = "X-%org-name%-BaruwaFW:" } + { "Spam Header" = "X-%org-name%-BaruwaFW-SpamCheck:" } + { "Spam Score Header" = "X-%org-name%-BaruwaFW-SpamScore:" } + { "Information Header" = "X-%org-name%-BaruwaFW-Information:" } + { "Add Envelope From Header" = "yes" } + { "Add Envelope To Header" = "no" } + { "Envelope From Header" = "X-BARUWA-BaruwaFW-From:" } + { "Envelope To Header" = "X-%org-name%-BaruwaFW-To:" } + { "ID Header" = "X-%org-name%-BaruwaFW-ID:" } + { "IP Protocol Version Header" } + { "Spam Score Character" = "s" } + { "SpamScore Number Instead Of Stars" = "no" } + { "Minimum Stars If On Spam List" = "0" } + { "Clean Header Value" = "Found to be clean" } + { "Infected Header Value" = "Found to be infected" } + { "Disinfected Header Value" = "Disinfected" } + { "Information Header Value" = "Please contact %org-long-name% for more information" } + { "Detailed Spam Report" = "yes" } + { "Include Scores In SpamAssassin Report" = "yes" } + { "Always Include SpamAssassin Report" = "no" } + { "Multiple Headers" = "add" } + { "Place New Headers At Top Of Message" = "yes" } + { "Hostname" = "the %org-name% ($HOSTNAME) Baruwa" } + { "Sign Messages Already Processed" = "no" } + { "Sign Clean Messages" = "%brules-dir%/sign.clean.msgs.rules" } + { "Attach Image To Signature" = "yes" } + { "Attach Image To HTML Message Only" = "yes" } + { "Allow Multiple HTML Signatures" = "no" } + { "Dont Sign HTML If Headers Exist" } + { "Mark Infected Messages" = "yes" } + { "Mark Unscanned Messages" = "no" } + { "Unscanned Header Value" = "Not scanned: please contact %org-long-name% for details" } + { "Remove These Headers" = "X-Mozilla-Status: X-Mozilla-Status2:" } + { "Deliver Cleaned Messages" = "yes" } + { "Notify Senders" = "no" } + { "Notify Senders Of Viruses" = "no" } + { "Notify Senders Of Blocked Filenames Or Filetypes" = "no" } + { "Notify Senders Of Blocked Size Attachments" = "no" } + { "Notify Senders Of Other Blocked Content" = "no" } + { "Never Notify Senders Of Precedence" = "list bulk" } + { "Scanned Modify Subject" = "no" } + { "Scanned Subject Text" = "{Scanned}" } + { "Virus Modify Subject" = "no" } + { "Virus Subject Text" = "{Virus?}" } + { "Filename Modify Subject" = "no" } + { "Filename Subject Text" = "{Filename?}" } + { "Content Modify Subject" = "no" } + { "Content Subject Text" = "{Dangerous Content?}" } + { "Size Modify Subject" = "no" } + { "Size Subject Text" = "{Size}" } + { "Disarmed Modify Subject" = "no" } + { "Disarmed Subject Text" = "{Disarmed}" } + { "Phishing Modify Subject" = "yes" } + { "Phishing Subject Text" = "{Suspected Phishing?}" } + { "Spam Modify Subject" = "no" } + { "Spam Subject Text" = "{Spam?}" } + { "High Scoring Spam Modify Subject" = "no" } + { "High Scoring Spam Subject Text" = "{Spam?}" } + { "Warning Is Attachment" = "yes" } + { "Attachment Warning Filename" = "%org-name%-Attachment-Warning.txt" } + { "Attachment Encoding Charset" = "ISO-8859-1" } + { "Archive Mail" } + { "Missing Mail Archive Is" = "file" } + { "Send Notices" = "no" } + { "Notices Include Full Headers" = "yes" } + { "Hide Incoming Work Dir in Notices" = "yes" } + { "Notice Signature" = "-- \\n%org-name%\\nEmail Security\\n%website%" } + { "Notices From" = "Baruwa" } + { "Notices To" = "postmaster" } + { "Local Postmaster" = "postmaster" } + { "Spam List Definitions" = "%etc-dir%/spam.lists.conf" } + { "Virus Scanner Definitions" = "%etc-dir%/virus.scanners.conf" } + { "Spam Checks" = "%brules-dir%/spam.checks.rules" } + { "Spam List" } + { "Spam Domain List" } + { "Spam Lists To Be Spam" = "1" } + { "Spam Lists To Reach High Score" = "3" } + { "Spam List Timeout" = "10" } + { "Max Spam List Timeouts" = "7" } + { "Spam List Timeouts History" = "10" } + { "Is Definitely Not Spam" = "%brules-dir%/approved.senders.rules" } + { "Is Definitely Spam" = "%brules-dir%/banned.senders.rules" } + { "Definite Spam Is High Scoring" = "yes" } + { "Ignore Spam Whitelist If Recipients Exceed" = "20" } + { "Max Spam Check Size" = "4000k" } + { "Use Watermarking" = "no" } + { "Add Watermark" = "yes" } + { "Check Watermarks With No Sender" = "yes" } + { "Treat Invalid Watermarks With No Sender as Spam" = "nothing" } + { "Check Watermarks To Skip Spam Checks" = "yes" } + { "Watermark Secret" = "%org-name%-BaruwaFW-Secret" } + { "Watermark Lifetime" = "604800" } + { "Watermark Header" = "X-%org-name%-BaruwaFW-Watermark:" } + { "Use SpamAssassin" = "yes" } + { "Max SpamAssassin Size" = "800k" } + { "Required SpamAssassin Score" = "%brules-dir%/spam.score.rules" } + { "High SpamAssassin Score" = "%brules-dir%/highspam.score.rules" } + { "SpamAssassin Auto Whitelist" = "yes" } + { "SpamAssassin Timeout" = "75" } + { "Max SpamAssassin Timeouts" = "10" } + { "SpamAssassin Timeouts History" = "30" } + { "Check SpamAssassin If On Spam List" = "yes" } + { "Include Binary Attachments In SpamAssassin" = "no" } + { "Spam Score" = "yes" } + { "Cache SpamAssassin Results" = "yes" } + { "SpamAssassin Cache Database File" = "%spool-dir%/incoming/SpamAssassin.cache.db" } + { "Rebuild Bayes Every" = "0" } + { "Wait During Bayes Rebuild" = "no" } + { "Use Custom Spam Scanner" = "no" } + { "Max Custom Spam Scanner Size" = "20k" } + { "Custom Spam Scanner Timeout" = "20" } + { "Max Custom Spam Scanner Timeouts" = "10" } + { "Custom Spam Scanner Timeout History" = "20" } + { "Spam Actions" = "%brules-dir%/spam.actions.rules" } + { "High Scoring Spam Actions" = "%brules-dir%/highspam.actions.rules" } + { "Non Spam Actions" = "%rules-dir%/nonspam.actions.rules" } + { "SpamAssassin Rule Actions" } + { "Sender Spam Report" = "%brules-dir%/senderspamreport.rules" } + { "Sender Spam List Report" = "%brules-dir%/senderspamrblreport.rules" } + { "Sender SpamAssassin Report" = "%brules-dir%/senderspamsareport.rules" } + { "Inline Spam Warning" = "%brules-dir%/inlinespamwarning.rules" } + { "Recipient Spam Report" = "%brules-dir%/recipientspamreport.rules" } + { "Enable Spam Bounce" = "%rules-dir%/bounce.rules" } + { "Bounce Spam As Attachment" = "no" } + { "Syslog Facility" = "mail" } + { "Log Speed" = "no" } + { "Log Spam" = "no" } + { "Log Non Spam" = "no" } + { "Log Delivery And Non-Delivery" = "no" } + { "Log Permitted Filenames" = "no" } + { "Log Permitted Filetypes" = "no" } + { "Log Permitted File MIME Types" = "no" } + { "Log Silent Viruses" = "no" } + { "Log Dangerous HTML Tags" = "no" } + { "Log SpamAssassin Rule Actions" = "no" } + { "SpamAssassin Temporary Dir" = "/var/spool/MailScanner/incoming/SpamAssassin-Temp" } + { "SpamAssassin User State Dir" } + { "SpamAssassin Install Prefix" } + { "SpamAssassin Site Rules Dir" = "/etc/mail/spamassassin" } + { "SpamAssassin Local Rules Dir" } + { "SpamAssassin Local State Dir" } + { "SpamAssassin Default Rules Dir" } + { "DB DSN" = "DBI:Pg:database=baruwa" } + { "DB Username" = "baruwa" } + { "DB Password" = "password" } + { "SQL Serial Number" = "SELECT MAX(value) AS confserialnumber FROM configurations WHERE internal='confserialnumber'" } + { "SQL Quick Peek" = "SELECT dbvalue(value) AS value FROM quickpeek WHERE external = ? AND (hostname = ? OR hostname='default') LIMIT 1" } + { "SQL Config" = "SELECT internal, dbvalue(value) AS value, hostname FROM quickpeek WHERE hostname=? OR hostname='default'" } + { "SQL Ruleset" = "SELECT row_number, ruleset AS rule FROM msrulesets WHERE name=?" } + { "SQL SpamAssassin Config" } + { "SQL Debug" = "no" } + { "Sphinx Host" = "127.0.0.1" } + { "Sphinx Port" = "9306" } + { "MCP Checks" = "no" } + { "First Check" = "spam" } + { "MCP Required SpamAssassin Score" = "1" } + { "MCP High SpamAssassin Score" = "10" } + { "MCP Error Score" = "1" } + { "MCP Header" = "X-%org-name%-BaruwaFW-MCPCheck:" } + { "Non MCP Actions" = "deliver" } + { "MCP Actions" = "deliver" } + { "High Scoring MCP Actions" = "deliver" } + { "Bounce MCP As Attachment" = "no" } + { "MCP Modify Subject" = "start" } + { "MCP Subject Text" = "{MCP?}" } + { "High Scoring MCP Modify Subject" = "start" } + { "High Scoring MCP Subject Text" = "{MCP?}" } + { "Is Definitely MCP" = "no" } + { "Is Definitely Not MCP" = "no" } + { "Definite MCP Is High Scoring" = "no" } + { "Always Include MCP Report" = "no" } + { "Detailed MCP Report" = "yes" } + { "Include Scores In MCP Report" = "no" } + { "Log MCP" = "no" } + { "MCP Max SpamAssassin Timeouts" = "20" } + { "MCP Max SpamAssassin Size" = "100k" } + { "MCP SpamAssassin Timeout" = "10" } + { "MCP SpamAssassin Prefs File" = "%mcp-dir%/mcp.spam.assassin.prefs.conf" } + { "MCP SpamAssassin User State Dir" } + { "MCP SpamAssassin Local Rules Dir" = "%mcp-dir%" } + { "MCP SpamAssassin Default Rules Dir" = "%mcp-dir%" } + { "MCP SpamAssassin Install Prefix" = "%mcp-dir%" } + { "Recipient MCP Report" = "%report-dir%/recipient.mcp.report.txt" } + { "Sender MCP Report" = "%report-dir%/sender.mcp.report.txt" } + { "Use Default Rules With Multiple Recipients" = "no" } + { "Read IP Address From Received Header" = "no" } + { "Spam Score Number Format" = "%d.1f" } + { "MailScanner Version Number" = "4.85.5" } + { "SpamAssassin Cache Timings" = "1800,300,10800,172800,600" } + { "Debug" = "no" } + { "Debug SpamAssassin" = "no" } + { "Run In Foreground" = "no" } + { "Always Looked Up Last" = "&BaruwaLog" } + { "Always Looked Up Last After Batch" = "no" } + { "Deliver In Background" = "yes" } + { "Delivery Method" = "batch" } + { "Split Exim Spool" = "no" } + { "Lockfile Dir" = "%spool-dir%/incoming/Locks" } + { "Custom Functions Dir" = "/usr/share/baruwa/CustomFunctions" } + { "Lock Type" } + { "Syslog Socket Type" } + { "Automatic Syntax Check" = "yes" } + { "Minimum Code Status" = "supported" } + { "include" = "/etc/MailScanner/conf.d/*.conf"} \ No newline at end of file diff --git a/lenses/tests/test_mailscanner_rules.aug b/lenses/tests/test_mailscanner_rules.aug new file mode 100644 index 0000000..c8acf7a --- /dev/null +++ b/lenses/tests/test_mailscanner_rules.aug @@ -0,0 +1,59 @@ +module Test_Mailscanner_Rules = +let conf = "# JKF 10/08/2007 Adobe Acrobat nastiness +rename \.fdf$ Dangerous Adobe Acrobat data-file Opening this file can cause auto-loading of any file from the internet + +# JKF 04/01/2005 More Microsoft security vulnerabilities +deny \.ico$ Windows icon file security vulnerability Possible buffer overflow in Windows +allow \.(jan|feb|mar|apr|may|jun|june|jul|july|aug|sep|sept|oct|nov|dec)\.[a-z0-9]{3}$ - - +deny+delete \.cur$ Windows cursor file security vulnerability Possible buffer overflow in Windows +andrew@baruwa.com,andrew@baruwa.net \.reg$ Possible Windows registry attack Windows registry entries are very dangerous in email +andrew@baruwa.com andrew@baruwa.net \.chm$ Possible compiled Help file-based virus Compiled help files are very dangerous in email +rename to .ppt \.pps$ Renamed .pps to .ppt Renamed .pps to .ppt +" + +test Mailscanner_Rules.lns get conf = + { "#comment" = "JKF 10/08/2007 Adobe Acrobat nastiness" } + { "1" + { "action" = "rename" } + { "regex" = "\.fdf$" } + { "log-text" = "Dangerous Adobe Acrobat data-file" } + { "user-report" = "Opening this file can cause auto-loading of any file from the internet" } + } + {} + { "#comment" = "JKF 04/01/2005 More Microsoft security vulnerabilities" } + { "2" + { "action" = "deny" } + { "regex" = "\.ico$" } + { "log-text" = "Windows icon file security vulnerability" } + { "user-report" = "Possible buffer overflow in Windows" } + } + { "3" + { "action" = "allow" } + { "regex" = "\.(jan|feb|mar|apr|may|jun|june|jul|july|aug|sep|sept|oct|nov|dec)\.[a-z0-9]{3}$" } + { "log-text" = "-" } + { "user-report" = "-" } + } + { "4" + { "action" = "deny+delete" } + { "regex" = "\.cur$" } + { "log-text" = "Windows cursor file security vulnerability" } + { "user-report" = "Possible buffer overflow in Windows" } + } + { "5" + { "action" = "andrew@baruwa.com,andrew@baruwa.net" } + { "regex" = "\.reg$" } + { "log-text" = "Possible Windows registry attack" } + { "user-report" = "Windows registry entries are very dangerous in email" } + } + { "6" + { "action" = "andrew@baruwa.com andrew@baruwa.net" } + { "regex" = "\.chm$" } + { "log-text" = "Possible compiled Help file-based virus" } + { "user-report" = "Compiled help files are very dangerous in email" } + } + { "7" + { "action" = "rename to .ppt" } + { "regex" = "\.pps$" } + { "log-text" = "Renamed .pps to .ppt" } + { "user-report" = "Renamed .pps to .ppt" } + } \ No newline at end of file diff --git a/lenses/tests/test_nginx.aug b/lenses/tests/test_nginx.aug index f336c3f..7cdf985 100644 --- a/lenses/tests/test_nginx.aug +++ b/lenses/tests/test_nginx.aug @@ -2,9 +2,26 @@ Module: Test_Nginx Provides unit tests and examples for the lens. *) -module Test_nginx = +module Test_nginx = - let conf ="user nginx nginx; +(* Do some limited typechecking on the recursive lens; note that + unrolling once more leads to a typecheck error that seems to + be spurious, though it's not clear why + + Unrolling once more amounts to adding the clause + Nginx.block (Nginx.block Nginx.simple) + to unrolled and results in an error + overlapping lenses in union.get + Example matched by both: 'upstream{}\n' +*) +let unrolled = Nginx.simple | Nginx.block Nginx.simple + +let lns_unrolled = (Util.comment | Util.empty | unrolled) + +(* Normal unit tests *) +let lns = Nginx.lns + +let conf ="user nginx nginx; worker_processes 1; error_log /var/log/nginx/error_log info; @@ -48,45 +65,148 @@ http { } " - test Nginx.lns get conf = - { "user" = "nginx nginx" } - { "worker_processes" = "1" } - { "error_log" = "/var/log/nginx/error_log info" } - {} - { "events" - { "worker_connections" = "1024" } - { "use" = "epoll" } } - {} - { "#comment" = "comment1" } - { "#comment" = "comment2" } - {} - { "http" - { "#comment" = "comment3" } - { "include" = "/etc/nginx/mime.types" } - { "default_type" = "application/octet-stream" } - { "log_format" = "main +test lns get conf = + { "user" = "nginx nginx" } + { "worker_processes" = "1" } + { "error_log" = "/var/log/nginx/error_log info" } + {} + { "events" + { "worker_connections" = "1024" } + { "use" = "epoll" } } + {} + { "#comment" = "comment1" } + { "#comment" = "comment2" } + {} + { "http" + { "#comment" = "comment3" } + { "include" = "/etc/nginx/mime.types" } + { "default_type" = "application/octet-stream" } + { "log_format" = "main '$remote_addr - $remote_user [$time_local] ' '\"$request\" $status $bytes_sent ' '\"$http_referer\" \"$http_user_agent\" ' '\"$gzip_ratio\"'" } - { "client_header_timeout" = "10m" } - { "client_body_timeout" = "10m" } - { "send_timeout" = "10m" } - { "connection_pool_size" = "256" } - { "client_header_buffer_size" = "2k" } - { "large_client_header_buffers" = "4 8k" } - { "request_pool_size" = "4k" } - { "gzip" = "on" } - { "gzip_min_length" = "1000" } - { "gzip_buffers" = "4 8k" } - { "gzip_types" = "text/plain application/json" } - { "output_buffers" = "1 32k" } - { "postpone_output" = "1460" } - { "sendfile" = "on" } - { "tcp_nopush" = "on" } - { "tcp_nodelay" = "on" } - { "keepalive_timeout" = "75 20" } - { "ignore_invalid_headers" = "on" } - { "index" = "index.html index.php" } - { "include" = "vhosts/*.conf" } } - + { "client_header_timeout" = "10m" } + { "client_body_timeout" = "10m" } + { "send_timeout" = "10m" } + { "connection_pool_size" = "256" } + { "client_header_buffer_size" = "2k" } + { "large_client_header_buffers" = "4 8k" } + { "request_pool_size" = "4k" } + { "gzip" = "on" } + { "gzip_min_length" = "1000" } + { "gzip_buffers" = "4 8k" } + { "gzip_types" = "text/plain application/json" } + { "output_buffers" = "1 32k" } + { "postpone_output" = "1460" } + { "sendfile" = "on" } + { "tcp_nopush" = "on" } + { "tcp_nodelay" = "on" } + { "keepalive_timeout" = "75 20" } + { "ignore_invalid_headers" = "on" } + { "index" = "index.html index.php" } + { "include" = "vhosts/*.conf" } } + +(* location blocks *) +test lns get "location / { }\n" = + { "location" + { "#uri" = "/" } } + +test lns get "location = / { }\n" = + { "location" + { "#comp" = "=" } + { "#uri" = "/" } } + +test lns get "location /documents/ { }\n" = + { "location" + { "#uri" = "/documents/" } } + +test lns get "location ^~ /images/ { }\n" = + { "location" + { "#comp" = "^~" } + { "#uri" = "/images/" } } + +test lns get "location ~* \.(gif|jpg|jpeg)$ { }\n" = + { "location" + { "#comp" = "~*" } + { "#uri" = "\.(gif|jpg|jpeg)$" } } + +test lns get "location @fallback { }\n" = + { "location" + { "#uri" = "@fallback" } } + +(* if blocks *) +test lns get "if ($slow) { + tcp_nodelay on; +}\n" = + { "if" + { "#cond" = "($slow)" } + { "tcp_nodelay" = "on" } } + +test lns get "if ($request_method = POST) { }\n" = + { "if" + { "#cond" = "($request_method = POST)" } } + + +test lns get "if ($http_cookie ~* \"id=([^;]+)(?:;|$)\") { }\n" = + { "if" + { "#cond" = "($http_cookie ~* \"id=([^;]+)(?:;|$)\")" } } + +(* geo blocks *) +test lns get "geo $geo { }\n" = + { "geo" + { "#geo" = "$geo" } } + +test lns get "geo $address $geo { }\n" = + { "geo" + { "#address" = "$address" } + { "#geo" = "$geo" } } + +(* map blocks *) +test lns get "map $http_host $name { }\n" = + { "map" + { "#source" = "$http_host" } + { "#variable" = "$name" } } + +(* split_clients block *) +test lns get "split_clients \"${remote_addr}AAA\" $variable { }\n" = + { "split_clients" + { "#string" = "\"${remote_addr}AAA\"" } + { "#variable" = "$variable" } } + +(* upstream block *) +test lns get "upstream backend { }\n" = + { "upstream" + { "#name" = "backend" } } + +(* GH #179 - recursive blocks *) +let http = "http { + server { + listen 80; + location / { + root\thtml; + } + } + gzip on; +}\n" + +test lns get http = + { "http" + { "server" + { "listen" = "80" } + { "location" + { "#uri" = "/" } + { "root" = "html" } } } + { "gzip" = "on" } } + +(* Make sure we do not screw up the indentation of the file *) +test lns put http after set "/http/gzip" "off" = +"http { + server { + listen 80; + location / { + root\thtml; + } + } + gzip off; +}\n" diff --git a/lenses/tests/test_pagekite.aug b/lenses/tests/test_pagekite.aug index 1520fbd..d32bc4f 100644 --- a/lenses/tests/test_pagekite.aug +++ b/lenses/tests/test_pagekite.aug @@ -64,21 +64,27 @@ test Pagekite.lns get conf_service = { } { "service_on" { "1" - { "source" = "raw/22:@kitename" } - { "destination" = "localhost:22" } + { "protocol" = "raw/22" } + { "kitename" = "@kitename" } + { "backend_host" = "localhost" } + { "backend_port" = "22" } { "secret" = "@kitesecret" } } } { "service_on" { "2" - { "source" = "http:192.168.0.1" } - { "destination" = "127.0.0.1:80" } + { "protocol" = "http" } + { "kitename" = "192.168.0.1" } + { "backend_host" = "127.0.0.1" } + { "backend_port" = "80" } } } { "service_on" { "3" - { "source" = "https:yourhostname,fqdn" } - { "destination" = "127.0.0.1:443" } + { "protocol" = "https" } + { "kitename" = "yourhostname,fqdn" } + { "backend_host" = "127.0.0.1" } + { "backend_port" = "443" } } } diff --git a/lenses/tests/test_passwd.aug b/lenses/tests/test_passwd.aug index 51081f8..01d93fc 100644 --- a/lenses/tests/test_passwd.aug +++ b/lenses/tests/test_passwd.aug @@ -43,6 +43,15 @@ test Passwd.lns get "+@some-nis-group::::::\n" = test Passwd.lns get "+\n" = { "@nisdefault" } +test Passwd.lns get "+::::::\n" = + { "@nisdefault" + { "password" = "" } + { "uid" = "" } + { "gid" = "" } + { "name" } + { "home" } + { "shell" } } + test Passwd.lns get "+::::::/sbin/nologin\n" = { "@nisdefault" { "password" = "" } @@ -52,8 +61,44 @@ test Passwd.lns get "+::::::/sbin/nologin\n" = { "home" } { "shell" = "/sbin/nologin" } } +test Passwd.lns get "+:*:0:0:::\n" = + { "@nisdefault" + { "password" = "*" } + { "uid" = "0" } + { "gid" = "0" } + { "name" } + { "home" } + { "shell" } } + (* NIS entries with overrides, ticket #339 *) test Passwd.lns get "+@bob:::::/home/bob:/bin/bash\n" = { "@nis" = "bob" { "home" = "/home/bob" } { "shell" = "/bin/bash" } } + +(* NIS user entries *) +test Passwd.lns get "+bob::::::\n" = + { "@+nisuser" = "bob" } + +test Passwd.lns get "+bob::::User Comment:/home/bob:/bin/bash\n" = + { "@+nisuser" = "bob" + { "name" = "User Comment" } + { "home" = "/home/bob" } + { "shell" = "/bin/bash" } } + +test Passwd.lns put "+bob::::::\n" after + set "@+nisuser" "alice" += "+alice::::::\n" + +test Passwd.lns put "+bob::::::\n" after + set "@+nisuser/name" "User Comment"; + set "@+nisuser/home" "/home/bob"; + set "@+nisuser/shell" "/bin/bash" += "+bob::::User Comment:/home/bob:/bin/bash\n" + +test Passwd.lns get "-bob::::::\n" = + { "@-nisuser" = "bob" } + +test Passwd.lns put "-bob::::::\n" after + set "@-nisuser" "alice" += "-alice::::::\n" diff --git a/lenses/tests/test_pgbouncer.aug b/lenses/tests/test_pgbouncer.aug new file mode 100644 index 0000000..177dc6a --- /dev/null +++ b/lenses/tests/test_pgbouncer.aug @@ -0,0 +1,55 @@ +module Test_Pgbouncer = + let pgconfig =";; database name = connect string +;; +;; connect string params: +;; dbname= host= port= user= password= +[databases] +; foodb over unix socket +foodb = + +; redirect bardb to bazdb on localhost +bardb = host=localhost dbname=bazdb + +; acceess to dest database will go with single user +forcedb = host=127.0.0.1 port=300 user=baz password=foo client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1' +[pgbouncer] +;;; Administrative settings +logfile = /var/log/pgbouncer/pgbouncer.log +pidfile = /var/run/pgbouncer/pgbouncer.pid +; ip address or * which means all ip-s +listen_addr = 127.0.0.1 +listen_port = 6432 +;auth_file = /8.0/main/global/pg_auth +auth_file = /var/lib/pgsql/data/global/pg_auth +admin_users = postgres +server_reset_query = DISCARD ALL +" + +test Pgbouncer.lns get pgconfig = + { "#comment" = "; database name = connect string" } + { "#comment" = ";" } + { "#comment" = "; connect string params:" } + { "#comment" = "; dbname= host= port= user= password=" } + { "databases" + { "#comment" = "foodb over unix socket" } + { "foodb" } + { } + { "#comment" = "redirect bardb to bazdb on localhost" } + { "bardb" = "host=localhost dbname=bazdb" } + { } + { "#comment" = "acceess to dest database will go with single user" } + { "forcedb" = "host=127.0.0.1 port=300 user=baz password=foo client_encoding=UNICODE datestyle=ISO connect_query='SELECT 1'" } + } + { "pgbouncer" + { "#comment" = ";; Administrative settings" } + { "logfile" = "/var/log/pgbouncer/pgbouncer.log" } + { "pidfile" = "/var/run/pgbouncer/pgbouncer.pid" } + { "#comment" = "ip address or * which means all ip-s" } + { "listen_addr" = "127.0.0.1" } + { "listen_port" = "6432" } + { "#comment" = "auth_file = /8.0/main/global/pg_auth" } + { "auth_file" = "/var/lib/pgsql/data/global/pg_auth" } + { "admin_users" = "postgres" } + { "server_reset_query" = "DISCARD ALL" } + } + \ No newline at end of file diff --git a/lenses/tests/test_postfix_sasl_smtpd.aug b/lenses/tests/test_postfix_sasl_smtpd.aug new file mode 100644 index 0000000..231bc69 --- /dev/null +++ b/lenses/tests/test_postfix_sasl_smtpd.aug @@ -0,0 +1,19 @@ +module Test_Postfix_Sasl_Smtpd = + + + let conf = "pwcheck_method: auxprop saslauthd +auxprop_plugin: plesk +saslauthd_path: /private/plesk_saslauthd +mech_list: CRAM-MD5 PLAIN LOGIN +sql_engine: intentionally disabled +log_level: 4 +" + + + test Postfix_sasl_smtpd.lns get conf = + { "pwcheck_method" = "auxprop saslauthd" } + { "auxprop_plugin" = "plesk" } + { "saslauthd_path" = "/private/plesk_saslauthd" } + { "mech_list" = "CRAM-MD5 PLAIN LOGIN" } + { "sql_engine" = "intentionally disabled" } + { "log_level" = "4" } diff --git a/lenses/tests/test_puppetfile.aug b/lenses/tests/test_puppetfile.aug new file mode 100644 index 0000000..8784a3f --- /dev/null +++ b/lenses/tests/test_puppetfile.aug @@ -0,0 +1,58 @@ +(* +Module: Test_Puppetfile + Provides unit tests and examples for the lens. +*) +module Test_Puppetfile = + +(* Test: Puppetfile.lns *) +test Puppetfile.lns get "forge \"https://forgeapi.puppetlabs.com\" + +mod 'puppetlabs-razor' +mod 'puppetlabs-ntp', \"0.0.3\" + +mod 'puppetlabs-apt', + :git => \"git://github.com/puppetlabs/puppetlabs-apt.git\" + +mod 'puppetlabs-stdlib', + :git => \"git://github.com/puppetlabs/puppetlabs-stdlib.git\" + +mod 'puppetlabs-apache', '0.6.0', + :github_tarball => 'puppetlabs/puppetlabs-apache' + +metadata\n" = + { "forge" = "https://forgeapi.puppetlabs.com" } + { } + { "1" = "puppetlabs-razor" } + { "2" = "puppetlabs-ntp" + { "@version" = "0.0.3" } + } + { } + { "3" = "puppetlabs-apt" + { "git" = "git://github.com/puppetlabs/puppetlabs-apt.git" } + } + { } + { "4" = "puppetlabs-stdlib" + { "git" = "git://github.com/puppetlabs/puppetlabs-stdlib.git" } + } + { } + { "5" = "puppetlabs-apache" + { "@version" = "0.6.0" } + { "github_tarball" = "puppetlabs/puppetlabs-apache" } + } + { } + { "metadata" } + +(* Test: Puppetfile.lns + Complex version conditions *) +test Puppetfile.lns get "mod 'puppetlabs/stdlib', '< 5.0.0' +mod 'theforeman/concat_native', '>= 1.3.0 < 1.4.0' +mod 'herculesteam/augeasproviders', '2.1.x'\n" = + { "1" = "puppetlabs/stdlib" + { "@version" = "< 5.0.0" } + } + { "2" = "theforeman/concat_native" + { "@version" = ">= 1.3.0 < 1.4.0" } + } + { "3" = "herculesteam/augeasproviders" + { "@version" = "2.1.x" } + } diff --git a/lenses/tests/test_pylonspaste.aug b/lenses/tests/test_pylonspaste.aug new file mode 100644 index 0000000..1a324ff --- /dev/null +++ b/lenses/tests/test_pylonspaste.aug @@ -0,0 +1,75 @@ +module Test_Pylonspaste = + let pylons_conf ="# baruwa - Pylons configuration +# The %(here)s variable will be replaced with the parent directory of this file +[uwsgi] +socket = /var/run/baruwa/baruwa.sock +processes = 5 +uid = baruwa +daemonize = /var/log/uwsgi/uwsgi-baruwa.log + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 5000 + +[app:main] +use = egg:baruwa +full_stack = true +static_files = false +set debug = false + +[identifiers] +plugins = + form;browser + auth_tkt + +[authenticators] +plugins = + sa_auth + baruwa_pop3_auth + baruwa_imap_auth + baruwa_smtp_auth + baruwa_ldap_auth + baruwa_radius_auth +" + +test Pylonspaste.lns get pylons_conf = + { "#comment" = "baruwa - Pylons configuration" } + { "#comment" = "The %(here)s variable will be replaced with the parent directory of this file" } + { "uwsgi" + { "socket" = "/var/run/baruwa/baruwa.sock" } + { "processes" = "5" } + { "uid" = "baruwa" } + { "daemonize" = "/var/log/uwsgi/uwsgi-baruwa.log" } + { } + } + { "server:main" + { "use" = "egg:Paste#http" } + { "host" = "0.0.0.0" } + { "port" = "5000" } + { } + } + { "app:main" + { "use" = "egg:baruwa" } + { "full_stack" = "true" } + { "static_files" = "false" } + { "debug" = "false" } + { } + } + { "identifiers" + { "plugins" + { "1" = "form;browser" } + { "2" = "auth_tkt" } + } + {} + } + { "authenticators" + { "plugins" + { "1" = "sa_auth" } + { "2" = "baruwa_pop3_auth" } + { "3" = "baruwa_imap_auth" } + { "4" = "baruwa_smtp_auth" } + { "5" = "baruwa_ldap_auth" } + { "6" = "baruwa_radius_auth" } + } + } diff --git a/lenses/tests/test_pythonpaste.aug b/lenses/tests/test_pythonpaste.aug index 40cb7a5..fca7545 100644 --- a/lenses/tests/test_pythonpaste.aug +++ b/lenses/tests/test_pythonpaste.aug @@ -39,3 +39,20 @@ use = egg:Paste#urlmap /: public_version_api /v3: a_new_api_version " + + (* Paste can define global config in DEFAULT, then override with "set" in sections, RHBZ#1175545 *) + test PythonPaste.lns get "[DEFAULT] +log_name = swift +log_facility = LOG_LOCAL1 + +[app:proxy-server] +use = egg:swift#proxy +set log_name = proxy-server\n" = + { "DEFAULT" + { "log_name" = "swift" } + { "log_facility" = "LOG_LOCAL1" } + { } } + { "app:proxy-server" + { "use" = "egg:swift#proxy" } + { "log_name" = "proxy-server" + { "@set" } } } diff --git a/lenses/tests/test_shadow.aug b/lenses/tests/test_shadow.aug index 44b5a94..ed3e222 100644 --- a/lenses/tests/test_shadow.aug +++ b/lenses/tests/test_shadow.aug @@ -43,3 +43,39 @@ test Shadow.lns get conf = { "inactive_days" = "" } { "expire_date" = "" } { "flag" = "" } } + +test Shadow.lns get "+\n" = + { "@nisdefault" } + +test Shadow.lns get "+::::::::\n" = + { "@nisdefault" + { "password" = "" } + { "lastchange_date" = "" } + { "minage_days" = "" } + { "maxage_days" = "" } + { "warn_days" = "" } + { "inactive_days" = "" } + { "expire_date" = "" } + { "flag" = "" } } + +test Shadow.lns put "+\n" after + set "@nisdefault/password" ""; + set "@nisdefault/lastchange_date" ""; + set "@nisdefault/minage_days" ""; + set "@nisdefault/maxage_days" ""; + set "@nisdefault/warn_days" ""; + set "@nisdefault/inactive_days" ""; + set "@nisdefault/expire_date" ""; + set "@nisdefault/flag" "" += "+::::::::\n" + +test Shadow.lns put "+::::::::\n" after + rm "@nisdefault/password"; + rm "@nisdefault/lastchange_date"; + rm "@nisdefault/minage_days"; + rm "@nisdefault/maxage_days"; + rm "@nisdefault/warn_days"; + rm "@nisdefault/inactive_days"; + rm "@nisdefault/expire_date"; + rm "@nisdefault/flag" += "+\n" diff --git a/lenses/tests/test_shellvars.aug b/lenses/tests/test_shellvars.aug index 42fc2bd..7a89f11 100644 --- a/lenses/tests/test_shellvars.aug +++ b/lenses/tests/test_shellvars.aug @@ -406,7 +406,6 @@ esac\n" = (* Empty comment before entries *) test Shellvars.lns get "# \nfoo=bar\n" = - { } { "foo" = "bar" } (* Empty comment after entries *) @@ -470,6 +469,25 @@ esac\n" = { "@case_entry" = "1" { "TestVar" = "\"test1\"" } } } + (* case: support ;; on the same line with multiple commands *) + test lns get "case $ARG in + 0) Foo=0; Bar=1;; + 1) + Foo=2 + Bar=3; Baz=4;; +esac\n" = + { "@case" = "$ARG" + { "@case_entry" = "0" + { "Foo" = "0" } + { "Bar" = "1" } + } + { "@case_entry" = "1" + { "Foo" = "2" } + { "Bar" = "3" } + { "Baz" = "4" } + } + } + (* Test: Shellvars.lns Support `##` bashism in conditions (GH issue #118) *) test Shellvars.lns get "if [ \"${APACHE_CONFDIR##/etc/apache2-}\" != \"${APACHE_CONFDIR}\" ] ; then @@ -489,6 +507,35 @@ fi\n" = { "MALLOC_PERTURB_" = "$(($RANDOM % 255 + 1))" { "export" } } + (* + * Github issue 202 + *) + let starts_with_blank = "\n \nVAR=value\n" + + test lns get starts_with_blank = { "VAR" = "value" } + + (* It is now possible to insert at the beginning of a file + * that starts with blank lines *) + test lns put starts_with_blank after + insb "#comment" "/*[1]"; + set "/#comment[1]" "a comment" = + " # a comment\nVAR=value\n" + + (* Modifications of the file lose the blank lines though *) + test lns put starts_with_blank after + set "/VAR2" "abc" = "VAR=value\nVAR2=abc\n" + + test lns put starts_with_blank after + rm "/VAR"; + set "/VAR2" "abc" = "VAR2=abc\n" + + test lns put starts_with_blank after + rm "/VAR" = "" + + (* Support associative arrays *) + test lns get "var[alpha_beta,gamma]=something\n" = + { "var[alpha_beta,gamma]" = "something" } + (* Local Variables: *) (* mode: caml *) (* End: *) diff --git a/lenses/tests/test_shellvars_list.aug b/lenses/tests/test_shellvars_list.aug index 8cd9dd4..36fecc1 100644 --- a/lenses/tests/test_shellvars_list.aug +++ b/lenses/tests/test_shellvars_list.aug @@ -128,6 +128,17 @@ FAILSAVE_APPEND=\"console=ttyS0\" { "value" = "ping/icmp" } { "#comment" = "ping" } } + (* Test: Shellvars_list.lns + Support double-quoted continued lines *) + test Shellvars_list.lns get "DAEMON_OPTS=\"-a :6081 \ + -T localhost:6082\"\n" = + { "DAEMON_OPTS" + { "quote" = "\"" } + { "value" = "-a" } + { "value" = ":6081" } + { "value" = "-T" } + { "value" = "localhost:6082" } } + (* Local Variables: *) (* mode: caml *) (* End: *) diff --git a/lenses/tests/test_sudoers.aug b/lenses/tests/test_sudoers.aug index 7114fd3..c9f9fff 100644 --- a/lenses/tests/test_sudoers.aug +++ b/lenses/tests/test_sudoers.aug @@ -315,3 +315,14 @@ test Sudoers.spec get "%GrOup ALL = (ALL) ALL\n" = { "runas_user" = "ALL" } } } } + +(* Test: Sudoers.spec + allow + in user-/groupnames *) +test Sudoers.spec get "group+user somehost = ALL\n" = + { "spec" + { "user" = "group+user" } + { "host_group" + { "host" = "somehost" } + { "command" = "ALL" } + } + } diff --git a/lenses/tests/test_sysconfig.aug b/lenses/tests/test_sysconfig.aug index fa1601a..660844f 100644 --- a/lenses/tests/test_sysconfig.aug +++ b/lenses/tests/test_sysconfig.aug @@ -148,6 +148,15 @@ unset ONBOOT # We do not want this var test lns get "#MOUNTD_NFS_V3\n#\n" = { "#comment" = "MOUNTD_NFS_V3" } + (* Handle leading whitespace at the beginning of a line correctly *) + test lns get " var=value\n" = { "var" = "value" } + + test lns put " var=value\n" after set "/var" "val2" = " var=val2\n" + + test lns get "\t \tvar=value\n" = { "var" = "value" } + + test lns get " export var=value\n" = { "var" = "value" { "export" } } + (* Local Variables: *) (* mode: caml *) (* End: *) diff --git a/lenses/xinetd.aug b/lenses/xinetd.aug index 506c025..072d768 100644 --- a/lenses/xinetd.aug +++ b/lenses/xinetd.aug @@ -74,7 +74,7 @@ module Xinetd = * about how to write that down. The resulting regular expressions * would simply be prohibitively large. *) - let body (attr:lens) = Build.block_newlines + let body (attr:lens) = Build.block_newlines_spc (indent . attr . Util.eol) Util.comment diff --git a/man/Makefile.in b/man/Makefile.in deleted file mode 100644 index e635575..0000000 --- a/man/Makefile.in +++ /dev/null @@ -1,1352 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ -VPATH = @srcdir@ -am__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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -subdir = man -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -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__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -man1dir = $(mandir)/man1 -am__installdirs = "$(DESTDIR)$(man1dir)" -NROFF = nroff -MANS = $(man1_MANS) -am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -EXTRA_DIST = $(wildcard *.pod) $(wildcard *.[0-9]) -man1_MANS = augtool.1 augparse.1 -all: all-am - -.SUFFIXES: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu man/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-man1: $(man1_MANS) - @$(NORMAL_INSTALL) - @list1='$(man1_MANS)'; \ - list2=''; \ - test -n "$(man1dir)" \ - && test -n "`echo $$list1$$list2`" \ - || exit 0; \ - echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ - { for i in $$list1; do echo "$$i"; done; \ - if test -n "$$list2"; then \ - for i in $$list2; do echo "$$i"; done \ - | sed -n '/\.1[a-z]*$$/p'; \ - fi; \ - } | while read p; do \ - if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; echo "$$p"; \ - done | \ - sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ - sed 'N;N;s,\n, ,g' | { \ - list=; while read file base inst; do \ - if test "$$base" = "$$inst"; then list="$$list $$file"; else \ - echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ - $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ - fi; \ - done; \ - for i in $$list; do echo "$$i"; done | $(am__base_list) | \ - while read files; do \ - test -z "$$files" || { \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ - done; } - -uninstall-man1: - @$(NORMAL_UNINSTALL) - @list='$(man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - files=`{ for i in $$list; do echo "$$i"; done; \ - } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ - -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) -tags TAGS: - -ctags CTAGS: - -cscope cscopelist: - - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(MANS) -installdirs: - for dir in "$(DESTDIR)$(man1dir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f Makefile -distclean-am: clean-am distclean-generic - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-man - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: install-man1 - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-generic mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-man - -uninstall-man: uninstall-man1 - -.MAKE: install-am install-strip - -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - 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-man1 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 uninstall-man \ - uninstall-man1 - - -%.1: %.pod - pod2man -c "Augeas" -r "Augeas $(VERSION)" $< > $@ - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/man/augparse.1 b/man/augparse.1 deleted file mode 100644 index 8702e6d..0000000 --- a/man/augparse.1 +++ /dev/null @@ -1,211 +0,0 @@ -.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.20) -.\" -.\" Standard preamble: -.\" ======================================================================== -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. \*(C+ will -.\" give a nicer C++. Capital omega is used to do unbreakable dashes and -.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, -.\" nothing in troff, for use with C<>. -.tr \(*W- -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" Escape single quotes in literal strings from groff's Unicode transform. -.ie \n(.g .ds Aq \(aq -.el .ds Aq ' -.\" -.\" If the F register is turned on, we'll generate index entries on stderr for -.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index -.\" entries marked with X<> in POD. Of course, you'll have to process the -.\" output yourself in some meaningful fashion. -.ie \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.el \{\ -. de IX -.. -.\} -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ======================================================================== -.\" -.IX Title "AUGPARSE 1" -.TH AUGPARSE 1 "2013-02-06" "Augeas 1.0.0" "Augeas" -.\" For nroff, turn off justification. Always turn off hyphenation; it makes -.\" way too many mistakes in technical documents. -.if n .ad l -.nh -.SH "NAME" -augparse \- execute an Augeas module -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -augparse [\s-1OPTIONS\s0] \s-1MODULE\s0 -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -Execute an Augeas module, most commonly to evaluate the tests it contains. -.SH "OPTIONS" -.IX Header "OPTIONS" -.IP "\fB\-I\fR, \fB\-\-include\fR=\fI\s-1DIR\s0\fR" 4 -.IX Item "-I, --include=DIR" -Add \s-1DIR\s0 to the module loadpath. Can be given multiple times. The -directories set here are searched before any directories specified in the -\&\s-1AUGEAS_LENS_LIB\s0 environment variable, and before the default directory -\&\fI/usr/share/augeas/lenses\fR. -.IP "\fB\-t\fR, \fB\-\-trace\fR" 4 -.IX Item "-t, --trace" -Print a trace of the modules that are being loaded. -.IP "\fB\-\-nostdinc\fR" 4 -.IX Item "--nostdinc" -Do not search any of the default directories for modules. When this option -is set, only directories specified explicitly with \fB\-I\fR or specified in -\&\fB\s-1AUGEAS_LENS_LIB\s0\fR will be searched for modules. -.IP "\fB\-\-notypecheck\fR" 4 -.IX Item "--notypecheck" -Do not perform lens type checks. Only use this option during lens -development and make sure you typecheck lenses when you are done developing -\&\- you should never use a lens that hasn't been typechecked. This option is -sometimes useful when you are working on unit tests for a lens to speed up -the time it takes to repeatedly run and fix tests. -.IP "\fB\-\-version\fR" 4 -.IX Item "--version" -Print version information and exit. -.IP "\fB\-h\fR" 4 -.IX Item "-h" -Display this help and exit -.SH "EXAMPLES" -.IX Header "EXAMPLES" -To run the tests in \fIlenses/tests/test_foo.aug\fR and use modules from the -directory \fIlenses\fR, run -.Sp -.RS 4 -augparse \-I lenses lenses/tests/test_foo.aug -.RE -.SH "TESTS" -.IX Header "TESTS" -Tests can appear as top-level forms anywhere in a module. Generally, the -tests for a module \fIlenses/foo.aug\fR are kept in a separate file, usually -in \fIlenses/tests/test_foo.aug\fR. -.PP -There are two different kinds of tests that Augeas can run: \fBget\fR and -\&\fBput\fR tests. The syntax for \fBget\fR tests is -.Sp -.RS 4 -test \s-1LENS\s0 get \s-1STRING\s0 = \s-1RESULT\s0 -.RE -.PP -which applies the \fIget\fR direction of the lens \s-1LENS\s0 to \s-1STRING\s0 and compares -it with the given \s-1RESULT\s0. \s-1RESULT\s0 can either be a tree literal, the symbol -\&\fB?\fR to print the result of applying \s-1LENS\s0 to \s-1STRING\s0, or the symbol \fB*\fR to -indicate that the test should produce an exception. -.PP -The syntax for \fBput\fR tests is -.Sp -.RS 4 -test \s-1LENS\s0 put \s-1STRING\s0 after \s-1COMMANDS\s0 = \s-1RESULT\s0 -.RE -.PP -which first applies the \fIget\fR direction of the lens \s-1LENS\s0 to \s-1STRING\s0, then -applies the given \s-1COMMANDS\s0 to the resulting tree, and finally transforms -the modified tree back to a string using the \fIput\fR direction of \s-1LENS\s0. The -resulting string is then compared to \s-1RESULT\s0, which can be a string, the -symbol \fB?\fR to print the result of applying \s-1LENS\s0 to \s-1STRING\s0, or the symbol -\&\fB*\fR to indicate that the test should produce an exception. -.SH "SEE ALSO" -.IX Header "SEE ALSO" -\&\fBAugeas\fR project homepage -.PP -augtool diff --git a/src/Makefile.in b/src/Makefile.in deleted file mode 100644 index 0fd2931..0000000 --- a/src/Makefile.in +++ /dev/null @@ -1,1749 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- Makefile-automake -*- -# -# Support for running programs with failmalloc preloaded. Include in other -# automake files and make sure the following variables are set: -# -# FAILMALLOC_START - number of first FAILMALLOC_INTERVAL -# FAILMALLOC_REP - how often to repeat with increasing FAILMALLOC_INTERVAL -# FAILMALLOC_PROG - the program to run with linfailmalloc preloaded - - - -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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = augtool$(EXEEXT) augparse$(EXEEXT) -DIST_COMMON = $(top_srcdir)/Makefile.inc $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am parser.h parser.c lexer.c \ - $(top_srcdir)/build/ac-aux/depcomp \ - $(top_srcdir)/build/ac-aux/ylwrap $(include_HEADERS) -subdir = src -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ - "$(DESTDIR)$(includedir)" -LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -am__DEPENDENCIES_1 = -libaugeas_la_DEPENDENCIES = liblexer.la libfa.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_libaugeas_la_OBJECTS = augeas.lo augrun.lo pathx.lo internal.lo \ - memory.lo ref.lo syntax.lo parser.lo builtin.lo lens.lo \ - regexp.lo transform.lo ast.lo get.lo put.lo info.lo errcode.lo \ - jmt.lo -libaugeas_la_OBJECTS = $(am_libaugeas_la_OBJECTS) -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 = -libaugeas_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libaugeas_la_LDFLAGS) $(LDFLAGS) -o $@ -libfa_la_DEPENDENCIES = $(am__DEPENDENCIES_1) $(GNULIB) -am_libfa_la_OBJECTS = fa.lo hash.lo memory.lo ref.lo -libfa_la_OBJECTS = $(am_libfa_la_OBJECTS) -libfa_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libfa_la_LDFLAGS) $(LDFLAGS) -o $@ -liblexer_la_LIBADD = -am_liblexer_la_OBJECTS = liblexer_la-lexer.lo -liblexer_la_OBJECTS = $(am_liblexer_la_OBJECTS) -liblexer_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(liblexer_la_CFLAGS) \ - $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -PROGRAMS = $(bin_PROGRAMS) -am_augparse_OBJECTS = augparse.$(OBJEXT) -augparse_OBJECTS = $(am_augparse_OBJECTS) -augparse_DEPENDENCIES = libaugeas.la $(am__DEPENDENCIES_1) $(GNULIB) -am_augtool_OBJECTS = augtool.$(OBJEXT) -augtool_OBJECTS = $(am_augtool_OBJECTS) -augtool_DEPENDENCIES = libaugeas.la $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) $(GNULIB) -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/ac-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -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_@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_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -LEXCOMPILE = $(LEX) $(AM_LFLAGS) $(LFLAGS) -LTLEXCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(LEX) $(AM_LFLAGS) $(LFLAGS) -AM_V_LEX = $(am__v_LEX_@AM_V@) -am__v_LEX_ = $(am__v_LEX_@AM_DEFAULT_V@) -am__v_LEX_0 = @echo " LEX " $@; -am__v_LEX_1 = -YLWRAP = $(top_srcdir)/build/ac-aux/ylwrap -am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \ - -e s/c++$$/h++/ -e s/c$$/h/ -YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) -LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) -AM_V_YACC = $(am__v_YACC_@AM_V@) -am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) -am__v_YACC_0 = @echo " YACC " $@; -am__v_YACC_1 = -SOURCES = $(libaugeas_la_SOURCES) $(libfa_la_SOURCES) \ - $(liblexer_la_SOURCES) $(augparse_SOURCES) $(augtool_SOURCES) -DIST_SOURCES = $(libaugeas_la_SOURCES) $(libfa_la_SOURCES) \ - $(liblexer_la_SOURCES) $(augparse_SOURCES) $(augtool_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -HEADERS = $(include_HEADERS) -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) -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -GNULIB = ../gnulib/lib/libgnu.la -GNULIB_CFLAGS = -I $(top_builddir)/gnulib/lib -I $(top_srcdir)/gnulib/lib -AM_CFLAGS = @AUGEAS_CFLAGS@ @WARN_CFLAGS@ $(GNULIB_CFLAGS) $(LIBXML_CFLAGS) -AM_YFLAGS = -d -p spec_ -EXTRA_DIST = try augeas_sym.version fa_sym.version -BUILT_SOURCES = datadir.h -DISTCLEANFILES = datadir.h -lib_LTLIBRARIES = libfa.la libaugeas.la -noinst_LTLIBRARIES = liblexer.la -include_HEADERS = augeas.h fa.h -libaugeas_la_SOURCES = augeas.h augeas.c augrun.c pathx.c \ - internal.h internal.c \ - memory.h memory.c ref.h ref.c \ - syntax.c syntax.h parser.y builtin.c lens.c lens.h regexp.c regexp.h \ - transform.h transform.c ast.c get.c put.c list.h \ - info.c info.h errcode.c errcode.h jmt.h jmt.c - -@USE_VERSION_SCRIPT_FALSE@AUGEAS_VERSION_SCRIPT = -@USE_VERSION_SCRIPT_TRUE@AUGEAS_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/augeas_sym.version -@USE_VERSION_SCRIPT_FALSE@FA_VERSION_SCRIPT = -@USE_VERSION_SCRIPT_TRUE@FA_VERSION_SCRIPT = $(VERSION_SCRIPT_FLAGS)$(srcdir)/fa_sym.version -libaugeas_la_LDFLAGS = $(AUGEAS_VERSION_SCRIPT) \ - -version-info $(LIBAUGEAS_VERSION_INFO) - -libaugeas_la_LIBADD = liblexer.la libfa.la $(LIB_SELINUX) $(LIBXML_LIBS) $(GNULIB) -augtool_SOURCES = augtool.c -augtool_LDADD = libaugeas.la $(READLINE_LIBS) $(LIBXML_LIBS) $(GNULIB) -augparse_SOURCES = augparse.c -augparse_LDADD = libaugeas.la $(LIBXML_LIBS) $(GNULIB) -libfa_la_SOURCES = fa.c fa.h hash.c hash.h memory.c memory.h ref.h ref.c -libfa_la_LIBADD = $(LIB_SELINUX) $(GNULIB) -libfa_la_LDFLAGS = $(FA_VERSION_SCRIPT) -version-info $(LIBFA_VERSION_INFO) -liblexer_la_SOURCES = lexer.l -liblexer_la_CFLAGS = $(AM_CFLAGS) -Wno-error -all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .l .lo .o .obj .y -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.inc $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu src/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/Makefile.inc: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_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}; \ - } - -clean-noinstLTLIBRARIES: - -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) - @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}; \ - } -parser.h: parser.c - @if test ! -f $@; then rm -f parser.c; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) parser.c; else :; fi - -libaugeas.la: $(libaugeas_la_OBJECTS) $(libaugeas_la_DEPENDENCIES) $(EXTRA_libaugeas_la_DEPENDENCIES) - $(AM_V_CCLD)$(libaugeas_la_LINK) -rpath $(libdir) $(libaugeas_la_OBJECTS) $(libaugeas_la_LIBADD) $(LIBS) - -libfa.la: $(libfa_la_OBJECTS) $(libfa_la_DEPENDENCIES) $(EXTRA_libfa_la_DEPENDENCIES) - $(AM_V_CCLD)$(libfa_la_LINK) -rpath $(libdir) $(libfa_la_OBJECTS) $(libfa_la_LIBADD) $(LIBS) - -liblexer.la: $(liblexer_la_OBJECTS) $(liblexer_la_DEPENDENCIES) $(EXTRA_liblexer_la_DEPENDENCIES) - $(AM_V_CCLD)$(liblexer_la_LINK) $(liblexer_la_OBJECTS) $(liblexer_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @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; \ - done | \ - 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 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @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)/' \ - `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -augparse$(EXEEXT): $(augparse_OBJECTS) $(augparse_DEPENDENCIES) $(EXTRA_augparse_DEPENDENCIES) - @rm -f augparse$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(augparse_OBJECTS) $(augparse_LDADD) $(LIBS) - -augtool$(EXEEXT): $(augtool_OBJECTS) $(augtool_DEPENDENCIES) $(EXTRA_augtool_DEPENDENCIES) - @rm -f augtool$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(augtool_OBJECTS) $(augtool_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ast.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/augeas.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/augparse.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/augrun.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/augtool.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/builtin.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/errcode.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fa.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/get.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/internal.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jmt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lens.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/liblexer_la-lexer.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parser.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pathx.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/put.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ref.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexp.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/syntax.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transform.Plo@am__quote@ - -.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 -@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@ $(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 -@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@ $(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 -@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -liblexer_la-lexer.lo: lexer.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblexer_la_CFLAGS) $(CFLAGS) -MT liblexer_la-lexer.lo -MD -MP -MF $(DEPDIR)/liblexer_la-lexer.Tpo -c -o liblexer_la-lexer.lo `test -f 'lexer.c' || echo '$(srcdir)/'`lexer.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/liblexer_la-lexer.Tpo $(DEPDIR)/liblexer_la-lexer.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='lexer.c' object='liblexer_la-lexer.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(liblexer_la_CFLAGS) $(CFLAGS) -c -o liblexer_la-lexer.lo `test -f 'lexer.c' || echo '$(srcdir)/'`lexer.c - -.l.c: - $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) - -.y.c: - $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h `echo $@ | $(am__yacc_c2h)` y.output $*.output -- $(YACCCOMPILE) - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs -install-includeHEADERS: $(include_HEADERS) - @$(NORMAL_INSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ - $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ - done - -uninstall-includeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) - -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`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS) -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." - -rm -f lexer.c - -rm -f parser.c - -rm -f parser.h - -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool clean-noinstLTLIBRARIES mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: install-includeHEADERS - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS \ - uninstall-libLTLIBRARIES - -.MAKE: all check install install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ - clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool 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-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-includeHEADERS install-info install-info-am \ - install-libLTLIBRARIES 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 \ - uninstall-includeHEADERS uninstall-libLTLIBRARIES - - -FAILMALLOC_START ?= 1 -FAILMALLOC_REP ?= 20 -FAILMALLOC_PROG ?= ./augtool - -@WITH_FAILMALLOC_TRUE@failmalloc: failmalloc-run -@WITH_FAILMALLOC_FALSE@failmalloc: failmalloc-error - -failmalloc-run: $(FAILMALLOC_PROG) - @(echo "Running $(FAILMALLOC_PROG) with failmalloc"; \ - for i in $$(seq $(FAILMALLOC_START) $$(expr $(FAILMALLOC_START) + $(FAILMALLOC_REP) - 1)) ; do \ - resp=$$(libtool --mode=execute env LD_PRELOAD=$(LIBFAILMALLOC) FAILMALLOC_INTERVAL=$$i $(FAILMALLOC_PROG)); \ - status=$$?; \ - if [ $$status -ne 0 -a $$status -ne 2 ] ; then \ - printf "%5d FAIL %3d %s\n" $$i $$status "$$resp" ; \ - elif [ x$(V) = x1 -o $$(( $$i % 100 )) -eq 0 ] ; then \ - printf "%5d PASS %s\n" $$i "$$resp" ; \ - fi \ - done) - -failmalloc-error: - @(echo "You need to turn on failmalloc support with --with-failmalloc"; \ - exit 1) - -# Generate datadir.h. AUGEAS_LENS_DIR in internal.h depends on -# the value of DATADIR -internal.h: datadir.h - -FORCE-datadir.h: Makefile - echo '#define DATADIR "$(datadir)"' > datadir.h1 - $(top_srcdir)/build/ac-aux/move-if-change datadir.h1 datadir.h - -datadir.h: FORCE-datadir.h - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/augeas.c b/src/augeas.c index 9eb2047..a1931f6 100644 --- a/src/augeas.c +++ b/src/augeas.c @@ -1985,6 +1985,20 @@ int aug_transform(struct augeas *aug, const char *lens, return result; } +int aug_escape_name(augeas *aug, const char *in, char **out) { + int result; + + api_entry(aug); + ARG_CHECK(in == NULL, aug, "aug_escape_name: IN must not be NULL"); + ARG_CHECK(out == NULL, aug, "aug_escape_name: OUT must not be NULL"); + + result = pathx_escape_name(in, out); + ERR_NOMEM(result < 0, aug); + error: + api_exit(aug); + return result; +} + int aug_print(const struct augeas *aug, FILE *out, const char *pathin) { struct pathx *p; int result; @@ -2031,7 +2045,7 @@ void aug_close(struct augeas *aug) { int __aug_load_module_file(struct augeas *aug, const char *filename) { api_entry(aug); - int r = load_module_file(aug, filename); + int r = load_module_file(aug, filename, NULL); api_exit(aug); return r; } diff --git a/src/augeas.h b/src/augeas.h index b4d6003..3225651 100644 --- a/src/augeas.h +++ b/src/augeas.h @@ -370,6 +370,23 @@ int aug_text_retrieve(struct augeas *aug, const char *lens, const char *node_in, const char *path, const char *node_out); +/* Function: aug_escape_name + * + * Escape special characters in a string such that it can be used as part + * of a path expressions and only matches a node named exactly + * IN. Characters that have special meanings in path expressions, such as + * '[' and ']' are prefixed with a '\\'. Note that this function assumes + * that it is passed a name, not a path, and will therefore escape '/', + * too. + * + * On return, *OUT is NULL if IN does not need any escaping at all, and + * points to an escaped copy of IN otherwise. + * + * Returns: + * 0 on success, or a negative value on failure + */ +int aug_escape_name(augeas *aug, const char *in, char **out); + /* Function: aug_print * * Print each node matching PATH and its descendants to OUT. diff --git a/src/augeas_sym.version b/src/augeas_sym.version index 3740f67..0c4d7c4 100644 --- a/src/augeas_sym.version +++ b/src/augeas_sym.version @@ -65,3 +65,8 @@ AUGEAS_0.18.0 { global: aug_cp; } AUGEAS_0.16.0; + +AUGEAS_0.20.0 { + global: + aug_escape_name; +} AUGEAS_0.18.0; diff --git a/src/augrun.c b/src/augrun.c index 9e1d46f..b5a84d1 100644 --- a/src/augrun.c +++ b/src/augrun.c @@ -1015,7 +1015,7 @@ static void cmd_save(struct command *cmd) { r = aug_save(cmd->aug); if (r == -1) { ERR_REPORT(cmd, AUG_ECMDRUN, - "saving failed (run 'print /augeas//error' for details)"); + "saving failed (run 'errors' for details)"); } else { r = aug_match(cmd->aug, "/augeas/events/saved", NULL); if (r > 0) { @@ -1033,7 +1033,7 @@ static const struct command_def cmd_save_def = { .opts = cmd_save_opts, .handler = cmd_save, .synopsis = "save all pending changes", - .help = "Save all pending changes to disk. How exactly that is done depends on\n the value of the node /augeas/save, which can be changed by the user.\n The possible values for it are\n \n noop - do not write files; useful for finding errors that\n might happen during a save\n backup - save the original file in a file by appending the extension\n '.augsave' and overwrite the original with new content\n newfile - leave the original file untouched and write new content to\n a file with extension '.augnew' next to the original file\n overwrite - overwrite the original file with new content\n \n Save always tries to save all files for which entries in the tree have\n changed. When saving fails, some files will be written. Details about\n why a save failed can by found by issuing the command 'print\n /augeas//error' (note the double slash)" + .help = "Save all pending changes to disk. How exactly that is done depends on\n the value of the node /augeas/save, which can be changed by the user.\n The possible values for it are\n \n noop - do not write files; useful for finding errors that\n might happen during a save\n backup - save the original file in a file by appending the extension\n '.augsave' and overwrite the original with new content\n newfile - leave the original file untouched and write new content to\n a file with extension '.augnew' next to the original file\n overwrite - overwrite the original file with new content\n \n Save always tries to save all files for which entries in the tree have\n changed. When saving fails, some files will be written. Details about\n why a save failed can by found by running the 'errors' command" }; static void cmd_load(struct command *cmd) { @@ -1041,7 +1041,7 @@ static void cmd_load(struct command *cmd) { r = aug_load(cmd->aug); if (r == -1) { ERR_REPORT(cmd, AUG_ECMDRUN, - "loading failed (run 'print /augeas//error' for details)"); + "loading failed (run 'errors' for details)"); } } @@ -1175,6 +1175,114 @@ static const struct command_def cmd_retrieve_def = { .help = cmd_retrieve_help }; +/* Given a path "/augeas/files/FILENAME/error", return FILENAME */ +static char *err_filename(const char *match) { + int noise = strlen(AUGEAS_META_FILES) + strlen("/error"); + if (strlen(match) < noise + 1) + goto error; + return strndup(match + strlen(AUGEAS_META_FILES), strlen(match) - noise); + error: + return strdup("(no filename)"); +} + +static const char *err_get(struct augeas *aug, + const char *match, const char *child) { + char *path = NULL; + const char *value = ""; + int r; + + r = pathjoin(&path, 2, match, child); + ERR_NOMEM(r < 0, aug); + + aug_get(aug, path, &value); + ERR_BAIL(aug); + + error: + free(path); + return value; +} + +static void cmd_errors(struct command *cmd) { + char **matches = NULL; + int cnt = 0; + char *filename = NULL; + struct augeas *aug = cmd->aug; + + cnt = aug_match(aug, "/augeas//error", &matches); + ERR_BAIL(cmd); + ERR_THROW(cnt < 0, aug, AUG_ECMDRUN, + " (problem retrieving error messages)\n"); + if (cnt == 0) { + fprintf(cmd->out, " (no errors)\n"); + goto done; + } + + for (int i=0; i < cnt; i++) { + const char *match = matches[i]; + const char *line = err_get(aug, match, "line"); + const char *char_pos = err_get(aug, match, "char"); + const char *lens = err_get(aug, match, "lens"); + const char *last = err_get(aug, match, "lens/last_matched"); + const char *next = err_get(aug, match, "lens/next_not_matched"); + const char *msg = err_get(aug, match, "message"); + const char *kind = NULL; + + aug_get(aug, match, &kind); + ERR_BAIL(aug); + + filename = err_filename(match); + ERR_NOMEM(filename == NULL, aug); + + if (i>0) + fprintf(cmd->out, "\n"); + + if (line != NULL) { + fprintf(cmd->out, "Error in %s:%s.%s (%s)\n", + filename, line, char_pos, kind); + } else { + fprintf(cmd->out, "Error in %s (%s)\n", filename, kind); + } + + if (msg != NULL) + fprintf(cmd->out, " %s\n", msg); + if (lens != NULL) + fprintf(cmd->out, " Lens: %s\n", lens); + if (last != NULL) + fprintf(cmd->out, " Last matched: %s\n", last); + if (next != NULL) + fprintf(cmd->out, " Next (no match): %s\n", next); + } + + done: + error: + for (int i=0; i < cnt; i++) + free(matches[i]); + free(matches); + free(filename); +} + +static const struct command_opt_def cmd_errors_opts[] = { + CMD_OPT_DEF_LAST +}; + +static const char const cmd_errors_help[] = + "Show all the errors encountered in processing files. For each error,\n" + " print detailed information about where it happened and how. The same\n" + " information can be retrieved by running 'print /augeas//error'\n\n" + " For each error, the file in which the error occurred together with the\n" + " line number and position in that line is shown, as well as information\n" + " about the lens that encountered the error. For some errors, the last\n" + " lens that matched successfully and the next lens that should have\n" + " matched but didn't are also shown\n"; + +static const struct command_def cmd_errors_def = { + .name = "errors", + .opts = cmd_errors_opts, + .handler = cmd_errors, + .synopsis = "show all errors encountered in processing files", + .help = cmd_errors_help +}; + /* Groups of commands */ static const struct command_grp_def cmd_grp_admin_def = { .name = "Admin", @@ -1199,6 +1307,7 @@ static const struct command_grp_def cmd_grp_read_def = { &cmd_ls_def, &cmd_match_def, &cmd_print_def, + &cmd_errors_def, &cmd_span_def, &cmd_def_last } diff --git a/src/augtool.c b/src/augtool.c index c7be484..7ab2c39 100644 --- a/src/augtool.c +++ b/src/augtool.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -136,8 +137,10 @@ static char *readline_path_generator(const char *text, int state) { if (STREQLEN(chend, end, strlen(end))) { if (child_count(child) > 0) { char *c = realloc(child, strlen(child)+2); - if (c == NULL) + if (c == NULL) { + free(child); return NULL; + } child = c; strcat(child, "/"); } @@ -145,8 +148,10 @@ static char *readline_path_generator(const char *text, int state) { /* strip off context if the user didn't give it */ if (ctx != NULL) { char *c = realloc(child, strlen(child)-strlen(ctx)+1); - if (c == NULL) + if (c == NULL) { + free(child); return NULL; + } int ctxidx = strlen(ctx); if (child[ctxidx] == SEP) ctxidx++; @@ -171,7 +176,7 @@ static char *readline_command_generator(const char *text, int state) { "get", "label", "ins", "load", "ls", "match", "mv", "cp", "rename", "print", "dump-xml", "rm", "save", "set", "setm", "clearm", "span", "store", "retrieve", "transform", - "help", "touch", "insert", "move", "copy", NULL }; + "help", "touch", "insert", "move", "copy", "errors", NULL }; static int current = 0; const char *name; @@ -426,6 +431,25 @@ static void print_aug_error(void) { } } +static void sigint_handler(ATTRIBUTE_UNUSED int signum) { + // Cancel the current line of input, along with undo info for that line. + rl_replace_line("", 1); + + // Move the cursor to the next screen line, then force a re-display. + rl_crlf(); + rl_forced_update_display(); +} + +static void install_signal_handlers(void) { + // On Ctrl-C, cancel the current line (rather than exit the program). + struct sigaction sigint_action; + MEMZERO(&sigint_action, 1); + sigint_action.sa_handler = sigint_handler; + sigemptyset(&sigint_action.sa_mask); + sigint_action.sa_flags = 0; + sigaction(SIGINT, &sigint_action, NULL); +} + static int main_loop(void) { char *line = NULL; int ret = 0; @@ -446,6 +470,8 @@ static int main_loop(void) { } } + install_signal_handlers(); + // make readline silent by default echo_commands = echo_commands || isatty(fileno(stdin)); if (echo_commands) @@ -468,10 +494,11 @@ static int main_loop(void) { echo_commands = true; // reopen in stream - if ((rl_instream = fopen("/dev/tty", "r")) == NULL) { + if (freopen("/dev/tty", "r", stdin) == NULL) { perror("Failed to open terminal for reading"); return -1; } + rl_instream = stdin; // reopen stdout and stream to a tty if originally silenced or // not connected to a tty, for full interactive mode diff --git a/src/builtin.c b/src/builtin.c index 2da7bbb..e674181 100644 --- a/src/builtin.c +++ b/src/builtin.c @@ -97,6 +97,16 @@ static struct value *lns_square(struct info *info, struct value *l1, return lns_make_square(ref(info), ref(l1->lens), ref(l2->lens), ref(l3->lens), check); } +static void exn_lns_error_detail(struct value *exn, const char *label, + struct lens *lens) { + if (lens == NULL) + return; + + char *s = format_info(lens->info); + exn_printf_line(exn, "%s: %s", label, s); + free(s); +} + static struct value *make_exn_lns_error(struct info *info, struct lns_error *err, const char *text) { @@ -106,11 +116,9 @@ static struct value *make_exn_lns_error(struct info *info, return info->error->exn; v = make_exn_value(ref(info), "%s", err->message); - if (err->lens != NULL) { - char *s = format_info(err->lens->info); - exn_printf_line(v, "Lens: %s", s); - free(s); - } + exn_lns_error_detail(v, "Lens", err->lens); + exn_lns_error_detail(v, " Last match", err->last); + exn_lns_error_detail(v, " Not matching", err->next); if (err->pos >= 0) { char *pos = format_pos(text, err->pos); size_t line, ofs; diff --git a/src/fa.c b/src/fa.c index 9d5e4e8..99fd6d1 100644 --- a/src/fa.c +++ b/src/fa.c @@ -899,6 +899,8 @@ static struct state_set *fa_accept_states(struct fa *fa) { struct state_set *accept = state_set_init(-1, S_NONE); int r; + E(accept == NULL); + r = mark_reachable(fa); E(r < 0); @@ -908,6 +910,7 @@ static struct state_set *fa_accept_states(struct fa *fa) { } return accept; error: + state_set_free(accept); return NULL; } @@ -957,7 +960,9 @@ static struct state_set *fa_reverse(struct fa *fa) { int r; all = fa_states(fa); + E(all == NULL); accept = fa_accept_states(fa); + E(accept == NULL); F(state_set_init_data(all)); @@ -2794,6 +2799,9 @@ static struct fa *expand_alphabet(struct fa *fa, int add_marker, static bitset *alphabet(struct fa *fa) { bitset *bs = bitset_init(UCHAR_NUM); + if (bs == NULL) + return NULL; + list_for_each(s, fa->initial) { for (int i=0; i < s->tused; i++) { for (uint c = s->trans[i].min; c <= s->trans[i].max; c++) @@ -2806,6 +2814,9 @@ static bitset *alphabet(struct fa *fa) { static bitset *last_chars(struct fa *fa) { bitset *bs = bitset_init(UCHAR_NUM); + if (bs == NULL) + return NULL; + list_for_each(s, fa->initial) { for (int i=0; i < s->tused; i++) { if (s->trans[i].to->accept) { @@ -2821,6 +2832,9 @@ static bitset *first_chars(struct fa *fa) { bitset *bs = bitset_init(UCHAR_NUM); struct state *s = fa->initial; + if (bs == NULL) + return NULL; + for (int i=0; i < s->tused; i++) { for (uint c = s->trans[i].min; c <= s->trans[i].max; c++) bitset_set(bs, c); @@ -2828,29 +2842,36 @@ static bitset *first_chars(struct fa *fa) { return bs; } -/* Return true if F1 and F2 are known to be unambiguously concatenable - * according to simple heuristics. Return false if they need to be checked - * further to decide ambiguity */ -static bool is_splittable(struct fa *fa1, struct fa *fa2) { +/* Return 1 if F1 and F2 are known to be unambiguously concatenable + * according to simple heuristics. Return 0 if they need to be checked + * further to decide ambiguity + * Return -1 if an allocation fails + */ +static int is_splittable(struct fa *fa1, struct fa *fa2) { bitset *alpha1 = NULL; bitset *alpha2 = NULL; bitset *last1 = NULL; bitset *first2 = NULL; - bool result = false; + bool result = -1; alpha2 = alphabet(fa2); last1 = last_chars(fa1); + if (alpha2 == NULL || last1 == NULL) + goto done; if (bitset_disjoint(last1, alpha2, UCHAR_NUM)) { - result = true; + result = 1; goto done; } alpha1 = alphabet(fa1); first2 = first_chars(fa2); + if (alpha1 == NULL || first2 == NULL) + goto done; if (bitset_disjoint(first2, alpha1, UCHAR_NUM)) { - result = true; + result = 1; goto done; } + result = 0; done: bitset_free(alpha1); bitset_free(alpha2); @@ -2880,7 +2901,10 @@ int fa_ambig_example(struct fa *fa1, struct fa *fa2, if (v != NULL) *v = NULL; - if (is_splittable(fa1, fa2)) + r = is_splittable(fa1, fa2); + if (r < 0) + goto error; + if (r == 1) return 0; #define Xs "\001" diff --git a/src/get.c b/src/get.c index a7ee565..96a9e7c 100644 --- a/src/get.c +++ b/src/get.c @@ -233,7 +233,8 @@ static void vget_error(struct state *state, struct lens *lens, if (state->error != NULL) return; - CALLOC(state->error, 1); + if (ALLOC(state->error) < 0) + return; state->error->lens = ref(lens); if (REG_MATCHED(state)) state->error->pos = REG_END(state); @@ -688,6 +689,90 @@ static struct skel *parse_concat(struct lens *lens, struct state *state, return skel; } +/* Given a lens that does not match at the current position, try to find + * the left-most child LAST that does match and the lens next to it NEXT + * that does not match. Return the length of the match. + * + * If no such child exists, return 0 + */ +static int try_match(struct lens *lens, struct state *state, + uint start, uint end, + struct lens **last, struct lens **next) { + int result = 0, r; + + switch(lens->tag) { + case L_VALUE: + case L_LABEL: + case L_SEQ: + case L_COUNTER: + *last = lens; + return result; + break; + case L_DEL: + case L_KEY: + case L_STORE: + result = regexp_match(lens->ctype, state->text, end, start, NULL); + if (result >= 0) + *last = lens; + return result; + case L_CONCAT: + for (int i=0; i < lens->nchildren; i++) { + struct lens *child = lens->children[i]; + struct lens *next_child = + (i < lens->nchildren - 1) ? lens->children[i+1] : NULL; + + r = regexp_match(child->ctype, state->text, end, start, NULL); + if (r >= 0) { + result += r; + start += r; + *last = child; + } else if (result > 0) { + if (*next == NULL) + *next = child; + return result; + } else { + result = try_match(child, state, start, end, last, next); + if (result > 0 && *next == NULL) + *next = next_child; + return result; + } + } + return result; + break; + case L_UNION: + for (int i=0; i < lens->nchildren; i++) { + struct lens *child = lens->children[i]; + result = try_match(child, state, start, end, last, next); + if (result > 0) + return result; + } + return 0; + break; + case L_SUBTREE: + case L_STAR: + case L_MAYBE: + case L_SQUARE: + return try_match(lens->child, state, start, end, last, next); + break; + default: + BUG_ON(true, state->info, "illegal lens tag %d", lens->tag); + break; + } + error: + return 0; +} + +static void short_iteration_error(struct lens *lens, struct state *state, + uint start, uint end) { + int match_count; + + get_error(state, lens, "%s", short_iteration); + + match_count = try_match(lens->child, state, start, end, + &state->error->last, &state->error->next); + state->error->pos = start + match_count; +} + static struct tree *get_quant_star(struct lens *lens, struct state *state) { ensure0(lens->tag == L_STAR, state->info); struct lens *child = lens->child; @@ -713,8 +798,7 @@ static struct tree *get_quant_star(struct lens *lens, struct state *state) { state->regs = old_regs; state->nreg = old_nreg; if (size != 0) { - get_error(state, lens, "%s", short_iteration); - state->error->pos = start; + short_iteration_error(lens, state, start, end); } return tree; } @@ -802,6 +886,7 @@ static struct tree *get_subtree(struct lens *lens, struct state *state) { children = get_lens(lens->child, state); tree = make_tree(state->key, state->value, NULL, children); + ERR_NOMEM(tree == NULL, state->info); tree->span = state->span; if (state->span != NULL) { diff --git a/src/internal.c b/src/internal.c index b9e3eab..e149fe6 100644 --- a/src/internal.c +++ b/src/internal.c @@ -336,6 +336,8 @@ char *path_expand(struct tree *tree, const char *ppath) { char *path; const char *label; + char *escaped = NULL; + int cnt = 0, ind = 0, r; list_for_each(t, siblings) { @@ -356,11 +358,21 @@ char *path_expand(struct tree *tree, const char *ppath) { else label = tree->label; + r = pathx_escape_name(label, &escaped); + if (r < 0) + return NULL; + + if (escaped != NULL) + label = escaped; + if (cnt > 1) { r = asprintf(&path, "%s/%s[%d]", ppath, label, ind); } else { r = asprintf(&path, "%s/%s", ppath, label); } + + free(escaped); + if (r == -1) return NULL; return path; diff --git a/src/internal.h b/src/internal.h index 0b4d5ac..85d8ee3 100644 --- a/src/internal.h +++ b/src/internal.h @@ -575,6 +575,16 @@ void pathx_symtab_remove_descendants(struct pathx_symtab *symtab, const struct tree *tree); void free_symtab(struct pathx_symtab *symtab); +/* Escape a name so that it is safe to pass to parse_name and have it + * interpreted as the literal name of a path component. + * + * On return, *OUT will be NULL if IN does not need escaping, otherwise it + * will contain an escaped copy of IN which the caller must free. + * + * Returns -1 if it failed to allocate memory for *OUT, 0 on success + */ +int pathx_escape_name(const char *in, char **out); + /* Debug helpers, all defined in internal.c. When ENABLE_DEBUG is not * set, they compile to nothing. */ diff --git a/src/lens.c b/src/lens.c index 58256ed..37db306 100644 --- a/src/lens.c +++ b/src/lens.c @@ -1109,11 +1109,24 @@ char *enc_format(const char *e, size_t len) { return result; } -static int lns_format_subtree_atype(struct lens *l, char **buf) { +static int format_atype(struct lens *l, char **buf, uint indent); + +static int format_indent(char **buf, uint indent) { + if (ALLOC_N(*buf, indent+1) < 0) + return -1; + memset(*buf, ' ', indent); + return 0; +} + +static int format_subtree_atype(struct lens *l, char **buf, uint indent) { char *k = NULL, *v = NULL; const struct regexp *ktype = l->child->ktype; const struct regexp *vtype = l->child->vtype; int r, result = -1; + char *si = NULL; + + if (format_indent(&si, indent) < 0) + goto done; if (ktype != NULL) { k = regexp_escape(ktype); @@ -1125,30 +1138,32 @@ static int lns_format_subtree_atype(struct lens *l, char **buf) { if (v == NULL) goto done; if (k == NULL) - r = xasprintf(buf, "{ = /%s/ }", k, v); + r = xasprintf(buf, "%s{ = /%s/ }", si, k, v); else - r = xasprintf(buf, "{ /%s/ = /%s/ }", k, v); + r = xasprintf(buf, "%s{ /%s/ = /%s/ }", si, k, v); } else { if (k == NULL) - r = xasprintf(buf, "{ }", k); + r = xasprintf(buf, "%s{ }", si, k); else - r = xasprintf(buf, "{ /%s/ }", k); + r = xasprintf(buf, "%s{ /%s/ }", si, k); } if (r < 0) goto done; result = 0; done: + FREE(si); FREE(v); FREE(k); return result; } -static int lns_format_rep_atype(struct lens *l, char **buf, char quant) { +static int format_rep_atype(struct lens *l, char **buf, + uint indent, char quant) { char *a = NULL; int r, result = -1; - r = lns_format_atype(l->child, &a); + r = format_atype(l->child, &a, indent); if (r < 0) goto done; if (strlen(a) == 0) { @@ -1172,7 +1187,7 @@ static int lns_format_rep_atype(struct lens *l, char **buf, char quant) { return result; } -static int lns_format_concat_atype(struct lens *l, char **buf) { +static int format_concat_atype(struct lens *l, char **buf, uint indent) { char **c = NULL, *s = NULL, *p; int r, result = -1; size_t len = 0, nconc = 0; @@ -1181,10 +1196,10 @@ static int lns_format_concat_atype(struct lens *l, char **buf) { goto done; for (int i=0; i < l->nchildren; i++) { - r = lns_format_atype(l->children[i], c+i); + r = format_atype(l->children[i], c+i, indent); if (r < 0) goto done; - len += strlen(c[i]) + 2; + len += strlen(c[i]) + 3; if (strlen(c[i]) > 0) nconc += 1; if (l->children[i]->tag == L_UNION) @@ -1198,9 +1213,15 @@ static int lns_format_concat_atype(struct lens *l, char **buf) { bool needs_parens = nconc > 1 && l->children[i]->tag == L_UNION; if (strlen(c[i]) == 0) continue; - if (needs_parens) + if (i > 0) + *p++ = '\n'; + char *t = c[i]; + if (needs_parens) { + for (int j=0; j < indent; j++) + *p++ = *t++; *p++ = '('; - p = stpcpy(p, c[i]); + } + p = stpcpy(p, t); if (needs_parens) *p++ = ')'; } @@ -1217,7 +1238,7 @@ static int lns_format_concat_atype(struct lens *l, char **buf) { return result; } -static int lns_format_union_atype(struct lens *l, char **buf) { +static int format_union_atype(struct lens *l, char **buf, uint indent) { char **c = NULL, *s = NULL, *p; int r, result = -1; size_t len = 0; @@ -1226,10 +1247,10 @@ static int lns_format_union_atype(struct lens *l, char **buf) { goto done; for (int i=0; i < l->nchildren; i++) { - r = lns_format_atype(l->children[i], c+i); + r = format_atype(l->children[i], c+i, indent + 2); if (r < 0) goto done; - len += strlen(c[i]) + 2; + len += strlen(c[i]) + 3; } len += l->nchildren - 1; @@ -1238,12 +1259,25 @@ static int lns_format_union_atype(struct lens *l, char **buf) { p = s; for (int i=0; i < l->nchildren; i++) { - if (i > 0) - p = stpcpy(p, " | "); - if (strlen(c[i]) == 0) + char *t = c[i]; + if (i > 0) { + *p++ = '\n'; + if (strlen(t) >= indent+2) { + p = stpncpy(p, t, indent+2); + t += indent+2; + } else { + memset(p, ' ', indent+2); + p += indent+2; + } + p = stpcpy(p, "| "); + } else { + /* Skip additional indent */ + t += 2; + } + if (strlen(t) == 0) p = stpcpy(p, "()"); else - p = stpcpy(p, c[i]); + p = stpcpy(p, t); } *buf = s; s = NULL; @@ -1257,7 +1291,7 @@ static int lns_format_union_atype(struct lens *l, char **buf) { return result; } -static int lns_format_rec_atype(struct lens *l, char **buf) { +static int format_rec_atype(struct lens *l, char **buf, uint indent) { int r; if (l->rec_internal) { @@ -1266,7 +1300,7 @@ static int lns_format_rec_atype(struct lens *l, char **buf) { } char *c = NULL; - r = lns_format_atype(l->body, &c); + r = format_atype(l->body, &c, indent); if (r < 0) return -1; r = xasprintf(buf, "<>", c); @@ -1274,7 +1308,7 @@ static int lns_format_rec_atype(struct lens *l, char **buf) { return (r < 0) ? -1 : 0; } -int lns_format_atype(struct lens *l, char **buf) { +static int format_atype(struct lens *l, char **buf, uint indent) { *buf = NULL; switch(l->tag) { @@ -1289,25 +1323,25 @@ int lns_format_atype(struct lens *l, char **buf) { return (*buf == NULL) ? -1 : 0; break; case L_SUBTREE: - return lns_format_subtree_atype(l, buf); + return format_subtree_atype(l, buf, indent); break; case L_STAR: - return lns_format_rep_atype(l, buf, '*'); + return format_rep_atype(l, buf, indent, '*'); break; case L_MAYBE: - return lns_format_rep_atype(l, buf, '?'); + return format_rep_atype(l, buf, indent, '?'); break; case L_CONCAT: - return lns_format_concat_atype(l, buf); + return format_concat_atype(l, buf, indent); break; case L_UNION: - return lns_format_union_atype(l, buf); + return format_union_atype(l, buf, indent); break; case L_REC: - return lns_format_rec_atype(l, buf); + return format_rec_atype(l, buf, indent); break; case L_SQUARE: - return lns_format_concat_atype(l->child, buf); + return format_concat_atype(l->child, buf, indent); break; default: BUG_LENS_TAG(l); @@ -1316,6 +1350,12 @@ int lns_format_atype(struct lens *l, char **buf) { return -1; } +int lns_format_atype(struct lens *l, char **buf) { + int r = 0; + r = format_atype(l, buf, 4); + return r; +} + /* * Recursive lenses */ diff --git a/src/lens.h b/src/lens.h index b8cb202..dfa7cbd 100644 --- a/src/lens.h +++ b/src/lens.h @@ -170,6 +170,8 @@ struct skel { struct lns_error { struct lens *lens; + struct lens *last; /* The last lens that matched */ + struct lens *next; /* The next lens that should match but doesn't */ int pos; /* Errors from get/parse */ char *path; /* Errors from put, pos will be -1 */ char *message; diff --git a/src/lexer.c b/src/lexer.c deleted file mode 100644 index e7532d5..0000000 --- a/src/lexer.c +++ /dev/null @@ -1,2362 +0,0 @@ -#line 2 "lexer.c" -#line 9 "lexer.l" -/* config.h must precede flex's inclusion of - in order for its _GNU_SOURCE definition to take effect. */ -#include - - - -#line 10 "lexer.c" - -#define YY_INT_ALIGNED short int - -/* A lexical scanner generated by flex */ - -#define FLEX_SCANNER -#define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 -#if YY_FLEX_SUBMINOR_VERSION > 0 -#define FLEX_BETA -#endif - -/* First, we deal with platform-specific or compiler-specific issues. */ - -/* begin standard C headers. */ -#include -#include -#include -#include - -/* end standard C headers. */ - -/* flex integer type definitions */ - -#ifndef FLEXINT_H -#define FLEXINT_H - -/* C99 systems have . Non-C99 systems may or may not. */ - -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - -/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, - * if you want the limit (max/min) macros for int types. - */ -#ifndef __STDC_LIMIT_MACROS -#define __STDC_LIMIT_MACROS 1 -#endif - -#include -typedef int8_t flex_int8_t; -typedef uint8_t flex_uint8_t; -typedef int16_t flex_int16_t; -typedef uint16_t flex_uint16_t; -typedef int32_t flex_int32_t; -typedef uint32_t flex_uint32_t; -#else -typedef signed char flex_int8_t; -typedef short int flex_int16_t; -typedef int flex_int32_t; -typedef unsigned char flex_uint8_t; -typedef unsigned short int flex_uint16_t; -typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ - -/* Limits of integral types. */ -#ifndef INT8_MIN -#define INT8_MIN (-128) -#endif -#ifndef INT16_MIN -#define INT16_MIN (-32767-1) -#endif -#ifndef INT32_MIN -#define INT32_MIN (-2147483647-1) -#endif -#ifndef INT8_MAX -#define INT8_MAX (127) -#endif -#ifndef INT16_MAX -#define INT16_MAX (32767) -#endif -#ifndef INT32_MAX -#define INT32_MAX (2147483647) -#endif -#ifndef UINT8_MAX -#define UINT8_MAX (255U) -#endif -#ifndef UINT16_MAX -#define UINT16_MAX (65535U) -#endif -#ifndef UINT32_MAX -#define UINT32_MAX (4294967295U) -#endif - -#endif /* ! FLEXINT_H */ - -#ifdef __cplusplus - -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const -#else -#define yyconst -#endif - -/* Returned upon end-of-file. */ -#define YY_NULL 0 - -/* Promotes a possibly negative, possibly signed char to an unsigned - * integer for use as an array index. If the signed char is negative, - * we want to instead treat it as an 8-bit unsigned char, hence the - * double cast. - */ -#define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) - -/* An opaque pointer. */ -#ifndef YY_TYPEDEF_YY_SCANNER_T -#define YY_TYPEDEF_YY_SCANNER_T -typedef void* yyscan_t; -#endif - -/* For convenience, these vars (plus the bison vars far below) - are macros in the reentrant scanner. */ -#define yyin yyg->yyin_r -#define yyout yyg->yyout_r -#define yyextra yyg->yyextra_r -#define yyleng yyg->yyleng_r -#define yytext yyg->yytext_r -#define yylineno (YY_CURRENT_BUFFER_LVALUE->yy_bs_lineno) -#define yycolumn (YY_CURRENT_BUFFER_LVALUE->yy_bs_column) -#define yy_flex_debug yyg->yy_flex_debug_r - -/* Enter a start condition. This macro really ought to take a parameter, - * but we do it the disgusting crufty way forced on us by the ()-less - * definition of BEGIN. - */ -#define BEGIN yyg->yy_start = 1 + 2 * - -/* Translate the current start state into a value that can be later handed - * to BEGIN to return to the state. The YYSTATE alias is for lex - * compatibility. - */ -#define YY_START ((yyg->yy_start - 1) / 2) -#define YYSTATE YY_START - -/* Action number for EOF rule of a given start state. */ -#define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) - -/* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE augl_restart(yyin ,yyscanner ) - -#define YY_END_OF_BUFFER_CHAR 0 - -/* Size of default input buffer. */ -#ifndef YY_BUF_SIZE -#define YY_BUF_SIZE 16384 -#endif - -/* The state buf must be large enough to hold one state per character in the main buffer. - */ -#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) - -#ifndef YY_TYPEDEF_YY_BUFFER_STATE -#define YY_TYPEDEF_YY_BUFFER_STATE -typedef struct yy_buffer_state *YY_BUFFER_STATE; -#endif - -#define EOB_ACT_CONTINUE_SCAN 0 -#define EOB_ACT_END_OF_FILE 1 -#define EOB_ACT_LAST_MATCH 2 - - /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires - * access to the local variable yy_act. Since yyless() is a macro, it would break - * existing scanners that call yyless() from OUTSIDE augl_lex. - * One obvious solution it to make yy_act a global. I tried that, and saw - * a 5% performance hit in a non-yylineno scanner, because yy_act is - * normally declared as a register variable-- so it is not worth it. - */ - #define YY_LESS_LINENO(n) \ - do { \ - int yyl;\ - for ( yyl = n; yyl < yyleng; ++yyl )\ - if ( yytext[yyl] == '\n' )\ - --yylineno;\ - }while(0) - -/* Return all but the first "n" matched characters back to the input stream. */ -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - *yy_cp = yyg->yy_hold_char; \ - YY_RESTORE_YY_MORE_OFFSET \ - yyg->yy_c_buf_p = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ - YY_DO_BEFORE_ACTION; /* set up yytext again */ \ - } \ - while ( 0 ) - -#define unput(c) yyunput( c, yyg->yytext_ptr , yyscanner ) - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - -#ifndef YY_STRUCT_YY_BUFFER_STATE -#define YY_STRUCT_YY_BUFFER_STATE -struct yy_buffer_state - { - FILE *yy_input_file; - - char *yy_ch_buf; /* input buffer */ - char *yy_buf_pos; /* current position in input buffer */ - - /* Size of input buffer in bytes, not including room for EOB - * characters. - */ - yy_size_t yy_buf_size; - - /* Number of characters read into yy_ch_buf, not including EOB - * characters. - */ - int yy_n_chars; - - /* Whether we "own" the buffer - i.e., we know we created it, - * and can realloc() it to grow it, and should free() it to - * delete it. - */ - int yy_is_our_buffer; - - /* Whether this is an "interactive" input source; if so, and - * if we're using stdio for input, then we want to use getc() - * instead of fread(), to make sure we stop fetching input after - * each newline. - */ - int yy_is_interactive; - - /* Whether we're considered to be at the beginning of a line. - * If so, '^' rules will be active on the next match, otherwise - * not. - */ - int yy_at_bol; - - int yy_bs_lineno; /**< The line count. */ - int yy_bs_column; /**< The column count. */ - - /* Whether to try to fill the input buffer when we reach the - * end of it. - */ - int yy_fill_buffer; - - int yy_buffer_status; - -#define YY_BUFFER_NEW 0 -#define YY_BUFFER_NORMAL 1 - /* When an EOF's been seen but there's still some text to process - * then we mark the buffer as YY_EOF_PENDING, to indicate that we - * shouldn't try reading from the input source any more. We might - * still have a bunch of tokens to match, though, because of - * possible backing-up. - * - * When we actually see the EOF, we change the status to "new" - * (via augl_restart()), so that the user can continue scanning by - * just pointing yyin at a new input file. - */ -#define YY_BUFFER_EOF_PENDING 2 - - }; -#endif /* !YY_STRUCT_YY_BUFFER_STATE */ - -/* We provide macros for accessing buffer states in case in the - * future we want to put the buffer states in a more general - * "scanner state". - * - * Returns the top of the stack, or NULL. - */ -#define YY_CURRENT_BUFFER ( yyg->yy_buffer_stack \ - ? yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] \ - : NULL) - -/* Same as previous macro, but useful when we know that the buffer stack is not - * NULL or when we need an lvalue. For internal use only. - */ -#define YY_CURRENT_BUFFER_LVALUE yyg->yy_buffer_stack[yyg->yy_buffer_stack_top] - -void augl_restart (FILE *input_file ,yyscan_t yyscanner ); -void augl__switch_to_buffer (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -YY_BUFFER_STATE augl__create_buffer (FILE *file,int size ,yyscan_t yyscanner ); -void augl__delete_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void augl__flush_buffer (YY_BUFFER_STATE b ,yyscan_t yyscanner ); -void augl_push_buffer_state (YY_BUFFER_STATE new_buffer ,yyscan_t yyscanner ); -void augl_pop_buffer_state (yyscan_t yyscanner ); - -static void augl_ensure_buffer_stack (yyscan_t yyscanner ); -static void augl__load_buffer_state (yyscan_t yyscanner ); -static void augl__init_buffer (YY_BUFFER_STATE b,FILE *file ,yyscan_t yyscanner ); - -#define YY_FLUSH_BUFFER augl__flush_buffer(YY_CURRENT_BUFFER ,yyscanner) - -YY_BUFFER_STATE augl__scan_buffer (char *base,yy_size_t size ,yyscan_t yyscanner ); -YY_BUFFER_STATE augl__scan_string (yyconst char *yy_str ,yyscan_t yyscanner ); -YY_BUFFER_STATE augl__scan_bytes (yyconst char *bytes,int len ,yyscan_t yyscanner ); - -void *augl_alloc (yy_size_t ,yyscan_t yyscanner ); -void *augl_realloc (void *,yy_size_t ,yyscan_t yyscanner ); -void augl_free (void * ,yyscan_t yyscanner ); - -#define yy_new_buffer augl__create_buffer - -#define yy_set_interactive(is_interactive) \ - { \ - if ( ! YY_CURRENT_BUFFER ){ \ - augl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - augl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ - } - -#define yy_set_bol(at_bol) \ - { \ - if ( ! YY_CURRENT_BUFFER ){\ - augl_ensure_buffer_stack (yyscanner); \ - YY_CURRENT_BUFFER_LVALUE = \ - augl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); \ - } \ - YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ - } - -#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) - -/* Begin user sect3 */ - -#define augl_wrap(n) 1 -#define YY_SKIP_YYWRAP - -typedef unsigned char YY_CHAR; - -typedef int yy_state_type; - -#define yytext_ptr yytext_r - -static yy_state_type yy_get_previous_state (yyscan_t yyscanner ); -static yy_state_type yy_try_NUL_trans (yy_state_type current_state ,yyscan_t yyscanner); -static int yy_get_next_buffer (yyscan_t yyscanner ); -static void yy_fatal_error (yyconst char msg[] ,yyscan_t yyscanner ); - -/* Done after the current pattern has been matched and before the - * corresponding action - sets up yytext. - */ -#define YY_DO_BEFORE_ACTION \ - yyg->yytext_ptr = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ - yyg->yy_hold_char = *yy_cp; \ - *yy_cp = '\0'; \ - yyg->yy_c_buf_p = yy_cp; - -#define YY_NUM_RULES 29 -#define YY_END_OF_BUFFER 30 -/* This struct is not used in this scanner, - but its presence is necessary. */ -struct yy_trans_info - { - flex_int32_t yy_verify; - flex_int32_t yy_nxt; - }; -static yyconst flex_int16_t yy_accept[98] = - { 0, - 1, 1, 1, 1, 30, 25, 1, 2, 25, 25, - 7, 7, 7, 25, 23, 22, 22, 22, 22, 22, - 22, 22, 22, 22, 22, 28, 1, 28, 28, 28, - 1, 2, 3, 0, 4, 0, 24, 20, 0, 6, - 0, 0, 23, 22, 22, 22, 22, 14, 22, 22, - 22, 22, 22, 22, 26, 27, 0, 4, 5, 6, - 21, 22, 22, 17, 22, 10, 22, 18, 22, 22, - 22, 5, 21, 22, 22, 13, 0, 22, 22, 22, - 16, 19, 22, 0, 22, 22, 22, 22, 0, 8, - 12, 11, 22, 0, 15, 9, 0 - - } ; - -static yyconst flex_int32_t yy_ec[256] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, - 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 5, 1, 1, 1, 1, 1, 6, - 7, 8, 9, 1, 10, 11, 12, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 9, 9, 1, - 9, 14, 9, 1, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, - 9, 16, 9, 1, 17, 1, 18, 17, 19, 20, - - 21, 22, 23, 17, 24, 17, 17, 25, 26, 27, - 28, 29, 17, 30, 31, 32, 33, 17, 17, 34, - 17, 17, 9, 9, 9, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1 - } ; - -static yyconst flex_int32_t yy_meta[35] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 2, 1, 3, 1, 3, 1, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4 - } ; - -static yyconst flex_int16_t yy_base[105] = - { 0, - 0, 0, 33, 40, 145, 146, 142, 140, 139, 33, - 133, 146, 126, 35, 128, 0, 23, 117, 110, 115, - 107, 101, 112, 100, 110, 146, 128, 126, 120, 120, - 124, 122, 120, 45, 146, 47, 146, 146, 41, 99, - 42, 0, 111, 0, 89, 88, 87, 0, 28, 98, - 85, 93, 85, 83, 146, 146, 110, 54, 146, 50, - 0, 71, 63, 0, 59, 87, 55, 0, 66, 62, - 53, 52, 0, 54, 58, 0, 63, 57, 47, 53, - 0, 0, 51, 57, 56, 47, 52, 55, 50, 0, - 0, 0, 47, 69, 0, 146, 146, 93, 97, 101, - - 104, 106, 36, 108 - } ; - -static yyconst flex_int16_t yy_def[105] = - { 0, - 97, 1, 98, 98, 97, 97, 97, 97, 97, 99, - 97, 97, 97, 100, 101, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 102, 97, 97, 97, 97, 97, - 97, 97, 97, 99, 97, 99, 97, 97, 100, 97, - 100, 103, 101, 102, 102, 102, 102, 102, 102, 102, - 102, 102, 102, 102, 97, 97, 97, 99, 97, 100, - 104, 102, 102, 102, 102, 102, 102, 102, 102, 102, - 102, 100, 104, 102, 102, 102, 97, 102, 102, 102, - 102, 102, 102, 97, 102, 102, 102, 102, 97, 102, - 102, 102, 102, 97, 102, 97, 0, 97, 97, 97, - - 97, 97, 97, 97 - } ; - -static yyconst flex_int16_t yy_nxt[181] = - { 0, - 6, 7, 8, 9, 10, 11, 12, 12, 12, 13, - 12, 14, 6, 6, 15, 6, 16, 17, 16, 16, - 16, 16, 18, 19, 20, 21, 16, 16, 22, 23, - 24, 25, 16, 16, 27, 8, 28, 35, 29, 61, - 30, 27, 8, 28, 45, 29, 40, 30, 36, 35, - 41, 58, 40, 60, 65, 46, 41, 41, 35, 66, - 36, 40, 36, 40, 77, 41, 95, 41, 94, 36, - 96, 96, 93, 72, 92, 91, 90, 89, 88, 87, - 86, 85, 83, 82, 81, 80, 79, 78, 77, 76, - 75, 74, 84, 26, 26, 26, 26, 34, 34, 34, - - 34, 39, 39, 39, 39, 43, 43, 43, 44, 44, - 73, 73, 33, 71, 70, 69, 68, 67, 64, 63, - 62, 42, 59, 57, 32, 31, 56, 55, 33, 31, - 54, 53, 52, 51, 50, 49, 48, 47, 42, 38, - 37, 33, 32, 31, 97, 5, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97 - } ; - -static yyconst flex_int16_t yy_chk[181] = - { 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 3, 3, 3, 10, 3, 103, - 3, 4, 4, 4, 17, 4, 14, 4, 10, 34, - 14, 36, 39, 41, 49, 17, 39, 41, 58, 49, - 34, 60, 36, 72, 77, 60, 93, 72, 89, 58, - 94, 94, 88, 60, 87, 86, 85, 84, 83, 80, - 79, 78, 75, 74, 71, 70, 69, 67, 66, 65, - 63, 62, 77, 98, 98, 98, 98, 99, 99, 99, - - 99, 100, 100, 100, 100, 101, 101, 101, 102, 102, - 104, 104, 57, 54, 53, 52, 51, 50, 47, 46, - 45, 43, 40, 33, 32, 31, 30, 29, 28, 27, - 25, 24, 23, 22, 21, 20, 19, 18, 15, 13, - 11, 9, 8, 7, 5, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97 - } ; - -/* Table of booleans, true if rule could match eol. */ -static yyconst flex_int32_t yy_rule_can_match_eol[30] = - { 0, -0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }; - -/* The intent behind this definition is that it'll catch - * any uses of REJECT which flex missed. - */ -#define REJECT reject_used_but_not_detected -#define yymore() yymore_used_but_not_detected -#define YY_MORE_ADJ 0 -#define YY_RESTORE_YY_MORE_OFFSET -#line 1 "lexer.l" -/* Scanner for config specs -*- C -*- */ - -#line 15 "lexer.l" -#include "syntax.h" -#include "errcode.h" - -typedef struct info YYLTYPE; -#define YYLTYPE_IS_DECLARED 1 - -#include "parser.h" - -/* Advance of NUM lines. */ -# define LOCATION_LINES(Loc, Num) \ - (Loc).last_column = 0; \ - (Loc).last_line += Num; - -/* Restart: move the first cursor to the last position. */ -# define LOCATION_STEP(Loc) \ - (Loc).first_column = (Loc).last_column; \ - (Loc).first_line = (Loc).last_line; - -/* The lack of reference counting for filename is intentional */ -#define YY_USER_ACTION \ - do { \ - yylloc->last_column += yyleng; \ - yylloc->filename = augl_get_info(yyscanner)->filename; \ - yylloc->error = augl_get_info(yyscanner)->error; \ - } while(0); - -#define YY_USER_INIT LOCATION_STEP(*yylloc) - -#define YY_EXTRA_TYPE struct state * - -int augl_init_lexer(struct state *state, yyscan_t * scanner); -void augl_close_lexer(yyscan_t *scanner); -struct info *augl_get_info(yyscan_t yyscanner); - -static void loc_update(YYLTYPE *yylloc, const char *s, int len) { - for (int i=0; i < len; i++) { - if (s[i] == '\n') { - LOCATION_LINES(*yylloc, 1); - } - } -} - -static char *regexp_literal(const char *s, int len) { - char *u = unescape(s, len, RX_ESCAPES); - size_t u_len = strlen(u); - - if (u == NULL) - return NULL; - - regexp_c_locale(&u, &u_len); - - return u; -} - -#line 585 "lexer.c" - -#define INITIAL 0 -#define COMMENT 1 - -#ifndef YY_NO_UNISTD_H -/* Special case for "unistd.h", since it is non-ANSI. We include it way - * down here because we want the user's section 1 to have been scanned first. - * The user has a chance to override it with an option. - */ -#include -#endif - -#ifndef YY_EXTRA_TYPE -#define YY_EXTRA_TYPE void * -#endif - -/* Holds the entire state of the reentrant scanner. */ -struct yyguts_t - { - - /* User-defined. Not touched by flex. */ - YY_EXTRA_TYPE yyextra_r; - - /* The rest are the same as the globals declared in the non-reentrant scanner. */ - FILE *yyin_r, *yyout_r; - size_t yy_buffer_stack_top; /**< index of top of stack. */ - size_t yy_buffer_stack_max; /**< capacity of stack. */ - YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ - char yy_hold_char; - int yy_n_chars; - int yyleng_r; - char *yy_c_buf_p; - int yy_init; - int yy_start; - int yy_did_buffer_switch_on_eof; - int yy_start_stack_ptr; - int yy_start_stack_depth; - int *yy_start_stack; - yy_state_type yy_last_accepting_state; - char* yy_last_accepting_cpos; - - int yylineno_r; - int yy_flex_debug_r; - - char *yytext_r; - int yy_more_flag; - int yy_more_len; - - YYSTYPE * yylval_r; - - YYLTYPE * yylloc_r; - - }; /* end struct yyguts_t */ - -static int yy_init_globals (yyscan_t yyscanner ); - - /* This must go here because YYSTYPE and YYLTYPE are included - * from bison output in section 1.*/ - # define yylval yyg->yylval_r - - # define yylloc yyg->yylloc_r - -int augl_lex_init (yyscan_t* scanner); - -int augl_lex_init_extra (YY_EXTRA_TYPE user_defined,yyscan_t* scanner); - -/* Accessor methods to globals. - These are made visible to non-reentrant scanners for convenience. */ - -int augl_lex_destroy (yyscan_t yyscanner ); - -int augl_get_debug (yyscan_t yyscanner ); - -void augl_set_debug (int debug_flag ,yyscan_t yyscanner ); - -YY_EXTRA_TYPE augl_get_extra (yyscan_t yyscanner ); - -void augl_set_extra (YY_EXTRA_TYPE user_defined ,yyscan_t yyscanner ); - -FILE *augl_get_in (yyscan_t yyscanner ); - -void augl_set_in (FILE * in_str ,yyscan_t yyscanner ); - -FILE *augl_get_out (yyscan_t yyscanner ); - -void augl_set_out (FILE * out_str ,yyscan_t yyscanner ); - -int augl_get_leng (yyscan_t yyscanner ); - -char *augl_get_text (yyscan_t yyscanner ); - -int augl_get_lineno (yyscan_t yyscanner ); - -void augl_set_lineno (int line_number ,yyscan_t yyscanner ); - -int augl_get_column (yyscan_t yyscanner ); - -void augl_set_column (int column_no ,yyscan_t yyscanner ); - -YYSTYPE * augl_get_lval (yyscan_t yyscanner ); - -void augl_set_lval (YYSTYPE * yylval_param ,yyscan_t yyscanner ); - - YYLTYPE *augl_get_lloc (yyscan_t yyscanner ); - - void augl_set_lloc (YYLTYPE * yylloc_param ,yyscan_t yyscanner ); - -/* Macros after this point can all be overridden by user definitions in - * section 1. - */ - -#ifndef YY_SKIP_YYWRAP -#ifdef __cplusplus -extern "C" int augl_wrap (yyscan_t yyscanner ); -#else -extern int augl_wrap (yyscan_t yyscanner ); -#endif -#endif - - static void yyunput (int c,char *buf_ptr ,yyscan_t yyscanner); - -#ifndef yytext_ptr -static void yy_flex_strncpy (char *,yyconst char *,int ,yyscan_t yyscanner); -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * ,yyscan_t yyscanner); -#endif - -#ifndef YY_NO_INPUT - -#ifdef __cplusplus -static int yyinput (yyscan_t yyscanner ); -#else -static int input (yyscan_t yyscanner ); -#endif - -#endif - -/* Amount of stuff to slurp up with each read. */ -#ifndef YY_READ_BUF_SIZE -#define YY_READ_BUF_SIZE 8192 -#endif - -/* Copy whatever the last rule matched to the standard output. */ -#ifndef ECHO -/* This used to be an fputs(), but since the string might contain NUL's, - * we now use fwrite(). - */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) -#endif - -/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, - * is returned in "result". - */ -#ifndef YY_INPUT -#define YY_INPUT(buf,result,max_size) \ - if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ - { \ - int c = '*'; \ - unsigned n; \ - for ( n = 0; n < max_size && \ - (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ - buf[n] = (char) c; \ - if ( c == '\n' ) \ - buf[n++] = (char) c; \ - if ( c == EOF && ferror( yyin ) ) \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - result = n; \ - } \ - else \ - { \ - errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ - { \ - if( errno != EINTR) \ - { \ - YY_FATAL_ERROR( "input in flex scanner failed" ); \ - break; \ - } \ - errno=0; \ - clearerr(yyin); \ - } \ - }\ -\ - -#endif - -/* No semi-colon after return; correct usage is to write "yyterminate();" - - * we don't want an extra ';' after the "return" because that will cause - * some compilers to complain about unreachable statements. - */ -#ifndef yyterminate -#define yyterminate() return YY_NULL -#endif - -/* Number of entries by which start-condition stack grows. */ -#ifndef YY_START_STACK_INCR -#define YY_START_STACK_INCR 25 -#endif - -/* Report a fatal error. */ -#ifndef YY_FATAL_ERROR -#define YY_FATAL_ERROR(msg) yy_fatal_error( msg , yyscanner) -#endif - -/* end tables serialization structures and prototypes */ - -/* Default declaration of generated scanner - a define so the user can - * easily add parameters. - */ -#ifndef YY_DECL -#define YY_DECL_IS_OURS 1 - -extern int augl_lex \ - (YYSTYPE * yylval_param,YYLTYPE * yylloc_param ,yyscan_t yyscanner); - -#define YY_DECL int augl_lex \ - (YYSTYPE * yylval_param, YYLTYPE * yylloc_param , yyscan_t yyscanner) -#endif /* !YY_DECL */ - -/* Code executed at the beginning of each rule, after yytext and yyleng - * have been set up. - */ -#ifndef YY_USER_ACTION -#define YY_USER_ACTION -#endif - -/* Code executed at the end of each rule. */ -#ifndef YY_BREAK -#define YY_BREAK break; -#endif - -#define YY_RULE_SETUP \ - YY_USER_ACTION - -/** The main scanner function which does all the work. - */ -YY_DECL -{ - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - -#line 80 "lexer.l" - -#line 833 "lexer.c" - - yylval = yylval_param; - - yylloc = yylloc_param; - - if ( !yyg->yy_init ) - { - yyg->yy_init = 1; - -#ifdef YY_USER_INIT - YY_USER_INIT; -#endif - - if ( ! yyg->yy_start ) - yyg->yy_start = 1; /* first start state */ - - if ( ! yyin ) - yyin = stdin; - - if ( ! yyout ) - yyout = stdout; - - if ( ! YY_CURRENT_BUFFER ) { - augl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - augl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - augl__load_buffer_state(yyscanner ); - } - - while ( 1 ) /* loops until end-of-file is reached */ - { - yy_cp = yyg->yy_c_buf_p; - - /* Support of yytext. */ - *yy_cp = yyg->yy_hold_char; - - /* yy_bp points to the position in yy_ch_buf of the start of - * the current run. - */ - yy_bp = yy_cp; - - yy_current_state = yyg->yy_start; -yy_match: - do - { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 98 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - ++yy_cp; - } - while ( yy_current_state != 97 ); - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - -yy_find_action: - yy_act = yy_accept[yy_current_state]; - - YY_DO_BEFORE_ACTION; - - if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) - { - int yyl; - for ( yyl = 0; yyl < yyleng; ++yyl ) - if ( yytext[yyl] == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - } - -do_action: /* This label is used only to access EOF actions. */ - - switch ( yy_act ) - { /* beginning of action switch */ - case 0: /* must back up */ - /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yyg->yy_hold_char; - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - -case 1: -YY_RULE_SETUP -#line 83 "lexer.l" -LOCATION_STEP(*yylloc); - YY_BREAK -case 2: -/* rule 2 can match eol */ -YY_RULE_SETUP -#line 84 "lexer.l" -LOCATION_LINES(*yylloc, yyleng); LOCATION_STEP(*yylloc); - YY_BREAK -case 3: -/* rule 3 can match eol */ -YY_RULE_SETUP -#line 85 "lexer.l" -LOCATION_LINES(*yylloc, yyleng/2); LOCATION_STEP(*yylloc); - YY_BREAK - - - -case 4: -/* rule 4 can match eol */ -YY_RULE_SETUP -#line 90 "lexer.l" -{ - loc_update(yylloc, yytext, yyleng); - yylval->string = unescape(yytext+1, yyleng-2, STR_ESCAPES); - return DQUOTED; - } - YY_BREAK -case 5: -/* rule 5 can match eol */ -YY_RULE_SETUP -#line 96 "lexer.l" -{ - loc_update(yylloc, yytext, yyleng); - yylval->regexp.nocase = 1; - yylval->regexp.pattern = regexp_literal(yytext+1, yyleng-3); - return REGEXP; - } - YY_BREAK -case 6: -/* rule 6 can match eol */ -YY_RULE_SETUP -#line 103 "lexer.l" -{ - loc_update(yylloc, yytext, yyleng); - yylval->regexp.nocase = 0; - yylval->regexp.pattern = regexp_literal(yytext+1, yyleng-2); - return REGEXP; - } - YY_BREAK -case 7: -YY_RULE_SETUP -#line 110 "lexer.l" -return yytext[0]; - YY_BREAK -case 8: -YY_RULE_SETUP -#line 112 "lexer.l" -return KW_MODULE; - YY_BREAK -case 9: -/* rule 9 can match eol */ -*yy_cp = yyg->yy_hold_char; /* undo effects of setting up yytext */ -yyg->yy_c_buf_p = yy_cp -= 1; -YY_DO_BEFORE_ACTION; /* set up yytext again */ -YY_RULE_SETUP -#line 114 "lexer.l" -return KW_LET_REC; - YY_BREAK -case 10: -YY_RULE_SETUP -#line 116 "lexer.l" -return KW_LET; - YY_BREAK -case 11: -YY_RULE_SETUP -#line 117 "lexer.l" -return KW_STRING; - YY_BREAK -case 12: -YY_RULE_SETUP -#line 118 "lexer.l" -return KW_REGEXP; - YY_BREAK -case 13: -YY_RULE_SETUP -#line 119 "lexer.l" -return KW_LENS; - YY_BREAK -case 14: -YY_RULE_SETUP -#line 120 "lexer.l" -return KW_IN; - YY_BREAK -case 15: -YY_RULE_SETUP -#line 121 "lexer.l" -return KW_AUTOLOAD; - YY_BREAK -/* tests */ -case 16: -YY_RULE_SETUP -#line 124 "lexer.l" -return KW_TEST; - YY_BREAK -case 17: -YY_RULE_SETUP -#line 125 "lexer.l" -return KW_GET; - YY_BREAK -case 18: -YY_RULE_SETUP -#line 126 "lexer.l" -return KW_PUT; - YY_BREAK -case 19: -YY_RULE_SETUP -#line 127 "lexer.l" -return KW_AFTER; - YY_BREAK -case 20: -YY_RULE_SETUP -#line 129 "lexer.l" -return ARROW; - YY_BREAK -case 21: -YY_RULE_SETUP -#line 131 "lexer.l" -{ - yylval->string = strndup(yytext, yyleng); - return QIDENT; - } - YY_BREAK -case 22: -YY_RULE_SETUP -#line 135 "lexer.l" -{ - yylval->string = strndup(yytext, yyleng); - return LIDENT; - } - YY_BREAK -case 23: -YY_RULE_SETUP -#line 139 "lexer.l" -{ - yylval->string = strndup(yytext, yyleng); - return UIDENT; - } - YY_BREAK -case 24: -YY_RULE_SETUP -#line 143 "lexer.l" -{ - augl_get_extra(yyscanner)->comment_depth = 1; - BEGIN(COMMENT); - } - YY_BREAK -case 25: -YY_RULE_SETUP -#line 147 "lexer.l" -{ - report_error(augl_get_info(yyscanner)->error, AUG_ESYNTAX, - "%s:%d:%d: Unexpected character %c", - augl_get_info(yyscanner)->filename->str, - yylineno, yylloc->first_column, yytext[0]); - } - YY_BREAK -case YY_STATE_EOF(INITIAL): -#line 154 "lexer.l" -{ - augl_close_lexer(yyscanner); - yyterminate(); - } - YY_BREAK - - - -case 26: -YY_RULE_SETUP -#line 163 "lexer.l" -{ - augl_get_extra(yyscanner)->comment_depth += 1; - } - YY_BREAK -case 27: -YY_RULE_SETUP -#line 166 "lexer.l" -{ - augl_get_extra(yyscanner)->comment_depth -= 1; - if (augl_get_extra(yyscanner)->comment_depth == 0) - BEGIN(INITIAL); - } - YY_BREAK -case 28: -YY_RULE_SETUP -#line 171 "lexer.l" -/* Skip */; - YY_BREAK -case YY_STATE_EOF(COMMENT): -#line 172 "lexer.l" -{ - report_error(augl_get_info(yyscanner)->error, AUG_ESYNTAX, - "%s:%d:%d: Missing *)", - augl_get_info(yyscanner)->filename->str, - yylineno, yylloc->first_column); - augl_close_lexer(yyscanner); - yyterminate(); - } - YY_BREAK - -case 29: -YY_RULE_SETUP -#line 181 "lexer.l" -YY_FATAL_ERROR( "flex scanner jammed" ); - YY_BREAK -#line 1145 "lexer.c" - - case YY_END_OF_BUFFER: - { - /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yyg->yytext_ptr) - 1; - - /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yyg->yy_hold_char; - YY_RESTORE_YY_MORE_OFFSET - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) - { - /* We're scanning a new file or input source. It's - * possible that this happened because the user - * just pointed yyin at a new source and called - * augl_lex(). If so, then we have to assure - * consistency between YY_CURRENT_BUFFER and our - * globals. Here is the right place to do so, because - * this is the first action (other than possibly a - * back-up) that will match for the new input source. - */ - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; - } - - /* Note that here we test for yy_c_buf_p "<=" to the position - * of the first EOB in the buffer, since yy_c_buf_p will - * already have been incremented past the NUL character - * (since all states make transitions on EOB to the - * end-of-buffer state). Contrast this with the test - * in input(). - */ - if ( yyg->yy_c_buf_p <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - { /* This was really a NUL. */ - yy_state_type yy_next_state; - - yyg->yy_c_buf_p = yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - /* Okay, we're now positioned to make the NUL - * transition. We couldn't have - * yy_get_previous_state() go ahead and do it - * for us because it doesn't know how to deal - * with the possibility of jamming (and we don't - * want to build jamming into it because then it - * will run more slowly). - */ - - yy_next_state = yy_try_NUL_trans( yy_current_state , yyscanner); - - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - - if ( yy_next_state ) - { - /* Consume the NUL. */ - yy_cp = ++yyg->yy_c_buf_p; - yy_current_state = yy_next_state; - goto yy_match; - } - - else - { - yy_cp = yyg->yy_last_accepting_cpos; - yy_current_state = yyg->yy_last_accepting_state; - goto yy_find_action; - } - } - - else switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_END_OF_FILE: - { - yyg->yy_did_buffer_switch_on_eof = 0; - - if ( augl_wrap(yyscanner ) ) - { - /* Note: because we've taken care in - * yy_get_next_buffer() to have set up - * yytext, we can now set up - * yy_c_buf_p so that if some total - * hoser (like flex itself) wants to - * call the scanner after we return the - * YY_NULL, it'll still work - another - * YY_NULL will get returned. - */ - yyg->yy_c_buf_p = yyg->yytext_ptr + YY_MORE_ADJ; - - yy_act = YY_STATE_EOF(YY_START); - goto do_action; - } - - else - { - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; - } - break; - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = - yyg->yytext_ptr + yy_amount_of_matched_text; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_match; - - case EOB_ACT_LAST_MATCH: - yyg->yy_c_buf_p = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars]; - - yy_current_state = yy_get_previous_state( yyscanner ); - - yy_cp = yyg->yy_c_buf_p; - yy_bp = yyg->yytext_ptr + YY_MORE_ADJ; - goto yy_find_action; - } - break; - } - - default: - YY_FATAL_ERROR( - "fatal flex scanner internal error--no action found" ); - } /* end of action switch */ - } /* end of scanning one token */ -} /* end of augl_lex */ - -/* yy_get_next_buffer - try to read in a new buffer - * - * Returns a code representing an action: - * EOB_ACT_LAST_MATCH - - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position - * EOB_ACT_END_OF_FILE - end of file - */ -static int yy_get_next_buffer (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = yyg->yytext_ptr; - register int number_to_move, i; - int ret_val; - - if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] ) - YY_FATAL_ERROR( - "fatal flex scanner internal error--end of buffer missed" ); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) - { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yyg->yy_c_buf_p - yyg->yytext_ptr - YY_MORE_ADJ == 1 ) - { - /* We matched a single character, the EOB, so - * treat this as a final EOF. - */ - return EOB_ACT_END_OF_FILE; - } - - else - { - /* We matched some text prior to the EOB, first - * process it. - */ - return EOB_ACT_LAST_MATCH; - } - } - - /* Try to read more data. */ - - /* First move last chars to start of buffer. */ - number_to_move = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr) - 1; - - for ( i = 0; i < number_to_move; ++i ) - *(dest++) = *(source++); - - if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) - /* don't do the read, it's not guaranteed to return an EOF, - * just force an EOF - */ - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars = 0; - - else - { - int num_to_read = - YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; - - while ( num_to_read <= 0 ) - { /* Not enough room in the buffer - grow it. */ - - /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; - - int yy_c_buf_p_offset = - (int) (yyg->yy_c_buf_p - b->yy_ch_buf); - - if ( b->yy_is_our_buffer ) - { - int new_size = b->yy_buf_size * 2; - - if ( new_size <= 0 ) - b->yy_buf_size += b->yy_buf_size / 8; - else - b->yy_buf_size *= 2; - - b->yy_ch_buf = (char *) - /* Include room in for 2 EOB chars. */ - augl_realloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ,yyscanner ); - } - else - /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; - - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( - "fatal error - scanner input buffer overflow" ); - - yyg->yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; - - num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - - number_to_move - 1; - - } - - if ( num_to_read > YY_READ_BUF_SIZE ) - num_to_read = YY_READ_BUF_SIZE; - - /* Read in more data. */ - YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - yyg->yy_n_chars, (size_t) num_to_read ); - - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - if ( yyg->yy_n_chars == 0 ) - { - if ( number_to_move == YY_MORE_ADJ ) - { - ret_val = EOB_ACT_END_OF_FILE; - augl_restart(yyin ,yyscanner); - } - - else - { - ret_val = EOB_ACT_LAST_MATCH; - YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = - YY_BUFFER_EOF_PENDING; - } - } - - else - ret_val = EOB_ACT_CONTINUE_SCAN; - - if ((yy_size_t) (yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { - /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) augl_realloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ,yyscanner ); - if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); - } - - yyg->yy_n_chars += number_to_move; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] = YY_END_OF_BUFFER_CHAR; - YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; - - yyg->yytext_ptr = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; - - return ret_val; -} - -/* yy_get_previous_state - get the state just before the EOB char was reached */ - - static yy_state_type yy_get_previous_state (yyscan_t yyscanner) -{ - register yy_state_type yy_current_state; - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_current_state = yyg->yy_start; - - for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp ) - { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 98 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - } - - return yy_current_state; -} - -/* yy_try_NUL_trans - try to make a transition on the NUL character - * - * synopsis - * next_state = yy_try_NUL_trans( current_state ); - */ - static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner) -{ - register int yy_is_jam; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */ - register char *yy_cp = yyg->yy_c_buf_p; - - register YY_CHAR yy_c = 1; - if ( yy_accept[yy_current_state] ) - { - yyg->yy_last_accepting_state = yy_current_state; - yyg->yy_last_accepting_cpos = yy_cp; - } - while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) - { - yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 98 ) - yy_c = yy_meta[(unsigned int) yy_c]; - } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 97); - - return yy_is_jam ? 0 : yy_current_state; -} - - static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner) -{ - register char *yy_cp; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - yy_cp = yyg->yy_c_buf_p; - - /* undo effects of setting up yytext */ - *yy_cp = yyg->yy_hold_char; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - { /* need to shift things up to make room */ - /* +2 for EOB chars. */ - register int number_to_move = yyg->yy_n_chars + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ - YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = - &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - - while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) - *--dest = *--source; - - yy_cp += (int) (dest - source); - yy_bp += (int) (dest - source); - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - - if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) - YY_FATAL_ERROR( "flex scanner push-back overflow" ); - } - - *--yy_cp = (char) c; - - if ( c == '\n' ){ - --yylineno; - } - - yyg->yytext_ptr = yy_bp; - yyg->yy_hold_char = *yy_cp; - yyg->yy_c_buf_p = yy_cp; -} - -#ifndef YY_NO_INPUT -#ifdef __cplusplus - static int yyinput (yyscan_t yyscanner) -#else - static int input (yyscan_t yyscanner) -#endif - -{ - int c; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - *yyg->yy_c_buf_p = yyg->yy_hold_char; - - if ( *yyg->yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) - { - /* yy_c_buf_p now points to the character we want to return. - * If this occurs *before* the EOB characters, then it's a - * valid NUL; if not, then we've hit the end of the buffer. - */ - if ( yyg->yy_c_buf_p < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars] ) - /* This was really a NUL. */ - *yyg->yy_c_buf_p = '\0'; - - else - { /* need more input */ - int offset = yyg->yy_c_buf_p - yyg->yytext_ptr; - ++yyg->yy_c_buf_p; - - switch ( yy_get_next_buffer( yyscanner ) ) - { - case EOB_ACT_LAST_MATCH: - /* This happens because yy_g_n_b() - * sees that we've accumulated a - * token and flags that we need to - * try matching the token before - * proceeding. But for input(), - * there's no matching to consider. - * So convert the EOB_ACT_LAST_MATCH - * to EOB_ACT_END_OF_FILE. - */ - - /* Reset buffer status. */ - augl_restart(yyin ,yyscanner); - - /*FALLTHROUGH*/ - - case EOB_ACT_END_OF_FILE: - { - if ( augl_wrap(yyscanner ) ) - return EOF; - - if ( ! yyg->yy_did_buffer_switch_on_eof ) - YY_NEW_FILE; -#ifdef __cplusplus - return yyinput(yyscanner); -#else - return input(yyscanner); -#endif - } - - case EOB_ACT_CONTINUE_SCAN: - yyg->yy_c_buf_p = yyg->yytext_ptr + offset; - break; - } - } - } - - c = *(unsigned char *) yyg->yy_c_buf_p; /* cast for 8-bit char's */ - *yyg->yy_c_buf_p = '\0'; /* preserve yytext */ - yyg->yy_hold_char = *++yyg->yy_c_buf_p; - - if ( c == '\n' ) - - do{ yylineno++; - yycolumn=0; - }while(0) -; - - return c; -} -#endif /* ifndef YY_NO_INPUT */ - -/** Immediately switch to a different input stream. - * @param input_file A readable stream. - * @param yyscanner The scanner object. - * @note This function does not reset the start condition to @c INITIAL . - */ - void augl_restart (FILE * input_file , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! YY_CURRENT_BUFFER ){ - augl_ensure_buffer_stack (yyscanner); - YY_CURRENT_BUFFER_LVALUE = - augl__create_buffer(yyin,YY_BUF_SIZE ,yyscanner); - } - - augl__init_buffer(YY_CURRENT_BUFFER,input_file ,yyscanner); - augl__load_buffer_state(yyscanner ); -} - -/** Switch to a different input buffer. - * @param new_buffer The new input buffer. - * @param yyscanner The scanner object. - */ - void augl__switch_to_buffer (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* TODO. We should be able to replace this entire function body - * with - * augl_pop_buffer_state(); - * augl_push_buffer_state(new_buffer); - */ - augl_ensure_buffer_stack (yyscanner); - if ( YY_CURRENT_BUFFER == new_buffer ) - return; - - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - YY_CURRENT_BUFFER_LVALUE = new_buffer; - augl__load_buffer_state(yyscanner ); - - /* We don't actually know whether we did this switch during - * EOF (augl_wrap()) processing, but the only time this flag - * is looked at is after augl_wrap() is called, so it's safe - * to go ahead and always set it. - */ - yyg->yy_did_buffer_switch_on_eof = 1; -} - -static void augl__load_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyg->yy_n_chars = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; - yyg->yytext_ptr = yyg->yy_c_buf_p = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; - yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; - yyg->yy_hold_char = *yyg->yy_c_buf_p; -} - -/** Allocate and initialize an input buffer state. - * @param file A readable stream. - * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. - * @param yyscanner The scanner object. - * @return the allocated buffer state. - */ - YY_BUFFER_STATE augl__create_buffer (FILE * file, int size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) augl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in augl__create_buffer()" ); - - b->yy_buf_size = size; - - /* yy_ch_buf has to be 2 characters longer than the size given because - * we need to put in 2 end-of-buffer characters. - */ - b->yy_ch_buf = (char *) augl_alloc(b->yy_buf_size + 2 ,yyscanner ); - if ( ! b->yy_ch_buf ) - YY_FATAL_ERROR( "out of dynamic memory in augl__create_buffer()" ); - - b->yy_is_our_buffer = 1; - - augl__init_buffer(b,file ,yyscanner); - - return b; -} - -/** Destroy the buffer. - * @param b a buffer created with augl__create_buffer() - * @param yyscanner The scanner object. - */ - void augl__delete_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if ( ! b ) - return; - - if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ - YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; - - if ( b->yy_is_our_buffer ) - augl_free((void *) b->yy_ch_buf ,yyscanner ); - - augl_free((void *) b ,yyscanner ); -} - -/* Initializes or reinitializes a buffer. - * This function is sometimes called more than once on the same buffer, - * such as during a augl_restart() or at EOF. - */ - static void augl__init_buffer (YY_BUFFER_STATE b, FILE * file , yyscan_t yyscanner) - -{ - int oerrno = errno; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - augl__flush_buffer(b ,yyscanner); - - b->yy_input_file = file; - b->yy_fill_buffer = 1; - - /* If b is the current buffer, then augl__init_buffer was _probably_ - * called from augl_restart() or through yy_get_next_buffer. - * In that case, we don't want to reset the lineno or column. - */ - if (b != YY_CURRENT_BUFFER){ - b->yy_bs_lineno = 1; - b->yy_bs_column = 0; - } - - b->yy_is_interactive = 0; - - errno = oerrno; -} - -/** Discard all buffered characters. On the next scan, YY_INPUT will be called. - * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. - * @param yyscanner The scanner object. - */ - void augl__flush_buffer (YY_BUFFER_STATE b , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if ( ! b ) - return; - - b->yy_n_chars = 0; - - /* We always need two end-of-buffer characters. The first causes - * a transition to the end-of-buffer state. The second causes - * a jam in that state. - */ - b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; - b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; - - b->yy_buf_pos = &b->yy_ch_buf[0]; - - b->yy_at_bol = 1; - b->yy_buffer_status = YY_BUFFER_NEW; - - if ( b == YY_CURRENT_BUFFER ) - augl__load_buffer_state(yyscanner ); -} - -/** Pushes the new state onto the stack. The new state becomes - * the current state. This function will allocate the stack - * if necessary. - * @param new_buffer The new state. - * @param yyscanner The scanner object. - */ -void augl_push_buffer_state (YY_BUFFER_STATE new_buffer , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (new_buffer == NULL) - return; - - augl_ensure_buffer_stack(yyscanner); - - /* This block is copied from augl__switch_to_buffer. */ - if ( YY_CURRENT_BUFFER ) - { - /* Flush out information for old buffer. */ - *yyg->yy_c_buf_p = yyg->yy_hold_char; - YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = yyg->yy_c_buf_p; - YY_CURRENT_BUFFER_LVALUE->yy_n_chars = yyg->yy_n_chars; - } - - /* Only push if top exists. Otherwise, replace top. */ - if (YY_CURRENT_BUFFER) - yyg->yy_buffer_stack_top++; - YY_CURRENT_BUFFER_LVALUE = new_buffer; - - /* copied from augl__switch_to_buffer. */ - augl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; -} - -/** Removes and deletes the top of the stack, if present. - * The next element becomes the new top. - * @param yyscanner The scanner object. - */ -void augl_pop_buffer_state (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - if (!YY_CURRENT_BUFFER) - return; - - augl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner); - YY_CURRENT_BUFFER_LVALUE = NULL; - if (yyg->yy_buffer_stack_top > 0) - --yyg->yy_buffer_stack_top; - - if (YY_CURRENT_BUFFER) { - augl__load_buffer_state(yyscanner ); - yyg->yy_did_buffer_switch_on_eof = 1; - } -} - -/* Allocates the stack if it does not exist. - * Guarantees space for at least one push. - */ -static void augl_ensure_buffer_stack (yyscan_t yyscanner) -{ - int num_to_alloc; - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (!yyg->yy_buffer_stack) { - - /* First allocation is just for 2 elements, since we don't know if this - * scanner will even need a stack. We use 2 instead of 1 to avoid an - * immediate realloc on the next call. - */ - num_to_alloc = 1; - yyg->yy_buffer_stack = (struct yy_buffer_state**)augl_alloc - (num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in augl_ensure_buffer_stack()" ); - - memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*)); - - yyg->yy_buffer_stack_max = num_to_alloc; - yyg->yy_buffer_stack_top = 0; - return; - } - - if (yyg->yy_buffer_stack_top >= (yyg->yy_buffer_stack_max) - 1){ - - /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; - - num_to_alloc = yyg->yy_buffer_stack_max + grow_size; - yyg->yy_buffer_stack = (struct yy_buffer_state**)augl_realloc - (yyg->yy_buffer_stack, - num_to_alloc * sizeof(struct yy_buffer_state*) - , yyscanner); - if ( ! yyg->yy_buffer_stack ) - YY_FATAL_ERROR( "out of dynamic memory in augl_ensure_buffer_stack()" ); - - /* zero only the new slots.*/ - memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*)); - yyg->yy_buffer_stack_max = num_to_alloc; - } -} - -/** Setup the input buffer state to scan directly from a user-specified character buffer. - * @param base the character buffer - * @param size the size in bytes of the character buffer - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE augl__scan_buffer (char * base, yy_size_t size , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - - if ( size < 2 || - base[size-2] != YY_END_OF_BUFFER_CHAR || - base[size-1] != YY_END_OF_BUFFER_CHAR ) - /* They forgot to leave room for the EOB's. */ - return 0; - - b = (YY_BUFFER_STATE) augl_alloc(sizeof( struct yy_buffer_state ) ,yyscanner ); - if ( ! b ) - YY_FATAL_ERROR( "out of dynamic memory in augl__scan_buffer()" ); - - b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ - b->yy_buf_pos = b->yy_ch_buf = base; - b->yy_is_our_buffer = 0; - b->yy_input_file = 0; - b->yy_n_chars = b->yy_buf_size; - b->yy_is_interactive = 0; - b->yy_at_bol = 1; - b->yy_fill_buffer = 0; - b->yy_buffer_status = YY_BUFFER_NEW; - - augl__switch_to_buffer(b ,yyscanner ); - - return b; -} - -/** Setup the input buffer state to scan a string. The next call to augl_lex() will - * scan from a @e copy of @a str. - * @param yystr a NUL-terminated string to scan - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - * @note If you want to scan bytes that may contain NUL values, then use - * augl__scan_bytes() instead. - */ -YY_BUFFER_STATE augl__scan_string (yyconst char * yystr , yyscan_t yyscanner) -{ - - return augl__scan_bytes(yystr,strlen(yystr) ,yyscanner); -} - -/** Setup the input buffer state to scan the given bytes. The next call to augl_lex() will - * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. - * @param yyscanner The scanner object. - * @return the newly allocated buffer state object. - */ -YY_BUFFER_STATE augl__scan_bytes (yyconst char * yybytes, int _yybytes_len , yyscan_t yyscanner) -{ - YY_BUFFER_STATE b; - char *buf; - yy_size_t n; - int i; - - /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; - buf = (char *) augl_alloc(n ,yyscanner ); - if ( ! buf ) - YY_FATAL_ERROR( "out of dynamic memory in augl__scan_bytes()" ); - - for ( i = 0; i < _yybytes_len; ++i ) - buf[i] = yybytes[i]; - - buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - - b = augl__scan_buffer(buf,n ,yyscanner); - if ( ! b ) - YY_FATAL_ERROR( "bad buffer in augl__scan_bytes()" ); - - /* It's okay to grow etc. this buffer, and we should throw it - * away when we're done. - */ - b->yy_is_our_buffer = 1; - - return b; -} - -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif - -static void yy_fatal_error (yyconst char* msg , yyscan_t yyscanner) -{ - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); -} - -/* Redefine yyless() so it works in section 3 code. */ - -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ - YY_LESS_LINENO(yyless_macro_arg);\ - yytext[yyleng] = yyg->yy_hold_char; \ - yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ - yyg->yy_hold_char = *yyg->yy_c_buf_p; \ - *yyg->yy_c_buf_p = '\0'; \ - yyleng = yyless_macro_arg; \ - } \ - while ( 0 ) - -/* Accessor methods (get/set functions) to struct members. */ - -/** Get the user-defined data for this scanner. - * @param yyscanner The scanner object. - */ -YY_EXTRA_TYPE augl_get_extra (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyextra; -} - -/** Get the current line number. - * @param yyscanner The scanner object. - */ -int augl_get_lineno (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yylineno; -} - -/** Get the current column number. - * @param yyscanner The scanner object. - */ -int augl_get_column (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - if (! YY_CURRENT_BUFFER) - return 0; - - return yycolumn; -} - -/** Get the input stream. - * @param yyscanner The scanner object. - */ -FILE *augl_get_in (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyin; -} - -/** Get the output stream. - * @param yyscanner The scanner object. - */ -FILE *augl_get_out (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyout; -} - -/** Get the length of the current token. - * @param yyscanner The scanner object. - */ -int augl_get_leng (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yyleng; -} - -/** Get the current token. - * @param yyscanner The scanner object. - */ - -char *augl_get_text (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yytext; -} - -/** Set the user-defined data. This data is never touched by the scanner. - * @param user_defined The data to be associated with this scanner. - * @param yyscanner The scanner object. - */ -void augl_set_extra (YY_EXTRA_TYPE user_defined , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyextra = user_defined ; -} - -/** Set the current line number. - * @param line_number - * @param yyscanner The scanner object. - */ -void augl_set_lineno (int line_number , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* lineno is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "augl_set_lineno called with no buffer" , yyscanner); - - yylineno = line_number; -} - -/** Set the current column. - * @param line_number - * @param yyscanner The scanner object. - */ -void augl_set_column (int column_no , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* column is only valid if an input buffer exists. */ - if (! YY_CURRENT_BUFFER ) - yy_fatal_error( "augl_set_column called with no buffer" , yyscanner); - - yycolumn = column_no; -} - -/** Set the input stream. This does not discard the current - * input buffer. - * @param in_str A readable stream. - * @param yyscanner The scanner object. - * @see augl__switch_to_buffer - */ -void augl_set_in (FILE * in_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyin = in_str ; -} - -void augl_set_out (FILE * out_str , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yyout = out_str ; -} - -int augl_get_debug (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yy_flex_debug; -} - -void augl_set_debug (int bdebug , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yy_flex_debug = bdebug ; -} - -/* Accessor methods for yylval and yylloc */ - -YYSTYPE * augl_get_lval (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylval; -} - -void augl_set_lval (YYSTYPE * yylval_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylval = yylval_param; -} - -YYLTYPE *augl_get_lloc (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - return yylloc; -} - -void augl_set_lloc (YYLTYPE * yylloc_param , yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - yylloc = yylloc_param; -} - -/* User-visible API */ - -/* augl_lex_init is special because it creates the scanner itself, so it is - * the ONLY reentrant function that doesn't take the scanner as the last argument. - * That's why we explicitly handle the declaration, instead of using our macros. - */ - -int augl_lex_init(yyscan_t* ptr_yy_globals) - -{ - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) augl_alloc ( sizeof( struct yyguts_t ), NULL ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - return yy_init_globals ( *ptr_yy_globals ); -} - -/* augl_lex_init_extra has the same functionality as augl_lex_init, but follows the - * convention of taking the scanner as the last argument. Note however, that - * this is a *pointer* to a scanner, as it will be allocated by this call (and - * is the reason, too, why this function also must handle its own declaration). - * The user defined value in the first argument will be available to augl_alloc in - * the yyextra field. - */ - -int augl_lex_init_extra(YY_EXTRA_TYPE yy_user_defined,yyscan_t* ptr_yy_globals ) - -{ - struct yyguts_t dummy_yyguts; - - augl_set_extra (yy_user_defined, &dummy_yyguts); - - if (ptr_yy_globals == NULL){ - errno = EINVAL; - return 1; - } - - *ptr_yy_globals = (yyscan_t) augl_alloc ( sizeof( struct yyguts_t ), &dummy_yyguts ); - - if (*ptr_yy_globals == NULL){ - errno = ENOMEM; - return 1; - } - - /* By setting to 0xAA, we expose bugs in - yy_init_globals. Leave at 0x00 for releases. */ - memset(*ptr_yy_globals,0x00,sizeof(struct yyguts_t)); - - augl_set_extra (yy_user_defined, *ptr_yy_globals); - - return yy_init_globals ( *ptr_yy_globals ); -} - -static int yy_init_globals (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - /* Initialization is the same as for the non-reentrant scanner. - * This function is called from augl_lex_destroy(), so don't allocate here. - */ - - yyg->yy_buffer_stack = 0; - yyg->yy_buffer_stack_top = 0; - yyg->yy_buffer_stack_max = 0; - yyg->yy_c_buf_p = (char *) 0; - yyg->yy_init = 0; - yyg->yy_start = 0; - - yyg->yy_start_stack_ptr = 0; - yyg->yy_start_stack_depth = 0; - yyg->yy_start_stack = NULL; - -/* Defined in main.c */ -#ifdef YY_STDINIT - yyin = stdin; - yyout = stdout; -#else - yyin = (FILE *) 0; - yyout = (FILE *) 0; -#endif - - /* For future reference: Set errno on error, since we are called by - * augl_lex_init() - */ - return 0; -} - -/* augl_lex_destroy is for both reentrant and non-reentrant scanners. */ -int augl_lex_destroy (yyscan_t yyscanner) -{ - struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; - - /* Pop the buffer stack, destroying each element. */ - while(YY_CURRENT_BUFFER){ - augl__delete_buffer(YY_CURRENT_BUFFER ,yyscanner ); - YY_CURRENT_BUFFER_LVALUE = NULL; - augl_pop_buffer_state(yyscanner); - } - - /* Destroy the stack itself. */ - augl_free(yyg->yy_buffer_stack ,yyscanner); - yyg->yy_buffer_stack = NULL; - - /* Destroy the start condition stack. */ - augl_free(yyg->yy_start_stack ,yyscanner ); - yyg->yy_start_stack = NULL; - - /* Reset the globals. This is important in a non-reentrant scanner so the next time - * augl_lex() is called, initialization will occur. */ - yy_init_globals( yyscanner); - - /* Destroy the main struct (reentrant only). */ - augl_free ( yyscanner , yyscanner ); - yyscanner = NULL; - return 0; -} - -/* - * Internal utility routines. - */ - -#ifndef yytext_ptr -static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner) -{ - register int i; - for ( i = 0; i < n; ++i ) - s1[i] = s2[i]; -} -#endif - -#ifdef YY_NEED_STRLEN -static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner) -{ - register int n; - for ( n = 0; s[n]; ++n ) - ; - - return n; -} -#endif - -void *augl_alloc (yy_size_t size , yyscan_t yyscanner) -{ - return (void *) malloc( size ); -} - -void *augl_realloc (void * ptr, yy_size_t size , yyscan_t yyscanner) -{ - /* The cast to (char *) in the following accommodates both - * implementations that use char* generic pointers, and those - * that use void* generic pointers. It works with the latter - * because both ANSI C and C++ allow castless assignment from - * any pointer type to void*, and deal with argument conversions - * as though doing an assignment. - */ - return (void *) realloc( (char *) ptr, size ); -} - -void augl_free (void * ptr , yyscan_t yyscanner) -{ - free( (char *) ptr ); /* see augl_realloc() for (char *) cast */ -} - -#define YYTABLES_NAME "yytables" - -#line 181 "lexer.l" - - - -void augl_close_lexer(yyscan_t *scanner) { - FILE *fp = augl_get_in(scanner); - - if (fp != NULL) { - fclose(fp); - augl_set_in(NULL, scanner); - } -} - -int augl_init_lexer(struct state *state, yyscan_t *scanner) { - FILE *f; - struct string *name = state->info->filename; - - f = fopen(name->str, "r"); - if (f == NULL) - return -1; - - if (augl_lex_init(scanner) != 0) { - fclose(f); - return -1; - } - augl_set_extra(state, *scanner); - augl_set_in(f, *scanner); - return 0; -} - -struct info *augl_get_info(yyscan_t scanner) { - return augl_get_extra(scanner)->info; -} - diff --git a/src/parser.c b/src/parser.c deleted file mode 100644 index 3aa3ef7..0000000 --- a/src/parser.c +++ /dev/null @@ -1,2694 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison implementation for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - -/* C LALR(1) parser skeleton written by Richard Stallman, by - simplifying the original so-called "semantic" parser. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -/* Identify Bison output. */ -#define YYBISON 1 - -/* Bison version. */ -#define YYBISON_VERSION "2.5" - -/* Skeleton name. */ -#define YYSKELETON_NAME "yacc.c" - -/* Pure parsers. */ -#define YYPURE 1 - -/* Push parsers. */ -#define YYPUSH 0 - -/* Pull parsers. */ -#define YYPULL 1 - -/* Using locations. */ -#define YYLSP_NEEDED 1 - -/* Substitute the variable and function names. */ -#define yyparse augl_parse -#define yylex augl_lex -#define yyerror augl_error -#define yylval augl_lval -#define yychar augl_char -#define yydebug augl_debug -#define yynerrs augl_nerrs -#define yylloc augl_lloc - -/* Copy the first part of user declarations. */ - -/* Line 268 of yacc.c */ -#line 1 "parser.y" - - -#include - -#include "internal.h" -#include "syntax.h" -#include "list.h" -#include "errcode.h" -#include - -/* Work around a problem on FreeBSD where Bison looks for _STDLIB_H - * to see if stdlib.h has been included, but the system includes - * use _STDLIB_H_ - */ -#if HAVE_STDLIB_H && ! defined _STDLIB_H -# include -# define _STDLIB_H 1 -#endif - -#define YYDEBUG 1 - -int augl_parse_file(struct augeas *aug, const char *name, struct term **term); - -typedef void *yyscan_t; -typedef struct info YYLTYPE; -#define YYLTYPE_IS_DECLARED 1 -/* The lack of reference counting on filename is intentional */ -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do { \ - (Current).filename = augl_get_info(scanner)->filename; \ - (Current).error = augl_get_info(scanner)->error; \ - if (YYID (N)) { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } else { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - } while (0) - - -/* Line 268 of yacc.c */ -#line 125 "parser.c" - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 1 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - DQUOTED = 258, - REGEXP = 259, - LIDENT = 260, - UIDENT = 261, - QIDENT = 262, - ARROW = 263, - KW_MODULE = 264, - KW_AUTOLOAD = 265, - KW_LET = 266, - KW_LET_REC = 267, - KW_IN = 268, - KW_STRING = 269, - KW_REGEXP = 270, - KW_LENS = 271, - KW_TEST = 272, - KW_GET = 273, - KW_PUT = 274, - KW_AFTER = 275 - }; -#endif -/* Tokens. */ -#define DQUOTED 258 -#define REGEXP 259 -#define LIDENT 260 -#define UIDENT 261 -#define QIDENT 262 -#define ARROW 263 -#define KW_MODULE 264 -#define KW_AUTOLOAD 265 -#define KW_LET 266 -#define KW_LET_REC 267 -#define KW_IN 268 -#define KW_STRING 269 -#define KW_REGEXP 270 -#define KW_LENS 271 -#define KW_TEST 272 -#define KW_GET 273 -#define KW_PUT 274 -#define KW_AFTER 275 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 293 of yacc.c */ -#line 89 "parser.y" - - struct term *term; - struct type *type; - struct ident *ident; - struct tree *tree; - char *string; - struct { - int nocase; - char *pattern; - } regexp; - int intval; - enum quant_tag quant; - - - -/* Line 293 of yacc.c */ -#line 217 "parser.c" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - -/* "%code provides" blocks. */ - -/* Line 340 of yacc.c */ -#line 46 "parser.y" - -#include "info.h" - -/* Track custom scanner state */ -struct state { - struct info *info; - unsigned int comment_depth; -}; - - - - -/* Line 340 of yacc.c */ -#line 254 "parser.c" - -/* Copy the second part of user declarations. */ - -/* Line 343 of yacc.c */ -#line 114 "parser.y" - -/* Lexer */ -extern int augl_lex (YYSTYPE * yylval_param,struct info * yylloc_param ,yyscan_t yyscanner); -int augl_init_lexer(struct state *state, yyscan_t * scanner); -void augl_close_lexer(yyscan_t *scanner); -int augl_lex_destroy (yyscan_t yyscanner ); -int augl_get_lineno (yyscan_t yyscanner ); -int augl_get_column (yyscan_t yyscanner); -struct info *augl_get_info(yyscan_t yyscanner); -char *augl_get_text (yyscan_t yyscanner ); - -static void augl_error(struct info *locp, struct term **term, - yyscan_t scanner, const char *s); - -/* TERM construction */ - static struct info *clone_info(struct info *locp); - static struct term *make_module(char *ident, char *autoload, - struct term *decls, - struct info *locp); - - static struct term *make_bind(char *ident, struct term *params, - struct term *exp, struct term *decls, - struct info *locp); - static struct term *make_bind_rec(char *ident, struct term *exp, - struct term *decls, struct info *locp); - static struct term *make_let(char *ident, struct term *params, - struct term *exp, struct term *body, - struct info *locp); - static struct term *make_binop(enum term_tag tag, - struct term *left, struct term *right, - struct info *locp); - static struct term *make_unop(enum term_tag tag, - struct term *exp, struct info *locp); - static struct term *make_ident(char *qname, struct info *locp); - static struct term *make_unit_term(struct info *locp); - static struct term *make_string_term(char *value, struct info *locp); - static struct term *make_regexp_term(char *pattern, - int nocase, struct info *locp); - static struct term *make_rep(struct term *exp, enum quant_tag quant, - struct info *locp); - - static struct term *make_get_test(struct term *lens, struct term *arg, - struct info *info); - static struct term *make_put_test(struct term *lens, struct term *arg, - struct term *cmds, struct info *info); - static struct term *make_test(struct term *test, struct term *result, - enum test_result_tag tr_tag, - struct term *decls, struct info *locp); - static struct term *make_tree_value(struct tree *, struct info*); - static struct tree *tree_concat(struct tree *, struct tree *); - -#define LOC_MERGE(a, b, c) \ - do { \ - (a).filename = (b).filename; \ - (a).first_line = (b).first_line; \ - (a).first_column = (b).first_column; \ - (a).last_line = (c).last_line; \ - (a).last_column = (c).last_column; \ - (a).error = (b).error; \ - } while(0); - - - -/* Line 343 of yacc.c */ -#line 324 "parser.c" - -#ifdef short -# undef short -#endif - -#ifdef YYTYPE_UINT8 -typedef YYTYPE_UINT8 yytype_uint8; -#else -typedef unsigned char yytype_uint8; -#endif - -#ifdef YYTYPE_INT8 -typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; -#else -typedef short int yytype_int8; -#endif - -#ifdef YYTYPE_UINT16 -typedef YYTYPE_UINT16 yytype_uint16; -#else -typedef unsigned short int yytype_uint16; -#endif - -#ifdef YYTYPE_INT16 -typedef YYTYPE_INT16 yytype_int16; -#else -typedef short int yytype_int16; -#endif - -#ifndef YYSIZE_T -# ifdef __SIZE_TYPE__ -# define YYSIZE_T __SIZE_TYPE__ -# elif defined size_t -# define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# else -# define YYSIZE_T unsigned int -# endif -#endif - -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) - -#ifndef YY_ -# if defined YYENABLE_NLS && YYENABLE_NLS -# if ENABLE_NLS -# include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) -# endif -# endif -# ifndef YY_ -# define YY_(msgid) msgid -# endif -#endif - -/* Suppress unused-variable warnings by "using" E. */ -#if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) -#else -# define YYUSE(e) /* empty */ -#endif - -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int yyi) -#else -static int -YYID (yyi) - int yyi; -#endif -{ - return yyi; -} -#endif - -#if ! defined yyoverflow || YYERROR_VERBOSE - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# ifdef YYSTACK_USE_ALLOCA -# if YYSTACK_USE_ALLOCA -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# elif defined __BUILTIN_VA_ARG_INCR -# include /* INFRINGES ON USER NAME SPACE */ -# elif defined _AIX -# define YYSTACK_ALLOC __alloca -# elif defined _MSC_VER -# include /* INFRINGES ON USER NAME SPACE */ -# define alloca _alloca -# else -# define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) -# ifndef YYSTACK_ALLOC_MAXIMUM - /* The OS might guarantee only one guard page at the bottom of the stack, - and a page size can be as small as 4096 bytes. So we cannot safely - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number - to allow for a few compiler-allocated temporary stack slots. */ -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ -# endif -# else -# define YYSTACK_ALLOC YYMALLOC -# define YYSTACK_FREE YYFREE -# ifndef YYSTACK_ALLOC_MAXIMUM -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM -# endif -# if (defined __cplusplus && ! defined EXIT_SUCCESS \ - && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) -# include /* INFRINGES ON USER NAME SPACE */ -# ifndef EXIT_SUCCESS -# define EXIT_SUCCESS 0 -# endif -# endif -# ifndef YYMALLOC -# define YYMALLOC malloc -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# ifndef YYFREE -# define YYFREE free -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -void free (void *); /* INFRINGES ON USER NAME SPACE */ -# endif -# endif -# endif -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ - - -#if (! defined yyoverflow \ - && (! defined __cplusplus \ - || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ - && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) - -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - yytype_int16 yyss_alloc; - YYSTYPE yyvs_alloc; - YYLTYPE yyls_alloc; -}; - -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAXIMUM) - -# define YYCOPY_NEEDED 1 - -/* Relocate STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ - Stack = &yyptr->Stack_alloc; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) - -#endif - -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif -#endif /* !YYCOPY_NEEDED */ - -/* YYFINAL -- State number of the termination state. */ -#define YYFINAL 4 -/* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 129 - -/* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 36 -/* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 25 -/* YYNRULES -- Number of rules. */ -#define YYNRULES 61 -/* YYNRULES -- Number of states. */ -#define YYNSTATES 113 - -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ -#define YYUNDEFTOK 2 -#define YYMAXUTOK 275 - -#define YYTRANSLATE(YYX) \ - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) - -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ -static const yytype_uint8 yytranslate[] = -{ - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 28, 29, 23, 32, 2, 26, 27, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 33, 24, - 2, 21, 2, 22, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 30, 2, 31, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 34, 25, 35, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, - 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20 -}; - -#if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint8 yyprhs[] = -{ - 0, 0, 3, 9, 12, 13, 20, 26, 32, 38, - 39, 43, 49, 51, 53, 61, 63, 67, 69, 73, - 75, 77, 81, 83, 87, 89, 92, 94, 96, 98, - 100, 104, 108, 111, 114, 116, 118, 120, 122, 124, - 126, 128, 130, 133, 134, 140, 142, 144, 146, 150, - 152, 154, 156, 158, 162, 167, 171, 176, 177, 180, - 185, 187 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 37, 0, -1, 9, 6, 21, 38, 39, -1, 10, - 5, -1, -1, 11, 5, 52, 21, 42, 39, -1, - 12, 5, 21, 42, 39, -1, 17, 40, 21, 42, - 39, -1, 17, 40, 21, 41, 39, -1, -1, 48, - 18, 42, -1, 48, 19, 48, 20, 42, -1, 22, - -1, 23, -1, 11, 5, 52, 21, 42, 13, 42, - -1, 43, -1, 43, 24, 44, -1, 44, -1, 44, - 25, 45, -1, 45, -1, 57, -1, 45, 26, 46, - -1, 46, -1, 46, 27, 47, -1, 47, -1, 47, - 49, -1, 49, -1, 51, -1, 3, -1, 4, -1, - 28, 42, 29, -1, 30, 42, 31, -1, 28, 29, - -1, 48, 50, -1, 48, -1, 23, -1, 32, -1, - 22, -1, 5, -1, 7, -1, 18, -1, 19, -1, - 53, 52, -1, -1, 28, 54, 33, 55, 29, -1, - 5, -1, 18, -1, 19, -1, 56, 8, 55, -1, - 56, -1, 14, -1, 15, -1, 16, -1, 28, 55, - 29, -1, 57, 34, 59, 35, -1, 34, 59, 35, - -1, 58, 34, 59, 35, -1, -1, 60, 58, -1, - 60, 21, 3, 58, -1, 3, -1, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const yytype_uint16 yyrline[] = -{ - 0, 179, 179, 182, 185, 187, 192, 197, 202, 208, - 212, 214, 217, 219, 223, 228, 230, 232, 235, 237, - 239, 242, 244, 247, 249, 252, 254, 257, 259, 261, - 263, 265, 267, 270, 272, 275, 277, 279, 282, 284, - 286, 288, 291, 294, 296, 299, 301, 303, 306, 308, - 311, 313, 315, 317, 320, 322, 325, 330, 332, 336, - 340, 342 -}; -#endif - -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. - First, the terminals, then, starting at YYNTOKENS, nonterminals. */ -static const char *const yytname[] = -{ - "$end", "error", "$undefined", "DQUOTED", "REGEXP", "LIDENT", "UIDENT", - "QIDENT", "ARROW", "KW_MODULE", "KW_AUTOLOAD", "KW_LET", "KW_LET_REC", - "KW_IN", "KW_STRING", "KW_REGEXP", "KW_LENS", "KW_TEST", "KW_GET", - "KW_PUT", "KW_AFTER", "'='", "'?'", "'*'", "';'", "'|'", "'-'", "'.'", - "'('", "')'", "'['", "']'", "'+'", "':'", "'{'", "'}'", "$accept", - "start", "autoload", "decls", "test_exp", "test_special_res", "exp", - "composeexp", "unionexp", "minusexp", "catexp", "appexp", "aexp", "rexp", - "rep", "qid", "param_list", "param", "id", "type", "atype", "tree_const", - "tree_const2", "tree_branch", "tree_label", 0 -}; -#endif - -# ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ -static const yytype_uint16 yytoknum[] = -{ - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, - 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, - 275, 61, 63, 42, 59, 124, 45, 46, 40, 41, - 91, 93, 43, 58, 123, 125 -}; -# endif - -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 36, 37, 38, 38, 39, 39, 39, 39, 39, - 40, 40, 41, 41, 42, 42, 43, 43, 44, 44, - 44, 45, 45, 46, 46, 47, 47, 48, 48, 48, - 48, 48, 48, 49, 49, 50, 50, 50, 51, 51, - 51, 51, 52, 52, 53, 54, 54, 54, 55, 55, - 56, 56, 56, 56, 57, 57, 58, 58, 59, 59, - 60, 60 -}; - -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = -{ - 0, 2, 5, 2, 0, 6, 5, 5, 5, 0, - 3, 5, 1, 1, 7, 1, 3, 1, 3, 1, - 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, - 3, 3, 2, 2, 1, 1, 1, 1, 1, 1, - 1, 1, 2, 0, 5, 1, 1, 1, 3, 1, - 1, 1, 1, 3, 4, 3, 4, 0, 2, 4, - 1, 0 -}; - -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. - Performed when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ -static const yytype_uint8 yydefact[] = -{ - 0, 0, 0, 0, 1, 4, 0, 9, 3, 0, - 0, 0, 2, 43, 0, 28, 29, 38, 39, 40, - 41, 0, 0, 0, 0, 27, 0, 0, 43, 0, - 0, 32, 61, 0, 15, 17, 19, 22, 24, 34, - 26, 20, 0, 0, 0, 0, 45, 46, 47, 0, - 0, 42, 9, 43, 60, 0, 57, 30, 0, 0, - 0, 0, 25, 37, 35, 36, 33, 61, 31, 12, - 13, 9, 9, 10, 0, 0, 9, 6, 0, 55, - 0, 58, 16, 18, 21, 23, 0, 8, 7, 0, - 50, 51, 52, 0, 0, 49, 5, 0, 57, 61, - 54, 11, 0, 44, 0, 0, 59, 0, 53, 48, - 0, 56, 14 -}; - -/* YYDEFGOTO[NTERM-NUM]. */ -static const yytype_int8 yydefgoto[] = -{ - -1, 2, 7, 12, 23, 71, 33, 34, 35, 36, - 37, 38, 39, 40, 66, 25, 27, 28, 49, 94, - 95, 41, 81, 55, 56 -}; - -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -90 -static const yytype_int8 yypact[] = -{ - -1, 8, 16, -4, -90, 14, 26, 53, -90, 27, - 29, 92, -90, 11, 25, -90, -90, -90, -90, -90, - -90, 50, 55, 28, -6, -90, 1, 30, 11, 55, - 38, -90, 44, 34, 52, 57, 51, 59, 92, 49, - -90, 64, 56, 22, 55, 92, -90, -90, -90, 60, - 55, -90, 53, 11, -90, 65, 80, -90, 87, 92, - 92, 92, -90, -90, -90, -90, -90, 44, -90, -90, - -90, 53, 53, -90, 82, -5, 53, -90, 83, -90, - 100, 73, 57, 51, 59, 92, 74, -90, -90, 55, - -90, -90, -90, -5, 79, 104, -90, 55, -90, 44, - -90, -90, 84, -90, -5, 101, 73, 81, -90, -90, - 55, -90, -90 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int8 yypgoto[] = -{ - -90, -90, -90, -34, -90, -90, -22, -90, 61, 66, - 58, 62, -9, -37, -90, -90, -23, -90, -90, -89, - -90, -90, 31, -64, -90 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -1 -static const yytype_uint8 yytable[] = -{ - 42, 62, 24, 86, 102, 51, 46, 52, 1, 90, - 91, 92, 44, 45, 3, 109, 4, 5, 77, 47, - 48, 72, 73, 93, 6, 15, 16, 17, 76, 18, - 78, 8, 13, 30, 14, 107, 74, 87, 88, 26, - 19, 20, 96, 53, 69, 70, 29, 54, 62, 43, - 21, 50, 22, 15, 16, 17, 32, 18, 15, 16, - 17, 30, 18, 57, 9, 10, 30, 101, 19, 20, - 11, 63, 64, 19, 20, 105, 58, 60, 21, 31, - 22, 65, 59, 21, 32, 22, 61, 68, 112, 32, - 15, 16, 17, 75, 18, 15, 16, 17, 67, 18, - 79, 80, 89, 98, 97, 19, 20, 99, 103, 100, - 19, 20, 104, 108, 110, 21, 111, 22, 84, 82, - 21, 32, 22, 85, 0, 83, 0, 0, 0, 106 -}; - -#define yypact_value_is_default(yystate) \ - ((yystate) == (-90)) - -#define yytable_value_is_error(yytable_value) \ - YYID (0) - -static const yytype_int8 yycheck[] = -{ - 22, 38, 11, 67, 93, 28, 5, 29, 9, 14, - 15, 16, 18, 19, 6, 104, 0, 21, 52, 18, - 19, 43, 44, 28, 10, 3, 4, 5, 50, 7, - 53, 5, 5, 11, 5, 99, 45, 71, 72, 28, - 18, 19, 76, 5, 22, 23, 21, 3, 85, 21, - 28, 21, 30, 3, 4, 5, 34, 7, 3, 4, - 5, 11, 7, 29, 11, 12, 11, 89, 18, 19, - 17, 22, 23, 18, 19, 97, 24, 26, 28, 29, - 30, 32, 25, 28, 34, 30, 27, 31, 110, 34, - 3, 4, 5, 33, 7, 3, 4, 5, 34, 7, - 35, 21, 20, 3, 21, 18, 19, 34, 29, 35, - 18, 19, 8, 29, 13, 28, 35, 30, 60, 58, - 28, 34, 30, 61, -1, 59, -1, -1, -1, 98 -}; - -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ -static const yytype_uint8 yystos[] = -{ - 0, 9, 37, 6, 0, 21, 10, 38, 5, 11, - 12, 17, 39, 5, 5, 3, 4, 5, 7, 18, - 19, 28, 30, 40, 48, 51, 28, 52, 53, 21, - 11, 29, 34, 42, 43, 44, 45, 46, 47, 48, - 49, 57, 42, 21, 18, 19, 5, 18, 19, 54, - 21, 52, 42, 5, 3, 59, 60, 29, 24, 25, - 26, 27, 49, 22, 23, 32, 50, 34, 31, 22, - 23, 41, 42, 42, 48, 33, 42, 39, 52, 35, - 21, 58, 44, 45, 46, 47, 59, 39, 39, 20, - 14, 15, 16, 28, 55, 56, 39, 21, 3, 34, - 35, 42, 55, 29, 8, 42, 58, 59, 29, 55, - 13, 35, 42 -}; - -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 - -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab - - -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. However, - YYFAIL appears to be in use. Nevertheless, it is formally deprecated - in Bison 2.4.2's NEWS entry, where a plan to phase it out is - discussed. */ - -#define YYFAIL goto yyerrlab -#if defined YYFAIL - /* This is here to suppress warnings from the GCC cpp's - -Wunused-macros. Normally we don't worry about that warning, but - some users do, and we want to make it easy for users to remove - YYFAIL uses, which will produce warnings from Bison 2.5. */ -#endif - -#define YYRECOVERING() (!!yyerrstatus) - -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ - yyerror (&yylloc, term, scanner, YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif - - -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif - - -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -#else -# define YYLEX yylex (&yylval, &yylloc, scanner) -#endif - -/* Enable debugging if requested. */ -#if YYDEBUG - -# ifndef YYFPRINTF -# include /* INFRINGES ON USER NAME SPACE */ -# define YYFPRINTF fprintf -# endif - -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) - -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value, Location, term, scanner); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct term **term, yyscan_t scanner) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, term, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct term **term; - yyscan_t scanner; -#endif -{ - if (!yyvaluep) - return; - YYUSE (yylocationp); - YYUSE (term); - YYUSE (scanner); -# ifdef YYPRINT - if (yytype < YYNTOKENS) - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); -# endif - switch (yytype) - { - default: - break; - } -} - - -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, struct term **term, yyscan_t scanner) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, term, scanner) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; - YYLTYPE const * const yylocationp; - struct term **term; - yyscan_t scanner; -#endif -{ - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); - - YY_LOCATION_PRINT (yyoutput, *yylocationp); - YYFPRINTF (yyoutput, ": "); - yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, term, scanner); - YYFPRINTF (yyoutput, ")"); -} - -/*------------------------------------------------------------------. -| yy_stack_print -- Print the state stack from its BOTTOM up to its | -| TOP (included). | -`------------------------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) -#else -static void -yy_stack_print (yybottom, yytop) - yytype_int16 *yybottom; - yytype_int16 *yytop; -#endif -{ - YYFPRINTF (stderr, "Stack now"); - for (; yybottom <= yytop; yybottom++) - { - int yybot = *yybottom; - YYFPRINTF (stderr, " %d", yybot); - } - YYFPRINTF (stderr, "\n"); -} - -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) - - -/*------------------------------------------------. -| Report that the YYRULE is going to be reduced. | -`------------------------------------------------*/ - -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, struct term **term, yyscan_t scanner) -#else -static void -yy_reduce_print (yyvsp, yylsp, yyrule, term, scanner) - YYSTYPE *yyvsp; - YYLTYPE *yylsp; - int yyrule; - struct term **term; - yyscan_t scanner; -#endif -{ - int yynrhs = yyr2[yyrule]; - int yyi; - unsigned long int yylno = yyrline[yyrule]; - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); - /* The symbols being reduced. */ - for (yyi = 0; yyi < yynrhs; yyi++) - { - YYFPRINTF (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - , &(yylsp[(yyi + 1) - (yynrhs)]) , term, scanner); - YYFPRINTF (stderr, "\n"); - } -} - -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, yylsp, Rule, term, scanner); \ -} while (YYID (0)) - -/* Nonzero means print parse trace. It is left uninitialized so that - multiple parsers can coexist. */ -int yydebug; -#else /* !YYDEBUG */ -# define YYDPRINTF(Args) -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) -# define YY_STACK_PRINT(Bottom, Top) -# define YY_REDUCE_PRINT(Rule) -#endif /* !YYDEBUG */ - - -/* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH -# define YYINITDEPTH 200 -#endif - -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only - if the built-in stack extension method is used). - - Do not make this value too large; the results are undefined if - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) - evaluated with infinite-precision integer arithmetic. */ - -#ifndef YYMAXDEPTH -# define YYMAXDEPTH 10000 -#endif - - -#if YYERROR_VERBOSE - -# ifndef yystrlen -# if defined __GLIBC__ && defined _STRING_H -# define yystrlen strlen -# else -/* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static YYSIZE_T -yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif -{ - YYSIZE_T yylen; - for (yylen = 0; yystr[yylen]; yylen++) - continue; - return yylen; -} -# endif -# endif - -# ifndef yystpcpy -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE -# define yystpcpy stpcpy -# else -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in - YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static char * -yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif -{ - char *yyd = yydest; - const char *yys = yysrc; - - while ((*yyd++ = *yys++) != '\0') - continue; - - return yyd - 1; -} -# endif -# endif - -# ifndef yytnamerr -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary - quotes and backslashes, so that it's suitable for yyerror. The - heuristic is that double-quoting is unnecessary unless the string - contains an apostrophe, a comma, or backslash (other than - backslash-backslash). YYSTR is taken from yytname. If YYRES is - null, do not copy; instead, return the length of what the result - would have been. */ -static YYSIZE_T -yytnamerr (char *yyres, const char *yystr) -{ - if (*yystr == '"') - { - YYSIZE_T yyn = 0; - char const *yyp = yystr; - - for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } - do_not_strip_quotes: ; - } - - if (! yyres) - return yystrlen (yystr); - - return yystpcpy (yyres, yystr) - yyres; -} -# endif - -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message - about the unexpected token YYTOKEN for the state stack whose top is - YYSSP. - - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is - not large enough to hold the message. In that case, also set - *YYMSG_ALLOC to the required number of bytes. Return 2 if the - required number of bytes is too large to store. */ -static int -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, - yytype_int16 *yyssp, int yytoken) -{ - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - /* Internationalized format string. */ - const char *yyformat = 0; - /* Arguments of yyformat. */ - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - /* Number of reported tokens (one for the "unexpected", one per - "expected"). */ - int yycount = 0; - - /* There are many possibilities here to consider: - - Assume YYFAIL is not used. It's too flawed to consider. See - - for details. YYERROR is fine as it does not invoke this - function. - - If this state is a consistent state with a default action, then - the only way this function was invoked is if the default action - is an error action. In that case, don't check for expected - tokens because there are none. - - The only way there can be no lookahead present (in yychar) is if - this state is a consistent state with a default action. Thus, - detecting the absence of a lookahead is sufficient to determine - that there is no unexpected or expected token to report. In that - case, just report a simple "syntax error". - - Don't assume there isn't a lookahead just because this state is a - consistent state with a default action. There might have been a - previous inconsistent state, consistent state with a non-default - action, or user semantic action that manipulated yychar. - - Of course, the expected token list depends on states to have - correct lookahead information, and it depends on the parser not - to perform extra reductions after fetching a lookahead from the - scanner and before detecting a syntax error. Thus, state merging - (from LALR or IELR) and default reductions corrupt the expected - token list. However, the list is correct for canonical LR with - one exception: it will still contain any token that will not be - accepted due to an error action in a later state. - */ - if (yytoken != YYEMPTY) - { - int yyn = yypact[*yyssp]; - yyarg[yycount++] = yytname[yytoken]; - if (!yypact_value_is_default (yyn)) - { - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. In other words, skip the first -YYN actions for - this state because they are default actions. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yyx; - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR - && !yytable_value_is_error (yytable[yyx + yyn])) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - if (! (yysize <= yysize1 - && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - } - } - } - - switch (yycount) - { -# define YYCASE_(N, S) \ - case N: \ - yyformat = S; \ - break - YYCASE_(0, YY_("syntax error")); - YYCASE_(1, YY_("syntax error, unexpected %s")); - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); -# undef YYCASE_ - } - - yysize1 = yysize + yystrlen (yyformat); - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) - return 2; - yysize = yysize1; - - if (*yymsg_alloc < yysize) - { - *yymsg_alloc = 2 * yysize; - if (! (yysize <= *yymsg_alloc - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; - return 1; - } - - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - { - char *yyp = *yymsg; - int yyi = 0; - while ((*yyp = *yyformat) != '\0') - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyformat += 2; - } - else - { - yyp++; - yyformat++; - } - } - return 0; -} -#endif /* YYERROR_VERBOSE */ - -/*-----------------------------------------------. -| Release the memory associated to this symbol. | -`-----------------------------------------------*/ - -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static void -yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, struct term **term, yyscan_t scanner) -#else -static void -yydestruct (yymsg, yytype, yyvaluep, yylocationp, term, scanner) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; - YYLTYPE *yylocationp; - struct term **term; - yyscan_t scanner; -#endif -{ - YYUSE (yyvaluep); - YYUSE (yylocationp); - YYUSE (term); - YYUSE (scanner); - - if (!yymsg) - yymsg = "Deleting"; - YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - - switch (yytype) - { - - default: - break; - } -} - - -/* Prevent warnings from -Wmissing-prototypes. */ -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (struct term **term, yyscan_t scanner); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ - - -/*----------. -| yyparse. | -`----------*/ - -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (struct term **term, yyscan_t scanner) -#else -int -yyparse (term, scanner) - struct term **term; - yyscan_t scanner; -#endif -#endif -{ -/* The lookahead symbol. */ -int yychar; - -/* The semantic value of the lookahead symbol. */ -YYSTYPE yylval; - -/* Location data for the lookahead symbol. */ -YYLTYPE yylloc; - - /* Number of syntax errors so far. */ - int yynerrs; - - int yystate; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - - /* The stacks and their tools: - `yyss': related to states. - `yyvs': related to semantic values. - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs; - YYSTYPE *yyvsp; - - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls; - YYLTYPE *yylsp; - - /* The locations where the error started and ended. */ - YYLTYPE yyerror_range[3]; - - YYSIZE_T yystacksize; - - int yyn; - int yyresult; - /* Lookahead token as an internal (translated) token number. */ - int yytoken; - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - YYLTYPE yyloc; - -#if YYERROR_VERBOSE - /* Buffer for error messages, and its allocated size. */ - char yymsgbuf[128]; - char *yymsg = yymsgbuf; - YYSIZE_T yymsg_alloc = sizeof yymsgbuf; -#endif - -#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) - - /* The number of symbols on the RHS of the reduced rule. - Keep to zero when no symbol should be popped. */ - int yylen = 0; - - yytoken = 0; - yyss = yyssa; - yyvs = yyvsa; - yyls = yylsa; - yystacksize = YYINITDEPTH; - - YYDPRINTF ((stderr, "Starting parse\n")); - - yystate = 0; - yyerrstatus = 0; - yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - yyssp = yyss; - yyvsp = yyvs; - yylsp = yyls; - -#if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL - /* Initialize the default location before parsing starts. */ - yylloc.first_line = yylloc.last_line = 1; - yylloc.first_column = yylloc.last_column = 1; -#endif - -/* User initialization code. */ - -/* Line 1590 of yacc.c */ -#line 66 "parser.y" -{ - yylloc.first_line = 1; - yylloc.first_column = 0; - yylloc.last_line = 1; - yylloc.last_column = 0; - yylloc.filename = augl_get_info(scanner)->filename; - yylloc.error = augl_get_info(scanner)->error; -} - -/* Line 1590 of yacc.c */ -#line 1535 "parser.c" - yylsp[0] = yylloc; - - goto yysetstate; - -/*------------------------------------------------------------. -| yynewstate -- Push a new state, which is found in yystate. | -`------------------------------------------------------------*/ - yynewstate: - /* In all cases, when you get here, the value and location stacks - have just been pushed. So pushing a state here evens the stacks. */ - yyssp++; - - yysetstate: - *yyssp = yystate; - - if (yyss + yystacksize - 1 <= yyssp) - { - /* Get the current used size of the three stacks, in elements. */ - YYSIZE_T yysize = yyssp - yyss + 1; - -#ifdef yyoverflow - { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - YYLTYPE *yyls1 = yyls; - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - - yyls = yyls1; - yyss = yyss1; - yyvs = yyvs1; - } -#else /* no yyoverflow */ -# ifndef YYSTACK_RELOCATE - goto yyexhaustedlab; -# else - /* Extend the stack our own way. */ - if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; - yystacksize *= 2; - if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; - - { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss_alloc, yyss); - YYSTACK_RELOCATE (yyvs_alloc, yyvs); - YYSTACK_RELOCATE (yyls_alloc, yyls); -# undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); - } -# endif -#endif /* no yyoverflow */ - - yyssp = yyss + yysize - 1; - yyvsp = yyvs + yysize - 1; - yylsp = yyls + yysize - 1; - - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); - - if (yyss + yystacksize - 1 <= yyssp) - YYABORT; - } - - YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - - if (yystate == YYFINAL) - YYACCEPT; - - goto yybackup; - -/*-----------. -| yybackup. | -`-----------*/ -yybackup: - - /* Do appropriate processing given the current state. Read a - lookahead token if we need one and don't already have one. */ - - /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yypact_value_is_default (yyn)) - goto yydefault; - - /* Not known => get a lookahead token if don't already have one. */ - - /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ - if (yychar == YYEMPTY) - { - YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; - } - - if (yychar <= YYEOF) - { - yychar = yytoken = YYEOF; - YYDPRINTF ((stderr, "Now at end of input.\n")); - } - else - { - yytoken = YYTRANSLATE (yychar); - YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); - } - - /* If the proper action on seeing token YYTOKEN is to reduce or to - detect an error, take that action. */ - yyn += yytoken; - if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) - goto yydefault; - yyn = yytable[yyn]; - if (yyn <= 0) - { - if (yytable_value_is_error (yyn)) - goto yyerrlab; - yyn = -yyn; - goto yyreduce; - } - - /* Count tokens shifted since error; after three, turn off error - status. */ - if (yyerrstatus) - yyerrstatus--; - - /* Shift the lookahead token. */ - YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - - /* Discard the shifted token. */ - yychar = YYEMPTY; - - yystate = yyn; - *++yyvsp = yylval; - *++yylsp = yylloc; - goto yynewstate; - - -/*-----------------------------------------------------------. -| yydefault -- do the default action for the current state. | -`-----------------------------------------------------------*/ -yydefault: - yyn = yydefact[yystate]; - if (yyn == 0) - goto yyerrlab; - goto yyreduce; - - -/*-----------------------------. -| yyreduce -- Do a reduction. | -`-----------------------------*/ -yyreduce: - /* yyn is the number of a rule to reduce with. */ - yylen = yyr2[yyn]; - - /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. - - Otherwise, the following line sets YYVAL to garbage. - This behavior is undocumented and Bison - users should not rely upon it. Assigning to YYVAL - unconditionally makes the parser a bit smaller, and it avoids a - GCC warning that YYVAL may be used uninitialized. */ - yyval = yyvsp[1-yylen]; - - /* Default location. */ - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); - YY_REDUCE_PRINT (yyn); - switch (yyn) - { - case 2: - -/* Line 1806 of yacc.c */ -#line 180 "parser.y" - { (*term) = make_module((yyvsp[(2) - (5)].string), (yyvsp[(4) - (5)].string), (yyvsp[(5) - (5)].term), &(yylsp[(1) - (5)])); } - break; - - case 3: - -/* Line 1806 of yacc.c */ -#line 183 "parser.y" - { (yyval.string) = (yyvsp[(2) - (2)].string); } - break; - - case 4: - -/* Line 1806 of yacc.c */ -#line 185 "parser.y" - { (yyval.string) = NULL; } - break; - - case 5: - -/* Line 1806 of yacc.c */ -#line 188 "parser.y" - { - LOC_MERGE((yylsp[(1) - (6)]), (yylsp[(1) - (6)]), (yylsp[(5) - (6)])); - (yyval.term) = make_bind((yyvsp[(2) - (6)].string), (yyvsp[(3) - (6)].term), (yyvsp[(5) - (6)].term), (yyvsp[(6) - (6)].term), &(yylsp[(1) - (6)])); - } - break; - - case 6: - -/* Line 1806 of yacc.c */ -#line 193 "parser.y" - { - LOC_MERGE((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); - (yyval.term) = make_bind_rec((yyvsp[(2) - (5)].string), (yyvsp[(4) - (5)].term), (yyvsp[(5) - (5)].term), &(yylsp[(1) - (5)])); - } - break; - - case 7: - -/* Line 1806 of yacc.c */ -#line 198 "parser.y" - { - LOC_MERGE((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); - (yyval.term) = make_test((yyvsp[(2) - (5)].term), (yyvsp[(4) - (5)].term), TR_CHECK, (yyvsp[(5) - (5)].term), &(yylsp[(1) - (5)])); - } - break; - - case 8: - -/* Line 1806 of yacc.c */ -#line 203 "parser.y" - { - LOC_MERGE((yylsp[(1) - (5)]), (yylsp[(1) - (5)]), (yylsp[(4) - (5)])); - (yyval.term) = make_test((yyvsp[(2) - (5)].term), NULL, (yyvsp[(4) - (5)].intval), (yyvsp[(5) - (5)].term), &(yylsp[(1) - (5)])); - } - break; - - case 9: - -/* Line 1806 of yacc.c */ -#line 208 "parser.y" - { (yyval.term) = NULL; } - break; - - case 10: - -/* Line 1806 of yacc.c */ -#line 213 "parser.y" - { (yyval.term) = make_get_test((yyvsp[(1) - (3)].term), (yyvsp[(3) - (3)].term), &(yyloc)); } - break; - - case 11: - -/* Line 1806 of yacc.c */ -#line 215 "parser.y" - { (yyval.term) = make_put_test((yyvsp[(1) - (5)].term), (yyvsp[(3) - (5)].term), (yyvsp[(5) - (5)].term), &(yyloc)); } - break; - - case 12: - -/* Line 1806 of yacc.c */ -#line 218 "parser.y" - { (yyval.intval) = TR_PRINT; } - break; - - case 13: - -/* Line 1806 of yacc.c */ -#line 220 "parser.y" - { (yyval.intval) = TR_EXN; } - break; - - case 14: - -/* Line 1806 of yacc.c */ -#line 224 "parser.y" - { - LOC_MERGE((yylsp[(1) - (7)]), (yylsp[(1) - (7)]), (yylsp[(6) - (7)])); - (yyval.term) = make_let((yyvsp[(2) - (7)].string), (yyvsp[(3) - (7)].term), (yyvsp[(5) - (7)].term), (yyvsp[(7) - (7)].term), &(yylsp[(1) - (7)])); - } - break; - - case 16: - -/* Line 1806 of yacc.c */ -#line 231 "parser.y" - { (yyval.term) = make_binop(A_COMPOSE, (yyvsp[(1) - (3)].term), (yyvsp[(3) - (3)].term), &(yyloc)); } - break; - - case 17: - -/* Line 1806 of yacc.c */ -#line 233 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 18: - -/* Line 1806 of yacc.c */ -#line 236 "parser.y" - { (yyval.term) = make_binop(A_UNION, (yyvsp[(1) - (3)].term), (yyvsp[(3) - (3)].term), &(yyloc)); } - break; - - case 19: - -/* Line 1806 of yacc.c */ -#line 238 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 20: - -/* Line 1806 of yacc.c */ -#line 240 "parser.y" - { (yyval.term) = make_tree_value((yyvsp[(1) - (1)].tree), &(yylsp[(1) - (1)])); } - break; - - case 21: - -/* Line 1806 of yacc.c */ -#line 243 "parser.y" - { (yyval.term) = make_binop(A_MINUS, (yyvsp[(1) - (3)].term), (yyvsp[(3) - (3)].term), &(yyloc)); } - break; - - case 22: - -/* Line 1806 of yacc.c */ -#line 245 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 23: - -/* Line 1806 of yacc.c */ -#line 248 "parser.y" - { (yyval.term) = make_binop(A_CONCAT, (yyvsp[(1) - (3)].term), (yyvsp[(3) - (3)].term), &(yyloc)); } - break; - - case 24: - -/* Line 1806 of yacc.c */ -#line 250 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 25: - -/* Line 1806 of yacc.c */ -#line 253 "parser.y" - { (yyval.term) = make_binop(A_APP, (yyvsp[(1) - (2)].term), (yyvsp[(2) - (2)].term), &(yyloc)); } - break; - - case 26: - -/* Line 1806 of yacc.c */ -#line 255 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 27: - -/* Line 1806 of yacc.c */ -#line 258 "parser.y" - { (yyval.term) = make_ident((yyvsp[(1) - (1)].string), &(yylsp[(1) - (1)])); } - break; - - case 28: - -/* Line 1806 of yacc.c */ -#line 260 "parser.y" - { (yyval.term) = make_string_term((yyvsp[(1) - (1)].string), &(yylsp[(1) - (1)])); } - break; - - case 29: - -/* Line 1806 of yacc.c */ -#line 262 "parser.y" - { (yyval.term) = make_regexp_term((yyvsp[(1) - (1)].regexp).pattern, (yyvsp[(1) - (1)].regexp).nocase, &(yylsp[(1) - (1)])); } - break; - - case 30: - -/* Line 1806 of yacc.c */ -#line 264 "parser.y" - { (yyval.term) = (yyvsp[(2) - (3)].term); } - break; - - case 31: - -/* Line 1806 of yacc.c */ -#line 266 "parser.y" - { (yyval.term) = make_unop(A_BRACKET, (yyvsp[(2) - (3)].term), &(yyloc)); } - break; - - case 32: - -/* Line 1806 of yacc.c */ -#line 268 "parser.y" - { (yyval.term) = make_unit_term(&(yyloc)); } - break; - - case 33: - -/* Line 1806 of yacc.c */ -#line 271 "parser.y" - { (yyval.term) = make_rep((yyvsp[(1) - (2)].term), (yyvsp[(2) - (2)].quant), &(yyloc)); } - break; - - case 34: - -/* Line 1806 of yacc.c */ -#line 273 "parser.y" - { (yyval.term) = (yyvsp[(1) - (1)].term); } - break; - - case 35: - -/* Line 1806 of yacc.c */ -#line 276 "parser.y" - { (yyval.quant) = Q_STAR; } - break; - - case 36: - -/* Line 1806 of yacc.c */ -#line 278 "parser.y" - { (yyval.quant) = Q_PLUS; } - break; - - case 37: - -/* Line 1806 of yacc.c */ -#line 280 "parser.y" - { (yyval.quant) = Q_MAYBE; } - break; - - case 38: - -/* Line 1806 of yacc.c */ -#line 283 "parser.y" - { (yyval.string) = (yyvsp[(1) - (1)].string); } - break; - - case 39: - -/* Line 1806 of yacc.c */ -#line 285 "parser.y" - { (yyval.string) = (yyvsp[(1) - (1)].string); } - break; - - case 40: - -/* Line 1806 of yacc.c */ -#line 287 "parser.y" - { (yyval.string) = strdup("get"); } - break; - - case 41: - -/* Line 1806 of yacc.c */ -#line 289 "parser.y" - { (yyval.string) = strdup("put"); } - break; - - case 42: - -/* Line 1806 of yacc.c */ -#line 292 "parser.y" - { (yyval.term) = (yyvsp[(2) - (2)].term); list_cons((yyval.term), (yyvsp[(1) - (2)].term)); } - break; - - case 43: - -/* Line 1806 of yacc.c */ -#line 294 "parser.y" - { (yyval.term) = NULL; } - break; - - case 44: - -/* Line 1806 of yacc.c */ -#line 297 "parser.y" - { (yyval.term) = make_param((yyvsp[(2) - (5)].string), (yyvsp[(4) - (5)].type), clone_info(&(yylsp[(1) - (5)]))); } - break; - - case 45: - -/* Line 1806 of yacc.c */ -#line 300 "parser.y" - { (yyval.string) = (yyvsp[(1) - (1)].string); } - break; - - case 46: - -/* Line 1806 of yacc.c */ -#line 302 "parser.y" - { (yyval.string) = strdup("get"); } - break; - - case 47: - -/* Line 1806 of yacc.c */ -#line 304 "parser.y" - { (yyval.string) = strdup("put"); } - break; - - case 48: - -/* Line 1806 of yacc.c */ -#line 307 "parser.y" - { (yyval.type) = make_arrow_type((yyvsp[(1) - (3)].type), (yyvsp[(3) - (3)].type)); } - break; - - case 49: - -/* Line 1806 of yacc.c */ -#line 309 "parser.y" - { (yyval.type) = (yyvsp[(1) - (1)].type); } - break; - - case 50: - -/* Line 1806 of yacc.c */ -#line 312 "parser.y" - { (yyval.type) = make_base_type(T_STRING); } - break; - - case 51: - -/* Line 1806 of yacc.c */ -#line 314 "parser.y" - { (yyval.type) = make_base_type(T_REGEXP); } - break; - - case 52: - -/* Line 1806 of yacc.c */ -#line 316 "parser.y" - { (yyval.type) = make_base_type(T_LENS); } - break; - - case 53: - -/* Line 1806 of yacc.c */ -#line 318 "parser.y" - { (yyval.type) = (yyvsp[(2) - (3)].type); } - break; - - case 54: - -/* Line 1806 of yacc.c */ -#line 321 "parser.y" - { (yyval.tree) = tree_concat((yyvsp[(1) - (4)].tree), (yyvsp[(3) - (4)].tree)); } - break; - - case 55: - -/* Line 1806 of yacc.c */ -#line 323 "parser.y" - { (yyval.tree) = tree_concat((yyvsp[(2) - (3)].tree), NULL); } - break; - - case 56: - -/* Line 1806 of yacc.c */ -#line 326 "parser.y" - { - (yyval.tree) = tree_concat((yyvsp[(1) - (4)].tree), (yyvsp[(3) - (4)].tree)); - } - break; - - case 57: - -/* Line 1806 of yacc.c */ -#line 330 "parser.y" - { (yyval.tree) = NULL; } - break; - - case 58: - -/* Line 1806 of yacc.c */ -#line 333 "parser.y" - { - (yyval.tree) = make_tree((yyvsp[(1) - (2)].string), NULL, NULL, (yyvsp[(2) - (2)].tree)); - } - break; - - case 59: - -/* Line 1806 of yacc.c */ -#line 337 "parser.y" - { - (yyval.tree) = make_tree((yyvsp[(1) - (4)].string), (yyvsp[(3) - (4)].string), NULL, (yyvsp[(4) - (4)].tree)); - } - break; - - case 61: - -/* Line 1806 of yacc.c */ -#line 342 "parser.y" - { (yyval.string) = NULL; } - break; - - - -/* Line 1806 of yacc.c */ -#line 2150 "parser.c" - default: break; - } - /* User semantic actions sometimes alter yychar, and that requires - that yytoken be updated with the new translation. We take the - approach of translating immediately before every use of yytoken. - One alternative is translating here after every semantic action, - but that translation would be missed if the semantic action invokes - YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or - if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an - incorrect destructor might then be invoked immediately. In the - case of YYERROR or YYBACKUP, subsequent parser actions might lead - to an incorrect destructor call or verbose syntax error message - before the lookahead is translated. */ - YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); - - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - - *++yyvsp = yyval; - *++yylsp = yyloc; - - /* Now `shift' the result of the reduction. Determine what state - that goes to, based on the state we popped back to and the rule - number reduced by. */ - - yyn = yyr1[yyn]; - - yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; - if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) - yystate = yytable[yystate]; - else - yystate = yydefgoto[yyn - YYNTOKENS]; - - goto yynewstate; - - -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ -yyerrlab: - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); - - /* If not already recovering from an error, report this error. */ - if (!yyerrstatus) - { - ++yynerrs; -#if ! YYERROR_VERBOSE - yyerror (&yylloc, term, scanner, YY_("syntax error")); -#else -# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ - yyssp, yytoken) - { - char const *yymsgp = YY_("syntax error"); - int yysyntax_error_status; - yysyntax_error_status = YYSYNTAX_ERROR; - if (yysyntax_error_status == 0) - yymsgp = yymsg; - else if (yysyntax_error_status == 1) - { - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); - if (!yymsg) - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - yysyntax_error_status = 2; - } - else - { - yysyntax_error_status = YYSYNTAX_ERROR; - yymsgp = yymsg; - } - } - yyerror (&yylloc, term, scanner, yymsgp); - if (yysyntax_error_status == 2) - goto yyexhaustedlab; - } -# undef YYSYNTAX_ERROR -#endif - } - - yyerror_range[1] = yylloc; - - if (yyerrstatus == 3) - { - /* If just tried and failed to reuse lookahead token after an - error, discard it. */ - - if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } - else - { - yydestruct ("Error: discarding", - yytoken, &yylval, &yylloc, term, scanner); - yychar = YYEMPTY; - } - } - - /* Else will try to reuse lookahead token after shifting the error - token. */ - goto yyerrlab1; - - -/*---------------------------------------------------. -| yyerrorlab -- error raised explicitly by YYERROR. | -`---------------------------------------------------*/ -yyerrorlab: - - /* Pacify compilers like GCC when the user code never invokes - YYERROR and the label yyerrorlab therefore never appears in user - code. */ - if (/*CONSTCOND*/ 0) - goto yyerrorlab; - - yyerror_range[1] = yylsp[1-yylen]; - /* Do not reclaim the symbols of the rule which action triggered - this YYERROR. */ - YYPOPSTACK (yylen); - yylen = 0; - YY_STACK_PRINT (yyss, yyssp); - yystate = *yyssp; - goto yyerrlab1; - - -/*-------------------------------------------------------------. -| yyerrlab1 -- common code for both syntax error and YYERROR. | -`-------------------------------------------------------------*/ -yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ - - for (;;) - { - yyn = yypact[yystate]; - if (!yypact_value_is_default (yyn)) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } - - /* Pop the current state because it cannot handle the error token. */ - if (yyssp == yyss) - YYABORT; - - yyerror_range[1] = *yylsp; - yydestruct ("Error: popping", - yystos[yystate], yyvsp, yylsp, term, scanner); - YYPOPSTACK (1); - yystate = *yyssp; - YY_STACK_PRINT (yyss, yyssp); - } - - *++yyvsp = yylval; - - yyerror_range[2] = yylloc; - /* Using YYLLOC is tempting, but would change the location of - the lookahead. YYLOC is available though. */ - YYLLOC_DEFAULT (yyloc, yyerror_range, 2); - *++yylsp = yyloc; - - /* Shift the error token. */ - YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); - - yystate = yyn; - goto yynewstate; - - -/*-------------------------------------. -| yyacceptlab -- YYACCEPT comes here. | -`-------------------------------------*/ -yyacceptlab: - yyresult = 0; - goto yyreturn; - -/*-----------------------------------. -| yyabortlab -- YYABORT comes here. | -`-----------------------------------*/ -yyabortlab: - yyresult = 1; - goto yyreturn; - -#if !defined(yyoverflow) || YYERROR_VERBOSE -/*-------------------------------------------------. -| yyexhaustedlab -- memory exhaustion comes here. | -`-------------------------------------------------*/ -yyexhaustedlab: - yyerror (&yylloc, term, scanner, YY_("memory exhausted")); - yyresult = 2; - /* Fall through. */ -#endif - -yyreturn: - if (yychar != YYEMPTY) - { - /* Make sure we have latest lookahead translation. See comments at - user semantic actions for why this is necessary. */ - yytoken = YYTRANSLATE (yychar); - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval, &yylloc, term, scanner); - } - /* Do not reclaim the symbols of the rule which action triggered - this YYABORT or YYACCEPT. */ - YYPOPSTACK (yylen); - YY_STACK_PRINT (yyss, yyssp); - while (yyssp != yyss) - { - yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp, yylsp, term, scanner); - YYPOPSTACK (1); - } -#ifndef yyoverflow - if (yyss != yyssa) - YYSTACK_FREE (yyss); -#endif -#if YYERROR_VERBOSE - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); -#endif - /* Make sure YYID is used. */ - return YYID (yyresult); -} - - - -/* Line 2067 of yacc.c */ -#line 343 "parser.y" - - -int augl_parse_file(struct augeas *aug, const char *name, - struct term **term) { - yyscan_t scanner; - struct state state; - struct string *sname = NULL; - struct info info; - int result = -1; - int r; - - *term = NULL; - - r = make_ref(sname); - ERR_NOMEM(r < 0, aug); - - sname->str = strdup(name); - ERR_NOMEM(sname->str == NULL, aug); - - MEMZERO(&info, 1); - info.ref = UINT_MAX; - info.filename = sname; - info.error = aug->error; - - MEMZERO(&state, 1); - state.info = &info; - state.comment_depth = 0; - - if (augl_init_lexer(&state, &scanner) < 0) { - augl_error(&info, term, NULL, "file not found"); - goto error; - } - - yydebug = getenv("YYDEBUG") != NULL; - r = augl_parse(term, scanner); - augl_close_lexer(scanner); - augl_lex_destroy(scanner); - if (r == 1) { - augl_error(&info, term, NULL, "syntax error"); - goto error; - } else if (r == 2) { - augl_error(&info, term, NULL, "parser ran out of memory"); - ERR_NOMEM(1, aug); - } - result = 0; - - error: - unref(sname, string); - // free TERM - return result; -} - -// FIXME: Nothing here checks for alloc errors. -static struct info *clone_info(struct info *locp) { - struct info *info; - make_ref(info); - info->filename = ref(locp->filename); - info->first_line = locp->first_line; - info->first_column = locp->first_column; - info->last_line = locp->last_line; - info->last_column = locp->last_column; - info->error = locp->error; - return info; -} - -static struct term *make_term_locp(enum term_tag tag, struct info *locp) { - struct info *info = clone_info(locp); - return make_term(tag, info); -} - -static struct term *make_module(char *ident, char *autoload, - struct term *decls, - struct info *locp) { - struct term *term = make_term_locp(A_MODULE, locp); - term->mname = ident; - term->autoload = autoload; - term->decls = decls; - return term; -} - -static struct term *make_bind(char *ident, struct term *params, - struct term *exp, struct term *decls, - struct info *locp) { - struct term *term = make_term_locp(A_BIND, locp); - if (params != NULL) - exp = build_func(params, exp); - - term->bname = ident; - term->exp = exp; - list_cons(decls, term); - return decls; -} - -static struct term *make_bind_rec(char *ident, struct term *exp, - struct term *decls, struct info *locp) { - /* Desugar let rec IDENT = EXP as - * let IDENT = - * let RLENS = (lns_make_rec) in - * lns_check_rec ((lambda IDENT: EXP) RLENS) RLENS - * where RLENS is a brandnew recursive lens. - * - * That only works since we know that 'let rec' is only defined for lenses, - * not general purposes functions, i.e. we know that IDENT has type 'lens' - * - * The point of all this is that we make it possible to put a recursive - * lens (which is a placeholder for the actual recursion) into arbitrary - * places in some bigger lens and then have LNS_CHECK_REC rattle through - * to do the special-purpose typechecking. - */ - char *id; - struct info *info = exp->info; - struct term *lambda = NULL, *rlens = NULL; - struct term *app1 = NULL, *app2 = NULL, *app3 = NULL; - - id = strdup(ident); - if (id == NULL) goto error; - - lambda = make_param(id, make_base_type(T_LENS), ref(info)); - if (lambda == NULL) goto error; - id = NULL; - - build_func(lambda, exp); - - rlens = make_term(A_VALUE, ref(exp->info)); - if (rlens == NULL) goto error; - rlens->value = lns_make_rec(ref(exp->info)); - if (rlens->value == NULL) goto error; - rlens->type = make_base_type(T_LENS); - - app1 = make_app_term(lambda, rlens, ref(info)); - if (app1 == NULL) goto error; - - id = strdup(LNS_CHECK_REC_NAME); - if (id == NULL) goto error; - app2 = make_app_ident(id, app1, ref(info)); - if (app2 == NULL) goto error; - id = NULL; - - app3 = make_app_term(app2, ref(rlens), ref(info)); - if (app3 == NULL) goto error; - - return make_bind(ident, NULL, app3, decls, locp); - - error: - free(id); - unref(lambda, term); - unref(rlens, term); - unref(app1, term); - unref(app2, term); - unref(app3, term); - return NULL; -} - -static struct term *make_let(char *ident, struct term *params, - struct term *exp, struct term *body, - struct info *locp) { - /* let f (x:string) = "f " . x in - f "a" . f "b" */ - /* (lambda f: f "a" . f "b") (lambda x: "f " . x) */ - /* (lambda IDENT: BODY) (lambda PARAMS: EXP) */ - /* Desugar as (lambda IDENT: BODY) (lambda PARAMS: EXP) */ - struct term *term = make_term_locp(A_LET, locp); - struct term *p = make_param(ident, NULL, ref(term->info)); - term->left = build_func(p, body); - if (params != NULL) - term->right = build_func(params, exp); - else - term->right = exp; - return term; -} - -static struct term *make_binop(enum term_tag tag, - struct term *left, struct term *right, - struct info *locp) { - assert(tag == A_COMPOSE || tag == A_CONCAT - || tag == A_UNION || tag == A_APP || tag == A_MINUS); - struct term *term = make_term_locp(tag, locp); - term->left = left; - term->right = right; - return term; -} - -static struct term *make_unop(enum term_tag tag, struct term *exp, - struct info *locp) { - assert(tag == A_BRACKET); - struct term *term = make_term_locp(tag, locp); - term->brexp = exp; - return term; -} - -static struct term *make_ident(char *qname, struct info *locp) { - struct term *term = make_term_locp(A_IDENT, locp); - term->ident = make_string(qname); - return term; -} - -static struct term *make_unit_term(struct info *locp) { - struct term *term = make_term_locp(A_VALUE, locp); - term->value = make_unit(ref(term->info)); - term->type = make_base_type(T_UNIT); - return term; -} - -static struct term *make_string_term(char *value, struct info *locp) { - struct term *term = make_term_locp(A_VALUE, locp); - term->value = make_value(V_STRING, ref(term->info)); - term->value->string = make_string(value); - term->type = make_base_type(T_STRING); - return term; -} - -static struct term *make_regexp_term(char *pattern, int nocase, - struct info *locp) { - struct term *term = make_term_locp(A_VALUE, locp); - term->value = make_value(V_REGEXP, ref(term->info)); - term->type = make_base_type(T_REGEXP); - term->value->regexp = make_regexp(term->info, pattern, nocase); - return term; -} - -static struct term *make_rep(struct term *exp, enum quant_tag quant, - struct info *locp) { - struct term *term = make_term_locp(A_REP, locp); - term->quant = quant; - term->exp = exp; - return term; -} - -static struct term *make_get_test(struct term *lens, struct term *arg, - struct info *locp) { - /* Return a term for "get" LENS ARG */ - struct info *info = clone_info(locp); - struct term *term = make_app_ident(strdup("get"), lens, info); - term = make_app_term(term, arg, ref(info)); - return term; -} - -static struct term *make_put_test(struct term *lens, struct term *arg, - struct term *cmds, struct info *locp) { - /* Return a term for "put" LENS (CMDS ("get" LENS ARG)) ARG */ - struct term *term = make_get_test(lens, arg, locp); - term = make_app_term(cmds, term, ref(term->info)); - struct term *put = make_app_ident(strdup("put"), ref(lens), ref(term->info)); - put = make_app_term(put, term, ref(term->info)); - put = make_app_term(put, ref(arg), ref(term->info)); - return put; -} - -static struct term *make_test(struct term *test, struct term *result, - enum test_result_tag tr_tag, - struct term *decls, struct info *locp) { - struct term *term = make_term_locp(A_TEST, locp); - term->tr_tag = tr_tag; - term->test = test; - term->result = result; - term->next = decls; - return term; -} - -static struct term *make_tree_value(struct tree *tree, struct info *locp) { - struct term *term = make_term_locp(A_VALUE, locp); - struct value *value = make_value(V_TREE, ref(term->info)); - value->origin = make_tree_origin(tree); - term->type = make_base_type(T_TREE); - term->value = value; - return term; -} - -static struct tree *tree_concat(struct tree *t1, struct tree *t2) { - if (t2 != NULL) - list_append(t1, t2); - return t1; -} - -void augl_error(struct info *locp, - struct term **term, - yyscan_t scanner, - const char *s) { - struct info info; - struct string string; - MEMZERO(&info, 1); - info.ref = string.ref = UINT_MAX; - info.filename = &string; - - if (locp != NULL) { - info.first_line = locp->first_line; - info.first_column = locp->first_column; - info.last_line = locp->last_line; - info.last_column = locp->last_column; - info.filename->str = locp->filename->str; - info.error = locp->error; - } else if (scanner != NULL) { - info.first_line = augl_get_lineno(scanner); - info.first_column = augl_get_column(scanner); - info.last_line = augl_get_lineno(scanner); - info.last_column = augl_get_column(scanner); - info.filename = augl_get_info(scanner)->filename; - info.error = augl_get_info(scanner)->error; - } else if (*term != NULL && (*term)->info != NULL) { - memcpy(&info, (*term)->info, sizeof(info)); - } else { - info.first_line = info.last_line = 0; - info.first_column = info.last_column = 0; - } - syntax_error(&info, "%s", s); -} - diff --git a/src/parser.h b/src/parser.h deleted file mode 100644 index f681a36..0000000 --- a/src/parser.h +++ /dev/null @@ -1,146 +0,0 @@ -/* A Bison parser, made by GNU Bison 2.5. */ - -/* Bison interface for Yacc-like parsers in C - - Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . */ - -/* As a special exception, you may create a larger work that contains - part or all of the Bison parser skeleton and distribute that work - under terms of your choice, so long as that work isn't itself a - parser generator using the skeleton or a modified version thereof - as a parser skeleton. Alternatively, if you modify or redistribute - the parser skeleton itself, you may (at your option) remove this - special exception, which will cause the skeleton and the resulting - Bison output files to be licensed under the GNU General Public - License without this special exception. - - This special exception was added by the Free Software Foundation in - version 2.2 of Bison. */ - - -/* Tokens. */ -#ifndef YYTOKENTYPE -# define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - DQUOTED = 258, - REGEXP = 259, - LIDENT = 260, - UIDENT = 261, - QIDENT = 262, - ARROW = 263, - KW_MODULE = 264, - KW_AUTOLOAD = 265, - KW_LET = 266, - KW_LET_REC = 267, - KW_IN = 268, - KW_STRING = 269, - KW_REGEXP = 270, - KW_LENS = 271, - KW_TEST = 272, - KW_GET = 273, - KW_PUT = 274, - KW_AFTER = 275 - }; -#endif -/* Tokens. */ -#define DQUOTED 258 -#define REGEXP 259 -#define LIDENT 260 -#define UIDENT 261 -#define QIDENT 262 -#define ARROW 263 -#define KW_MODULE 264 -#define KW_AUTOLOAD 265 -#define KW_LET 266 -#define KW_LET_REC 267 -#define KW_IN 268 -#define KW_STRING 269 -#define KW_REGEXP 270 -#define KW_LENS 271 -#define KW_TEST 272 -#define KW_GET 273 -#define KW_PUT 274 -#define KW_AFTER 275 - - - - -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -{ - -/* Line 2068 of yacc.c */ -#line 89 "parser.y" - - struct term *term; - struct type *type; - struct ident *ident; - struct tree *tree; - char *string; - struct { - int nocase; - char *pattern; - } regexp; - int intval; - enum quant_tag quant; - - - -/* Line 2068 of yacc.c */ -#line 106 "parser.h" -} YYSTYPE; -# define YYSTYPE_IS_TRIVIAL 1 -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 -#endif - - - -#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED -typedef struct YYLTYPE -{ - int first_line; - int first_column; - int last_line; - int last_column; -} YYLTYPE; -# define yyltype YYLTYPE /* obsolescent; will be withdrawn */ -# define YYLTYPE_IS_DECLARED 1 -# define YYLTYPE_IS_TRIVIAL 1 -#endif - - - -/* "%code provides" blocks. */ - -/* Line 2068 of yacc.c */ -#line 46 "parser.y" - -#include "info.h" - -/* Track custom scanner state */ -struct state { - struct info *info; - unsigned int comment_depth; -}; - - - - -/* Line 2068 of yacc.c */ -#line 147 "parser.h" diff --git a/src/parser.y b/src/parser.y index 4d579ef..7c9e7d9 100644 --- a/src/parser.y +++ b/src/parser.y @@ -29,7 +29,7 @@ typedef struct info YYLTYPE; do { \ (Current).filename = augl_get_info(scanner)->filename; \ (Current).error = augl_get_info(scanner)->error; \ - if (YYID (N)) { \ + if (N) { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ @@ -56,7 +56,7 @@ struct state { %locations %error-verbose -%name-prefix="augl_" +%name-prefix "augl_" %defines %pure-parser %parse-param {struct term **term} diff --git a/src/pathx.c b/src/pathx.c index 467e5d7..8d8dbbb 100644 --- a/src/pathx.c +++ b/src/pathx.c @@ -123,6 +123,15 @@ static const char *const axis_names[] = { static const char *const axis_sep = "::"; +/* The characters that can follow a name in a location expression (aka path) + * The parser will assume that name (path component) is finished when it + * encounters any of these characters, unless they are escaped by preceding + * them with a '\\'. + * + * See parse_name for the gory details + */ +static const char const name_follow[] = "][|/=()!,"; + /* Doubly linked list of location steps. Besides the information from the * path expression, also contains information to iterate over a node set, * in particular, the context node CTX for the step, and the current node @@ -1607,17 +1616,43 @@ static void push_new_binary_op(enum binary_op op, struct state *state) { push_expr(expr, state); } +int pathx_escape_name(const char *in, char **out) { + const char *p; + int num_to_escape = 0; + char *s; + + *out = NULL; + + for (p = in; *p; p++) { + if (strchr(name_follow, *p) || isspace(*p) || *p == '\\') + num_to_escape += 1; + } + + if (num_to_escape == 0) + return 0; + + if (ALLOC_N(*out, strlen(in) + num_to_escape + 1) < 0) + return -1; + + for (p = in, s = *out; *p; p++) { + if (strchr(name_follow, *p) || isspace(*p) || *p == '\\') + *s++ = '\\'; + *s++ = *p; + } + *s = '\0'; + return 0; +} + /* * NameNoWS ::= [^][|/\= \t\n] | \\. * NameWS ::= [^][|/\=] | \\. * Name ::= NameNoWS NameWS* NameNoWS | NameNoWS */ static char *parse_name(struct state *state) { - static const char const follow[] = "][|/=()!,"; const char *s = state->pos; char *result; - while (*state->pos != '\0' && strchr(follow, *state->pos) == NULL) { + while (*state->pos != '\0' && strchr(name_follow, *state->pos) == NULL) { /* This is a hack: since we allow spaces in names, we need to avoid * gobbling up stuff that is in follow(Name), e.g. 'or' so that * things like [name1 or name2] still work. diff --git a/src/syntax.c b/src/syntax.c index 6f76af8..ac99e0e 100644 --- a/src/syntax.c +++ b/src/syntax.c @@ -1962,7 +1962,8 @@ static char *module_filename(struct augeas *aug, const char *modname) { return filename; } -int load_module_file(struct augeas *aug, const char *filename) { +int load_module_file(struct augeas *aug, const char *filename, + const char *name) { struct term *term = NULL; int result = -1; @@ -1977,10 +1978,18 @@ int load_module_file(struct augeas *aug, const char *filename) { goto error; struct module *module = compile(term, aug); - ERR_THROW(module == NULL, aug, AUG_ESYNTAX, - "Failed to load %s", filename); + bool bad_module = (module == NULL); + if (bad_module && name != NULL) { + /* Put an empty placeholder on the module list so that + * we don't retry loading this module everytime its mentioned + */ + module = module_create(name); + } + if (module != NULL) + list_append(aug->modules, module); + + ERR_THROW(bad_module, aug, AUG_ESYNTAX, "Failed to load %s", filename); - list_append(aug->modules, module); result = 0; error: // FIXME: This leads to a bad free of a string used in a del lens @@ -1998,7 +2007,7 @@ static int load_module(struct augeas *aug, const char *name) { if ((filename = module_filename(aug, name)) == NULL) return -1; - if (load_module_file(aug, filename) == -1) + if (load_module_file(aug, filename, name) == -1) goto error; free(filename); diff --git a/src/syntax.h b/src/syntax.h index 0ede43e..d978b03 100644 --- a/src/syntax.h +++ b/src/syntax.h @@ -274,7 +274,7 @@ int define_native_intl(const char *fname, int line, struct module *builtin_init(struct error *); -int load_module_file(struct augeas *aug, const char *filename); +int load_module_file(struct augeas *aug, const char *filename, const char *name); /* The name of the builtin function that checks recursive lenses */ #define LNS_CHECK_REC_NAME "lns_check_rec" diff --git a/src/transform.c b/src/transform.c index 1026912..5775308 100644 --- a/src/transform.c +++ b/src/transform.c @@ -61,6 +61,8 @@ static const int glob_flags = GLOB_NOSORT; */ static const char *const s_path = "path"; static const char *const s_lens = "lens"; +static const char *const s_last = "last_matched"; +static const char *const s_next = "next_not_matched"; static const char *const s_info = "info"; static const char *const s_mtime = "mtime"; @@ -328,9 +330,9 @@ static char *err_path(const char *filename) { } ATTRIBUTE_FORMAT(printf, 4, 5) -static void err_set(struct augeas *aug, - struct tree *err_info, const char *sub, - const char *format, ...) { +static struct tree *err_set(struct augeas *aug, + struct tree *err_info, const char *sub, + const char *format, ...) { int r; va_list ap; char *value = NULL; @@ -351,6 +353,22 @@ static void err_set(struct augeas *aug, error: free(value); + return tree; +} + +static struct tree *err_lens_entry(struct augeas *aug, struct tree *where, + struct lens *lens, const char *label) { + struct tree *result = NULL; + + if (lens == NULL) + return NULL; + + char *fi = format_info(lens->info); + if (fi != NULL) { + result = err_set(aug, where, label, "%s", fi); + free(fi); + } + return result; } /* Record an error in the tree. The error will show up underneath @@ -400,12 +418,10 @@ static int store_error(struct augeas *aug, if (err->path != NULL) { err_set(aug, err_info, s_path, "%s%s", path, err->path); } - if (err->lens != NULL) { - char *fi = format_info(err->lens->info); - if (fi != NULL) { - err_set(aug, err_info, s_lens, "%s", fi); - free(fi); - } + struct tree *t = err_lens_entry(aug, err_info, err->lens, s_lens); + if (t != NULL) { + err_lens_entry(aug, t, err->last, s_last); + err_lens_entry(aug, t, err->next, s_next); } err_set(aug, err_info, s_message, "%s", err->message); } else if (errnum != 0) { @@ -847,9 +863,16 @@ static int transfer_file_attrs(FILE *from, FILE *to, int selinux_enabled = (is_selinux_enabled() > 0); security_context_t con = NULL; - int from_fd = fileno(from); + int from_fd; int to_fd = fileno(to); + if (from == NULL) { + *err_status = "replace_from_missing"; + return -1; + } + + from_fd = fileno(from); + ret = fstat(from_fd, &st); if (ret < 0) { *err_status = "replace_stat"; @@ -1135,7 +1158,6 @@ int transform_save(struct augeas *aug, struct tree *xfm, if (augorig_exists) { if (transfer_file_attrs(augorig_canon_fp, fp, &err_status) != 0) { - err_status = "xfer_attrs"; goto done; } } else { @@ -1330,21 +1352,34 @@ int text_retrieve(struct augeas *aug, const char *lens_name, } int remove_file(struct augeas *aug, struct tree *tree) { - char *path = NULL; - const char *filename = NULL; const char *err_status = NULL; char *dyn_err_status = NULL; char *augsave = NULL, *augorig = NULL, *augorig_canon = NULL; + struct tree *path = NULL; + const char *file_path = NULL; + char *meta_path = NULL; int r; - path = path_of_tree(tree); + path = tree_child(tree, s_path); if (path == NULL) { + err_status = "no child called 'path' for file entry"; + goto error; + } + file_path = path->value + strlen(AUGEAS_FILES_TREE); + path = NULL; + + if (file_path == NULL) { + err_status = "no path for file"; + goto error; + } + + meta_path = path_of_tree(tree); + if (meta_path == NULL) { err_status = "path_of_tree"; goto error; } - filename = path + strlen(AUGEAS_META_FILES); - if ((augorig = strappend(aug->root, filename + 1)) == NULL) { + if ((augorig = strappend(aug->root, file_path)) == NULL) { err_status = "root_file"; goto error; } @@ -1359,7 +1394,7 @@ int remove_file(struct augeas *aug, struct tree *tree) { } } - r = file_saved_event(aug, path + strlen(AUGEAS_META_TREE)); + r = file_saved_event(aug, meta_path + strlen(AUGEAS_META_TREE)); if (r < 0) { err_status = "saved_event"; goto error; @@ -1389,9 +1424,10 @@ int remove_file(struct augeas *aug, struct tree *tree) { goto error; } } + path = NULL; tree_unlink(aug, tree); done: - free(path); + free(meta_path); free(augorig); free(augorig_canon); free(augsave); @@ -1400,9 +1436,9 @@ int remove_file(struct augeas *aug, struct tree *tree) { { const char *emsg = dyn_err_status == NULL ? err_status : dyn_err_status; - store_error(aug, filename, path, emsg, errno, NULL, NULL); + store_error(aug, file_path, meta_path, emsg, errno, NULL, NULL); } - free(path); + free(meta_path); free(augorig); free(augorig_canon); free(augsave); diff --git a/src/try b/src/try index 18a0123..6f66f11 100755 --- a/src/try +++ b/src/try @@ -33,7 +33,7 @@ elif [[ "x$1" == "xvalgrind" ]] ; then libtool --mode=execute valgrind --leak-check=full ./augtool --nostdinc < $AUGCMDS elif [[ "x$1" == "xcli" ]] ; then shift - ./augtool --nostdinc "$@" + exec ./augtool --nostdinc "$@" else ./augtool --nostdinc "$@" < $AUGCMDS echo diff --git a/tests/Makefile.am b/tests/Makefile.am index 079cd76..b456354 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -20,6 +20,7 @@ lens_tests = \ lens-access.sh \ lens-activemq_conf.sh \ lens-activemq_xml.sh \ + lens-afs_cellalias.sh \ lens-aliases.sh \ lens-anacron.sh \ lens-approx.sh \ @@ -42,6 +43,7 @@ lens_tests = \ lens-cgrules.sh \ lens-channels.sh \ lens-chrony.sh \ + lens-clamav.sh \ lens-cobblersettings.sh \ lens-cobblermodules.sh \ lens-collectd.sh \ @@ -56,6 +58,7 @@ lens_tests = \ lens-device_map.sh \ lens-dhclient.sh \ lens-dhcpd.sh \ + lens-dns_zone.sh \ lens-dnsmasq.sh \ lens-dovecot.sh \ lens-dpkg.sh \ @@ -85,6 +88,7 @@ lens_tests = \ lens-interfaces.sh \ lens-iptables.sh \ lens-iproute2.sh \ + lens-iscsid.sh \ lens-jettyrealm.sh \ lens-jmxaccess.sh \ lens-jmxpassword.sh \ @@ -104,6 +108,8 @@ lens_tests = \ lens-logwatch.sh \ lens-lokkit.sh \ lens-lvm.sh \ + lens-mailscanner.sh \ + lens-mailscanner_rules.sh \ lens-mcollective.sh \ lens-mdadm_conf.sh \ lens-memcached.sh \ @@ -136,11 +142,13 @@ lens_tests = \ lens-passwd.sh \ lens-pbuilder.sh \ lens-pg_hba.sh \ + lens-pgbouncer.sh \ lens-php.sh \ lens-phpvars.sh \ lens-postfix_access.sh \ lens-postfix_main.sh \ lens-postfix_master.sh \ + lens-postfix_sasl_smtpd.sh \ lens-postfix_transport.sh \ lens-postfix_virtual.sh \ lens-postgresql.sh \ @@ -148,7 +156,9 @@ lens_tests = \ lens-protocols.sh \ lens-puppet.sh \ lens-puppet_auth.sh \ + lens-puppetfile.sh \ lens-puppetfileserver.sh \ + lens-pylonspaste.sh \ lens-pythonpaste.sh \ lens-qpid.sh \ lens-quote.sh \ diff --git a/tests/Makefile.in b/tests/Makefile.in deleted file mode 100644 index da69073..0000000 --- a/tests/Makefile.in +++ /dev/null @@ -1,3685 +0,0 @@ -# Makefile.in generated by automake 1.13.4 from Makefile.am. -# @configure_input@ - -# 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. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# -*- Makefile-automake -*- -# -# Support for running programs with failmalloc preloaded. Include in other -# automake files and make sure the following variables are set: -# -# FAILMALLOC_START - number of first FAILMALLOC_INTERVAL -# FAILMALLOC_REP - how often to repeat with increasing FAILMALLOC_INTERVAL -# FAILMALLOC_PROG - the program to run with linfailmalloc preloaded - - -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@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -noinst_PROGRAMS = leak$(EXEEXT) -check_PROGRAMS = fatest$(EXEEXT) test-xpath$(EXEEXT) \ - test-load$(EXEEXT) test-save$(EXEEXT) test-api$(EXEEXT) \ - test-run$(EXEEXT) -DIST_COMMON = $(top_srcdir)/Makefile.inc $(srcdir)/Makefile.in \ - $(srcdir)/Makefile.am $(top_srcdir)/build/ac-aux/depcomp \ - $(top_srcdir)/build/ac-aux/test-driver -subdir = tests -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 \ - $(top_srcdir)/gnulib/m4/double-slash-root.m4 \ - $(top_srcdir)/gnulib/m4/dup2.m4 \ - $(top_srcdir)/gnulib/m4/eealloc.m4 \ - $(top_srcdir)/gnulib/m4/environ.m4 \ - $(top_srcdir)/gnulib/m4/errno_h.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/lib-prefix.m4 \ - $(top_srcdir)/gnulib/m4/libtool.m4 \ - $(top_srcdir)/gnulib/m4/localcharset.m4 \ - $(top_srcdir)/gnulib/m4/locale-fr.m4 \ - $(top_srcdir)/gnulib/m4/locale-ja.m4 \ - $(top_srcdir)/gnulib/m4/locale-tr.m4 \ - $(top_srcdir)/gnulib/m4/locale-zh.m4 \ - $(top_srcdir)/gnulib/m4/locale_h.m4 \ - $(top_srcdir)/gnulib/m4/localeconv.m4 \ - $(top_srcdir)/gnulib/m4/localename.m4 \ - $(top_srcdir)/gnulib/m4/lock.m4 \ - $(top_srcdir)/gnulib/m4/longlong.m4 \ - $(top_srcdir)/gnulib/m4/lstat.m4 \ - $(top_srcdir)/gnulib/m4/ltoptions.m4 \ - $(top_srcdir)/gnulib/m4/ltsugar.m4 \ - $(top_srcdir)/gnulib/m4/ltversion.m4 \ - $(top_srcdir)/gnulib/m4/lt~obsolete.m4 \ - $(top_srcdir)/gnulib/m4/malloc.m4 \ - $(top_srcdir)/gnulib/m4/malloca.m4 \ - $(top_srcdir)/gnulib/m4/mbrtowc.m4 \ - $(top_srcdir)/gnulib/m4/mbsinit.m4 \ - $(top_srcdir)/gnulib/m4/mbsrtowcs.m4 \ - $(top_srcdir)/gnulib/m4/mbstate_t.m4 \ - $(top_srcdir)/gnulib/m4/mbtowc.m4 \ - $(top_srcdir)/gnulib/m4/memchr.m4 \ - $(top_srcdir)/gnulib/m4/mempcpy.m4 \ - $(top_srcdir)/gnulib/m4/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 \ - $(top_srcdir)/gnulib/m4/safe-alloc.m4 \ - $(top_srcdir)/gnulib/m4/selinux-context-h.m4 \ - $(top_srcdir)/gnulib/m4/selinux-selinux-h.m4 \ - $(top_srcdir)/gnulib/m4/setenv.m4 \ - $(top_srcdir)/gnulib/m4/setlocale.m4 \ - $(top_srcdir)/gnulib/m4/size_max.m4 \ - $(top_srcdir)/gnulib/m4/ssize_t.m4 \ - $(top_srcdir)/gnulib/m4/stat.m4 \ - $(top_srcdir)/gnulib/m4/stdbool.m4 \ - $(top_srcdir)/gnulib/m4/stddef_h.m4 \ - $(top_srcdir)/gnulib/m4/stdint.m4 \ - $(top_srcdir)/gnulib/m4/stdint_h.m4 \ - $(top_srcdir)/gnulib/m4/stdio_h.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 \ - $(top_srcdir)/gnulib/m4/unistd_h.m4 \ - $(top_srcdir)/gnulib/m4/vasnprintf.m4 \ - $(top_srcdir)/gnulib/m4/vasprintf.m4 \ - $(top_srcdir)/gnulib/m4/warn-on-use.m4 \ - $(top_srcdir)/gnulib/m4/wchar_h.m4 \ - $(top_srcdir)/gnulib/m4/wchar_t.m4 \ - $(top_srcdir)/gnulib/m4/wcrtomb.m4 \ - $(top_srcdir)/gnulib/m4/wctob.m4 \ - $(top_srcdir)/gnulib/m4/wctomb.m4 \ - $(top_srcdir)/gnulib/m4/wctype_h.m4 \ - $(top_srcdir)/gnulib/m4/wint_t.m4 \ - $(top_srcdir)/gnulib/m4/xsize.m4 \ - $(top_srcdir)/gnulib/m4/yield.m4 $(top_srcdir)/acinclude.m4 \ - $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -PROGRAMS = $(noinst_PROGRAMS) -am_fatest_OBJECTS = fatest.$(OBJEXT) cutest.$(OBJEXT) memory.$(OBJEXT) -fatest_OBJECTS = $(am_fatest_OBJECTS) -am__DEPENDENCIES_1 = -fatest_DEPENDENCIES = $(top_builddir)/src/libfa.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -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_leak_OBJECTS = leak.$(OBJEXT) -leak_OBJECTS = $(am_leak_OBJECTS) -leak_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_test_api_OBJECTS = test-api.$(OBJEXT) cutest.$(OBJEXT) \ - memory.$(OBJEXT) -test_api_OBJECTS = $(am_test_api_OBJECTS) -test_api_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_test_load_OBJECTS = test-load.$(OBJEXT) cutest.$(OBJEXT) \ - memory.$(OBJEXT) -test_load_OBJECTS = $(am_test_load_OBJECTS) -test_load_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_test_run_OBJECTS = test-run.$(OBJEXT) cutest.$(OBJEXT) \ - memory.$(OBJEXT) -test_run_OBJECTS = $(am_test_run_OBJECTS) -test_run_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_test_save_OBJECTS = test-save.$(OBJEXT) cutest.$(OBJEXT) \ - memory.$(OBJEXT) -test_save_OBJECTS = $(am_test_save_OBJECTS) -test_save_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -am_test_xpath_OBJECTS = test-xpath.$(OBJEXT) cutest.$(OBJEXT) \ - memory.$(OBJEXT) -test_xpath_OBJECTS = $(am_test_xpath_OBJECTS) -test_xpath_DEPENDENCIES = $(top_builddir)/src/libaugeas.la \ - $(am__DEPENDENCIES_1) $(GNULIB) -SCRIPTS = $(noinst_SCRIPTS) -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/ac-aux/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -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_@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_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = -SOURCES = $(fatest_SOURCES) $(leak_SOURCES) $(test_api_SOURCES) \ - $(test_load_SOURCES) $(test_run_SOURCES) $(test_save_SOURCES) \ - $(test_xpath_SOURCES) -DIST_SOURCES = $(fatest_SOURCES) $(leak_SOURCES) $(test_api_SOURCES) \ - $(test_load_SOURCES) $(test_run_SOURCES) $(test_save_SOURCES) \ - $(test_xpath_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 -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 \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -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), 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. 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; \ -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='$@'; \ -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) -AM_RECURSIVE_TARGETS = check recheck -TEST_SUITE_LOG = test-suite.log -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) -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -pkglibexecdir = @pkglibexecdir@ -ACLOCAL = @ACLOCAL@ -ALLOCA = @ALLOCA@ -ALLOCA_H = @ALLOCA_H@ -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@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@ -BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@ -BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@ -BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@ -BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@ -EMULTIHOP_VALUE = @EMULTIHOP_VALUE@ -ENOLINK_HIDDEN = @ENOLINK_HIDDEN@ -ENOLINK_VALUE = @ENOLINK_VALUE@ -EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@ -EOVERFLOW_VALUE = @EOVERFLOW_VALUE@ -ERRNO_H = @ERRNO_H@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -FLOAT_H = @FLOAT_H@ -FNMATCH_H = @FNMATCH_H@ -GETOPT_H = @GETOPT_H@ -GLIBC21 = @GLIBC21@ -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@ -GNULIB_ENVIRON = @GNULIB_ENVIRON@ -GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@ -GNULIB_FACCESSAT = @GNULIB_FACCESSAT@ -GNULIB_FCHDIR = @GNULIB_FCHDIR@ -GNULIB_FCHMODAT = @GNULIB_FCHMODAT@ -GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@ -GNULIB_FCLOSE = @GNULIB_FCLOSE@ -GNULIB_FCNTL = @GNULIB_FCNTL@ -GNULIB_FDATASYNC = @GNULIB_FDATASYNC@ -GNULIB_FDOPEN = @GNULIB_FDOPEN@ -GNULIB_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@ -GNULIB_FTELLO = @GNULIB_FTELLO@ -GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@ -GNULIB_FUTIMENS = @GNULIB_FUTIMENS@ -GNULIB_FWRITE = @GNULIB_FWRITE@ -GNULIB_GETC = @GNULIB_GETC@ -GNULIB_GETCHAR = @GNULIB_GETCHAR@ -GNULIB_GETCWD = @GNULIB_GETCWD@ -GNULIB_GETDELIM = @GNULIB_GETDELIM@ -GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@ -GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@ -GNULIB_GETGROUPS = @GNULIB_GETGROUPS@ -GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@ -GNULIB_GETLINE = @GNULIB_GETLINE@ -GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@ -GNULIB_GETLOGIN = @GNULIB_GETLOGIN@ -GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@ -GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@ -GNULIB_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@ -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@ -GNULIB_MBRLEN = @GNULIB_MBRLEN@ -GNULIB_MBRTOWC = @GNULIB_MBRTOWC@ -GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@ -GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@ -GNULIB_MBSCHR = @GNULIB_MBSCHR@ -GNULIB_MBSCSPN = @GNULIB_MBSCSPN@ -GNULIB_MBSINIT = @GNULIB_MBSINIT@ -GNULIB_MBSLEN = @GNULIB_MBSLEN@ -GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@ -GNULIB_MBSNLEN = @GNULIB_MBSNLEN@ -GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@ -GNULIB_MBSPBRK = @GNULIB_MBSPBRK@ -GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@ -GNULIB_MBSRCHR = @GNULIB_MBSRCHR@ -GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@ -GNULIB_MBSSEP = @GNULIB_MBSSEP@ -GNULIB_MBSSPN = @GNULIB_MBSSPN@ -GNULIB_MBSSTR = @GNULIB_MBSSTR@ -GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@ -GNULIB_MBTOWC = @GNULIB_MBTOWC@ -GNULIB_MEMCHR = @GNULIB_MEMCHR@ -GNULIB_MEMMEM = @GNULIB_MEMMEM@ -GNULIB_MEMPCPY = @GNULIB_MEMPCPY@ -GNULIB_MEMRCHR = @GNULIB_MEMRCHR@ -GNULIB_MKDIRAT = @GNULIB_MKDIRAT@ -GNULIB_MKDTEMP = @GNULIB_MKDTEMP@ -GNULIB_MKFIFO = @GNULIB_MKFIFO@ -GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@ -GNULIB_MKNOD = @GNULIB_MKNOD@ -GNULIB_MKNODAT = @GNULIB_MKNODAT@ -GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@ -GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@ -GNULIB_MKSTEMP = @GNULIB_MKSTEMP@ -GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@ -GNULIB_MKTIME = @GNULIB_MKTIME@ -GNULIB_NANOSLEEP = @GNULIB_NANOSLEEP@ -GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@ -GNULIB_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@ -GNULIB_REALPATH = @GNULIB_REALPATH@ -GNULIB_REMOVE = @GNULIB_REMOVE@ -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@ -GNULIB_STRCASESTR = @GNULIB_STRCASESTR@ -GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@ -GNULIB_STRDUP = @GNULIB_STRDUP@ -GNULIB_STRERROR = @GNULIB_STRERROR@ -GNULIB_STRERROR_R = @GNULIB_STRERROR_R@ -GNULIB_STRNCAT = @GNULIB_STRNCAT@ -GNULIB_STRNDUP = @GNULIB_STRNDUP@ -GNULIB_STRNLEN = @GNULIB_STRNLEN@ -GNULIB_STRPBRK = @GNULIB_STRPBRK@ -GNULIB_STRPTIME = @GNULIB_STRPTIME@ -GNULIB_STRSEP = @GNULIB_STRSEP@ -GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@ -GNULIB_STRSTR = @GNULIB_STRSTR@ -GNULIB_STRTOD = @GNULIB_STRTOD@ -GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@ -GNULIB_STRTOK_R = @GNULIB_STRTOK_R@ -GNULIB_STRTOLL = @GNULIB_STRTOLL@ -GNULIB_STRTOULL = @GNULIB_STRTOULL@ -GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@ -GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@ -GNULIB_SYMLINK = @GNULIB_SYMLINK@ -GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@ -GNULIB_SYSTEM_POSIX = @GNULIB_SYSTEM_POSIX@ -GNULIB_TIMEGM = @GNULIB_TIMEGM@ -GNULIB_TIME_R = @GNULIB_TIME_R@ -GNULIB_TMPFILE = @GNULIB_TMPFILE@ -GNULIB_TOWCTRANS = @GNULIB_TOWCTRANS@ -GNULIB_TTYNAME_R = @GNULIB_TTYNAME_R@ -GNULIB_UNISTD_H_NONBLOCKING = @GNULIB_UNISTD_H_NONBLOCKING@ -GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@ -GNULIB_UNLINK = @GNULIB_UNLINK@ -GNULIB_UNLINKAT = @GNULIB_UNLINKAT@ -GNULIB_UNLOCKPT = @GNULIB_UNLOCKPT@ -GNULIB_UNSETENV = @GNULIB_UNSETENV@ -GNULIB_USLEEP = @GNULIB_USLEEP@ -GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@ -GNULIB_VASPRINTF = @GNULIB_VASPRINTF@ -GNULIB_VDPRINTF = @GNULIB_VDPRINTF@ -GNULIB_VFPRINTF = @GNULIB_VFPRINTF@ -GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@ -GNULIB_VFSCANF = @GNULIB_VFSCANF@ -GNULIB_VPRINTF = @GNULIB_VPRINTF@ -GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@ -GNULIB_VSCANF = @GNULIB_VSCANF@ -GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@ -GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@ -GNULIB_WAITPID = @GNULIB_WAITPID@ -GNULIB_WCPCPY = @GNULIB_WCPCPY@ -GNULIB_WCPNCPY = @GNULIB_WCPNCPY@ -GNULIB_WCRTOMB = @GNULIB_WCRTOMB@ -GNULIB_WCSCASECMP = @GNULIB_WCSCASECMP@ -GNULIB_WCSCAT = @GNULIB_WCSCAT@ -GNULIB_WCSCHR = @GNULIB_WCSCHR@ -GNULIB_WCSCMP = @GNULIB_WCSCMP@ -GNULIB_WCSCOLL = @GNULIB_WCSCOLL@ -GNULIB_WCSCPY = @GNULIB_WCSCPY@ -GNULIB_WCSCSPN = @GNULIB_WCSCSPN@ -GNULIB_WCSDUP = @GNULIB_WCSDUP@ -GNULIB_WCSLEN = @GNULIB_WCSLEN@ -GNULIB_WCSNCASECMP = @GNULIB_WCSNCASECMP@ -GNULIB_WCSNCAT = @GNULIB_WCSNCAT@ -GNULIB_WCSNCMP = @GNULIB_WCSNCMP@ -GNULIB_WCSNCPY = @GNULIB_WCSNCPY@ -GNULIB_WCSNLEN = @GNULIB_WCSNLEN@ -GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@ -GNULIB_WCSPBRK = @GNULIB_WCSPBRK@ -GNULIB_WCSRCHR = @GNULIB_WCSRCHR@ -GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@ -GNULIB_WCSSPN = @GNULIB_WCSSPN@ -GNULIB_WCSSTR = @GNULIB_WCSSTR@ -GNULIB_WCSTOK = @GNULIB_WCSTOK@ -GNULIB_WCSWIDTH = @GNULIB_WCSWIDTH@ -GNULIB_WCSXFRM = @GNULIB_WCSXFRM@ -GNULIB_WCTOB = @GNULIB_WCTOB@ -GNULIB_WCTOMB = @GNULIB_WCTOMB@ -GNULIB_WCTRANS = @GNULIB_WCTRANS@ -GNULIB_WCTYPE = @GNULIB_WCTYPE@ -GNULIB_WCWIDTH = @GNULIB_WCWIDTH@ -GNULIB_WMEMCHR = @GNULIB_WMEMCHR@ -GNULIB_WMEMCMP = @GNULIB_WMEMCMP@ -GNULIB_WMEMCPY = @GNULIB_WMEMCPY@ -GNULIB_WMEMMOVE = @GNULIB_WMEMMOVE@ -GNULIB_WMEMSET = @GNULIB_WMEMSET@ -GNULIB_WRITE = @GNULIB_WRITE@ -GNULIB__EXIT = @GNULIB__EXIT@ -GREP = @GREP@ -HAVE_ATOLL = @HAVE_ATOLL@ -HAVE_BTOWC = @HAVE_BTOWC@ -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@ -HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@ -HAVE_DECL_GETDOMAINNAME = @HAVE_DECL_GETDOMAINNAME@ -HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@ -HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@ -HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@ -HAVE_DECL_GETPAGESIZE = @HAVE_DECL_GETPAGESIZE@ -HAVE_DECL_GETUSERSHELL = @HAVE_DECL_GETUSERSHELL@ -HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@ -HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@ -HAVE_DECL_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@ -HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@ -HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@ -HAVE_DPRINTF = @HAVE_DPRINTF@ -HAVE_DUP2 = @HAVE_DUP2@ -HAVE_DUP3 = @HAVE_DUP3@ -HAVE_DUPLOCALE = @HAVE_DUPLOCALE@ -HAVE_EUIDACCESS = @HAVE_EUIDACCESS@ -HAVE_FACCESSAT = @HAVE_FACCESSAT@ -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@ -HAVE_FTELLO = @HAVE_FTELLO@ -HAVE_FTRUNCATE = @HAVE_FTRUNCATE@ -HAVE_FUTIMENS = @HAVE_FUTIMENS@ -HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@ -HAVE_GETGROUPS = @HAVE_GETGROUPS@ -HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@ -HAVE_GETLOGIN = @HAVE_GETLOGIN@ -HAVE_GETOPT_H = @HAVE_GETOPT_H@ -HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@ -HAVE_GETSUBOPT = @HAVE_GETSUBOPT@ -HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@ -HAVE_GRANTPT = @HAVE_GRANTPT@ -HAVE_GROUP_MEMBER = @HAVE_GROUP_MEMBER@ -HAVE_INTTYPES_H = @HAVE_INTTYPES_H@ -HAVE_ISBLANK = @HAVE_ISBLANK@ -HAVE_ISWBLANK = @HAVE_ISWBLANK@ -HAVE_ISWCNTRL = @HAVE_ISWCNTRL@ -HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@ -HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@ -HAVE_LANGINFO_H = @HAVE_LANGINFO_H@ -HAVE_LANGINFO_T_FMT_AMPM = @HAVE_LANGINFO_T_FMT_AMPM@ -HAVE_LANGINFO_YESEXPR = @HAVE_LANGINFO_YESEXPR@ -HAVE_LCHMOD = @HAVE_LCHMOD@ -HAVE_LCHOWN = @HAVE_LCHOWN@ -HAVE_LINK = @HAVE_LINK@ -HAVE_LINKAT = @HAVE_LINKAT@ -HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@ -HAVE_LSTAT = @HAVE_LSTAT@ -HAVE_MBRLEN = @HAVE_MBRLEN@ -HAVE_MBRTOWC = @HAVE_MBRTOWC@ -HAVE_MBSINIT = @HAVE_MBSINIT@ -HAVE_MBSLEN = @HAVE_MBSLEN@ -HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@ -HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@ -HAVE_MEMCHR = @HAVE_MEMCHR@ -HAVE_MEMPCPY = @HAVE_MEMPCPY@ -HAVE_MKDIRAT = @HAVE_MKDIRAT@ -HAVE_MKDTEMP = @HAVE_MKDTEMP@ -HAVE_MKFIFO = @HAVE_MKFIFO@ -HAVE_MKFIFOAT = @HAVE_MKFIFOAT@ -HAVE_MKNOD = @HAVE_MKNOD@ -HAVE_MKNODAT = @HAVE_MKNODAT@ -HAVE_MKOSTEMP = @HAVE_MKOSTEMP@ -HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@ -HAVE_MKSTEMP = @HAVE_MKSTEMP@ -HAVE_MKSTEMPS = @HAVE_MKSTEMPS@ -HAVE_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@ -HAVE_READLINK = @HAVE_READLINK@ -HAVE_READLINKAT = @HAVE_READLINKAT@ -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@ -HAVE_SLEEP = @HAVE_SLEEP@ -HAVE_STDINT_H = @HAVE_STDINT_H@ -HAVE_STPCPY = @HAVE_STPCPY@ -HAVE_STPNCPY = @HAVE_STPNCPY@ -HAVE_STRCASESTR = @HAVE_STRCASESTR@ -HAVE_STRCHRNUL = @HAVE_STRCHRNUL@ -HAVE_STRPBRK = @HAVE_STRPBRK@ -HAVE_STRPTIME = @HAVE_STRPTIME@ -HAVE_STRSEP = @HAVE_STRSEP@ -HAVE_STRTOD = @HAVE_STRTOD@ -HAVE_STRTOLL = @HAVE_STRTOLL@ -HAVE_STRTOULL = @HAVE_STRTOULL@ -HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@ -HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@ -HAVE_STRVERSCMP = @HAVE_STRVERSCMP@ -HAVE_SYMLINK = @HAVE_SYMLINK@ -HAVE_SYMLINKAT = @HAVE_SYMLINKAT@ -HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@ -HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@ -HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@ -HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@ -HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@ -HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@ -HAVE_TIMEGM = @HAVE_TIMEGM@ -HAVE_UNISTD_H = @HAVE_UNISTD_H@ -HAVE_UNLINKAT = @HAVE_UNLINKAT@ -HAVE_UNLOCKPT = @HAVE_UNLOCKPT@ -HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@ -HAVE_USLEEP = @HAVE_USLEEP@ -HAVE_UTIMENSAT = @HAVE_UTIMENSAT@ -HAVE_VASPRINTF = @HAVE_VASPRINTF@ -HAVE_VDPRINTF = @HAVE_VDPRINTF@ -HAVE_WCHAR_H = @HAVE_WCHAR_H@ -HAVE_WCHAR_T = @HAVE_WCHAR_T@ -HAVE_WCPCPY = @HAVE_WCPCPY@ -HAVE_WCPNCPY = @HAVE_WCPNCPY@ -HAVE_WCRTOMB = @HAVE_WCRTOMB@ -HAVE_WCSCASECMP = @HAVE_WCSCASECMP@ -HAVE_WCSCAT = @HAVE_WCSCAT@ -HAVE_WCSCHR = @HAVE_WCSCHR@ -HAVE_WCSCMP = @HAVE_WCSCMP@ -HAVE_WCSCOLL = @HAVE_WCSCOLL@ -HAVE_WCSCPY = @HAVE_WCSCPY@ -HAVE_WCSCSPN = @HAVE_WCSCSPN@ -HAVE_WCSDUP = @HAVE_WCSDUP@ -HAVE_WCSLEN = @HAVE_WCSLEN@ -HAVE_WCSNCASECMP = @HAVE_WCSNCASECMP@ -HAVE_WCSNCAT = @HAVE_WCSNCAT@ -HAVE_WCSNCMP = @HAVE_WCSNCMP@ -HAVE_WCSNCPY = @HAVE_WCSNCPY@ -HAVE_WCSNLEN = @HAVE_WCSNLEN@ -HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@ -HAVE_WCSPBRK = @HAVE_WCSPBRK@ -HAVE_WCSRCHR = @HAVE_WCSRCHR@ -HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@ -HAVE_WCSSPN = @HAVE_WCSSPN@ -HAVE_WCSSTR = @HAVE_WCSSTR@ -HAVE_WCSTOK = @HAVE_WCSTOK@ -HAVE_WCSWIDTH = @HAVE_WCSWIDTH@ -HAVE_WCSXFRM = @HAVE_WCSXFRM@ -HAVE_WCTRANS_T = @HAVE_WCTRANS_T@ -HAVE_WCTYPE_H = @HAVE_WCTYPE_H@ -HAVE_WCTYPE_T = @HAVE_WCTYPE_T@ -HAVE_WINSOCK2_H = @HAVE_WINSOCK2_H@ -HAVE_WINT_T = @HAVE_WINT_T@ -HAVE_WMEMCHR = @HAVE_WMEMCHR@ -HAVE_WMEMCMP = @HAVE_WMEMCMP@ -HAVE_WMEMCPY = @HAVE_WMEMCPY@ -HAVE_WMEMMOVE = @HAVE_WMEMMOVE@ -HAVE_WMEMSET = @HAVE_WMEMSET@ -HAVE_XLOCALE_H = @HAVE_XLOCALE_H@ -HAVE__BOOL = @HAVE__BOOL@ -HAVE__EXIT = @HAVE__EXIT@ -INCLUDE_NEXT = @INCLUDE_NEXT@ -INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@ -INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@ -INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LEX = @LEX@ -LEXLIB = @LEXLIB@ -LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ -LIBAUGEAS_VERSION_INFO = @LIBAUGEAS_VERSION_INFO@ -LIBFAILMALLOC = @LIBFAILMALLOC@ -LIBFA_VERSION_INFO = @LIBFA_VERSION_INFO@ -LIBINTL = @LIBINTL@ -LIBMULTITHREAD = @LIBMULTITHREAD@ -LIBOBJS = @LIBOBJS@ -LIBPTH = @LIBPTH@ -LIBPTH_PREFIX = @LIBPTH_PREFIX@ -LIBS = @LIBS@ -LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@ -LIBTHREAD = @LIBTHREAD@ -LIBTOOL = @LIBTOOL@ -LIBXML_CFLAGS = @LIBXML_CFLAGS@ -LIBXML_LIBS = @LIBXML_LIBS@ -LIB_SELINUX = @LIB_SELINUX@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_TESTS_ENVIRONMENT@ -LOCALE_FR = @LOCALE_FR@ -LOCALE_FR_UTF8 = @LOCALE_FR_UTF8@ -LOCALE_JA = @LOCALE_JA@ -LOCALE_TR_UTF8 = @LOCALE_TR_UTF8@ -LOCALE_ZH_CN = @LOCALE_ZH_CN@ -LTALLOCA = @LTALLOCA@ -LTLIBINTL = @LTLIBINTL@ -LTLIBMULTITHREAD = @LTLIBMULTITHREAD@ -LTLIBOBJS = @LTLIBOBJS@ -LTLIBPTH = @LTLIBPTH@ -LTLIBTHREAD = @LTLIBTHREAD@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -ND_FORMAT = @ND_FORMAT@ -ND_PROG = @ND_PROG@ -NEXT_AS_FIRST_DIRECTIVE_CTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_CTYPE_H@ -NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@ -NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@ -NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@ -NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@ -NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@ -NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@ -NEXT_AS_FIRST_DIRECTIVE_LOCALE_H = @NEXT_AS_FIRST_DIRECTIVE_LOCALE_H@ -NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H = @NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H@ -NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@ -NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@ -NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@ -NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@ -NEXT_AS_FIRST_DIRECTIVE_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@ -NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@ -NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@ -NEXT_CTYPE_H = @NEXT_CTYPE_H@ -NEXT_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@ -NEXT_STDDEF_H = @NEXT_STDDEF_H@ -NEXT_STDINT_H = @NEXT_STDINT_H@ -NEXT_STDIO_H = @NEXT_STDIO_H@ -NEXT_STDLIB_H = @NEXT_STDLIB_H@ -NEXT_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@ -NEXT_WCHAR_H = @NEXT_WCHAR_H@ -NEXT_WCTYPE_H = @NEXT_WCTYPE_H@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PDFDOCS = @PDFDOCS@ -PDFLATEX = @PDFLATEX@ -PKG_CONFIG = @PKG_CONFIG@ -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@ -READLINE_LIBS = @READLINE_LIBS@ -REPLACE_BTOWC = @REPLACE_BTOWC@ -REPLACE_CALLOC = @REPLACE_CALLOC@ -REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@ -REPLACE_CHOWN = @REPLACE_CHOWN@ -REPLACE_CLOSE = @REPLACE_CLOSE@ -REPLACE_DPRINTF = @REPLACE_DPRINTF@ -REPLACE_DUP = @REPLACE_DUP@ -REPLACE_DUP2 = @REPLACE_DUP2@ -REPLACE_DUPLOCALE = @REPLACE_DUPLOCALE@ -REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@ -REPLACE_FCLOSE = @REPLACE_FCLOSE@ -REPLACE_FCNTL = @REPLACE_FCNTL@ -REPLACE_FDOPEN = @REPLACE_FDOPEN@ -REPLACE_FFLUSH = @REPLACE_FFLUSH@ -REPLACE_FOPEN = @REPLACE_FOPEN@ -REPLACE_FPRINTF = @REPLACE_FPRINTF@ -REPLACE_FPURGE = @REPLACE_FPURGE@ -REPLACE_FREOPEN = @REPLACE_FREOPEN@ -REPLACE_FSEEK = @REPLACE_FSEEK@ -REPLACE_FSEEKO = @REPLACE_FSEEKO@ -REPLACE_FSTAT = @REPLACE_FSTAT@ -REPLACE_FSTATAT = @REPLACE_FSTATAT@ -REPLACE_FTELL = @REPLACE_FTELL@ -REPLACE_FTELLO = @REPLACE_FTELLO@ -REPLACE_FTRUNCATE = @REPLACE_FTRUNCATE@ -REPLACE_FUTIMENS = @REPLACE_FUTIMENS@ -REPLACE_GETCWD = @REPLACE_GETCWD@ -REPLACE_GETDELIM = @REPLACE_GETDELIM@ -REPLACE_GETDOMAINNAME = @REPLACE_GETDOMAINNAME@ -REPLACE_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@ -REPLACE_MALLOC = @REPLACE_MALLOC@ -REPLACE_MBRLEN = @REPLACE_MBRLEN@ -REPLACE_MBRTOWC = @REPLACE_MBRTOWC@ -REPLACE_MBSINIT = @REPLACE_MBSINIT@ -REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@ -REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@ -REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@ -REPLACE_MBTOWC = @REPLACE_MBTOWC@ -REPLACE_MEMCHR = @REPLACE_MEMCHR@ -REPLACE_MEMMEM = @REPLACE_MEMMEM@ -REPLACE_MKDIR = @REPLACE_MKDIR@ -REPLACE_MKFIFO = @REPLACE_MKFIFO@ -REPLACE_MKNOD = @REPLACE_MKNOD@ -REPLACE_MKSTEMP = @REPLACE_MKSTEMP@ -REPLACE_MKTIME = @REPLACE_MKTIME@ -REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@ -REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@ -REPLACE_NULL = @REPLACE_NULL@ -REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@ -REPLACE_OPEN = @REPLACE_OPEN@ -REPLACE_OPENAT = @REPLACE_OPENAT@ -REPLACE_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@ -REPLACE_REMOVE = @REPLACE_REMOVE@ -REPLACE_RENAME = @REPLACE_RENAME@ -REPLACE_RENAMEAT = @REPLACE_RENAMEAT@ -REPLACE_RMDIR = @REPLACE_RMDIR@ -REPLACE_SETENV = @REPLACE_SETENV@ -REPLACE_SETLOCALE = @REPLACE_SETLOCALE@ -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@ -REPLACE_STRNCAT = @REPLACE_STRNCAT@ -REPLACE_STRNDUP = @REPLACE_STRNDUP@ -REPLACE_STRNLEN = @REPLACE_STRNLEN@ -REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@ -REPLACE_STRSTR = @REPLACE_STRSTR@ -REPLACE_STRTOD = @REPLACE_STRTOD@ -REPLACE_STRTOIMAX = @REPLACE_STRTOIMAX@ -REPLACE_STRTOK_R = @REPLACE_STRTOK_R@ -REPLACE_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@ -REPLACE_UNSETENV = @REPLACE_UNSETENV@ -REPLACE_USLEEP = @REPLACE_USLEEP@ -REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@ -REPLACE_VASPRINTF = @REPLACE_VASPRINTF@ -REPLACE_VDPRINTF = @REPLACE_VDPRINTF@ -REPLACE_VFPRINTF = @REPLACE_VFPRINTF@ -REPLACE_VPRINTF = @REPLACE_VPRINTF@ -REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@ -REPLACE_VSPRINTF = @REPLACE_VSPRINTF@ -REPLACE_WCRTOMB = @REPLACE_WCRTOMB@ -REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@ -REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@ -REPLACE_WCSWIDTH = @REPLACE_WCSWIDTH@ -REPLACE_WCTOB = @REPLACE_WCTOB@ -REPLACE_WCTOMB = @REPLACE_WCTOMB@ -REPLACE_WCWIDTH = @REPLACE_WCWIDTH@ -REPLACE_WRITE = @REPLACE_WRITE@ -SED = @SED@ -SELINUX_CONTEXT_H = @SELINUX_CONTEXT_H@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@ -SIZE_T_SUFFIX = @SIZE_T_SUFFIX@ -STDBOOL_H = @STDBOOL_H@ -STDDEF_H = @STDDEF_H@ -STDINT_H = @STDINT_H@ -STRIP = @STRIP@ -SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@ -TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@ -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@ -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@ -YIELD_LIB = @YIELD_LIB@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -gl_LIBOBJS = @gl_LIBOBJS@ -gl_LTLIBOBJS = @gl_LTLIBOBJS@ -gltests_LIBOBJS = @gltests_LIBOBJS@ -gltests_LTLIBOBJS = @gltests_LTLIBOBJS@ -gltests_WITNESS = @gltests_WITNESS@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -lispdir = @lispdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -GNULIB = ../gnulib/lib/libgnu.la -GNULIB_CFLAGS = -I $(top_srcdir)/gnulib/lib -AM_CFLAGS = $(AUGEAS_CFLAGS) $(WARN_CFLAGS) $(GNULIB_CFLAGS) \ - $(LIBXML_CFLAGS) -I $(top_builddir)/src - -VALGRIND = libtool --mode=execute valgrind --quiet --leak-check=full -lens_tests = \ - lens-sudoers.sh \ - lens-access.sh \ - lens-activemq_conf.sh \ - lens-activemq_xml.sh \ - lens-aliases.sh \ - lens-anacron.sh \ - lens-approx.sh \ - lens-apt_update_manager.sh \ - lens-aptcacherngsecurity.sh \ - lens-aptpreferences.sh \ - lens-aptconf.sh \ - lens-aptsource.sh \ - lens-authorized_keys.sh \ - lens-automaster.sh \ - lens-automounter.sh \ - lens-avahi.sh \ - lens-backuppchosts.sh \ - lens-bbhosts.sh \ - lens-bootconf.sh \ - lens-build.sh \ - lens-cachefilesd.sh \ - lens-carbon.sh \ - lens-cgconfig.sh \ - lens-cgrules.sh \ - lens-channels.sh \ - lens-chrony.sh \ - lens-cobblersettings.sh \ - lens-cobblermodules.sh \ - lens-collectd.sh \ - lens-cpanel.sh \ - lens-cron.sh \ - lens-crypttab.sh \ - lens-cyrus_imapd.sh \ - lens-cups.sh \ - lens-darkice.sh \ - lens-debctrl.sh \ - lens-desktop.sh \ - lens-device_map.sh \ - lens-dhclient.sh \ - lens-dhcpd.sh \ - lens-dnsmasq.sh \ - lens-dovecot.sh \ - lens-dpkg.sh \ - lens-dput.sh \ - lens-erlang.sh \ - lens-ethers.sh \ - lens-exports.sh \ - lens-fai_diskconfig.sh \ - lens-fonts.sh \ - lens-fstab.sh \ - lens-fuse.sh \ - lens-gdm.sh \ - lens-group.sh \ - lens-gshadow.sh \ - lens-gtkbookmarks.sh \ - lens-json.sh \ - lens-hostname.sh \ - lens-hosts.sh \ - lens-hosts_access.sh \ - lens-host_conf.sh \ - lens-htpasswd.sh \ - lens-httpd.sh \ - lens-inetd.sh \ - lens-inifile.sh \ - lens-inittab.sh \ - lens-inputrc.sh \ - lens-interfaces.sh \ - lens-iptables.sh \ - lens-iproute2.sh \ - lens-jettyrealm.sh \ - lens-jmxaccess.sh \ - lens-jmxpassword.sh \ - lens-kdump.sh \ - lens-keepalived.sh \ - lens-known_hosts.sh \ - lens-koji.sh \ - lens-krb5.sh \ - lens-jaas.sh \ - lens-ldap.sh \ - lens-ldif.sh \ - lens-ldso.sh \ - lens-lightdm.sh \ - lens-limits.sh \ - lens-login_defs.sh \ - lens-logrotate.sh \ - lens-logwatch.sh \ - lens-lokkit.sh \ - lens-lvm.sh \ - lens-mcollective.sh \ - lens-mdadm_conf.sh \ - lens-memcached.sh \ - lens-mke2fs.sh \ - lens-modprobe.sh \ - lens-modules.sh \ - lens-modules_conf.sh \ - lens-mongodbserver.sh \ - lens-monit.sh \ - lens-multipath.sh \ - lens-mysql.sh \ - lens-nagioscfg.sh \ - lens-nagiosobjects.sh \ - lens-netmasks.sh \ - lens-networkmanager.sh \ - lens-networks.sh \ - lens-nginx.sh \ - lens-ntp.sh \ - lens-ntpd.sh \ - lens-nrpe.sh \ - lens-nsswitch.sh \ - lens-odbc.sh \ - lens-openshift_config.sh \ - lens-openshift_http.sh \ - lens-openshift_quickstarts.sh \ - lens-openvpn.sh \ - lens-pagekite.sh \ - lens-pam.sh \ - lens-pamconf.sh \ - lens-passwd.sh \ - lens-pbuilder.sh \ - lens-pg_hba.sh \ - lens-php.sh \ - lens-phpvars.sh \ - lens-postfix_access.sh \ - lens-postfix_main.sh \ - lens-postfix_master.sh \ - lens-postfix_transport.sh \ - lens-postfix_virtual.sh \ - lens-postgresql.sh \ - lens-properties.sh \ - lens-protocols.sh \ - lens-puppet.sh \ - lens-puppet_auth.sh \ - lens-puppetfileserver.sh \ - lens-pythonpaste.sh \ - lens-qpid.sh \ - lens-quote.sh \ - lens-rabbitmq.sh \ - lens-redis.sh \ - lens-reprepro_uploaders.sh \ - lens-resolv.sh \ - lens-rmt.sh \ - lens-rsyncd.sh \ - lens-rsyslog.sh \ - lens-rx.sh \ - lens-samba.sh \ - lens-securetty.sh \ - lens-services.sh \ - lens-shadow.sh \ - lens-shells.sh \ - lens-shellvars.sh \ - lens-shellvars_list.sh \ - lens-simplelines.sh \ - lens-simplevars.sh \ - lens-sip_conf.sh \ - lens-slapd.sh \ - lens-smbusers.sh \ - lens-solaris_system.sh \ - lens-soma.sh \ - lens-spacevars.sh \ - lens-splunk.sh \ - lens-squid.sh \ - lens-ssh.sh \ - lens-sshd.sh \ - lens-sssd.sh \ - lens-stunnel.sh \ - lens-subversion.sh \ - lens-sysconfig.sh \ - lens-sysconfig_route.sh \ - lens-syslog.sh \ - lens-sysctl.sh \ - lens-systemd.sh \ - lens-thttpd.sh \ - lens-tuned.sh \ - lens-up2date.sh \ - lens-updatedb.sh \ - lens-util.sh \ - lens-vfstab.sh \ - lens-vmware_config.sh \ - lens-vsftpd.sh \ - lens-webmin.sh \ - lens-wine.sh \ - lens-xinetd.sh \ - lens-xml.sh \ - lens-xorg.sh \ - lens-xymon.sh \ - lens-xymon_alerting.sh \ - lens-grub.sh \ - lens-schroot.sh \ - lens-xendconfsxp.sh \ - lens-yum.sh - -ME = tests/Makefile.am -_v = lens_tests -DISTCLEANFILES = $(lens_tests) -check_SCRIPTS = \ - test-interpreter.sh \ - $(lens_tests) \ - test-get.sh test-augtool.sh \ - test-put-symlink.sh test-put-symlink-augnew.sh \ - test-put-symlink-augsave.sh test-put-symlink-augtemp.sh \ - test-put-mount.sh test-put-mount-augnew.sh test-put-mount-augsave.sh \ - test-save-empty.sh test-bug-1.sh test-idempotent.sh test-preserve.sh \ - test-events-saved.sh test-save-mode.sh test-unlink-error.sh \ - test-augtool-empty-line.sh test-augtool-modify-root.sh - -EXTRA_DIST = \ - test-augtool root lens-test-1 \ - $(check_SCRIPTS) $(wildcard modules/*.aug) xpath.tests run.tests - -noinst_SCRIPTS = $(check_SCRIPTS) -TESTS_ENVIRONMENT = \ - PATH='$(abs_top_builddir)/src$(PATH_SEPARATOR)'"$$PATH" \ - abs_top_builddir='$(abs_top_builddir)' \ - abs_top_srcdir='$(abs_top_srcdir)' \ - LANG=en_US - -TESTS = $(check_SCRIPTS) $(check_PROGRAMS) -INCLUDES = -I$(top_srcdir)/src -fatest_SOURCES = fatest.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h -fatest_LDADD = $(top_builddir)/src/libfa.la $(LIBXML_LIBS) $(GNULIB) -test_xpath_SOURCES = test-xpath.c cutest.c cutest.h $(top_srcdir)/src/memory.c -test_xpath_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -test_load_SOURCES = test-load.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h -test_load_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -test_save_SOURCES = test-save.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h -test_save_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -test_api_SOURCES = test-api.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h -test_api_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -test_run_SOURCES = test-run.c cutest.c cutest.h $(top_srcdir)/src/memory.c $(top_srcdir)/src/memory.h -test_run_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -leak_SOURCES = leak.c -leak_LDADD = $(top_builddir)/src/libaugeas.la $(LIBXML_LIBS) $(GNULIB) -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/Makefile.inc $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --gnu tests/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; -$(top_srcdir)/Makefile.inc: - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -clean-noinstPROGRAMS: - @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list - -fatest$(EXEEXT): $(fatest_OBJECTS) $(fatest_DEPENDENCIES) $(EXTRA_fatest_DEPENDENCIES) - @rm -f fatest$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(fatest_OBJECTS) $(fatest_LDADD) $(LIBS) - -leak$(EXEEXT): $(leak_OBJECTS) $(leak_DEPENDENCIES) $(EXTRA_leak_DEPENDENCIES) - @rm -f leak$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(leak_OBJECTS) $(leak_LDADD) $(LIBS) - -test-api$(EXEEXT): $(test_api_OBJECTS) $(test_api_DEPENDENCIES) $(EXTRA_test_api_DEPENDENCIES) - @rm -f test-api$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_api_OBJECTS) $(test_api_LDADD) $(LIBS) - -test-load$(EXEEXT): $(test_load_OBJECTS) $(test_load_DEPENDENCIES) $(EXTRA_test_load_DEPENDENCIES) - @rm -f test-load$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_load_OBJECTS) $(test_load_LDADD) $(LIBS) - -test-run$(EXEEXT): $(test_run_OBJECTS) $(test_run_DEPENDENCIES) $(EXTRA_test_run_DEPENDENCIES) - @rm -f test-run$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_run_OBJECTS) $(test_run_LDADD) $(LIBS) - -test-save$(EXEEXT): $(test_save_OBJECTS) $(test_save_DEPENDENCIES) $(EXTRA_test_save_DEPENDENCIES) - @rm -f test-save$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_save_OBJECTS) $(test_save_LDADD) $(LIBS) - -test-xpath$(EXEEXT): $(test_xpath_OBJECTS) $(test_xpath_DEPENDENCIES) $(EXTRA_test_xpath_DEPENDENCIES) - @rm -f test-xpath$(EXEEXT) - $(AM_V_CCLD)$(LINK) $(test_xpath_OBJECTS) $(test_xpath_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cutest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatest.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/leak.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memory.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-api.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-load.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-run.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-save.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xpath.Po@am__quote@ - -.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 -@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@ $(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 -@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@ $(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 -@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@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< - -memory.o: $(top_srcdir)/src/memory.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.o -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.o `test -f '$(top_srcdir)/src/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/src/memory.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/memory.c' object='memory.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.o `test -f '$(top_srcdir)/src/memory.c' || echo '$(srcdir)/'`$(top_srcdir)/src/memory.c - -memory.obj: $(top_srcdir)/src/memory.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT memory.obj -MD -MP -MF $(DEPDIR)/memory.Tpo -c -o memory.obj `if test -f '$(top_srcdir)/src/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/src/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/memory.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/memory.Tpo $(DEPDIR)/memory.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/src/memory.c' object='memory.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o memory.obj `if test -f '$(top_srcdir)/src/memory.c'; then $(CYGPATH_W) '$(top_srcdir)/src/memory.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/src/memory.c'; fi` - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -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`; \ - $(am__define_uniq_tagged_files); \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: ctags-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 - -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 - -# 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__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); \ - create_testsuite_report --no-color; \ - echo; \ - echo ".. contents:: :depth: 2"; \ - echo; \ - 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 $$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 \ - echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ - fi; \ - echo "$$col$$br$$std"; \ - fi; \ - $$success || exit 1 - -check-TESTS: - @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) - @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_PROGRAMS) $(check_SCRIPTS) - @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-interpreter.sh.log: test-interpreter.sh - @p='test-interpreter.sh'; \ - b='test-interpreter.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) -lens-sudoers.sh.log: lens-sudoers.sh - @p='lens-sudoers.sh'; \ - b='lens-sudoers.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) -lens-access.sh.log: lens-access.sh - @p='lens-access.sh'; \ - b='lens-access.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) -lens-activemq_conf.sh.log: lens-activemq_conf.sh - @p='lens-activemq_conf.sh'; \ - b='lens-activemq_conf.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) -lens-activemq_xml.sh.log: lens-activemq_xml.sh - @p='lens-activemq_xml.sh'; \ - b='lens-activemq_xml.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) -lens-aliases.sh.log: lens-aliases.sh - @p='lens-aliases.sh'; \ - b='lens-aliases.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) -lens-anacron.sh.log: lens-anacron.sh - @p='lens-anacron.sh'; \ - b='lens-anacron.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) -lens-approx.sh.log: lens-approx.sh - @p='lens-approx.sh'; \ - b='lens-approx.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) -lens-apt_update_manager.sh.log: lens-apt_update_manager.sh - @p='lens-apt_update_manager.sh'; \ - b='lens-apt_update_manager.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) -lens-aptcacherngsecurity.sh.log: lens-aptcacherngsecurity.sh - @p='lens-aptcacherngsecurity.sh'; \ - b='lens-aptcacherngsecurity.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) -lens-aptpreferences.sh.log: lens-aptpreferences.sh - @p='lens-aptpreferences.sh'; \ - b='lens-aptpreferences.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) -lens-aptconf.sh.log: lens-aptconf.sh - @p='lens-aptconf.sh'; \ - b='lens-aptconf.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) -lens-aptsource.sh.log: lens-aptsource.sh - @p='lens-aptsource.sh'; \ - b='lens-aptsource.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) -lens-authorized_keys.sh.log: lens-authorized_keys.sh - @p='lens-authorized_keys.sh'; \ - b='lens-authorized_keys.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) -lens-automaster.sh.log: lens-automaster.sh - @p='lens-automaster.sh'; \ - b='lens-automaster.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) -lens-automounter.sh.log: lens-automounter.sh - @p='lens-automounter.sh'; \ - b='lens-automounter.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) -lens-avahi.sh.log: lens-avahi.sh - @p='lens-avahi.sh'; \ - b='lens-avahi.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) -lens-backuppchosts.sh.log: lens-backuppchosts.sh - @p='lens-backuppchosts.sh'; \ - b='lens-backuppchosts.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) -lens-bbhosts.sh.log: lens-bbhosts.sh - @p='lens-bbhosts.sh'; \ - b='lens-bbhosts.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) -lens-bootconf.sh.log: lens-bootconf.sh - @p='lens-bootconf.sh'; \ - b='lens-bootconf.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) -lens-build.sh.log: lens-build.sh - @p='lens-build.sh'; \ - b='lens-build.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) -lens-cachefilesd.sh.log: lens-cachefilesd.sh - @p='lens-cachefilesd.sh'; \ - b='lens-cachefilesd.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) -lens-carbon.sh.log: lens-carbon.sh - @p='lens-carbon.sh'; \ - b='lens-carbon.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) -lens-cgconfig.sh.log: lens-cgconfig.sh - @p='lens-cgconfig.sh'; \ - b='lens-cgconfig.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) -lens-cgrules.sh.log: lens-cgrules.sh - @p='lens-cgrules.sh'; \ - b='lens-cgrules.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) -lens-channels.sh.log: lens-channels.sh - @p='lens-channels.sh'; \ - b='lens-channels.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) -lens-chrony.sh.log: lens-chrony.sh - @p='lens-chrony.sh'; \ - b='lens-chrony.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) -lens-cobblersettings.sh.log: lens-cobblersettings.sh - @p='lens-cobblersettings.sh'; \ - b='lens-cobblersettings.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) -lens-cobblermodules.sh.log: lens-cobblermodules.sh - @p='lens-cobblermodules.sh'; \ - b='lens-cobblermodules.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) -lens-collectd.sh.log: lens-collectd.sh - @p='lens-collectd.sh'; \ - b='lens-collectd.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) -lens-cpanel.sh.log: lens-cpanel.sh - @p='lens-cpanel.sh'; \ - b='lens-cpanel.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) -lens-cron.sh.log: lens-cron.sh - @p='lens-cron.sh'; \ - b='lens-cron.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) -lens-crypttab.sh.log: lens-crypttab.sh - @p='lens-crypttab.sh'; \ - b='lens-crypttab.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) -lens-cyrus_imapd.sh.log: lens-cyrus_imapd.sh - @p='lens-cyrus_imapd.sh'; \ - b='lens-cyrus_imapd.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) -lens-cups.sh.log: lens-cups.sh - @p='lens-cups.sh'; \ - b='lens-cups.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) -lens-darkice.sh.log: lens-darkice.sh - @p='lens-darkice.sh'; \ - b='lens-darkice.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) -lens-debctrl.sh.log: lens-debctrl.sh - @p='lens-debctrl.sh'; \ - b='lens-debctrl.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) -lens-desktop.sh.log: lens-desktop.sh - @p='lens-desktop.sh'; \ - b='lens-desktop.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) -lens-device_map.sh.log: lens-device_map.sh - @p='lens-device_map.sh'; \ - b='lens-device_map.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) -lens-dhclient.sh.log: lens-dhclient.sh - @p='lens-dhclient.sh'; \ - b='lens-dhclient.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) -lens-dhcpd.sh.log: lens-dhcpd.sh - @p='lens-dhcpd.sh'; \ - b='lens-dhcpd.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) -lens-dnsmasq.sh.log: lens-dnsmasq.sh - @p='lens-dnsmasq.sh'; \ - b='lens-dnsmasq.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) -lens-dovecot.sh.log: lens-dovecot.sh - @p='lens-dovecot.sh'; \ - b='lens-dovecot.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) -lens-dpkg.sh.log: lens-dpkg.sh - @p='lens-dpkg.sh'; \ - b='lens-dpkg.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) -lens-dput.sh.log: lens-dput.sh - @p='lens-dput.sh'; \ - b='lens-dput.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) -lens-erlang.sh.log: lens-erlang.sh - @p='lens-erlang.sh'; \ - b='lens-erlang.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) -lens-ethers.sh.log: lens-ethers.sh - @p='lens-ethers.sh'; \ - b='lens-ethers.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) -lens-exports.sh.log: lens-exports.sh - @p='lens-exports.sh'; \ - b='lens-exports.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) -lens-fai_diskconfig.sh.log: lens-fai_diskconfig.sh - @p='lens-fai_diskconfig.sh'; \ - b='lens-fai_diskconfig.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) -lens-fonts.sh.log: lens-fonts.sh - @p='lens-fonts.sh'; \ - b='lens-fonts.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) -lens-fstab.sh.log: lens-fstab.sh - @p='lens-fstab.sh'; \ - b='lens-fstab.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) -lens-fuse.sh.log: lens-fuse.sh - @p='lens-fuse.sh'; \ - b='lens-fuse.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) -lens-gdm.sh.log: lens-gdm.sh - @p='lens-gdm.sh'; \ - b='lens-gdm.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) -lens-group.sh.log: lens-group.sh - @p='lens-group.sh'; \ - b='lens-group.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) -lens-gshadow.sh.log: lens-gshadow.sh - @p='lens-gshadow.sh'; \ - b='lens-gshadow.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) -lens-gtkbookmarks.sh.log: lens-gtkbookmarks.sh - @p='lens-gtkbookmarks.sh'; \ - b='lens-gtkbookmarks.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) -lens-json.sh.log: lens-json.sh - @p='lens-json.sh'; \ - b='lens-json.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) -lens-hostname.sh.log: lens-hostname.sh - @p='lens-hostname.sh'; \ - b='lens-hostname.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) -lens-hosts.sh.log: lens-hosts.sh - @p='lens-hosts.sh'; \ - b='lens-hosts.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) -lens-hosts_access.sh.log: lens-hosts_access.sh - @p='lens-hosts_access.sh'; \ - b='lens-hosts_access.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) -lens-host_conf.sh.log: lens-host_conf.sh - @p='lens-host_conf.sh'; \ - b='lens-host_conf.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) -lens-htpasswd.sh.log: lens-htpasswd.sh - @p='lens-htpasswd.sh'; \ - b='lens-htpasswd.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) -lens-httpd.sh.log: lens-httpd.sh - @p='lens-httpd.sh'; \ - b='lens-httpd.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) -lens-inetd.sh.log: lens-inetd.sh - @p='lens-inetd.sh'; \ - b='lens-inetd.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) -lens-inifile.sh.log: lens-inifile.sh - @p='lens-inifile.sh'; \ - b='lens-inifile.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) -lens-inittab.sh.log: lens-inittab.sh - @p='lens-inittab.sh'; \ - b='lens-inittab.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) -lens-inputrc.sh.log: lens-inputrc.sh - @p='lens-inputrc.sh'; \ - b='lens-inputrc.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) -lens-interfaces.sh.log: lens-interfaces.sh - @p='lens-interfaces.sh'; \ - b='lens-interfaces.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) -lens-iptables.sh.log: lens-iptables.sh - @p='lens-iptables.sh'; \ - b='lens-iptables.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) -lens-iproute2.sh.log: lens-iproute2.sh - @p='lens-iproute2.sh'; \ - b='lens-iproute2.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) -lens-jettyrealm.sh.log: lens-jettyrealm.sh - @p='lens-jettyrealm.sh'; \ - b='lens-jettyrealm.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) -lens-jmxaccess.sh.log: lens-jmxaccess.sh - @p='lens-jmxaccess.sh'; \ - b='lens-jmxaccess.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) -lens-jmxpassword.sh.log: lens-jmxpassword.sh - @p='lens-jmxpassword.sh'; \ - b='lens-jmxpassword.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) -lens-kdump.sh.log: lens-kdump.sh - @p='lens-kdump.sh'; \ - b='lens-kdump.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) -lens-keepalived.sh.log: lens-keepalived.sh - @p='lens-keepalived.sh'; \ - b='lens-keepalived.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) -lens-known_hosts.sh.log: lens-known_hosts.sh - @p='lens-known_hosts.sh'; \ - b='lens-known_hosts.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) -lens-koji.sh.log: lens-koji.sh - @p='lens-koji.sh'; \ - b='lens-koji.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) -lens-krb5.sh.log: lens-krb5.sh - @p='lens-krb5.sh'; \ - b='lens-krb5.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) -lens-jaas.sh.log: lens-jaas.sh - @p='lens-jaas.sh'; \ - b='lens-jaas.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) -lens-ldap.sh.log: lens-ldap.sh - @p='lens-ldap.sh'; \ - b='lens-ldap.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) -lens-ldif.sh.log: lens-ldif.sh - @p='lens-ldif.sh'; \ - b='lens-ldif.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) -lens-ldso.sh.log: lens-ldso.sh - @p='lens-ldso.sh'; \ - b='lens-ldso.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) -lens-lightdm.sh.log: lens-lightdm.sh - @p='lens-lightdm.sh'; \ - b='lens-lightdm.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) -lens-limits.sh.log: lens-limits.sh - @p='lens-limits.sh'; \ - b='lens-limits.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) -lens-login_defs.sh.log: lens-login_defs.sh - @p='lens-login_defs.sh'; \ - b='lens-login_defs.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) -lens-logrotate.sh.log: lens-logrotate.sh - @p='lens-logrotate.sh'; \ - b='lens-logrotate.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) -lens-logwatch.sh.log: lens-logwatch.sh - @p='lens-logwatch.sh'; \ - b='lens-logwatch.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) -lens-lokkit.sh.log: lens-lokkit.sh - @p='lens-lokkit.sh'; \ - b='lens-lokkit.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) -lens-lvm.sh.log: lens-lvm.sh - @p='lens-lvm.sh'; \ - b='lens-lvm.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) -lens-mcollective.sh.log: lens-mcollective.sh - @p='lens-mcollective.sh'; \ - b='lens-mcollective.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) -lens-mdadm_conf.sh.log: lens-mdadm_conf.sh - @p='lens-mdadm_conf.sh'; \ - b='lens-mdadm_conf.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) -lens-memcached.sh.log: lens-memcached.sh - @p='lens-memcached.sh'; \ - b='lens-memcached.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) -lens-mke2fs.sh.log: lens-mke2fs.sh - @p='lens-mke2fs.sh'; \ - b='lens-mke2fs.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) -lens-modprobe.sh.log: lens-modprobe.sh - @p='lens-modprobe.sh'; \ - b='lens-modprobe.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) -lens-modules.sh.log: lens-modules.sh - @p='lens-modules.sh'; \ - b='lens-modules.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) -lens-modules_conf.sh.log: lens-modules_conf.sh - @p='lens-modules_conf.sh'; \ - b='lens-modules_conf.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) -lens-mongodbserver.sh.log: lens-mongodbserver.sh - @p='lens-mongodbserver.sh'; \ - b='lens-mongodbserver.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) -lens-monit.sh.log: lens-monit.sh - @p='lens-monit.sh'; \ - b='lens-monit.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) -lens-multipath.sh.log: lens-multipath.sh - @p='lens-multipath.sh'; \ - b='lens-multipath.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) -lens-mysql.sh.log: lens-mysql.sh - @p='lens-mysql.sh'; \ - b='lens-mysql.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) -lens-nagioscfg.sh.log: lens-nagioscfg.sh - @p='lens-nagioscfg.sh'; \ - b='lens-nagioscfg.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) -lens-nagiosobjects.sh.log: lens-nagiosobjects.sh - @p='lens-nagiosobjects.sh'; \ - b='lens-nagiosobjects.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) -lens-netmasks.sh.log: lens-netmasks.sh - @p='lens-netmasks.sh'; \ - b='lens-netmasks.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) -lens-networkmanager.sh.log: lens-networkmanager.sh - @p='lens-networkmanager.sh'; \ - b='lens-networkmanager.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) -lens-networks.sh.log: lens-networks.sh - @p='lens-networks.sh'; \ - b='lens-networks.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) -lens-nginx.sh.log: lens-nginx.sh - @p='lens-nginx.sh'; \ - b='lens-nginx.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) -lens-ntp.sh.log: lens-ntp.sh - @p='lens-ntp.sh'; \ - b='lens-ntp.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) -lens-ntpd.sh.log: lens-ntpd.sh - @p='lens-ntpd.sh'; \ - b='lens-ntpd.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) -lens-nrpe.sh.log: lens-nrpe.sh - @p='lens-nrpe.sh'; \ - b='lens-nrpe.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) -lens-nsswitch.sh.log: lens-nsswitch.sh - @p='lens-nsswitch.sh'; \ - b='lens-nsswitch.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) -lens-odbc.sh.log: lens-odbc.sh - @p='lens-odbc.sh'; \ - b='lens-odbc.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) -lens-openshift_config.sh.log: lens-openshift_config.sh - @p='lens-openshift_config.sh'; \ - b='lens-openshift_config.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) -lens-openshift_http.sh.log: lens-openshift_http.sh - @p='lens-openshift_http.sh'; \ - b='lens-openshift_http.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) -lens-openshift_quickstarts.sh.log: lens-openshift_quickstarts.sh - @p='lens-openshift_quickstarts.sh'; \ - b='lens-openshift_quickstarts.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) -lens-openvpn.sh.log: lens-openvpn.sh - @p='lens-openvpn.sh'; \ - b='lens-openvpn.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) -lens-pagekite.sh.log: lens-pagekite.sh - @p='lens-pagekite.sh'; \ - b='lens-pagekite.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) -lens-pam.sh.log: lens-pam.sh - @p='lens-pam.sh'; \ - b='lens-pam.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) -lens-pamconf.sh.log: lens-pamconf.sh - @p='lens-pamconf.sh'; \ - b='lens-pamconf.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) -lens-passwd.sh.log: lens-passwd.sh - @p='lens-passwd.sh'; \ - b='lens-passwd.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) -lens-pbuilder.sh.log: lens-pbuilder.sh - @p='lens-pbuilder.sh'; \ - b='lens-pbuilder.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) -lens-pg_hba.sh.log: lens-pg_hba.sh - @p='lens-pg_hba.sh'; \ - b='lens-pg_hba.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) -lens-php.sh.log: lens-php.sh - @p='lens-php.sh'; \ - b='lens-php.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) -lens-phpvars.sh.log: lens-phpvars.sh - @p='lens-phpvars.sh'; \ - b='lens-phpvars.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) -lens-postfix_access.sh.log: lens-postfix_access.sh - @p='lens-postfix_access.sh'; \ - b='lens-postfix_access.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) -lens-postfix_main.sh.log: lens-postfix_main.sh - @p='lens-postfix_main.sh'; \ - b='lens-postfix_main.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) -lens-postfix_master.sh.log: lens-postfix_master.sh - @p='lens-postfix_master.sh'; \ - b='lens-postfix_master.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) -lens-postfix_transport.sh.log: lens-postfix_transport.sh - @p='lens-postfix_transport.sh'; \ - b='lens-postfix_transport.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) -lens-postfix_virtual.sh.log: lens-postfix_virtual.sh - @p='lens-postfix_virtual.sh'; \ - b='lens-postfix_virtual.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) -lens-postgresql.sh.log: lens-postgresql.sh - @p='lens-postgresql.sh'; \ - b='lens-postgresql.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) -lens-properties.sh.log: lens-properties.sh - @p='lens-properties.sh'; \ - b='lens-properties.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) -lens-protocols.sh.log: lens-protocols.sh - @p='lens-protocols.sh'; \ - b='lens-protocols.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) -lens-puppet.sh.log: lens-puppet.sh - @p='lens-puppet.sh'; \ - b='lens-puppet.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) -lens-puppet_auth.sh.log: lens-puppet_auth.sh - @p='lens-puppet_auth.sh'; \ - b='lens-puppet_auth.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) -lens-puppetfileserver.sh.log: lens-puppetfileserver.sh - @p='lens-puppetfileserver.sh'; \ - b='lens-puppetfileserver.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) -lens-pythonpaste.sh.log: lens-pythonpaste.sh - @p='lens-pythonpaste.sh'; \ - b='lens-pythonpaste.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) -lens-qpid.sh.log: lens-qpid.sh - @p='lens-qpid.sh'; \ - b='lens-qpid.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) -lens-quote.sh.log: lens-quote.sh - @p='lens-quote.sh'; \ - b='lens-quote.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) -lens-rabbitmq.sh.log: lens-rabbitmq.sh - @p='lens-rabbitmq.sh'; \ - b='lens-rabbitmq.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) -lens-redis.sh.log: lens-redis.sh - @p='lens-redis.sh'; \ - b='lens-redis.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) -lens-reprepro_uploaders.sh.log: lens-reprepro_uploaders.sh - @p='lens-reprepro_uploaders.sh'; \ - b='lens-reprepro_uploaders.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) -lens-resolv.sh.log: lens-resolv.sh - @p='lens-resolv.sh'; \ - b='lens-resolv.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) -lens-rmt.sh.log: lens-rmt.sh - @p='lens-rmt.sh'; \ - b='lens-rmt.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) -lens-rsyncd.sh.log: lens-rsyncd.sh - @p='lens-rsyncd.sh'; \ - b='lens-rsyncd.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) -lens-rsyslog.sh.log: lens-rsyslog.sh - @p='lens-rsyslog.sh'; \ - b='lens-rsyslog.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) -lens-rx.sh.log: lens-rx.sh - @p='lens-rx.sh'; \ - b='lens-rx.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) -lens-samba.sh.log: lens-samba.sh - @p='lens-samba.sh'; \ - b='lens-samba.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) -lens-securetty.sh.log: lens-securetty.sh - @p='lens-securetty.sh'; \ - b='lens-securetty.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) -lens-services.sh.log: lens-services.sh - @p='lens-services.sh'; \ - b='lens-services.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) -lens-shadow.sh.log: lens-shadow.sh - @p='lens-shadow.sh'; \ - b='lens-shadow.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) -lens-shells.sh.log: lens-shells.sh - @p='lens-shells.sh'; \ - b='lens-shells.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) -lens-shellvars.sh.log: lens-shellvars.sh - @p='lens-shellvars.sh'; \ - b='lens-shellvars.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) -lens-shellvars_list.sh.log: lens-shellvars_list.sh - @p='lens-shellvars_list.sh'; \ - b='lens-shellvars_list.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) -lens-simplelines.sh.log: lens-simplelines.sh - @p='lens-simplelines.sh'; \ - b='lens-simplelines.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) -lens-simplevars.sh.log: lens-simplevars.sh - @p='lens-simplevars.sh'; \ - b='lens-simplevars.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) -lens-sip_conf.sh.log: lens-sip_conf.sh - @p='lens-sip_conf.sh'; \ - b='lens-sip_conf.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) -lens-slapd.sh.log: lens-slapd.sh - @p='lens-slapd.sh'; \ - b='lens-slapd.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) -lens-smbusers.sh.log: lens-smbusers.sh - @p='lens-smbusers.sh'; \ - b='lens-smbusers.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) -lens-solaris_system.sh.log: lens-solaris_system.sh - @p='lens-solaris_system.sh'; \ - b='lens-solaris_system.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) -lens-soma.sh.log: lens-soma.sh - @p='lens-soma.sh'; \ - b='lens-soma.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) -lens-spacevars.sh.log: lens-spacevars.sh - @p='lens-spacevars.sh'; \ - b='lens-spacevars.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) -lens-splunk.sh.log: lens-splunk.sh - @p='lens-splunk.sh'; \ - b='lens-splunk.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) -lens-squid.sh.log: lens-squid.sh - @p='lens-squid.sh'; \ - b='lens-squid.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) -lens-ssh.sh.log: lens-ssh.sh - @p='lens-ssh.sh'; \ - b='lens-ssh.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) -lens-sshd.sh.log: lens-sshd.sh - @p='lens-sshd.sh'; \ - b='lens-sshd.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) -lens-sssd.sh.log: lens-sssd.sh - @p='lens-sssd.sh'; \ - b='lens-sssd.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) -lens-stunnel.sh.log: lens-stunnel.sh - @p='lens-stunnel.sh'; \ - b='lens-stunnel.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) -lens-subversion.sh.log: lens-subversion.sh - @p='lens-subversion.sh'; \ - b='lens-subversion.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) -lens-sysconfig.sh.log: lens-sysconfig.sh - @p='lens-sysconfig.sh'; \ - b='lens-sysconfig.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) -lens-sysconfig_route.sh.log: lens-sysconfig_route.sh - @p='lens-sysconfig_route.sh'; \ - b='lens-sysconfig_route.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) -lens-syslog.sh.log: lens-syslog.sh - @p='lens-syslog.sh'; \ - b='lens-syslog.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) -lens-sysctl.sh.log: lens-sysctl.sh - @p='lens-sysctl.sh'; \ - b='lens-sysctl.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) -lens-systemd.sh.log: lens-systemd.sh - @p='lens-systemd.sh'; \ - b='lens-systemd.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) -lens-thttpd.sh.log: lens-thttpd.sh - @p='lens-thttpd.sh'; \ - b='lens-thttpd.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) -lens-tuned.sh.log: lens-tuned.sh - @p='lens-tuned.sh'; \ - b='lens-tuned.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) -lens-up2date.sh.log: lens-up2date.sh - @p='lens-up2date.sh'; \ - b='lens-up2date.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) -lens-updatedb.sh.log: lens-updatedb.sh - @p='lens-updatedb.sh'; \ - b='lens-updatedb.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) -lens-util.sh.log: lens-util.sh - @p='lens-util.sh'; \ - b='lens-util.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) -lens-vfstab.sh.log: lens-vfstab.sh - @p='lens-vfstab.sh'; \ - b='lens-vfstab.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) -lens-vmware_config.sh.log: lens-vmware_config.sh - @p='lens-vmware_config.sh'; \ - b='lens-vmware_config.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) -lens-vsftpd.sh.log: lens-vsftpd.sh - @p='lens-vsftpd.sh'; \ - b='lens-vsftpd.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) -lens-webmin.sh.log: lens-webmin.sh - @p='lens-webmin.sh'; \ - b='lens-webmin.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) -lens-wine.sh.log: lens-wine.sh - @p='lens-wine.sh'; \ - b='lens-wine.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) -lens-xinetd.sh.log: lens-xinetd.sh - @p='lens-xinetd.sh'; \ - b='lens-xinetd.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) -lens-xml.sh.log: lens-xml.sh - @p='lens-xml.sh'; \ - b='lens-xml.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) -lens-xorg.sh.log: lens-xorg.sh - @p='lens-xorg.sh'; \ - b='lens-xorg.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) -lens-xymon.sh.log: lens-xymon.sh - @p='lens-xymon.sh'; \ - b='lens-xymon.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) -lens-xymon_alerting.sh.log: lens-xymon_alerting.sh - @p='lens-xymon_alerting.sh'; \ - b='lens-xymon_alerting.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) -lens-grub.sh.log: lens-grub.sh - @p='lens-grub.sh'; \ - b='lens-grub.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) -lens-schroot.sh.log: lens-schroot.sh - @p='lens-schroot.sh'; \ - b='lens-schroot.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) -lens-xendconfsxp.sh.log: lens-xendconfsxp.sh - @p='lens-xendconfsxp.sh'; \ - b='lens-xendconfsxp.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) -lens-yum.sh.log: lens-yum.sh - @p='lens-yum.sh'; \ - b='lens-yum.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-get.sh.log: test-get.sh - @p='test-get.sh'; \ - b='test-get.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-augtool.sh.log: test-augtool.sh - @p='test-augtool.sh'; \ - b='test-augtool.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-put-symlink.sh.log: test-put-symlink.sh - @p='test-put-symlink.sh'; \ - b='test-put-symlink.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-put-symlink-augnew.sh.log: test-put-symlink-augnew.sh - @p='test-put-symlink-augnew.sh'; \ - b='test-put-symlink-augnew.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-put-symlink-augsave.sh.log: test-put-symlink-augsave.sh - @p='test-put-symlink-augsave.sh'; \ - b='test-put-symlink-augsave.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-put-symlink-augtemp.sh.log: test-put-symlink-augtemp.sh - @p='test-put-symlink-augtemp.sh'; \ - b='test-put-symlink-augtemp.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-put-mount.sh.log: test-put-mount.sh - @p='test-put-mount.sh'; \ - b='test-put-mount.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-put-mount-augnew.sh.log: test-put-mount-augnew.sh - @p='test-put-mount-augnew.sh'; \ - b='test-put-mount-augnew.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-put-mount-augsave.sh.log: test-put-mount-augsave.sh - @p='test-put-mount-augsave.sh'; \ - b='test-put-mount-augsave.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-save-empty.sh.log: test-save-empty.sh - @p='test-save-empty.sh'; \ - b='test-save-empty.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-bug-1.sh.log: test-bug-1.sh - @p='test-bug-1.sh'; \ - b='test-bug-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-idempotent.sh.log: test-idempotent.sh - @p='test-idempotent.sh'; \ - b='test-idempotent.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-preserve.sh.log: test-preserve.sh - @p='test-preserve.sh'; \ - b='test-preserve.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-events-saved.sh.log: test-events-saved.sh - @p='test-events-saved.sh'; \ - b='test-events-saved.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-save-mode.sh.log: test-save-mode.sh - @p='test-save-mode.sh'; \ - b='test-save-mode.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-unlink-error.sh.log: test-unlink-error.sh - @p='test-unlink-error.sh'; \ - b='test-unlink-error.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-augtool-empty-line.sh.log: test-augtool-empty-line.sh - @p='test-augtool-empty-line.sh'; \ - b='test-augtool-empty-line.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-augtool-modify-root.sh.log: test-augtool-modify-root.sh - @p='test-augtool-modify-root.sh'; \ - b='test-augtool-modify-root.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) -fatest.log: fatest$(EXEEXT) - @p='fatest$(EXEEXT)'; \ - b='fatest'; \ - $(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-xpath.log: test-xpath$(EXEEXT) - @p='test-xpath$(EXEEXT)'; \ - b='test-xpath'; \ - $(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-load.log: test-load$(EXEEXT) - @p='test-load$(EXEEXT)'; \ - b='test-load'; \ - $(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-save.log: test-save$(EXEEXT) - @p='test-save$(EXEEXT)'; \ - b='test-save'; \ - $(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-api.log: test-api$(EXEEXT) - @p='test-api$(EXEEXT)'; \ - b='test-api'; \ - $(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-run.log: test-run$(EXEEXT) - @p='test-run$(EXEEXT)'; \ - b='test-run'; \ - $(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__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__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'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) - $(MAKE) $(AM_MAKEFLAGS) check-TESTS -check: check-am -all-am: Makefile $(PROGRAMS) $(SCRIPTS) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) - -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) - -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ - clean-noinstPROGRAMS mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: - -.MAKE: check-am install-am install-strip - -.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool \ - 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 \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ - pdf pdf-am ps ps-am recheck tags tags-am uninstall \ - uninstall-am - -valgrind: - make check \ - VALGRIND="$(VALGRIND)" \ - AUGPARSE=$(abs_top_builddir)/src/augparse \ - AUGTOOL=$(abs_top_builddir)/src/augtool - $(VALGRIND) ./fatest - -valgrind-leak: leak - $(TESTS_ENVIRONMENT) $(VALGRIND) ./leak - -# Ensure that the above list stays up to date: -# Construct two lists: list of lens-*.sh from lens_tests = ... above, -# and the list of ../lenses/tests/test_*.aug names. -# If they're not the same, print the new or removed names and fail. -check: check-lens-tests -.PHONY: check-lens-tests -check-lens-tests: - @u=$$({ sed -n '/^$(_v) =[ ]*\\$$/,/[^\]$$/p' \ - $(srcdir)/Makefile.am \ - | sed 's/^ *//;/^\$$.*/d;/^$(_v) =/d' \ - | sed 's,\.sh.*\\,.sh,'; \ - ls -1 $(srcdir)/../lenses/tests/test_*.aug \ - | sed 's,.*/test_\([^./]*\)\.aug$$,lens-\1.sh,'; \ - } | LC_ALL=C sort | uniq -u); \ - test "x$$u" = x && : \ - || { printf '%s\n' "$$u" >&2; \ - echo '$(ME): new test(s)? update lens_tests' >&2; exit 1; } -$(lens_tests): lens-test-1 - $(LN_S) $< $@ - -FAILMALLOC_START ?= 1 -FAILMALLOC_REP ?= 20 -FAILMALLOC_PROG ?= ./fatest - -@WITH_FAILMALLOC_TRUE@failmalloc: failmalloc-run -@WITH_FAILMALLOC_FALSE@failmalloc: failmalloc-error - -failmalloc-run: $(FAILMALLOC_PROG) - @(echo "Running $(FAILMALLOC_PROG) with failmalloc"; \ - for i in $$(seq $(FAILMALLOC_START) $$(expr $(FAILMALLOC_START) + $(FAILMALLOC_REP) - 1)) ; do \ - resp=$$(libtool --mode=execute env LD_PRELOAD=$(LIBFAILMALLOC) FAILMALLOC_INTERVAL=$$i $(FAILMALLOC_PROG)); \ - status=$$?; \ - if [ $$status -ne 0 -a $$status -ne 2 ] ; then \ - printf "%5d FAIL %3d %s\n" $$i $$status "$$resp" ; \ - elif [ x$(V) = x1 -o $$(( $$i % 100 )) -eq 0 ] ; then \ - printf "%5d PASS %s\n" $$i "$$resp" ; \ - fi \ - done) - -failmalloc-error: - @(echo "You need to turn on failmalloc support with --with-failmalloc"; \ - exit 1) - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/tests/lens-access.sh b/tests/lens-access.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-access.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-activemq_conf.sh b/tests/lens-activemq_conf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-activemq_conf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-activemq_xml.sh b/tests/lens-activemq_xml.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-activemq_xml.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-aliases.sh b/tests/lens-aliases.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-aliases.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-anacron.sh b/tests/lens-anacron.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-anacron.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-approx.sh b/tests/lens-approx.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-approx.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-apt_update_manager.sh b/tests/lens-apt_update_manager.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-apt_update_manager.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-aptcacherngsecurity.sh b/tests/lens-aptcacherngsecurity.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-aptcacherngsecurity.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-aptconf.sh b/tests/lens-aptconf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-aptconf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-aptpreferences.sh b/tests/lens-aptpreferences.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-aptpreferences.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-aptsource.sh b/tests/lens-aptsource.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-aptsource.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-authorized_keys.sh b/tests/lens-authorized_keys.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-authorized_keys.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-automaster.sh b/tests/lens-automaster.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-automaster.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-automounter.sh b/tests/lens-automounter.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-automounter.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-avahi.sh b/tests/lens-avahi.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-avahi.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-backuppchosts.sh b/tests/lens-backuppchosts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-backuppchosts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-bbhosts.sh b/tests/lens-bbhosts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-bbhosts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-bootconf.sh b/tests/lens-bootconf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-bootconf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-build.sh b/tests/lens-build.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-build.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cachefilesd.sh b/tests/lens-cachefilesd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cachefilesd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-carbon.sh b/tests/lens-carbon.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-carbon.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cgconfig.sh b/tests/lens-cgconfig.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cgconfig.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cgrules.sh b/tests/lens-cgrules.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cgrules.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-channels.sh b/tests/lens-channels.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-channels.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-chrony.sh b/tests/lens-chrony.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-chrony.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cobblermodules.sh b/tests/lens-cobblermodules.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cobblermodules.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cobblersettings.sh b/tests/lens-cobblersettings.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cobblersettings.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-collectd.sh b/tests/lens-collectd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-collectd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cpanel.sh b/tests/lens-cpanel.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cpanel.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cron.sh b/tests/lens-cron.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cron.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-crypttab.sh b/tests/lens-crypttab.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-crypttab.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cups.sh b/tests/lens-cups.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cups.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-cyrus_imapd.sh b/tests/lens-cyrus_imapd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-cyrus_imapd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-darkice.sh b/tests/lens-darkice.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-darkice.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-debctrl.sh b/tests/lens-debctrl.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-debctrl.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-desktop.sh b/tests/lens-desktop.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-desktop.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-device_map.sh b/tests/lens-device_map.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-device_map.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dhclient.sh b/tests/lens-dhclient.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dhclient.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dhcpd.sh b/tests/lens-dhcpd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dhcpd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dnsmasq.sh b/tests/lens-dnsmasq.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dnsmasq.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dovecot.sh b/tests/lens-dovecot.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dovecot.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dpkg.sh b/tests/lens-dpkg.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dpkg.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-dput.sh b/tests/lens-dput.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-dput.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-erlang.sh b/tests/lens-erlang.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-erlang.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ethers.sh b/tests/lens-ethers.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ethers.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-exports.sh b/tests/lens-exports.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-exports.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-fai_diskconfig.sh b/tests/lens-fai_diskconfig.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-fai_diskconfig.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-fonts.sh b/tests/lens-fonts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-fonts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-fstab.sh b/tests/lens-fstab.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-fstab.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-fuse.sh b/tests/lens-fuse.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-fuse.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-gdm.sh b/tests/lens-gdm.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-gdm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-group.sh b/tests/lens-group.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-group.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-grub.sh b/tests/lens-grub.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-grub.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-gshadow.sh b/tests/lens-gshadow.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-gshadow.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-gtkbookmarks.sh b/tests/lens-gtkbookmarks.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-gtkbookmarks.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-host_conf.sh b/tests/lens-host_conf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-host_conf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-hostname.sh b/tests/lens-hostname.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-hostname.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-hosts.sh b/tests/lens-hosts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-hosts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-hosts_access.sh b/tests/lens-hosts_access.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-hosts_access.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-htpasswd.sh b/tests/lens-htpasswd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-htpasswd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-httpd.sh b/tests/lens-httpd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-httpd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-inetd.sh b/tests/lens-inetd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-inetd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-inifile.sh b/tests/lens-inifile.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-inifile.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-inittab.sh b/tests/lens-inittab.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-inittab.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-inputrc.sh b/tests/lens-inputrc.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-inputrc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-interfaces.sh b/tests/lens-interfaces.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-interfaces.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-iproute2.sh b/tests/lens-iproute2.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-iproute2.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-iptables.sh b/tests/lens-iptables.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-iptables.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-jaas.sh b/tests/lens-jaas.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-jaas.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-jettyrealm.sh b/tests/lens-jettyrealm.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-jettyrealm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-jmxaccess.sh b/tests/lens-jmxaccess.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-jmxaccess.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-jmxpassword.sh b/tests/lens-jmxpassword.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-jmxpassword.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-json.sh b/tests/lens-json.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-json.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-kdump.sh b/tests/lens-kdump.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-kdump.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-keepalived.sh b/tests/lens-keepalived.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-keepalived.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-known_hosts.sh b/tests/lens-known_hosts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-known_hosts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-koji.sh b/tests/lens-koji.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-koji.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-krb5.sh b/tests/lens-krb5.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-krb5.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ldap.sh b/tests/lens-ldap.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ldap.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ldif.sh b/tests/lens-ldif.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ldif.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ldso.sh b/tests/lens-ldso.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ldso.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-lightdm.sh b/tests/lens-lightdm.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-lightdm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-limits.sh b/tests/lens-limits.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-limits.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-login_defs.sh b/tests/lens-login_defs.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-login_defs.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-logrotate.sh b/tests/lens-logrotate.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-logrotate.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-logwatch.sh b/tests/lens-logwatch.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-logwatch.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-lokkit.sh b/tests/lens-lokkit.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-lokkit.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-lvm.sh b/tests/lens-lvm.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-lvm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-mcollective.sh b/tests/lens-mcollective.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-mcollective.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-mdadm_conf.sh b/tests/lens-mdadm_conf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-mdadm_conf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-memcached.sh b/tests/lens-memcached.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-memcached.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-mke2fs.sh b/tests/lens-mke2fs.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-mke2fs.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-modprobe.sh b/tests/lens-modprobe.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-modprobe.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-modules.sh b/tests/lens-modules.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-modules.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-modules_conf.sh b/tests/lens-modules_conf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-modules_conf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-mongodbserver.sh b/tests/lens-mongodbserver.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-mongodbserver.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-monit.sh b/tests/lens-monit.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-monit.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-multipath.sh b/tests/lens-multipath.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-multipath.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-mysql.sh b/tests/lens-mysql.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-mysql.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-nagioscfg.sh b/tests/lens-nagioscfg.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-nagioscfg.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-nagiosobjects.sh b/tests/lens-nagiosobjects.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-nagiosobjects.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-netmasks.sh b/tests/lens-netmasks.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-netmasks.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-networkmanager.sh b/tests/lens-networkmanager.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-networkmanager.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-networks.sh b/tests/lens-networks.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-networks.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-nginx.sh b/tests/lens-nginx.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-nginx.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-nrpe.sh b/tests/lens-nrpe.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-nrpe.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-nsswitch.sh b/tests/lens-nsswitch.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-nsswitch.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ntp.sh b/tests/lens-ntp.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ntp.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ntpd.sh b/tests/lens-ntpd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ntpd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-odbc.sh b/tests/lens-odbc.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-odbc.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-openshift_config.sh b/tests/lens-openshift_config.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-openshift_config.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-openshift_http.sh b/tests/lens-openshift_http.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-openshift_http.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-openshift_quickstarts.sh b/tests/lens-openshift_quickstarts.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-openshift_quickstarts.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-openvpn.sh b/tests/lens-openvpn.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-openvpn.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pagekite.sh b/tests/lens-pagekite.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pagekite.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pam.sh b/tests/lens-pam.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pam.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pamconf.sh b/tests/lens-pamconf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pamconf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-passwd.sh b/tests/lens-passwd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-passwd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pbuilder.sh b/tests/lens-pbuilder.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pbuilder.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pg_hba.sh b/tests/lens-pg_hba.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pg_hba.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-php.sh b/tests/lens-php.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-php.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-phpvars.sh b/tests/lens-phpvars.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-phpvars.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postfix_access.sh b/tests/lens-postfix_access.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postfix_access.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postfix_main.sh b/tests/lens-postfix_main.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postfix_main.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postfix_master.sh b/tests/lens-postfix_master.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postfix_master.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postfix_transport.sh b/tests/lens-postfix_transport.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postfix_transport.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postfix_virtual.sh b/tests/lens-postfix_virtual.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postfix_virtual.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-postgresql.sh b/tests/lens-postgresql.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-postgresql.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-properties.sh b/tests/lens-properties.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-properties.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-protocols.sh b/tests/lens-protocols.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-protocols.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-puppet.sh b/tests/lens-puppet.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-puppet.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-puppet_auth.sh b/tests/lens-puppet_auth.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-puppet_auth.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-puppetfileserver.sh b/tests/lens-puppetfileserver.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-puppetfileserver.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-pythonpaste.sh b/tests/lens-pythonpaste.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-pythonpaste.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-qpid.sh b/tests/lens-qpid.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-qpid.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-quote.sh b/tests/lens-quote.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-quote.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-rabbitmq.sh b/tests/lens-rabbitmq.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-rabbitmq.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-redis.sh b/tests/lens-redis.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-redis.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-reprepro_uploaders.sh b/tests/lens-reprepro_uploaders.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-reprepro_uploaders.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-resolv.sh b/tests/lens-resolv.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-resolv.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-rmt.sh b/tests/lens-rmt.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-rmt.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-rsyncd.sh b/tests/lens-rsyncd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-rsyncd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-rsyslog.sh b/tests/lens-rsyslog.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-rsyslog.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-rx.sh b/tests/lens-rx.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-rx.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-samba.sh b/tests/lens-samba.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-samba.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-schroot.sh b/tests/lens-schroot.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-schroot.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-securetty.sh b/tests/lens-securetty.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-securetty.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-services.sh b/tests/lens-services.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-services.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-shadow.sh b/tests/lens-shadow.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-shadow.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-shells.sh b/tests/lens-shells.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-shells.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-shellvars.sh b/tests/lens-shellvars.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-shellvars.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-shellvars_list.sh b/tests/lens-shellvars_list.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-shellvars_list.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-simplelines.sh b/tests/lens-simplelines.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-simplelines.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-simplevars.sh b/tests/lens-simplevars.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-simplevars.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sip_conf.sh b/tests/lens-sip_conf.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sip_conf.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-slapd.sh b/tests/lens-slapd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-slapd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-smbusers.sh b/tests/lens-smbusers.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-smbusers.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-solaris_system.sh b/tests/lens-solaris_system.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-solaris_system.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-soma.sh b/tests/lens-soma.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-soma.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-spacevars.sh b/tests/lens-spacevars.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-spacevars.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-splunk.sh b/tests/lens-splunk.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-splunk.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-squid.sh b/tests/lens-squid.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-squid.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-ssh.sh b/tests/lens-ssh.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-ssh.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sshd.sh b/tests/lens-sshd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sshd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sssd.sh b/tests/lens-sssd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sssd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-stunnel.sh b/tests/lens-stunnel.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-stunnel.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-subversion.sh b/tests/lens-subversion.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-subversion.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sudoers.sh b/tests/lens-sudoers.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sudoers.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sysconfig.sh b/tests/lens-sysconfig.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sysconfig.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sysconfig_route.sh b/tests/lens-sysconfig_route.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sysconfig_route.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-sysctl.sh b/tests/lens-sysctl.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-sysctl.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-syslog.sh b/tests/lens-syslog.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-syslog.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-systemd.sh b/tests/lens-systemd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-systemd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-thttpd.sh b/tests/lens-thttpd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-thttpd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-tuned.sh b/tests/lens-tuned.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-tuned.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-up2date.sh b/tests/lens-up2date.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-up2date.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-updatedb.sh b/tests/lens-updatedb.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-updatedb.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-util.sh b/tests/lens-util.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-util.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-vfstab.sh b/tests/lens-vfstab.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-vfstab.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-vmware_config.sh b/tests/lens-vmware_config.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-vmware_config.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-vsftpd.sh b/tests/lens-vsftpd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-vsftpd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-webmin.sh b/tests/lens-webmin.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-webmin.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-wine.sh b/tests/lens-wine.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-wine.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xendconfsxp.sh b/tests/lens-xendconfsxp.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xendconfsxp.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xinetd.sh b/tests/lens-xinetd.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xinetd.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xml.sh b/tests/lens-xml.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xml.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xorg.sh b/tests/lens-xorg.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xorg.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xymon.sh b/tests/lens-xymon.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xymon.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-xymon_alerting.sh b/tests/lens-xymon_alerting.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-xymon_alerting.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/lens-yum.sh b/tests/lens-yum.sh deleted file mode 100755 index 2916ac0..0000000 --- a/tests/lens-yum.sh +++ /dev/null @@ -1,16 +0,0 @@ -#! /bin/sh -# Run one lens test. -# Derive names of inputs from the name of this script. - -[ -n "$abs_top_srcdir" ] || abs_top_srcdir=$TOPDIR -LENS_DIR=$abs_top_srcdir/lenses - -me=`echo "$0"|sed 's,.*/lens-\(.*\)\.sh$,\1,'` - -t=$LENS_DIR/tests/test_$me.aug - -if [ -n "$VALGRIND" ] ; then - exec $VALGRIND $AUGPARSE --nostdinc -I "$LENS_DIR" "$t" -else - exec augparse --nostdinc -I "$LENS_DIR" "$t" -fi diff --git a/tests/modules/README b/tests/modules/README new file mode 100644 index 0000000..c3661a6 --- /dev/null +++ b/tests/modules/README @@ -0,0 +1,4 @@ +Modules that test the interpreter, particularly ones that make module +loading fail. + +Tests for actually shipping lenses should go into ../lenses/tests. diff --git a/tests/root/boot/grub/menu.lst b/tests/root/boot/grub/menu.lst deleted file mode 100644 index adb02f5..0000000 --- a/tests/root/boot/grub/menu.lst +++ /dev/null @@ -1,31 +0,0 @@ -# grub.conf generated by anaconda -# -# Note that you do not have to rerun grub after making changes to this file -# NOTICE: You have a /boot partition. This means that -# all kernel and initrd paths are relative to /boot/, eg. -# root (hd0,0) -# kernel /vmlinuz-version ro root=/dev/vg00/lv00 -# initrd /initrd-version.img -#boot=/dev/sda -default=0 -timeout=5 -splashimage=(hd0,0)/grub/splash.xpm.gz -hiddenmenu -title Fedora (2.6.24.4-64.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.4-64.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.4-64.fc8.img -title Fedora (2.6.24.3-50.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.3-50.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.3-50.fc8.img -title Fedora (2.6.21.7-3.fc8xen) - root (hd0,0) - kernel /xen.gz-2.6.21.7-3.fc8 - module /vmlinuz-2.6.21.7-3.fc8xen ro root=/dev/vg00/lv00 - module /initrd-2.6.21.7-3.fc8xen.img -title Fedora (2.6.24.3-34.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.3-34.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.3-34.fc8.img - savedefault diff --git a/tests/root/boot/grub/menu.lst b/tests/root/boot/grub/menu.lst new file mode 120000 index 0000000..26b9e1d --- /dev/null +++ b/tests/root/boot/grub/menu.lst @@ -0,0 +1 @@ +grub.conf \ No newline at end of file diff --git a/tests/root/etc/grub.conf b/tests/root/etc/grub.conf deleted file mode 100644 index adb02f5..0000000 --- a/tests/root/etc/grub.conf +++ /dev/null @@ -1,31 +0,0 @@ -# grub.conf generated by anaconda -# -# Note that you do not have to rerun grub after making changes to this file -# NOTICE: You have a /boot partition. This means that -# all kernel and initrd paths are relative to /boot/, eg. -# root (hd0,0) -# kernel /vmlinuz-version ro root=/dev/vg00/lv00 -# initrd /initrd-version.img -#boot=/dev/sda -default=0 -timeout=5 -splashimage=(hd0,0)/grub/splash.xpm.gz -hiddenmenu -title Fedora (2.6.24.4-64.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.4-64.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.4-64.fc8.img -title Fedora (2.6.24.3-50.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.3-50.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.3-50.fc8.img -title Fedora (2.6.21.7-3.fc8xen) - root (hd0,0) - kernel /xen.gz-2.6.21.7-3.fc8 - module /vmlinuz-2.6.21.7-3.fc8xen ro root=/dev/vg00/lv00 - module /initrd-2.6.21.7-3.fc8xen.img -title Fedora (2.6.24.3-34.fc8) - root (hd0,0) - kernel /vmlinuz-2.6.24.3-34.fc8 ro root=/dev/vg00/lv00 - initrd /initrd-2.6.24.3-34.fc8.img - savedefault diff --git a/tests/root/etc/grub.conf b/tests/root/etc/grub.conf new file mode 120000 index 0000000..2d258ce --- /dev/null +++ b/tests/root/etc/grub.conf @@ -0,0 +1 @@ +../boot/grub/grub.conf \ No newline at end of file diff --git a/tests/root/etc/httpd/conf.d/ssl.conf b/tests/root/etc/httpd/conf.d/ssl.conf new file mode 100644 index 0000000..9c8db1a --- /dev/null +++ b/tests/root/etc/httpd/conf.d/ssl.conf @@ -0,0 +1,222 @@ +# +# This is the Apache server configuration file providing SSL support. +# It contains the configuration directives to instruct the server how to +# serve pages over an https connection. For detailing information about these +# directives see +# +# Do NOT simply read the instructions in here without understanding +# what they do. They're here only as hints or reminders. If you are unsure +# consult the online docs. You have been warned. +# + +LoadModule ssl_module modules/mod_ssl.so + +# +# When we also provide SSL we have to listen to the +# the HTTPS port in addition. +# +Listen 443 + +## +## SSL Global Context +## +## All SSL configuration in this context applies both to +## the main server and all SSL-enabled virtual hosts. +## + +# Pass Phrase Dialog: +# Configure the pass phrase gathering process. +# The filtering dialog program (`builtin' is a internal +# terminal dialog) has to provide the pass phrase on stdout. +SSLPassPhraseDialog builtin + +# Inter-Process Session Cache: +# Configure the SSL Session Cache: First the mechanism +# to use and second the expiring timeout (in seconds). +SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000) +SSLSessionCacheTimeout 300 + +# Semaphore: +# Configure the path to the mutual exclusion semaphore the +# SSL engine uses internally for inter-process synchronization. +SSLMutex default + +# Pseudo Random Number Generator (PRNG): +# Configure one or more sources to seed the PRNG of the +# SSL library. The seed data should be of good random quality. +# WARNING! On some platforms /dev/random blocks if not enough entropy +# is available. This means you then cannot use the /dev/random device +# because it would lead to very long connection times (as long as +# it requires to make more entropy available). But usually those +# platforms additionally provide a /dev/urandom device which doesn't +# block. So, if available, use this one instead. Read the mod_ssl User +# Manual for more details. +SSLRandomSeed startup file:/dev/urandom 256 +SSLRandomSeed connect builtin +#SSLRandomSeed startup file:/dev/random 512 +#SSLRandomSeed connect file:/dev/random 512 +#SSLRandomSeed connect file:/dev/urandom 512 + +# +# Use "SSLCryptoDevice" to enable any supported hardware +# accelerators. Use "openssl engine -v" to list supported +# engine names. NOTE: If you enable an accelerator and the +# server does not start, consult the error logs and ensure +# your accelerator is functioning properly. +# +SSLCryptoDevice builtin +#SSLCryptoDevice ubsec + +## +## SSL Virtual Host Context +## + + + +# General setup for the virtual host, inherited from global configuration +#DocumentRoot "/var/www/html" +#ServerName www.example.com:443 + +# Use separate log files for the SSL virtual host; note that LogLevel +# is not inherited from httpd.conf. +ErrorLog logs/ssl_error_log +TransferLog logs/ssl_access_log +LogLevel warn + +# SSL Engine Switch: +# Enable/Disable SSL for this virtual host. +SSLEngine on + +# SSL Protocol support: +# List the enable protocol levels with which clients will be able to +# connect. Disable SSLv2 access by default: +SSLProtocol all -SSLv2 + +# SSL Cipher Suite: +# List the ciphers that the client is permitted to negotiate. +# See the mod_ssl documentation for a complete list. +SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM:+LOW + +# Server Certificate: +# Point SSLCertificateFile at a PEM encoded certificate. If +# the certificate is encrypted, then you will be prompted for a +# pass phrase. Note that a kill -HUP will prompt again. A new +# certificate can be generated using the genkey(1) command. +SSLCertificateFile /etc/pki/tls/certs/localhost.crt + +# Server Private Key: +# If the key is not combined with the certificate, use this +# directive to point at the key file. Keep in mind that if +# you've both a RSA and a DSA private key you can configure +# both in parallel (to also allow the use of DSA ciphers, etc.) +SSLCertificateKeyFile /etc/pki/tls/private/localhost.key + +# Server Certificate Chain: +# Point SSLCertificateChainFile at a file containing the +# concatenation of PEM encoded CA certificates which form the +# certificate chain for the server certificate. Alternatively +# the referenced file can be the same as SSLCertificateFile +# when the CA certificates are directly appended to the server +# certificate for convinience. +#SSLCertificateChainFile /etc/pki/tls/certs/server-chain.crt + +# Certificate Authority (CA): +# Set the CA certificate verification path where to find CA +# certificates for client authentication or alternatively one +# huge file containing all of them (file must be PEM encoded) +#SSLCACertificateFile /etc/pki/tls/certs/ca-bundle.crt + +# Client Authentication (Type): +# Client certificate verification type and depth. Types are +# none, optional, require and optional_no_ca. Depth is a +# number which specifies how deeply to verify the certificate +# issuer chain before deciding the certificate is not valid. +#SSLVerifyClient require +#SSLVerifyDepth 10 + +# Access Control: +# With SSLRequire you can do per-directory access control based +# on arbitrary complex boolean expressions containing server +# variable checks and other lookup directives. The syntax is a +# mixture between C and Perl. See the mod_ssl documentation +# for more details. +# +#SSLRequire ( %{SSL_CIPHER} !~ m/^(EXP|NULL)/ \ +# and %{SSL_CLIENT_S_DN_O} eq "Snake Oil, Ltd." \ +# and %{SSL_CLIENT_S_DN_OU} in {"Staff", "CA", "Dev"} \ +# and %{TIME_WDAY} >= 1 and %{TIME_WDAY} <= 5 \ +# and %{TIME_HOUR} >= 8 and %{TIME_HOUR} <= 20 ) \ +# or %{REMOTE_ADDR} =~ m/^192\.76\.162\.[0-9]+$/ +# + +# SSL Engine Options: +# Set various options for the SSL engine. +# o FakeBasicAuth: +# Translate the client X.509 into a Basic Authorisation. This means that +# the standard Auth/DBMAuth methods can be used for access control. The +# user name is the `one line' version of the client's X.509 certificate. +# Note that no password is obtained from the user. Every entry in the user +# file needs this password: `xxj31ZMTZzkVA'. +# o ExportCertData: +# This exports two additional environment variables: SSL_CLIENT_CERT and +# SSL_SERVER_CERT. These contain the PEM-encoded certificates of the +# server (always existing) and the client (only existing when client +# authentication is used). This can be used to import the certificates +# into CGI scripts. +# o StdEnvVars: +# This exports the standard SSL/TLS related `SSL_*' environment variables. +# Per default this exportation is switched off for performance reasons, +# because the extraction step is an expensive operation and is usually +# useless for serving static content. So one usually enables the +# exportation for CGI and SSI requests only. +# o StrictRequire: +# This denies access when "SSLRequireSSL" or "SSLRequire" applied even +# under a "Satisfy any" situation, i.e. when it applies access is denied +# and no other module can change it. +# o OptRenegotiate: +# This enables optimized SSL connection renegotiation handling when SSL +# directives are used in per-directory context. +#SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire + + SSLOptions +StdEnvVars + + + SSLOptions +StdEnvVars + + +# SSL Protocol Adjustments: +# The safe and default but still SSL/TLS standard compliant shutdown +# approach is that mod_ssl sends the close notify alert but doesn't wait for +# the close notify alert from client. When you need a different shutdown +# approach you can use one of the following variables: +# o ssl-unclean-shutdown: +# This forces an unclean shutdown when the connection is closed, i.e. no +# SSL close notify alert is send or allowed to received. This violates +# the SSL/TLS standard but is needed for some brain-dead browsers. Use +# this when you receive I/O errors because of the standard approach where +# mod_ssl sends the close notify alert. +# o ssl-accurate-shutdown: +# This forces an accurate shutdown when the connection is closed, i.e. a +# SSL close notify alert is send and mod_ssl waits for the close notify +# alert of the client. This is 100% SSL/TLS standard compliant, but in +# practice often causes hanging connections with brain-dead browsers. Use +# this only for browsers where you know that their SSL implementation +# works correctly. +# Notice: Most problems of broken clients are also related to the HTTP +# keep-alive facility, so you usually additionally want to disable +# keep-alive for those clients, too. Use variable "nokeepalive" for this. +# Similarly, one has to force some clients to use HTTP/1.0 to workaround +# their broken HTTP/1.1 implementation. Use variables "downgrade-1.0" and +# "force-response-1.0" for this. +SetEnvIf User-Agent ".*MSIE.*" \ + nokeepalive ssl-unclean-shutdown \ + downgrade-1.0 force-response-1.0 + +# Per-Server Logging: +# The home of a custom SSL log file. Use this when you want a +# compact non-error SSL logfile on a virtual host basis. +CustomLog logs/ssl_request_log \ + "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" + + + diff --git a/tests/root/etc/nginx/nginx.conf b/tests/root/etc/nginx/nginx.conf new file mode 100644 index 0000000..684ebe0 --- /dev/null +++ b/tests/root/etc/nginx/nginx.conf @@ -0,0 +1,117 @@ + +user nobody; +worker_processes 1; + +error_log logs/error.log; +error_log logs/error.log notice; +error_log logs/error.log info; + +pid logs/nginx.pid; + + +events { + worker_connections 1024; +} + + +http { + include mime.types; + default_type application/octet-stream; + + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for"'; + + access_log logs/access.log main; + + sendfile on; + tcp_nopush on; + + keepalive_timeout 0; + keepalive_timeout 65; + + gzip on; + + server { + listen 80; + server_name localhost; + + charset koi8-r; + + access_log logs/host.access.log main; + + location / { + root html; + index index.html index.htm; + } + + error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + + location ~ \.php$ { + proxy_pass http://127.0.0.1; + } + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + location ~ \.php$ { + root html; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + include fastcgi_params; + } + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + location ~ /\.ht { + deny all; + } + } + + + # another virtual host using mix of IP-, name-, and port-based configuration + + server { + listen 8000; + listen somename:8080; + server_name somename alias another.alias; + + location / { + root html; + index index.html index.htm; + } + } + + + # HTTPS server + # + server { + listen 443 ssl; + server_name localhost; + + ssl_certificate cert.pem; + ssl_certificate_key cert.key; + + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 5m; + + ssl_ciphers HIGH:!aNULL:!MD5; + ssl_prefer_server_ciphers on; + + location / { + root html; + index index.html index.htm; + } + } + +} diff --git a/tests/root/lvm.conf~ b/tests/root/lvm.conf~ deleted file mode 100644 index 5cafa99..0000000 --- a/tests/root/lvm.conf~ +++ /dev/null @@ -1,59 +0,0 @@ -# Generated by LVM2 version 2.02.95(2)-RHEL6 (2012-10-16): Tue Apr 23 22:51:14 2013 - -contents = "Text Format Volume Group" -version = 1 - -description = "Created *before* executing '/sbin/vgs --noheadings -o name --config 'log{command_names=0 prefix=\" \"}''" - -creation_host = "host.example.com" # Linux host.example.com 2.6.32-279.11.1.el6.x86_64 #1 SMP Sat Sep 22 07:10:26 EDT 2012 x86_64 -creation_time = 1366757474 # Tue Apr 23 22:51:14 2013 - -vg_system { - id = "5dtHTQ-pvA6-s1r0-Iqck-Cc34-GDdt-MJK782" - seqno = 2 - format = "lvm2" # informational - status = ["RESIZEABLE", "READ", "WRITE"] - flags = [] - extent_size = 8192 # 4 Megabytes - max_lv = 0 - max_pv = 0 - metadata_copies = 0 - - physical_volumes { - - pv0 { - id = "AOXPQ6-hkrg-2z0g-FiJN-DvLk-aySL-0qrH5P" - device = "/dev/vda3" # Hint only - - status = ["ALLOCATABLE"] - flags = [] - dev_size = 20445184 # 9.74902 Gigabytes - pe_start = 2048 - pe_count = 2495 # 9.74609 Gigabytes - } - } - - logical_volumes { - - lv_root { - id = "pm03oc-AehK-DcvV-PvOj-1fzC-FWYc-qvDcAS" - status = ["READ", "WRITE", "VISIBLE"] - flags = [] - creation_host = "host.example.com" - creation_time = 1366757292 # 2013-04-23 22:48:12 +0000 - segment_count = 1 - - segment1 { - start_extent = 0 - extent_count = 2495 # 9.74609 Gigabytes - - type = "striped" - stripe_count = 1 # linear - - stripes = [ - "pv0", 0 - ] - } - } - } -} diff --git a/tests/run.tests b/tests/run.tests index 39f8153..c74b644 100644 --- a/tests/run.tests +++ b/tests/run.tests @@ -440,13 +440,13 @@ test set-escaped-path-bracket 2 set /white\ space/\[section value print /white\ space/\[section prints - /white space/[section = "value" + /white\ space/\[section = "value" test set-squote-escaped-bracket 2 set '/augeas/\[section' value print '/augeas/\[section' prints - /augeas/[section = "value" + /augeas/\[section = "value" test set-squote-escaped-path 2 set '/white\ space' value diff --git a/tests/test-api.c b/tests/test-api.c index 9367c27..cc2cc87 100644 --- a/tests/test-api.c +++ b/tests/test-api.c @@ -625,6 +625,23 @@ static void testTextRetrieve(CuTest *tc) { CuAssertStrEquals(tc, hosts, hosts_out); } +static void testAugEscape(CuTest *tc) { + static const char *const in = "a/[]b|=c()!, \td"; + static const char *const exp = "a\\/\\[\\]b\\|\\=c\\(\\)\\!\\,\\ \\\td"; + char *out; + struct augeas *aug; + int r; + + aug = aug_init(root, loadpath, AUG_NO_STDINC|AUG_NO_LOAD); + CuAssertPtrNotNull(tc, aug); + + r = aug_escape_name(aug, in, &out); + CuAssertRetSuccess(tc, r); + + CuAssertStrEquals(tc, out, exp); + free(out); +} + int main(void) { char *output = NULL; CuSuite* suite = CuSuiteNew(); @@ -643,6 +660,7 @@ int main(void) { SUITE_ADD_TEST(suite, testToXml); SUITE_ADD_TEST(suite, testTextStore); SUITE_ADD_TEST(suite, testTextRetrieve); + SUITE_ADD_TEST(suite, testAugEscape); abs_top_srcdir = getenv("abs_top_srcdir"); if (abs_top_srcdir == NULL) diff --git a/tests/test-put-symlink-augsave.sh b/tests/test-put-symlink-augsave.sh index c6a1d16..2f470cd 100755 --- a/tests/test-put-symlink-augsave.sh +++ b/tests/test-put-symlink-augsave.sh @@ -17,7 +17,7 @@ mkdir -p $(dirname $ATTACK_FILE) cat < $HOSTS 127.0.0.1 localhost EOF -HOSTS_SUM=$(sum $HOSTS) +HOSTS_SUM=$(sum $HOSTS | cut -d ' ' -f 1) touch $ATTACK_FILE (cd $(dirname $HOSTS) && ln -s ../other/attack $(basename $HOSTS).augsave) @@ -37,7 +37,7 @@ if [ -h $HOSTS_AUGSAVE ] ; then exit 1 fi -if [ ! "x${HOSTS_SUM}" = "x$(sum $HOSTS_AUGSAVE)" ]; then +if [ ! "x${HOSTS_SUM}" = "x$(sum $HOSTS_AUGSAVE | cut -d ' ' -f 1)" ]; then echo "/etc/hosts.augsave has changed from the original /etc/hosts" exit 1 fi diff --git a/tests/test-save.c b/tests/test-save.c index 698baf7..4b6470f 100644 --- a/tests/test-save.c +++ b/tests/test-save.c @@ -296,6 +296,86 @@ static void testUmask022(CuTest *tc) { testUmask(tc, 0022, 0644); } +/* Test that handling of 'strange' characters in path names works as + * expected. In particular, that paths with characters that have special + * meaning in path expressions are escaped properly. + * + * This test isn't all that specific to save, but since these tests set up + * a copy of tests/root/ that is modifiable, it was convenient to put this + * test here. + */ +static void testPathEscaping(CuTest *tc) { + /* Path expression with characters escaped */ + static const char *const weird = + "/files/etc/sysconfig/network-scripts/ifcfg-weird\\ \\[\\!\\]\\ \\(used\\ to\\ fail\\)"; + /* Path without any escaping */ + static const char *const weird_no_escape = + "/files/etc/sysconfig/network-scripts/ifcfg-weird [!] (used to fail)"; + + char *fname = NULL, *s = NULL; + const char *v; + int r; + + /* Construct the file name in the file system and check the file is there */ + r = asprintf(&fname, "%s%s", root, weird_no_escape + strlen("/files")); + CuAssertPositive(tc, r); + + r = access(fname, R_OK); + CuAssertIntEquals(tc, 0, r); + + /* Make sure weird is in the tree */ + r = aug_match(aug, weird, NULL); + CuAssertIntEquals(tc, 1, r); + + /* Make sure we can get to the metadata about weird */ + r = asprintf(&s, "/augeas%s/path", weird); + CuAssertPositive(tc, r); + + r = aug_get(aug, s, &v); + CuAssertIntEquals(tc, 1, r); + CuAssertStrEquals(tc, weird_no_escape, v); + + /* Delete it from the tree and save it; make sure it gets removed + from the file system */ + r = aug_rm(aug, weird); + CuAssertPositive(tc, r); + + r = aug_save(aug); + CuAssertRetSuccess(tc, r); + + r = access(fname, R_OK); + CuAssertIntEquals(tc, -1, r); + CuAssertIntEquals(tc, ENOENT, errno); +} + +/* Test that we handle failure to save a file because we lack permission on + * the target file is handled gracefully. + * + * As reported in https://github.com/hercules-team/augeas/issues/178, this + * used to lead to a SEGV + */ +static void testSaveNoPermission(CuTest *tc) { + int r; + char *path = NULL; + const char *v; + + r = asprintf(&path, "%s/etc/hosts", root); + CuAssertPositive(tc, r); + + r = aug_set(aug, "/files/etc/hosts/1/alias[1]", "othername"); + CuAssertRetSuccess(tc, r); + + r = chmod(path, 0); + CuAssertRetSuccess(tc, r); + + r = aug_save(aug); + CuAssertIntEquals(tc, -1, r); + + r = aug_get(aug, "/augeas/files/etc/hosts/error", &v); + CuAssertIntEquals(tc, 1, r); + CuAssertStrEquals(tc, "replace_from_missing", v); +} + int main(void) { char *output = NULL; CuSuite* suite = CuSuiteNew(); @@ -314,6 +394,7 @@ int main(void) { CuSuiteSetup(suite, setup, teardown); + SUITE_ADD_TEST(suite, testSaveNoPermission); SUITE_ADD_TEST(suite, testSaveNewFile); SUITE_ADD_TEST(suite, testRemoveNoPermission); SUITE_ADD_TEST(suite, testNonExistentLens); @@ -324,6 +405,7 @@ int main(void) { SUITE_ADD_TEST(suite, testUmask077); SUITE_ADD_TEST(suite, testUmask027); SUITE_ADD_TEST(suite, testUmask022); + SUITE_ADD_TEST(suite, testPathEscaping); CuSuiteRun(suite); CuSuiteSummary(suite, &output); diff --git a/tests/test-valgrind.sh b/tests/test-valgrind.sh new file mode 100755 index 0000000..c000e44 --- /dev/null +++ b/tests/test-valgrind.sh @@ -0,0 +1,20 @@ +#! /bin/bash + +# Run the tests in lenses/tests through valgrind and report which ones leak +set -e + +TOPDIR=$(cd $(dirname $0)/.. && pwd) +[[ -n "$top_builddir" ]] || top_builddir=$TOPDIR +[[ -n "$top_srcdir" ]] || top_srcdir=$TOPDIR + + +AUGPARSE="libtool --mode=execute valgrind -q --leak-check=full ${top_builddir}/src/augparse" +LENS_DIR=${top_srcdir}/lenses +TESTS=$LENS_DIR/tests/test_*.aug + +for t in $TESTS +do + echo Run $(basename $t .aug) + set +e + ${AUGPARSE} --nostdinc -I $LENS_DIR $t +done diff --git a/tests/xpath.tests b/tests/xpath.tests index 41bb555..e89cf98 100644 --- a/tests/xpath.tests +++ b/tests/xpath.tests @@ -278,7 +278,7 @@ test union (/files/etc/yum.conf | /files/etc/yum.repos.d/*)/*/gpgcheck # Paths with whitespace in them test php1 $php/mail function - /files/etc/php.ini/mail function + /files/etc/php.ini/mail\ function test php2 $php[mail function] /files/etc/php.ini @@ -287,10 +287,10 @@ test php3 $php[count(mail function) = 1] /files/etc/php.ini test php4 $php/mail function/SMTP - /files/etc/php.ini/mail function/SMTP = localhost + /files/etc/php.ini/mail\ function/SMTP = localhost test php5 $php/mail\ function - /files/etc/php.ini/mail function + /files/etc/php.ini/mail\ function test expr-or /files/etc/group/root/*[self::gid or self::user] /files/etc/group/root/gid = 0 @@ -315,3 +315,19 @@ test ctx_file etc/network/interfaces test ctx_file_pred etc/network/interfaces/iface[. = "lo"] /files/etc/network/interfaces/iface[1] = lo + +# Test matching with characters that need escaping in the filename +test escape1 /files/etc/sysconfig/network-scripts/* + /files/etc/sysconfig/network-scripts/ifcfg-eth0 + /files/etc/sysconfig/network-scripts/ifcfg-wlan0 + /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\ \(used\ to\ fail\) + /files/etc/sysconfig/network-scripts/ifcfg-Auto_FRITZ\!Box_Fon_WLAN_7112 + /files/etc/sysconfig/network-scripts/ifcfg-lo + /files/etc/sysconfig/network-scripts/ifcfg-Auto-ALICE-WLAN38_\(automatisch\) + /files/etc/sysconfig/network-scripts/ifcfg-br0 + +test escape2 /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\ \(used\ to\ fail\)/DEVICE + /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\ \(used\ to\ fail\)/DEVICE = weird + +test escape3 /files/etc/sysconfig/network-scripts/*[DEVICE = 'weird'] + /files/etc/sysconfig/network-scripts/ifcfg-weird\ \[\!\]\ \(used\ to\ fail\) -- 2.7.4